Jump to content

Opusmodus 2.0 release soon!


Recommended Posts

Opusmodus 2.0 - New Functions:

 

POLYPHONY

 

The POLYPHONY function allows you to modify unwanted events (interval, velocity or attribute) in a musical texture consisting of two or more simultaneous lines (voices). The unwanted pitch can be removed with (p) symbol (pause), replaced with the an octave (o) of the leading voice or replaced with an interval value in relation to the leading voice pitch.

 

Dictum form:

(<interval><pitch-event><velocity><attribute>) in that order.

 

Dictum examples

If true:

(7 p)

7 - test interval

p - pause

 

(7 o)

7 - test interval

o - octave

 

(7 t)

7 - test interval

t - replaced with the leading voice pitch value

 

(7 p t)

7 - test interval

p - pause

t - replaced with the leading voice velocity value

 

(7 ? mp t)

7 - test interval

? -  at random, octave or pause

pp - velocity set to pp

t - replaced with the leading voice attribute value

 

(1 13 mp stacc)

1 - test interval

13 - interval replacement in relation to the leading voice pitch

mp - velocity set to mp

stacc - attribute set to stacc

 

(7 (6 13) t t)

7 - test interval

(6 13) - at random, 6 or 13

t - replaced with the leading voice velocity value

t - replaced with the leading voice attribute value

 

Leading

The leading option is a voice number from which the iteration process will start. If the leading voice is not defined or set to NIL then the first voice in the voice list becomes the leading voice.

 

Iterate

The iterate option allows us to control the iteration of the polyphony process. Each repetition of the process is a single iteration, and the outcome of each iteration is then the starting point of the next iteration.

 

If iterate is set to T the process is iterated until all voices complete the process consecutively applying the process each time to the result of the previous polyphony process:

 

1 (leading voice) on  2 3 4

2  on  3 4

3  on  4

 

If iterate is set to NIL (default) only a single iteration from the leading voice is triggered:

 

1  (leading voice)  on  2 3 4

 

Examples:

I.

