# Session 17 - 26.09.20 Extrapolation for Pierrot Ensemble

## Recommended Posts

Hi folks,

Here's the files from this session showing my process for a work in progress " Extrapolation" for Pierrot Ensemble.

You will find also exceptionally the video recording.

All this material is shared here for study purpose naturally, please, don't use it "as this" but use this material as an example to inspire yourself and help you to construct your own workflow and algorithms.

All the best and happy Opusmodus-ing

Stéphane

##### Share on other sites

Thank you Stephane for these sessions and resources.

We each have our individual composition goals and OpusModus is a great tool to help address our challenges. Understanding how to effectively apply OpusModus to take on our challenges requires insight and experience and your generosity to share your process is invaluable. We can glean so much from this lesson. Thank you for including the recordings of the session.

##### Share on other sites

Thank you very much Stephane, your sessions are a valuable source of Opusmodus and music composition material.

##### Share on other sites
• 1 month later...

Thanks, Stephane. This session is very educational! I have a quick question about the first "simplified" process-example you introduced and discussed in the video.

I understand that there're eight measures set by the size variable. And that each of the eight measures introduces new material generated by make-omn. What would be the easiest way to adjust the code below so that each new measure is repeated a set number of times, either a fixed number of repetitions or changing (controlled)? I tried using the gen-repeat function, after gen-loop but it didn't seem to work.

Thank you!

```(setf size 8)
(setf ph1 (ambitus
'(g3 g6)
(filter-tie
(make-omn
:pitch (gen-loop size (interval-ambitus 6 (rnd-sample 12 (make-scale 'd4 12 :alt '(2 1 3)))))
:length (gen-loop size  (length-legato (rnd-sample 4 '(s -s))))
:velocity (rnd-pick '((pp)(p)(mp)(mf)(f)))
))))```

##### Share on other sites

Is this what you are looking for:

```(setf ph1 (ambitus
'(g3 g6)
(filter-tie
(make-omn
:pitch (gen-loop size (interval-ambitus 6 (rnd-sample 12 (make-scale 'd4 12 :alt '(2 1 3)))))
:length (gen-loop size (length-legato (rnd-sample 4 '(s -s))))
:velocity (rnd-sample 12 '((pp)(p)(mp)(mf)(f)))
:span :pitch
))))```

By default the span in length. If you wan't pitch to be the master then :span :pitch will do the trick.

##### Share on other sites
```(setf size 8)
(setf ph1 (ambitus
'(g3 g6)
(filter-tie
(make-omn
:pitch (gen-loop size (interval-ambitus 6 (rnd-sample 12 (make-scale 'd4 12 :alt '(2 1 3)))))
:length (gen-loop size (length-legato (rnd-sample 4 '(s -s))))
:velocity (rnd-pick '((pp)(p)(mp)(mf)(f)))
))))

;;; Controled repetitions of ph1 with vector-map (with index numbers)
(setf reps1 (vector-map  ph1 '(0 0 1 3 3 3 2 3 4 3 2 4 5 6 6 7 7 7)))

;;; Apply variations to this repetitions with unfold:
(setf reps1.proc (unfold 'om '((ld23 (4 5 6 12 16))(ld24 (2 8 13 16))(t4 (1 3 5 7))) reps1))```

##### Share on other sites

Stéphane,

Might you be willing to share the add-interval-if-length function required for your Extrapolation example, or point out where to look for it?

Thank you once again,

Zvony

##### Share on other sites

Hi,

here it is:

```;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package :Opusmodus)
;;; USAGE
#|
(setf seq '((e c4 p stacc d4 stacc e4 stacc f4 stacc q g4 g3)
(q c4 mf e c6 b5 a5 g5 f5 d5)
(s e4 f4 e4 d4 q g4 b4 d5)
(q g5 ff marc g4 marc h c5 )))

; with default parameters
(add-interval-if-length '(1/4 c4 d4 e4 1/8 e4 f4))
; with specified condition
; with specifird conditions en length value specification
(add-interval-if-length seq :condition '= :length-val '1/4)
|#

;;; VERSION REVISEE PAR TORSTEN
;;; ==============================================
;;; UTILITY FUNCTIONS
;;;
(defun add-interval-if-length-aux (omn &key (test #'>) (length-val 1/8) (interval-list '(4 3 4 7 4 3 5 4 7 3)))
(let ((s-events (single-events omn)))
(loop
for e in s-events
for i in (gen-trim (length s-events) interval-list)
when (funcall test (omn-encode (first e)) length-val)
append (omn-replace :pitch (chord-interval-add (list i) (list (second e))) e)
else append e)))

;(add-interval-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '(10 11))

;;; =============================
;;; MAIN FUNCTION
(defun add-interval-if-length (omn &key (test #'>) (length-val 1/8) (interval-list '(4 3 4 7 4 3 5 4 7 3)))
(let ((test-fn (case test
(> #'>)
(< #'<)
(= #'=)
(otherwise test))))
(if (listp (car omn))
(mapcar #'(lambda (x)
(add-interval-if-length-aux x :test test-fn :length-val (omn-encode length-val) :interval-list interval-list))
omn)
(add-interval-if-length-aux omn :test test-fn :length-val (omn-encode length-val) :interval-list interval-list)))))

;(add-interval-if-length '((q c4 d4 e4 f4 e g4 a4) (e f4 e4 q d4 c4 a4 g4 f4)) :interval-list '(10 11))
;(add-interval-if-length '((q c4 d4 e4 f4 e g4 a4) (e f4 e4 q d4 c4 a4 g4 h f4)) :interval-list '(3 4) :test #'>= :length-val 'q)

```

##### Share on other sites

Stéphane,

Sorry for another question. I'm experimenting with several ideas - very inspiring session! Instead of white noise vectors for dens-tend, I tried using a pitch row instead (see psets) to control various parameters in the piece. I used pitch-to-integer to get the numerical representation of pitches. The code below works most of the time:

```(setf size (car (rnd-number 1 12 32)))

(setf psets '(c4 fs4 g4 e4 gs4 f4 a4 cs5 ds5 as4 d5 b4))

;;; RHYTHM

(setf dens-tend (pitch-to-integer psets))
(setf dens1 (vector-round 0 100 (gen-tendency size dens-tend)))
(setf dens2 (vector-round 0 100 (gen-tendency size dens-tend)))
(setf dens3 (vector-round 0 100 (gen-tendency size dens-tend)))
(setf dens4 (vector-round 0 100 (gen-tendency size dens-tend)))
(setf dens5 (vector-round 0 100 (gen-tendency size dens-tend)))
(setf dens6 (vector-round 0 100 (gen-tendency size dens-tend)))```

However, occasionally when evaluating dens1 - dens 6  produces an error message:

```> Error: 0.0 is not a greater than zero number.
> While executing: (:internal rnd-variance1 rnd-variance), in process Listener-1(7).```

Any reason why this happens? Again, it occurs only sometimes.

Thank you!

##### Share on other sites

Hi,

The values for density control has to be between something greater than 0, for example 0.01, and 1.00.

Here's a better code:

``` (setf size (car (rnd-number 1 12 32)))

(setf psets '(c4 fs4 g4 e4 gs4 f4 a4 cs5 ds5 as4 d5 b4))

;;; RHYTHM

(setf dens-tend (vector-round 0.01 1.00 (pitch-to-integer psets)))
(setf dens1 (vector-round 0 100 (gen-tendency size dens-tend)))
(setf dens2 (vector-round 0 100 (gen-tendency size dens-tend)))
(setf dens3 (vector-round 0 100 (gen-tendency size dens-tend)))
(setf dens4 (vector-round 0 100 (gen-tendency size dens-tend)))
(setf dens5 (vector-round 0 100 (gen-tendency size dens-tend)))
(setf dens6 (vector-round 0 100 (gen-tendency size dens-tend)))```

SB.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account. ×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×

• Lessons