(setf v1 '((e c4 d4  e4  f4  g4 a4  b4  c5)))
(setf v2 '((e g4 eb4 fs4 a4  c5 eb5 fs5 a5)))
(setf v3 '((e c4 eb4 f4  as4 c5 e5  fs5 ab5)))
(setf v4 '((e a5 fs5 eb5 c5  a4 fs4 e4  c4)))

(setf voices (list v1 v2 v3 v4))

BCA450AB-FAD5-437E-96C3-9E23E1198E4B.png

 

 

By default the 1st voice in the list is a leading voice from which the POLYPHONY test will start.

(polyphony '(7 p) voices)
=> (((e c4 d4  e4  f4  g4 a4  b4 c5))
    ((-e   eb4 fs4 a4  c5 eb5 -  a5))
    ((e c4 eb4 f4  as4 c5 -   - ab5))
    ((e a5 fs5 eb5 -   a4 fs4 - c4)))

 

After POLYPHONY test:

D94CC693-4EAD-40E9-8C90-2A2E899F022F.png

 

II.

(setf
s1 '((e c4 p ten+leg d4 pp leg e4 mp f4 p g4 pp a4  b4 f c5))
s2 '((e g4 mp        eb4 p     fs4   a4   c5 mf eb5 fs5  a5))
s3 '((e c4 mp        eb4 p     f4    as4  c5    e5  fs5  ab5))
s4 '((e a5 mp        fs5 p     eb5   c5   a4    fs4 e4   c4)))

(setf seq (list s1 s2 s3 s4))

1B262CDD-8B79-4CF6-85C6-2FC489A2CAB9.png

 

 

If true the pitch will be replaced with the an octave of the leading voice and velocity and articulation event will be replaced with the leading voice events respectively.

(polyphony '(7 o t t) seq)

FBA80910-DDBA-4B3C-B28A-142E87F5A871.png

 

 

(polyphony '((7 6 t t) (1 -13 t t)) seq)

54E96755-8E74-4A98-899B-8AB6D46D02AB.png

 

 

III.

(setf p1 '(q d4 pp s eb4 leg g4 p leg bb4 leg a4 q. cs5 mf -e
           3q gs5 leg fs5 leg c5 b4 ff leg f4 leg e4))

(setf p2 '(t d4 p leg eb4 leg g4 leg bb4 f q. a4 marc
           t fs4 mf leg gs4 leg e. c5 e b4 t f5 leg e5 leg
             d5 leg eb5 f 3q bb5 a4 bb5 e a4 pp stacc -e))

(setf p3 '(q d5 leg eb5 3q g4 stacc bb4 stacc a4 stacc e. cs4 marc
           s gs4 leg q gs4 -q))

(setf p4 '(q. fs5 pp 3e c5 leg b4 leg f4 e d5 mf s eb5 leg g5 leg
              bb5 leg a5 e fs5 leg fs5 3e gs4 > stacc c5 stacc
              b5 stacc t f5 pp e.. e5))


(setf patterns (list p1 p2 p3 p4))

52498DE3-8B21-4E48-9F2B-46C045ED411E.png

 

 

The intervals 7, 10 and 11 if found in POLYPHONY will turn to a pause for the length of its value.

(polyphony '((7 p) (10 p) (11 p)) patterns)

3C0890CB-5B8E-4C67-9F68-E35E77072895.png

 

 

Instead of turning the unwanted interval to a pause, we set the pitch-event to (o) which will replace the pitch with an octave value, taken from the leading voice.

(polyphony '((7 o) (10 o) (11 o)) patterns)

13D0FA86-CEFE-49C0-802C-BF76011BDCAE.png

 

 

 

I the next example the 3rd voice is set to a leading voice. If true, the velocity and the articulation will be replaced with the values of the leading voice. In this example we set the :iterate to T.

(polyphony '((7 0 t t) (10 o t t) (11 o t t)) patterns :leading 3 :iterate t)

261244EC-1B4F-4D52-87A2-142F128CDDD0.png

 

 

(polyphony '((7 6 t t) (2 10 t t) (1 13 t t)) patterns :leading 2)

462C7433-99EF-4E2B-95F1-FD894B13CF1C.png

 

 

 

 


COUNTERPOINT

 

This function designates patterns to a number of voices with defined methods for each voice. The voices in the COUNTERPOINT dictum list are in sequential numerical order.

 

In the dictum below the 1st voice is assigned to the 1st pattern, the 2nd voice to the 2nd pattern, the 3rd voice to the 1st pattern and the 4th voice to the 2nd pattern.

 

Dictum:

((1 2 1 2) :methods (- - (ri dl.5) (r dl.2)) :polyphony (7 p) :iterate t)

 

voices:       1 2 3 4

patterns:   1 2 1 2

 

Patterns:

(setf p01 '((-5h 5w. e6 5h bb3 -e bb3 q e5 bb4 -) (-q)
           (-5h b5 5w c5 5h b4 q c6 - 3h b4 - -) (-q)))
(setf p02 '((q. f6 -e q. fs6 -e -5h - 5w. b6) (-q)
           (-3h 3w b5 -3h 3w bb6 5w b5 -5h - -) (-q)))
(setf patterns (list p01 p02))

(counterpoint
 patterns
 '(((1 2 1 2) :methods (- - (ri dl.5) (r dl.2)))))

B8FA17F1-0BB6-4A43-A9F1-C98D79BFBB47.png

 

 

Methods

Each of the voices use their own methods which are defined in the DEF-UNFOLD-SET library. The method symbols are method names used in UNFOLD function. In our example we use the default set 'om which can be found in the Utilities/Library/Default-Unfold-Sets library. It is imperative to understand how the unfold sets are created and how they are working. This will allow you to define your own libraries with your own method names and functions.

 

Let us examine in more detail the methods we are using in our dictum. In the first and second voice the symbol (-) method means, no method is defined (the pattern in the specified voice is unchanged). In the third voice we apply the retrograde-inversion first, then we scale the density of the pattern to 0.5 (mid density) with a length-legato. In the fourth voice we apply retrograde first, then we scale the density of the pattern to 0.2 (low density) with a length-legato.

 

Lets add two more dictums to our example:

(counterpoint
 patterns
 '(((1 2 1 2) :methods (- - (ri dl.5) (r dl.2)))
   ((2 2 1 2) :methods (d.8 (d.8 >) (r dl.2) (d.3 ri)))
   ((2 1 2 2) :methods ((dl.7 t-13) (dl.5 <>) (ri dl.4) (dl.3 r t-7)))))

 

Copy the expressions from above to the Composer panel, evaluate each of them and call the ⌘2 shortcut to audition the result.

In the next four voices COUNTERPOINT example we use 8 patterns with a number of dictum lists.

 

Patterns:

(setf p1 '(5q. d3 f cs2 pp 5q d1 mp bb1
           5q gs1 p a2 f - eb2 5e e3 pp gs2
           7e d2 f c2 ff 7q cs3 mf eb3 f - d4 7e c4 bb3 pp 7q e3))
(setf p2 '(7q f2 ff bb2 mp e3 f eb4 7e e3 mp f4 p 7q b3 ppp g4 pp
           7q cs4 mp g3 mf 7e. a3 p pp 7q. gs3 mp -7q -
           7q g4 p 7e cs5 f g4 7q cs4 mp c5 7e fs5 g6 pp 7q cs7 mf -))
(setf p3 '(5q. cs5 mf 5e. d6 ppp fs5 5q c6 mp cs5 p
           5q. g4 mp b3 5q f3 b2 f
           5q. f2 f b2 mp 5q eb2 mf 5e d1 f eb2))
(setf p4 '(5q. d2 f cs1 p -5q g1 mp
           5q f1 p fs2 mf - 5e c2 p fs2 mf gs2 p g1 f
           7q gs2 mp g1 gs2 p 7e g1 f f1 mf -7q b1 f f2 mp))
(setf p5 '(3q e3 bb3 ff 3e b4 mp c6 ff q d6 ff e gs6 a7))
(setf p6 '(e cs5 pp d6 ppp
           3q gs6 ff bb6 3e c7 pp b7 f
           3e bb6 mp a5 3q b5 pp f5 ppp))
(setf p7 '(e e2 pp bb1 mp b2 ppp g1 ff 5h f2 p 5q b2 g2 gs3 mp))
(setf p8 '(q f4 mf fs5 pp f5 ff))

 

Span

The span option will overwrite the original pattern span with a given length. If the original pattern is longer than the span then the pattern is shortened and vice versa. The span applies to all voices in the list. The symbol (-) in a voice list means the voice is paused for the length of the pattern. All patterns in a voice list will align to the longest (span) pattern in the voice list. If the pattern is shorter than the longest pattern the length-rests will be inserted at the end of the pattern.

 

Extend

The extend option allows you to place the additional length-rests at the start of the pattern with the symbol (s).

 

Polyphony

The polyphony option allows you to avoid unwanted intervals in the voice polyphony and modify the velocity or attributes (articulations) values. The unwanted interval can be removed with (p) symbol (pause), replaced with an octave (o) of the leading voice or be replaced with an interval value in relation to the leading voice pitch.

 

Leading

The leading option is a voice number from which the iteration process will start. If the leading voice is not defined or set to NIL then the first voice in the voice list becomes the leading voice.

 

Iterate

The iterate option allows us to control the iteration of the polyphony process. Each repetition of the process is a single iteration, and the outcome of each iteration is then the starting point of the next iteration.

 

If iterate is set to T the process is iterated until all voices complete the process consecutively applying the process each time to the result of the previous polyphony process:

 

1 (leading voice) on  2 3 4

2  on  3 4

3  on  4

 

If iterate is set to NIL (default) only a single iteration from the leading voice is triggered:

 

1  (leading voice)  on  2 3 4

 

Globals

The global-methods and global-polyphony option is used at the end of the process if a global process is required to an individual voice sequence.

 

Examples:

(setf voices
      (counterpoint
       (list p1 p2 p3 p4 p5 p6 p7 p8)
       '(((- 7 1 -) :span 5/4 :methods (- (i dl.7) (dl.7 r) -) :polyphony (7 p) :leading 3)
         ((- 6 3 8) :span 3/4 :methods (- ri (t7 >) <) :polyphony (7 p))
         ((7 2 5 -) :span 3/4 :methods ((d.4 r) - ri -) :polyphony (7 p))
         ((6 3 8 -) :span 3/2 :methods (d.2 < i -) :polyphony (7 p))
         ((- 5 - -) :span 5/4 :methods (- (i d.8) - -))
         ((4 8 - 4) :span 3/2 :methods (- ri - ri) :polyphony (7 p))
         ((- - - 4) :span 3/2 :methods (- - - ><))
         ((8 - 4 8) :span 5/4 :methods ((i > d.2) (d.2) (d.2) (d.2)) :polyphony (7 p))
         ((- 3 8 -) :span 5/4 :methods (- (dl.2 i) <> -) :polyphony (7 p))
         ((3 8 - 4) :span 3/2 :methods (< - - <>) :polyphony ((7 p) (1 p) (11 p)))
         (- :span 3/4)
         ((- 6 - 8) :methods (- > - ><) :polyphony (7 ?))
         ((- - 4 6) :methods (- - > (d.2 ll)) :polyphony (7 ?))
         ((- 4 8 3) :methods (- - - v?) :polyphony (7 p) :leading 4)
         ((- 4 6 8) :methods (- d.2 - (d.8 <>)) :polyphony (7 ?))
         ((6 - 8 -) :methods ((i > d.3) - > -) :polyphony (7 ?))
         ((3 8 - 4) :methods (- ri - (d.2 r ll)) :polyphony (7 ?))
         ((1 2 - 3) :methods (>< (d.8 <>) - -) :polyphony (7 ?)))
       :global-methods '((fl)      ;voice 1
                         (t12 cl)  ;voice 2
                         (hn)      ;voice 3
                         (t-12 vc) ;voice 4
      )))

 

 In the PS function we assign each voice to an instrument and the ASSEMBLE-VOICES function helps us to extract a particular voice number:

(ps 'gm
    :fl (list (assemble-voices 1 voices))
    :cl (list (assemble-voices 2 voices))
    :hn (list (assemble-voices 3 voices))
    :vc (list (assemble-voices 4 voices))
    :octave-shift '(c2 a6)
    :tempo (gen-tempo '(44 72 88) '(5 7 11)
                      (assemble-voices 1 voices) :seed 34)
    :time-signature '(3 4)
    )

 

 

 

 


GEN-DICTUM

 

This function allows you to generate a list of voices with a number of optional dictum methods. This function is a companion to the COUNTERPOINT function.

 

The simplest use of the function:

(gen-dictum '((6 - 1 2) (3 2 1 6) (- 1 2 3) (2 1 6 2)))
=> (((6 - 1 2) :span nil :extend nil :methods nil :polyphony nil :leading nil :iterate nil)
    ((3 2 1 6) :span nil :extend nil :methods nil :polyphony nil :leading nil :iterate nil)
    ((- 1 2 3) :span nil :extend nil :methods nil :polyphony nil :leading nil :iterate nil)
    ((2 1 6 2) :span nil :extend nil :methods nil :polyphony nil :leading nil :iterate nil))

 

Examples:

In the examples below we use the GEN-PROB and RND-ORDER functions to generate the voice lists and the optional dictum values:

(setf voice-weight '((1 .4) (2 .2) (3 .4) (4 .3) (5 .2) (6 .3) (- .5)))

(setf voices (gen-eval 12 '(gen-prob 4 voice-weight) :seed 34))
=> ((- 3 4 -) (6 5 4 3) (3 4 - 1) (5 4 3 4)
    (4 - 1 3) (4 3 4 1) (- 1 3 3) (3 4 1 6)
    (1 3 3 4) (4 1 6 2) (3 3 4 3) (1 6 2 4))

(setf span-weight '((3/4 .3) (6/4 .2) (5/4 .5)))

(setf span (flatten (gen-eval 12 '(gen-prob 1 span-weight) :seed 53)))
=> (5/4 5/4 5/4 3/2 3/2 5/4 5/4 3/4 5/4 5/4 3/4 5/4)

(setf extend (gen-eval 12 '(rnd-order '(s - s -) :encode nil) :seed 27))
=> ((- - s s) (- - s s) (- - s s) (- - s s)
    (- s s -) (- s - s) (s s - -) (- s s -)
    (s - s -) (- s s -) (- s s -) (- s s -))

(gen-dictum voices :span span :extend extend :print t)

 

Listener:

(setf
name
'(
   #|1|# ((- 3 4 -) :span 5/4 :extend (- - s s) :methods nil :polyphony nil :leading nil :iterate nil)
   #|2|# ((6 5 4 3) :span 5/4 :extend (- - s s) :methods nil :polyphony nil :leading nil :iterate nil)
   #|3|# ((3 4 - 1) :span 5/4 :extend (- - s s) :methods nil :polyphony nil :leading nil :iterate nil)
   #|4|# ((5 4 3 4) :span 3/2 :extend (- - s s) :methods nil :polyphony nil :leading nil :iterate nil)
   #|5|# ((4 - 1 3) :span 3/2 :extend (- s s -) :methods nil :polyphony nil :leading nil :iterate nil)
   #|6|# ((4 3 4 1) :span 5/4 :extend (- s - s) :methods nil :polyphony nil :leading nil :iterate nil)
   #|7|# ((- 1 3 3) :span 5/4 :extend (s s - -) :methods nil :polyphony nil :leading nil :iterate nil)
   #|8|# ((3 4 1 6) :span 3/4 :extend (- s s -) :methods nil :polyphony nil :leading nil :iterate nil)
   #|9|# ((1 3 3 4) :span 5/4 :extend (s - s -) :methods nil :polyphony nil :leading nil :iterate nil)
   #|10|# ((4 1 6 2) :span 5/4 :extend (- s s -) :methods nil :polyphony nil :leading nil :iterate nil)
   #|11|# ((3 3 4 3) :span 3/4 :extend (- s s -) :methods nil :polyphony nil :leading nil :iterate nil)
   #|12|# ((1 6 2 4) :span 5/4 :extend (- s s -) :methods nil :polyphony nil :leading nil :iterate nil)
   )
)

 

To use the output of the function from above as a counterpoint template, we copy the result from the Listener panel and paste it into the COUNTERPOINT function:

(counterpoint
 patterns
 '(
   #|1|# ((- 3 4 -) :span 5/4 :extend (- - s s) :methods nil :polyphony nil :leading nil :iterate nil)
   #|2|# ((6 5 4 3) :span 5/4 :extend (- - s s) :methods nil :polyphony nil :leading nil :iterate nil)
   #|3|# ((3 4 - 1) :span 5/4 :extend (- - s s) :methods nil :polyphony nil :leading nil :iterate nil)
   #|4|# ((5 4 3 4) :span 3/2 :extend (- - s s) :methods nil :polyphony nil :leading nil :iterate nil)
   #|5|# ((4 - 1 3) :span 3/2 :extend (- s s -) :methods nil :polyphony nil :leading nil :iterate nil)
   #|6|# ((4 3 4 1) :span 5/4 :extend (- s - s) :methods nil :polyphony nil :leading nil :iterate nil)
   #|7|# ((- 1 3 3) :span 5/4 :extend (s s - -) :methods nil :polyphony nil :leading nil :iterate nil)
   #|8|# ((3 4 1 6) :span 3/4 :extend (- s s -) :methods nil :polyphony nil :leading nil :iterate nil)
   #|9|# ((1 3 3 4) :span 5/4 :extend (s - s -) :methods nil :polyphony nil :leading nil :iterate nil)
   #|10|# ((4 1 6 2) :span 5/4 :extend (- s s -) :methods nil :polyphony nil :leading nil :iterate nil)
   #|11|# ((3 3 4 3) :span 3/4 :extend (- s s -) :methods nil :polyphony nil :leading nil :iterate nil)
   #|12|# ((1 6 2 4) :span 5/4 :extend (- s s -) :methods nil :polyphony nil :leading nil :iterate nil)
   ))

 

 

 

 


MAKE-DICTUM

 

The MAKE-DICTUM macro generates a counterpoint template with a number of dictum lists. Every list contains a list of voices and methods ready to be defined by the composer. This function is a companion to the COUNTERPOINT function.

 

Examples:

(make-dictum 4 12)

 

The result in the Listener:

(counterpoint
patterns
'(
   #|1|# ((- - - -) :span nil :extend nil :methods (- - - -) :polyphony nil :leading nil :iterate nil)
   #|2|# ((- - - -) :span nil :extend nil :methods (- - - -) :polyphony nil :leading nil :iterate nil)
   #|3|# ((- - - -) :span nil :extend nil :methods (- - - -) :polyphony nil :leading nil :iterate nil)
   #|4|# ((- - - -) :span nil :extend nil :methods (- - - -) :polyphony nil :leading nil :iterate nil)
   #|5|# ((- - - -) :span nil :extend nil :methods (- - - -) :polyphony nil :leading nil :iterate nil)
   #|6|# ((- - - -) :span nil :extend nil :methods (- - - -) :polyphony nil :leading nil :iterate nil)
   #|7|# ((- - - -) :span nil :extend nil :methods (- - - -) :polyphony nil :leading nil :iterate nil)
   #|8|# ((- - - -) :span nil :extend nil :methods (- - - -) :polyphony nil :leading nil :iterate nil)
   #|9|# ((- - - -) :span nil :extend nil :methods (- - - -) :polyphony nil :leading nil :iterate nil)
   #|10|# ((- - - -) :span nil :extend nil :methods (- - - -) :polyphony nil :leading nil :iterate nil)
   #|11|# ((- - - -) :span nil :extend nil :methods (- - - -) :polyphony nil :leading nil :iterate nil)
   #|12|# ((- - - -) :span nil :extend nil :methods (- - - -) :polyphony nil :leading nil :iterate nil)
   )
:global-methods '(- - - -)
:global-polyphony nil
)

 

Depending on your rules and methods the defined counterpoint template could look something like this:

(setf Sec-A
(counterpoint
  patterns
  '(
    #|1|# ((2 - 7 4) :span nil :extend nil :methods (d.2 - v? -))
    #|2|# ((4 10 9 10) :span nil :extend nil :methods (- d.6 - (d.4 r)))
    #|3|# ((- 4 8 9) :span nil :extend nil :methods (- d.2 - ri))
    #|4|# ((- 13 - 12) :span nil :extend nil :methods (- i - t6))
    #|5|# ((- - - 13) :span nil :extend nil :methods (- - - d.7))
    #|6|# ((9 12 - -) :span nil :extend nil :methods (i d.8 - -))
    #|7|# ((- 1 7 11) :span nil :extend nil :methods (- ri r i))
    #|8|# ((10 4 3 1) :span nil :extend nil :methods (i > - <))
    #|9|# ((8 8 - 8) :span nil :extend nil :methods (>< <> - d.3))
    #|10|# ((1 8 - 3) :span nil :extend nil :methods (v? (d.6 i) - d.3))
    #|11|# ((- 3 9 4) :span nil :extend nil :methods (- - i -))
    #|12|# ((8 13 9 -) :span nil :extend nil :methods (d.6 d.3 d.2 -)))
  :global-methods '((dyn fl) (dyn cl) (t-12 dyn hn) (t-12 dyn vc))
  :global-polyphony '(7 p)))

 

 

 

 


ASSEMBLE-VOICES

 

ASSEMBLE-VOICES is a twofold operation function. If the index value is a number, the function returns a list of that number. If the index value is a name the function will set indexed variable names to all the voices in the list. The index value set to NIL will return all voices in the list. The assembling of the voices is made by the matrix-transpose operation on a list of lists. This function is a companion to the COUNTERPOINT function.

 

Examples:

(setf sec-a
      (counterpoint
       patterns
       '(((5 - - -))
         ((4 - - -))
         ((2 - - -))
         ((3 - - -))
         (- :span 2/4))
       :global-methods '((dyn fl) - - -)))
(setf sec-b
      (counterpoint
       patterns
       '(((- 5 2 -) :span 3/4 :methods (- ri - -))
         ((- 2 2 6) :span 3/4 :methods (- > (dl.3) -))
         ((5 1 - 5) :span 3/4 :methods (- (dl.2) - i))
         ((1 2 6 3) :span 2/4 :methods (< ri i -))
         ((- 1 5 3) :span 5/4 :methods (- > t7 i))
         ((2 6 3 -) :span 3/4 :methods (- < - ri))
         ((5 5 8 3) :span 3/4 :methods ((dl.3 i) >< > -))
         ((3 3 - 4) :span 2/4 :methods ((i >) (dl.2 i) - (dl.3)))
         ((- 7 - 7) :span 3/4 :methods (- i - (t-12 ri)))
         ((4 6 6 8) :span 2/4 :methods (< (dl.2) r -))
         (- :span 2/4))
       :global-methods '((dyn fl)
                         (dyn cl)
                         (t-12 dyn hn)
                         (t-12 dyn vc))))
(setf sec-c
      (counterpoint
       patterns
       '(((7 4 - 5) :methods (< > i v?) :extend (s - s -))
         ((- 3 4 -) :methods (- < > -) :extend (s - s -))
         ((2 - 8 1) :methods (- - - v?) :extend (s - s -))
         ((8 8 6 6) :methods (< > - (dl.2 i)) :extend (s - s -))
         ((- 3 3 -) :methods (- i (dl.2) -) :extend (s - s -))
         ((- 4 8 -) :methods (- (ri dl.2) > -) :extend (s - s -))
         ((1 2 2 3) :methods (< > i -) :extend (s - s -)))
       :global-methods '((dyn fl)
                         (dyn cl)
                         (t-12 dyn hn)
                         (t-12 dyn vc))))
(setf sec-d
      (counterpoint
       patterns
       '(((- 3 - -) :methods (- - - -))
         ((- 2 - -) :methods (- - - -))
         ((- 4 - -) :methods (< - - -))
         ((1 1 1 1) :methods (>< <> (r dl.2) (i dl.2))))
       :global-methods '((dyn fl) (dyn cl) (dyn hn) (dyn vc))))

 

Returns 1st voice from all sections:

(assemble-voices 1 sec-a sec-b sec-c)

 

Returns 4th voice from all sections:

(assemble-voices 4 sec-a sec-b sec-c)

 

Sets indexed variable names to all voices in the sections:

(assemble-voices 'vox sec-a sec-b sec-c)
=> (vox1 vox2 vox3 vox4)

 

 

 

 


CHORALIS

 

The function CHORALIS returns four voice polyphony (soprano, alto, tenor and bass) by sorting the voices and taking the closest path to the previous chord. There are three path options: closest, relative and comparative.

 

The ambitus for each voice can be defined with the ambitus option. The default ambitus for bass is (-20 5), for tenor (-10 9), for alto (-7 14) and for soprano (2 21). The ambitus form is: '((-20 5) (-10 9) (-7 14) (2 21)) or '(bass tenor alto soprano).

 

The interval option, defines the largest interval step in a voice.

 

Each of the voices can be modified by methods which are defined in the DEF-UNFOLD-SET library. The method symbols are method names used in the UNFOLD function. The default set 'om can be found in the Utilities/Library/Default-Unfold-Sets library.

 

The methods can be applied to a bar and events.

Transposition 6 applied to 6th bar:

(t5 6)

 

Transposition -12 applied to 4th bar, events 1 and 2 only:

(t-12 4 (1 2))

 

The edit option allows to replace the entire bar with a new events. This option is useful for creating a melodic movement in a voice.

Number of chords in a omn-form should be one:

(h g4b4d5)

 

To repeat a voice polyphony we add an additional length value:

(q e4g4b4 q)
(q g4bb4d5 q q q)

 

Examples:

I.

(setf chords
      '((w c4e4g4) (h g4b4d5) (h c4e4g4) (-h) (q e4g4b4 q)
        (q a4c5e5 mp leg q leg) (q g4b4d5 leg) (q f4a4c5) (w d4f4a4)
        (w a4cs5e5 mf) (-q) (q d4f4a4 q q) (q a4c5e5) (h c4e4g4) (h d4f4a4)
        (q d4fs4a4 leg q leg q) (h g4b4d5 h) (-q) (q bb4d5f5 q q)
        (w eb4g4bb4) (-q) (q c4eb4g4 q) (q g4bb4d5) (h c4eb4g4) (h bb4d5f5)
        (w f4a4c5 h) (-q) (q d4fs4a4) (q g4bb4d5 q q q) (h d4fs4a4 h)
        (-q) (q g4bb4d5) (h c4eb4g4) (h g4bb4d5) (h d4fs4a4 h) (h. g4bb4d5)
        (-q) (w g4bb4d5) (h d4f4a4 h) (-q) (q a4c5e5) (q a4c5e5) (q a4c5e5)
        (h c4eb4g4) (h c4eb4g4) (h g4bb4d5) (q g4bb4d5) (q g4bb4d5)
        (h d4f4a4) (h d4f4a4) (-q) (q d4f4a4 mf) (q a4c5e5 f) (q d4f4a4 p)
        (h. b4d5fs5 p) (q d4f4a4 mp) (q f4a4c5 q q q) (w e4g4b4) (h a4c5e5)
        (-h) (h d4fs4a4) (q d4fs4a4 q) (h g4b4d5) (h g4b4d5) (h e4g4b4)
        (q e4g4b4) (q e4g4b4) (h. c4e4g4) (q c4e4g4) (h f4a4c5)
        (q f4a4c5) (q bb4d5f5) (h. g4b4d5) (q c4e4g4) (h a4cs5e5)
        (h d4f4a4) (q g4b4d5) (q d4fs4a4) (w g4b4d5 p) (w g4b4d5 pp)))
  
(choralis chords
          :rotation 1
          :index 'v
          :interval 8
          :path '?
          :seed 826083
          :methods
          '(:sop ((t5 6) (t-4 (31 32) (3 1)) (t-12 32 2))
            :ten ((t4 (31 32) (3 1)))
            :bass ((t-12 (1 2 3)) (t-12 4 (1 2)))))
  
(ps 'gm :satb (list v1 v2 v3 v4)
    :flexible-clef nil
    :tempo 60)

30FC74FE-0CD2-4CC7-99FB-67C7E51F8875.png

 

II.

Example with edit option:

(progn
  (choralis
   '((w a4c5e5 p<)
     (w g4bb4db5 mp< :r 3)
     (q a4c5eb5 < :r 15)
     (q a4c5eb5 f)
     (q a4c5eb5 > :r 16)
     (w e4g4bb4 > :r 2)
     (w a4c5e5 pp :r 2))
   :rotation '?
   :path 'relative
   :index 'voice
   :methods '(
              :sop dyn
              :alt dyn
              :ten dyn
              :bass dyn
              )
   :edit '(
           :alt ((q as4 p c5 f4 e4) 2)
           :ten ((q as4 p c5 eb5 as4) 3)
           :bass ((q a3 p c4 f3 eb3) 4)
          )
   :seed 45
   )
  
  (ps 'gm :satb (list voice1 voice2 voice3 voice4)
      :time-signature '(4 4)
      :flexible-clef nil
      :tempo 60)
  )

22856F16-CCA2-4D32-BDA8-F498DBF4F366.png

 

 

 

 


GEN-CHORALIS

 

This function allows you to generate a list of CHORALIS chords with optional velocity and attributes values. This function is a companion to the CHORALIS function.

 

Examples:

I.

(setf bartok '(c4eb4g4 c4e4g4 db4fs4a4 eb4g4bb4 e4g4bb4
               fs4a4c5 bb4c5ds5 a4c5eb5 a4c5e5 b4db5fs5))

(setf chords (rnd-sample 31 bartok :seed 857438))
=> (fs4a4c5 a4c5e5 b4db5fs5 b4db5fs5 b4db5fs5 c4e4g4
    db4fs4a4 fs4a4c5 bb4c5ds5 b4db5fs5 b4db5fs5 b4db5fs5
    eb4g4bb4 b4db5fs5 c4eb4g4 c4eb4g4 e4g4bb4 c4e4g4
    eb4g4bb4 b4db5fs5 bb4c5ds5 bb4c5ds5 db4fs4a4
    a4c5eb5 c4eb4g4 a4c5eb5 c4e4g4 a4c5e5 db4fs4a4
    c4eb4g4 fs4a4c5)

(setf lengths (gen-prob 31 '((h .4) (q .2) (h. .4) (q .3)
                             (-h .2) (-q .3) (w .5)) :seed 441896))
=> (-1/2 1 1/4 1 -1/4 3/4 1 1 -1/2 3/4 1/4 1/2 3/4 1 1/2 1
    1/4 1/2 1/2 1/4 -1/4 1/4 1/2 1/4 1 3/4 -1/4 1 -1/2 1/2 1)

(setf velocity (gen-prob 31 '((p .4) (mp .4) (mf .3) (f .2)) :seed 435))
=> (mp f f mf mp mp mp p p p mp p mf mp f mp
    mf p mp mf f f mf p p mf mp f mf f p)

(setf chords (gen-choralis lengths chords :velocity velocity))
=> ((-h) (w fs4a4c5 mp) (q a4c5e5 f) (w b4db5fs5 f) (-q) (h. b4db5fs5 mf)
    (w b4db5fs5 mp) (w c4e4g4 mp) (-h) (h. db4fs4a4 mp) (q fs4a4c5 p)
    (h bb4c5ds5 p) (h. b4db5fs5 p) (w b4db5fs5 mp) (h b4db5fs5 p)
    (w eb4g4bb4 mf) (q b4db5fs5 mp) (h c4eb4g4 f) (h c4eb4g4 mp)
    (q e4g4bb4 mf) (-q) (q c4e4g4 p) (h eb4g4bb4 mp) (q b4db5fs5 mf)
    (w bb4c5ds5 f) (h. bb4c5ds5 f) (-q) (w db4fs4a4 mf) (-h)
    (h a4c5eb5 p) (w c4eb4g4 p))

(choralis chords
          :index 'v
          :seed 653886
          :methods '(:sop dyn
                     :alt dyn
                     :ten dyn
                     :bass dyn))

(ps 'gm :satb (list v1 v2 v3 v4)
    :flexible-clef nil
    :time-signature '(4 4)
    :tempo 60)

645430A4-9E88-4E0F-A155-6925A154D358.png

 

II.

Microtonal example with quarter and eighth tone intervals:

(setf mbartok '(c4eb4-g4 c4e4g4+ db4fs4+a4 eb4-..g4bb4 e4g4bb4-
                fs4a4+c5. bb4c5ds5 a4c5.eb5 a4c5e5+ b4+db5fs5))

(setf mchords (rnd-sample 31 mbartok :seed 857438))
(setf chords2 (gen-choralis lengths mchords :velocity velocity))

(choralis chords2
          :index 'm
          :seed 653886
          :methods '(:sop dyn
                     :alt dyn
                     :ten dyn
                     :bass dyn))

(ps 'vsl :satb (list m1 m2 m3 m4)
    :flexible-clef nil
    :time-signature '(4 4)
    :tempo 60)

96D14015-3890-4DBA-B079-1DE349D7AFAF.png

 

 

 

 


TONNETZ

 

The principal transformations of neo-Riemannian triadic theory connect triads (major and minor), and are their own inverses (a second application undoes the first). These transformations are purely harmonic, and do not need any particular voice leading between chords: all instances of motion from a C major to a C minor triad represent the same neo-Riemannian transformation, no matter how the voices are distributed in register.

 

The three transformations move one of the three notes of the triad to produce a different triad:

 

  • The P transformation exchanges a triad for its Parallel. In a Major Triad move the third down a semitone (C major to C minor), in a Minor Triad move the third up a semitone (C minor to C major)

 

  • The R transformation exchanges a triad for its Relative. In a Major Triad move the fifth up a tone (C major to A minor), in a Minor Triad move the root down a tone (A minor to C major)

 

  • The L transformation exchanges a triad for its Leading-Tone Exchange. In a Major Triad the root moves down by a semitone (C major to E minor), in a Minor Triad the fifth moves up by a semitone (E minor to C major).

 

Observe that P preserves the perfect fifth interval (so given say C and G there are only two candidates for the third note: E and Eb), L preserves the minor third interval (given E and G our candidates are C and B) and R preserves the major third interval (given C and E our candidates are G and A).

 

Secondary operations can be constructed by combining these basic operations:

 

  • The N (or Nebenverwandt) relation exchanges a major triad for its minor subdominant, and a minor triad for its major dominant (C major and F minor). The N transformation can be obtained by applying R, L, and P successively.

 

  • The S (or Slide) relation exchanges two triads that share a third (C major and Cs minor); it can be obtained by applying L, P, and R successively in that order.

 

  • The H relation (LPL) exchanges a triad for its hexatonic pole (C major and Ab minor)

Any combination of the L, P, and R transformations will act inversely on major and minor triads: for instance, R-then-P transposes C major down a minor third, to A major via A minor, whilst transposing C minor to Eb minor up a minor 3rd via Eb major.

 

Neo-Riemannian transformations can be modelled with several interrelated geometric structures. The Riemannian Tonnetz (‘tonal grid’, shown below) is a planar array of pitches along three simplicial axes, corresponding to the three consonant intervals. Major and minor triads are represented by triangles which tile the plane of the Tonnetz. Edge-adjacent triads share two common pitches, and so the principal transformations are expressed as minimal motion of the Tonnetz.

 

 

Post-Riemann.png.9f408dd5d4242ac16983b53415a18372.png

 

 

One step transformation (basic transformations):

P (parallel)

R (relative)

L (leading)

 

Secondary One step transformation (combine transformations):

N (RLP)

S (LPR)

H (LPL)

 

Two step transformations:

Parallel: PR and PL

Relative: RL and RP

Leading: LR and LP

 

Three step transformations:

Parallel: PLR and PRL

Relative: RLP and RPL

Leading: LPR and LRP

 

Reflection:

PLR and RLP are equal.

PRL and LRP are equal.

RPL and LPR are equal.

 

Examples:

(tonnetz 'c4e4g4 '(p p r r l l))
=> (c4e4g4 c4eb4g4 c4e4g4 c4e4a4 c4e4g4 b3e4g4 c4e4g4)
(tonnetz '(c4 e4 g4) '(p p r r l l))
=> ((c4 e4 g4) (c4 eb4 g4) (c4 e4 g4) (c4 e4 a4)
    (c4 e4 g4) (b3 e4 g4) (c4 e4 g4))
(tonnetz 'e4g4b4 '(l r l r p l r l r p))
=> (e4g4b4 e4g4c5 e4a4c5 f4a4c5 f4a4d5 fs4a4d5 fs4a4cs5
    e4a4cs5 e4gs4cs5 e4gs4b4 e4g4b4)
(tonnetz 'ab3c4eb4 '(p l p l p l p l))
=> (ab3c4eb4 gs3b3eb4 gs3b3e4 g3b3e4 g3c4e4 g3c4eb4 gs3c4eb4
    gs3b3eb4 gs3b3e4)
(tonnetz 'ab3c4eb4 '(pl pl pl pl))
=> (ab3c4eb4 gs3b3e4 g3c4e4 gs3c4eb4 gs3b3e4)
(tonnetz 'c4e4g4 '(p r p r p r p r))
=> (c4e4g4 c4eb4g4 bb3eb4g4 bb3eb4fs4 bb3cs4fs4 a3cs4fs4
    a3cs4e4 a3c4e4 g3c4e4)
(tonnetz '(ab4 m) '(p n l s l n))
=> (ab4b4eb5 gs4c5eb5 gs4cs5e5 a4cs5e5 bb4cs5f5 bb4cs5fs5 b4d5fs5)
(setf moves (rnd-order '(p l r lr lp rp rl pr pl plr prl rpl) :seed 26))
=> (rp rl rpl pr prl lr r p plr pl lp l)

(tonnetz 'c4e4g4 moves)
=> (c4e4g4 cs4e4a4 d4fs4a4 eb4fs4bb4 eb4g4c5 f4a4c5 e4g4c5
    e4a4c5 e4a4cs5 f4a4d5 fs4a4cs5 f4a4d5 f4bb4d5)
(setf transitions '(p l r lr lp rp rl pr pl plr prl rpl prlpr lrplprpp))

(setf rnd-transition (rnd-sample 15 transitions :seed 750989))
=> (prlpr r r p pl pl lrplprpp lr prlpr rpl lp rl prl rl rpl)

(tonnetz 'ab3c4eb4 rnd-transition))
=> (ab3c4eb4 g3c4eb4 g3bb3eb4 g3c4eb4 g3c4e4 gs3c4eb4 gs3b3e4
    f3bb3d4 f3a3c4 e3a3c4 eb3gs3c4 e3g3c4 f3a3c4 eb3g3c4
    d3g3bb3 cs3fs3bb3)
(tonnetz '(c maj) '(plp rpr lpl rpr lpl lpl rprp lpl))
=> (c4e4g4 b3eb4gs4 a3d4fs4 bb3cs4f4 gs3b3e4 g3c4eb4 gs3b3e4 bb3d4f4 a3cs4fs4)
(progn
  (setf transitions '(p l r lr lp rp rl pr pl plr prl rpl prlpr lrplprpp))
  (setf rnd-transition (rnd-sample 15 transitions :seed 750989))
  (setf tonnetz (tonnetz '(ab5 m) rnd-transition))
  (setf chords (gen-choralis '(w h h h h h h h h h h h h h h w) tonnetz))

  (choralis chords
            :rotation -1
            :index 'v
            :interval 6
            :path '?
            :seed 570136
            )
  
  (ps 'gm :satb (list v1 v2 v3 v4)
      :flexible-clef nil
      :tempo 60)
  )

DFA4C959-DC3C-4FC3-A5C4-D0A78209B487.png

 

 

 

 


DENSITY

The DENSITY function will increase or decrease the number of events in a sequence. It will allow you on the fly to change the density and expression of the pattern without changing the original sequence span.

 

(setf pattern '(e f4 e4 c4 - a4 g4 d4 - ab4 db4 eb4 - gb4 bb4 b4 -))

619EB781-FD66-4B60-B88C-C08CAA1C8886.png

To find out the density of a sequence we call the GET-DENSITY function:

(get-density pattern :type :length)
=> 0.38

 

Let’s set the density of the sequence to a 0.9 value.  This will increase the number of events, knowing the original density is 0.38:

(density .9 pattern :seed 45)
=> (s f4 f4 e4 t t s c4 c4 -e s a4 a4 g4 t t s d4 t t -e
    s ab4 ab4 t db4 db4 s t eb4 eb4 s -e s gb4 gb4 bb4 bb4 b4 b4 -e)

 

CBC8C724-9CD3-4EF6-BAE3-CD5FF480E70B.png

 

The intervals option allows you to define intervals to align with newly created lengths.

(density .9 pattern :intervals '(0 6 1 6) :seed 45)
=> (s f4 b4 e4 t bb4 e5 s c4 fs4 -e s a4 eb5 g4 t cs5 g5
    s d4 t gs4 d5 -e s gs4 d5 t cs4 g4 s t eb4 a4 s -e
    s fs4 c5 bb4 e5 b4 f5 -e)

D118A3EE-6F79-44ED-8ACA-FDAD46D184FA.png

 

In the next example we set the density value to 0.5:

(density .5 pattern :seed 45)
=> (e f4 s e4 e4 e c4 - a4 g4 d4 - s ab4 ab4
    e db4 s eb4 eb4 -e gb4 bb4 s b4 b4 -e)

CD2EB5A7-8934-4E43-BBBA-AA706FE24372.png

 

Below is an example with a low density value 0.2. This will decrease (swallow) a number of events from the sequence:

(density .2 pattern :seed 45)
=> (e f4 mf - c4 - a4 g4 d4 -q e db4 -h.)

EF02689A-0BFB-438C-B702-6880DEFF2473.png

 

The legato option will extend the length-note with a sum of length-rests in sequence:

(density .2 pattern :seed 45 :legato t)
=> (q f4 c4 e a4 g4 q. d4 h.. db4)

9BD68767-964F-455A-90B5-6C500733071C.png

 

Examples:

(setf sequence '((s eb1 p g2 cs3 f e3 mp bb3 g3 a3 b3 3h d4 eb4 d4 p)
                 (3h cs4 p b3 f bb3 e a3 mf bb3 gs3 g3)
                 (q g3 pp 3h gs3 3q q bb3 5h mp b3 5q c4 p tie)
                 (5q c4 p 5h b3 b3 q bb3 mp e bb3 a3 5h. a3 5h gs3 p)
                 (q gs3 mf 5h. gs3 5h g3 5q g3 g3 fs3 fs3 mp f3 s f3 - f3 =)))

99B39B7F-4F22-4690-90D6-010B7E7AFD98.png

 

 

Original density:

(get-density sequence :type :length)
=> (0.69 0.44 0.44 0.5 0.69)
(density '(1.0 .95 .8 .75 .8) sequence
          :intervals '(0 13 1 11) :seed 23)

 

B1E17A7C-98A0-43DA-A39A-8EBDC7AA62C0.png

 

 

(density '(.3 .1 .1 .2 .1 .2) sequence :seed 23)

C2676281-7BF3-419D-A41A-4D12CA5C376A.png

 

 

(density '(.3 .1 .1 .2 .1 .2) sequence :legato t :seed 23)

2721BD9C-48B0-41E5-AF60-6EA0759BD53E.png

 

 

 


MICROTONALITY

 

Microtone pitch symbols and values:

+                       1/4

-                      -1/4

.   with sharp          1/8

..  with sharp          3/8

.   with flat          -1/8

..  with flat          -3/8

+.  with flat or sharp  1/8

+.. with flat or sharp  3/8

-.  with flat or sharp -1/8

-.. with flat or sharp -3/8

 

Quarter tone

'(q a4 a4+ as4 as4+ b4 b4- bb4 bb4- a4)

Pasted Graphic.png

 

Eight tone

'(q a4 a4. a4+ a4.. as4 as4. as4+ b4-. b4
    b4-. b4- b4-.. bb4 bb4. bb4- a4. a4)

Pasted Graphic 1.png

 

Chord

'(w c4ds4+g4as4+)

Pasted Graphic 2.png

 

Integer, interval and midi microtone values:

 

0.5   =  1/4 tone

0.25  =  1/8 tone

 

Transposition

(pitch-transpose 2.5 '((a4 a4+ b4 d5) (e5 e5+ fs5 a5)))
=> ((fs4+ g4 gs4+ b4+) (cs5+ d5 ds5+ fs5+))

Pasted Graphic 3.png

 

In the next example we generate a row of quarter tones using RND-ROW function with optional :quantize 1/4. If :quantize is set to 1/8 value, the function will return 8th tone row with 48 values.

(setf mat (rnd-row :quantize 1/4 :type :pitch :seed 34))
=> (c4 g4 ds4+ cs4 d4+ b4+ f4+ a4+ gs4+ e4+ b4 as4+
    e4 bb4 cs4+ a4 d4 g4+ fs4+ eb4 c4+ gs4 fs4 f4)

Pasted Graphic 4.png

 

 

Intervals

(pitch-to-interval mat)
=> (7 -3.5 -2.5 1.5 9 -6 4 -1 -4 6.5 0.5 -6.5
    6 -8.5 7.5 -7 5.5 -1 -3.5 -2.5 7.5 -2 -1)
(interval-to-pitch '(1.5 2 -1 -1.5 1 .5 .5))
=> (c4 cs4+ ds4+ d4+ cs4 d4 d4+ eb4)

Pasted Graphic 5.png

 

 

Hertz to pitch (quantize)

(setf hertz '(448 880 1320 1760 2200 2640 3212 3520))
(hertz-to-pitch hertz :quantize 1/4)
=> (a4+ a5 e6 a6 cs7 e7 g7+ a7)

Pasted Graphic 6.png

 

(hertz-to-pitch hertz :quantize 1/8)
=> (a4. a5 e6 a6 c7.. e7 g7+ a7)

Pasted Graphic 7.png

 

 

Thats all for now.

Best wishes,

Janusz

Link to comment
Share on other sites

  • opmo pinned, unpinned and featured this topic
  • opmo unfeatured this topic
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy