Jump to content

ydepps

Members
  • Posts

    6
  • Joined

  • Last visited

Reputation Activity

  1. Like
    ydepps reacted to opmo in OPUSMODUS 2.0 OUT NOW!   
  2. Like
    ydepps reacted to opmo in Opusmodus 2.0 release soon!   
    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))
     
     
    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:

     
    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))
     
     
    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)
     
     
    (polyphony '((7 6 t t) (1 -13 t t)) seq)
     
     
    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))
     
     
    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)
     
     
    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)
     
     
     
    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)
     
     
    (polyphony '((7 6 t t) (2 10 t t) (1 13 t t)) patterns :leading 2)
     
     
     
     
    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)))))
     
     
    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)
     
    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)   )
     
     
     
     
    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)
     
    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)
     
     
     
     
    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.
     
     

     
     
    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)   )
     
     
     
     
    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 -))
    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)  

     
    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)
     
    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)
     
    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.)
     
    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)
     
    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 =)))
     
     
    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)  

     
     
    (density '(.3 .1 .1 .2 .1 .2) sequence :seed 23)
     
     
    (density '(.3 .1 .1 .2 .1 .2) sequence :legato t :seed 23)
     
     
     
    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)
     
    Eight tone
    '(q a4 a4. a4+ a4.. as4 as4. as4+ b4-. b4     b4-. b4- b4-.. bb4 bb4. bb4- a4. a4)
     
    Chord
    '(w c4ds4+g4as4+)
     
    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+))
     
    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)
     
     
    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)
     
     
    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)
     
    (hertz-to-pitch hertz :quantize 1/8) => (a4. a5 e6 a6 c7.. e7 g7+ a7)
     
     
    Thats all for now.
    Best wishes,
    Janusz
  3. Like
    ydepps reacted to Stephane Boussuge in Prelude for Piano   
    Dear Wim,
    thank you for your kind words.
    the transposition was chosen by hear.
     
    About the harmonic path, it come from my original idea mat1:
    (setf mat1 '(#|1|# (ped e a2 p ds3 a3 d4 q c5 fs4 ped+tie) #|2|# (ped w fs4) #|3|# (ped e a2 ds3 a3 d4 q c5 fs4 ped) #|4|# (ped q d5 h. c5) #|5|# (ped e a2 ds3 a3 d4 q c5 fs4) #|6|# (w fs4 ped1) #|7|# (ped e a2 ds3 a3 d4 q d5 c5 ped) #|8|# (w fs4 ped) )) ;;; get the harmonic content from basic material mat1 (setf hmat1 (get-harmonic-path mat1 :chord t :unique t :time '(ww)))  
    After this extraction, i apply some transposition to this material (extended by gen-trim):
    ;;; Transpose list to apply to harmonic path (setf trsp2 '(-2 4 -2 2 8 -1 8 3 -3 2 6 0 1 0 -1 -1 4 4 9 7)) (setf path2 (pitch-transpose trsp2 (gen-trim 20 (mclist hmat1)))) And finally, i use chord-closest-path function for the voice leading:
    ;; chord closest path generation to use as harmonic material for variation 3 ;(setf closest-hpath2 (chord-closest-path (car path2) path2)) And i've added the output of this function directly in a variable because the computation time for chord-closest-path is a bit long and i like to be able to run my scripts very often when composing (for reading the score and hearing) and need fast evaluation:
    (setf closest-hpath2 '((g2cs3g3c4bb4e4) (g2cs3fs3cs4bb4e4fs5) (g2cs3g3c4bb4e4) (gs2d3f3b3b4e4e5) (gs2d3f3b3bb4f4) (gs2cs3gs3b3cs5f4d3) (gs2d3f3b3bb4f4) (fs2c3a3c4f4eb4f5) (fs2c3fs3b3a4eb4) (gs2d3f3b3b4e4e5) (gs2c3fs3eb4a4eb4) (fs2d3a3c4a4eb4d5) (g2cs3bb3bb3eb5e4) (fs2c3a3d4a4eb4d5) (gs2cs3gs3b3d5f4) (gs2cs3gs3b3cs5f4d3) (g2cs3fs3cs4bb4e4) (g2cs3fs3cs4bb4e4fs5) (fs2c3fs3b3a4eb4) (g2cs3a3bb3a4e4e4))) SB.
  4. Like
    ydepps reacted to Stephane Boussuge in make-chord-if-length   
    Here's a new function a bit similar to my old "add-interval-if-length" function but bit more sophisticated.
    It use gen-chord3 to create chord on defined length.
     
    ;;; ============================================== ;;; UTILITY FUNCTIONS ;;; (defun make-chord-if-length-aux (omn &key (test #'>) (length-val 1/8) (interval-list '((4 7)(7 12))) (cycle t)(relative nil) seed) (setf seed (rnd-seed seed)) (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 (gen-chord3 (list (second e)) i :cycle cycle :relative relative :seed (seed)) e ) else append e))) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4)) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7)(3 10))) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil :seed 4) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil :relative t) ;(make-chord-if-length-aux '(q c4 d4 e4 f4 e g4 a4) :interval-list '((4 7 11 14)(7 9 16)) :cycle nil :relative t :seed 4) ;;; ============================= ;;; MAIN FUNCTION (defun make-chord-if-length (omn &key (test #'>) (length-val 1/8) (interval-list '((4 7)(7 12)))(cycle nil)(relative nil) seed) (setf seed (rnd-seed seed)) (do-verbose ("make-chord-if-length :seed ~s :length-val ~s :interval-list ~s :cycle ~s :relative ~s" seed length-val interval-list cycle relative) (let ((test-fn (case test (> #'>) (< #'<) (= #'=) (otherwise test)))) (if (listp (car omn)) (mapcar #'(lambda (x) (make-chord-if-length-aux x :test test-fn :length-val (omn-encode length-val) :interval-list interval-list :cycle cycle :relative relative :seed (seed))) omn) (make-chord-if-length-aux omn :test test-fn :length-val (omn-encode length-val) :interval-list interval-list :cycle cycle :relative relative :seed (seed)))))) ;;; Tests ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4))) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :seed 8) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :interval-list '((2 9)(7 11))) ;(make-chord-if-length '((q c4 d4 e4 f4 g4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :cycle t) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :cycle nil :relative t) ;(make-chord-if-length '((q c4 e d4 e4 f4 h d4)(s a4 b4 a4 g4 h f4)(q c4 d4 h e4)) :cycle nil :relative t :seed 8) i've also attached the original file to this post.
    SB.
    make-chord-if-length.lisp
  5. Like
    ydepps reacted to opmo in Opusmodus 1.4 - Choralis   
    Upcoming ver. 1.4
    Function: CHORALIS

     
       
     
     

     
  6. Like
    ydepps reacted to opmo in Opusmodus 1.4 - Microtonality   
    Forthcoming ver. 1.4
    Microtonal System
     
    OMN Syntax:

     
    Example:
     


     
    Best wishes,
    Janusz
  7. Like
    ydepps reacted to opmo in Opusmodus 1.4 - Counterpoint   
    Upcoming ver. 1.4
    Function: COUNTERPOINT
     


       
     
     
  8. Like
    ydepps reacted to opmo in Opusmodus 1.3.24952   
    – Function name changes:
    LENGTH-DIVIDE2 to LENGTH-SUBDIVISION
    LENGTH-DIVIDE3 to LENGTH-SYNCOPATE

    – Function update:
    LENGTH-DIVIDE – changes to arguments.
    LENGTH-SUBDIVISION – changes to arguments.
    LENGTH-SYNCOPATE – changes to arguments.
    POLYGON-RHYTHM – enable fixed sides polygon. 

    – Note:
    If you used any of the functions:
    LENGTH-DIVIDE, LENGTH-DIVIDE2 or LENGTH-DIVIDE3 in your scores,
    please check new documents in order to make the necessary correction.

    – New:
    Enable or disable the DO-VERBOSE macro. 
    (defparameter *do-verbose* nil "Enable or disable traces printed by do-verbose.")  
     
    length-divide
    This function is able to divide number of lengths to a given division value. The :set and :ignore option increases the control for the desired result. When processing the omn-form sequence an optional third value allows you to fill intervalic steps (a root transposition) to new length values derived from the divisions.
     
    (setf rhy '(1/4 1/4 1/4 1/4)) (length-divide '(2 2) rhy) => (1/8 1/8 1/4 1/4 1/8 1/8) (length-divide '(2 4) rhy) => (1/4 1/16 1/16 1/16 1/16 1/16 1/16 1/16 1/16 1/4)  
    Example:
    (length-divide '(1 2) '(1/4 -1/8 1/16 1/16 -1/32 -3/32 1/8 1/1) :seed 34) => (1/4 -1/8 1/16 1/32 1/32 -1/32 -3/32 1/8 1)  
    In the example above only 1 length is divided by 2 - that is the 1/16. In the example below 4 lengths are divided by 2.
    (length-divide '(4 2) '(1/4 -1/8 1/16 1/16 -1/32 -3/32 1/8 1/1) :seed 34) => (1/8 1/8 -1/8 1/16 1/32 1/32 -1/32 -3/32 1/16 1/16 1/2 1/2) (length-divide '(1 2) '(1/4 -1/8 1/16 1/16 -1/32 -3/32 1/8 1/1) :set 'min :seed 34) => (1/4 -1/8 1/32 1/32 1/16 -1/32 -3/32 1/8 1) (length-divide '(1 4) '(1/4 -1/8 1/16 1/16 -1/32 -3/32 1/8 1/1) :set 1/8 :seed 34) => (1/4 -1/8 1/16 1/16 -1/32 -3/32 1/32 1/32 1/32 1/32 1) (length-divide '((2 3) (1 2)) '((1/4 -1/8 1/16 1/16) (1/32 -3/32 1/8 1/1)) :ignore 'max :seed 45) => ((1/4 -1/8 1/48 1/48 1/48 1/48 1/48 1/48) (1/64 1/64 -3/32 1/8 1)) (length-divide '((2 4) (1 2)) '((q -e s s) (s -e. e w)) :set 'max :ignore 1 :seed 65) => ((1/16 1/16 1/16 1/16 -1/8 1/16 1/64 1/64 1/64 1/64) (1/16 -3/16 1/16 1/16 1))
    OMN:
    (setf mat1 '(q c4 d4 e4 f4 g4 a4 b4)) (length-divide '(3 4) mat1 :seed 45) => (s d4 bb3 cs4 b3 cs4 eb4 c4 e4 q s g4 e4 eb4 fs4 q g4 a4 b4)
    Symbol 'r will apply repeat function:
    (length-divide '(3 4 r) mat1 :seed 45) => (s c4 c4 c4 c4 d4 d4 d4 d4 q e4 s f4 f4 f4 f4 q g4 a4 b4)
    Here we use a set of interval values at the end of the division list:
    (length-divide '(3 4 (13 0 1 13)) mat1 :seed 45) => (s cs5 c4 cs4 cs5 eb5 d4 eb4 eb5 q e4 s fs5 f4 fs4 fs5 q g4 a4 b4) (setf mat2 '((e c4 p e4 mp g4 he c5 p) (q c4 f c4 cs4 mp - d5 p d5) (q cs5 mf = - - cs5 p =))) (length-divide '((1 4) (2 4) (2 5)) mat2 :seed 34) => ((e c4 p e4 mp t a4 f4 gs4 fs4 he c5 p) (q c4 f s b3 cs4 bb3 d4 q cs4 mp - d5 p s c5 e5 cs5 eb5) (q cs5 mf cs5 - - 5q eb5 p b4 c5 d5 eb5 c5 eb5 b4 d5 c5))
    In the example below we assign three series of division values to variables s1, s2 and s3:
    (setf s1 '(3 4 (6 12 18 24)) s2 '(3 4 ((13 1 13 0) (13 0 7 1) r)) s3 '(2 5 ((13 0 13 0 13) ?)) ) (length-divide (list s1 s2 s3) mat2 :seed 34) => ((e c4 p t bb4 mp e5 bb5 e6 cs5 g5 cs6 g6 et fs5 p c6 fs6 c7) (q c4 f s cs5 cs4 cs5 c4 q cs4 mp - s eb6 p d5 a5 eb5 d5 d5 d5 d5) (5q d6 mf cs5 d6 cs5 d6 q cs5 - - cs5 p 5q d5 eb5 c5 b4 d5))  
     
    length-subdivision
    This function is able to divide a list of lengths into a number of subdivisions derived from a given length segment value. The :type and :position option increases the control for the desired result. When processing the omn-form sequence an optional third value allows you to fill intervalic steps (a root transposition) to new length values derived from the divisions. This function is a more sophisticated version of LENGTH-DIVIDE. It produces fascinating variants on the simplest of note-lengths, as can be seen below.
     
    (setf rhy '(1/4 1/4 1/4 1/4)) (length-subdivision '(2 1/8) rhy) => (1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8)
    position 's (start):
    (length-subdivision '(2 1/16) rhy :position 's) => (1/16 1/16 1/8 1/16 1/16 1/8 1/16 1/16 1/8 1/16 1/16 1/8)
    position 'e (end):
    (length-subdivision '(2 1/16) rhy :position 'e) => (1/8 1/16 1/16 1/8 1/16 1/16 1/8 1/16 1/16 1/8 1/16 1/16)
    type 'r (rest), position 'e (end):
    (length-subdivision '(2 1/16) rhy :type 'r :position 'e) => (-1/8 1/16 1/16 -1/8 1/16 1/16 -1/8 1/16 1/16 -1/8 1/16 1/16)
    type 'r (rest), position 's (end):
    (length-subdivision '(2 s) rhy :type 'r :position 's) => (1/16 1/16 -1/8 1/16 1/16 -1/8 1/16 1/16 -1/8 1/16 1/16 -1/8)
    type at random, rest or note :
    (length-subdivision '(2 s) rhy :type '? :position 's) => (1/16 1/16 -1/8 1/16 1/16 -1/8 1/16 1/16 -1/8 1/16 1/16 1/8)
    position and type at random:
    (length-subdivision '(1 e) rhy :type '? :position '? :seed 34) => (1/16 1/8 1/16 1/8 1/8 -1/8 1/8 1/8 1/8) (length-subdivision '((2 5q) (1 3q)) rhy :type '? :position 's :seed 34) => (1/20 1/20 3/20 1/12 -1/6 1/20 1/20 3/20 1/12 -1/6) (length-subdivision '((2 5q) (1 3q) (1 e) (1 s)) rhy :seed 34) => (1/20 1/20 3/20 1/12 1/12 1/12 1/8 1/8 3/16 1/16)  
    Example:
    (setf rhy2 '((1/4 1/4 1/4 1/4) (1/4 1/4 1/4 1/4))) (length-subdivision '(1 e) rhy2 :seed 34) => ((1/8 1/8 1/16 1/8 1/16 1/8 1/8 1/8 1/8) (1/16 1/8 1/16 1/8 1/8 1/8 1/8 1/8 1/8)) (length-subdivision '((1 e) (1 3q)) rhy2 :seed 34) => ((1/8 1/8 1/12 1/12 1/12 1/8 1/8 1/6 1/12) (1/16 1/8 1/16 1/6 1/12 1/8 1/8 1/6 1/12)) (length-subdivision '(((1 e)) ((1 3q))) rhy2 :seed 34) => ((1/8 1/8 1/16 1/8 1/16 1/8 1/8 1/8 1/8) (1/12 1/12 1/12 1/6 1/12 1/12 1/6 1/6 1/12)) (length-subdivision '((3 3q) (1 e)) '((q -e e h) (s e. q h)) :seed 65) => ((1/12 1/12 1/12 -1/8 1/8 1/12 1/12 1/12 1/4) (1/16 3/16 1/8 1/8 1/8 1/12 1/12 1/12 1/8)) (length-subdivision '(((3 3q)) ((1 e))) '((q -e e h) (s e. q h)) :seed 65) => ((1/12 1/12 1/12 -1/8 1/8 1/12 1/12 1/12 1/4) (1/16 1/16 1/8 1/16 1/8 1/16 1/8 3/8)) (length-subdivision '(((2 3q)) ((1 e))) '((q -e e h) (s e. q h)) :type '? :seed 65) => ((1/12 1/12 1/12 -1/8 1/8 1/12 1/12 -1/3) (1/16 -1/16 1/8 1/8 1/8 1/8 3/8))
    OMN:
    (setf mat1 '(q c4 d4 e4 f4 g4 a4 b4)) (length-subdivision '(1 e) mat1 :seed 45) => (s cs4 e b3 s d4 e cs4 e4 s f4 e fs4 s d4 e fs4 eb4 f4 a4 bb4 gs4 bb4 a4)
    The symbol 'r (third value) will apply repeat function:
    (length-subdivision '(1 e r) mat1 :seed 45) => (s c4 e s e d4 d4 s e4 e s e f4 f4 g4 g4 a4 a4 b4 b4)
    Here we define the intervals (third value):
    (length-subdivision '(1 e (13 0 13 0)) mat1 :seed 45) => (s cs5 e c4 s cs5 e eb5 d4 s f5 e e4 s f5 e fs5 f4 gs5 g4 bb5 a4 c6 b4) (length-subdivision '(4 s (13 0 13 0)) mat1 :seed 45) => (s cs5 c4 cs5 c4 eb5 d4 eb5 d4 f5 e4 f5 e4 fs5 f4 fs5 f4 gs5 g4 gs5 g4 bb5 a4 bb5 a4 c6 b4 c6 b4) (length-subdivision '(2 3q (13 0 13 0)) mat1 :type '(r n) :seed 45 :position '(e s s s e s s)) => (-3q cs5 c4 eb5 d4 eb5 f5 e4 - fs5 f4 fs5 - gs5 g4 bb5 a4 bb5 c6 b4 -) (setf mat2 '((e c4 p e4 mp g4 he c5 p) (q c4 f c4 cs4 mp - d5 p d5) (q cs5 mf = - - cs5 p =))) (length-subdivision '((1 e (13 0 13 0)) (2 e (13 0 13 0)) (2 3q (13 0 13 0))) mat2 :type '? :seed 34) => ((e c4 p e4 mp g4 q cs6 p e c5 q cs6) (e cs5 f c4 cs5 c4 -3q d5 mp cs4 -q e eb6 p d5 eb6 d5) (-s e cs5 mf -s e d6 cs5 -q - 3e d6 p 3q cs5 d6 3e cs5 e d6 cs5)) (length-subdivision '(((1 e (13 0 13 0))) ((2 s (13 0 13 0))) ((2 3q r))) mat2 :type '? :seed 34) => ((e c4 p e4 mp g4 q cs6 p e c5 q cs6) (e cs5 f s c4 cs5 -e s cs5 c4 e d5 mp s cs4 d5 -q -s eb6 p d5 - eb6 d5 eb6 d5) (3q cs5 mf cs5 cs5 cs5 cs5 cs5 -q - 3q cs5 p cs5 - - cs5 cs5))  
    In the example below we assign three series of values to variables s1, s2 and s3:
    (setf s1 '(2 e (6 12 18 24)) s2 '(1 3q ((13 1 13 0) (13 0 7 1) r)) s3 '(3 5q ((13 0 13 0 13) ?)) ) (length-subdivision (list s1 s2 s3) mat2 :seed 23) => ((e c4 p 3e bb4 mp 3q e5 e cs6 cs5 p cs6 q.) (e fs4 f c5 3q cs5 cs4 cs5 5h mp 5q c4 g4 c4 -q e c4 p c4 3q d5 3h cs4) (e g5 mf cs6 3q d6 3h d5 -q - 5q d6 p cs5 cs5 5h e d6 cs5))  
     
     
    length-syncopate
    The function LENGTH-SYNCOPATE is a valuable way of bringing more rhythmic interest into a length list. The usual idea of syncopating rhythm is to 'choke' certain attacks so that the attack is delayed or pre-empted.
    (setf rhy '(1/4 1/4 1/4 1/4)) (length-syncopate '(1 4) rhy) => (1/4 3/16 1/16 1/4 1/4) (length-syncopate '(2 4) rhy) => (1/16 3/16 1/4 3/16 1/16 1/4)  
    Example:
    (length-syncopate '(1 4) '(1/4 -1/8 1/16 1/16 -1/8 1/8 1/1) :seed 34) => (1/4 -1/8 1/16 1/64 3/64 -1/8 1/8 1)
    In the example above only 1 length is divided by 4 (1, 3) - that is the 1/16. In the example below 2 values are divided by 3: (1, 2) and (2, 1).
    (length-syncopate '(2 3) '(1/4 -1/8 1/16 1/16 -1/8 1/8 1/1) :seed 34) => (1/4 -1/8 1/48 1/24 1/16 -1/8 1/8 2/3 1/3) (length-syncopate '(1 4) '(1/4 -1/8 1/16 1/16 -1/8 1/8 1/1) :set 1/8 :seed 34) => (1/4 -1/8 1/16 1/16 -1/8 1/32 3/32 1)
    Example with :set for each list:
    (length-syncopate '((2 3) (1 4)) '((1/4 -1/8 1/16 1/16) (1/32 -3/32 1/8 1/1)) :set '(min 1/8) :seed 45) => ((1/4 -1/8 1/24 1/48 1/24 1/48) (1/32 -3/32 3/32 1/32 1)) (length-syncopate '((2 3) (1 5)) '((q -e s s) (s -e. q h)) :set 'max :ignore 'h :seed 65 :omn t) => ((3h 3q -e s 3s 3e) (s -e. 5q 5w h))
    OMN:
    (setf mat '(q c4 d4 e4 f4 g4 a4 b4)) (length-syncopate '(3 4) mat :seed 12) => (s b3 e. cs4 q d4 e. fs4 s d4 q f4 g4 a4 e. bb4 s c5)  
    Here we use a set of interval values:
    (length-syncopate '(3 4 ((13 0) (0 14) (1 13))) mat :seed 23) => (s cs5 e. c4 d4 s e5 q e4 f4 s gs4 e. gs5 q a4 b4) (setf mat2 '((e c4 p e4 mp g4 he c5 p) (q c4 f c4 cs4 mp - d5 p d5) (q cs5 mf = - q cs5 stacc p = =)) (length-syncopate '((1 3 (-3 6)) (2 4 (6 0)) (2 5 (11 13))) mat2 :seed 34) => ((e c4 p e4 mp 3e 3q cs5 he c5 p) (q c4 f s fs4 e. c4 q cs4 mp - e. gs5 p s d5 q) (q cs5 mf cs5 - 5w c6 stacc 5q d6 stacc q cs5 p 5q c6 5w d6 q cs5))
     
     
    polygon-rhythm
    In the next three examples below we use a list of fixed polygon sides (non-symmetrical):
    (circle-rhythm-plot (polygon-rhythm '(1 6 10) 16 1) :points 16) To rotate the polygon we change the starting point value:
    (circle-rhythm-plot (polygon-rhythm '(1 6 10) 16 2) :points 16) (circle-rhythm-plot (polygon-rhythm '(0 2 5 7 10 12 13 15 16 18 19 21 23) 24 0) :points 24 :value 1/24)  
    Best wishes,
    JP
  9. Like
    ydepps reacted to opmo in using Emacs and SLIME with Opusmodus   
    Thank you Matthew for the instructions.
    All is working fine.
     
    Alternatively you could put
    (ql:quickload "quicklisp-slime-helper") (cl-user::start-swank) into the 'Quicklisp Start.lisp' file which you find in the Opusmodus/Extension folder.
    This way all you need to do is to start Opusmodus then Emacs and finally type M-x slime-connect
  10. Like
    ydepps reacted to o_e in Remove Unison from Chord   
    (chord-pitch-unique chords) => (gs3gs4ds5 ab3gs4) hth!
  11. Like
    ydepps reacted to opmo in HOW to make a piano reduction with multiple voices and rhythms ?   
    Quite simple to do:
     
    (setf soprano '((-h. q g4) (q g4 a4 bb4 c5) (h. d5 fermata q d5) (q d5 c5 bb4 c5) (h. a4 fermata q a4) (q bb4 c5 d5 d5) (h c5 q d5 fermata d5) (q bb4 c5 d5 d5) (h c5 q bb4 fermata d5) (q f5 d5 d5 d5) (h c5 q c5 fermata c5) (q d5 c5 bb4 c5) (h a4 q g4 fermata))) (setf alto '((-h. q d4) (q eb4 e e4 gb4 q g4 g4) (h. gb4 fermata q gb4) (q g4 e g4 gb4 q g4 a4) (h. gb4 fermata q gb4) (q g4 a4 bb4 bb4) (q bb4 e a4 g4 q a4 fermata gb4) (q d4 c4 f4 g4) (q g4 e f4 eb4 q d4 fermata f4) (q f4 e f4 g4 q a4 g4) (e g4 f4 g4 e4 q f4 fermata e f4 eb4) (q d4 e e4 gb4 q g4 g4) (q g4 gb4 d4 fermata))) (setf tenor '((-h. q bb3) (q c4 c4 d4 eb4) (h. a3 fermata q a3) (q bb3 c4 d4 eb4) (h. d4 fermata q d4) (q d4 eb4 f4 f4) (q g4 e f4 eb4 q d4 fermata a3) (q bb3 e f4 eb4 d4 c4 q bb3) (q bb3 a3 f3 fermata bb3) (q c4 d4 e d4 c4 q bb3) (e bb3 a3 bb3 g3 q a3 fermata a3) (q bb3 a3 e g3 bb3 q eb4) (e d4 s c4 bb3 q c4 b3 fermata))) (setf bass '((-h. q g3) (e c4 bb3 q a3 e g3 f3 q eb3) (h. d3 fermata q c3) (q bb2 a2 g2 c3) (h. d3 fermata q d3) (q g3 e f3 eb3 d3 c3 q bb2) (q eb3 f3 gb3 fermata d3) (q g3 a3 e bb3 a3 g3 f3) (q eb3 f3 bb2 fermata bb3) (q a3 bb3 gb3 e g3 f3) (q e3 c3 f3 fermata f3) (q bb2 e c3 d3 q eb3 e d3 c3) (h d3 q g2 fermata))) (def-score bach-bwv-0005 (:title "Bach, BWV-0005" :composer "J. S. Bach" :key-signature '(g min) :time-signature '(4 4) :tempo 96 :layout (piano-layout '(soprano alto) '(tenor bass))) (soprano :omn soprano :channel 1 :sound 'gm :program 0) (alto :omn alto :channel 2) (tenor :omn tenor :channel 3) (bass :omn bass :channel 4) )  
    2nd possibility:
    ;;;--------------------------------------------------------- ;;; Bach, BWV 0005 ;;;--------------------------------------------------------- (setf soprano '((-h. q g4) (q g4 a4 bb4 c5) (h. d5 fermata q d5) (q d5 c5 bb4 c5) (h. a4 fermata q a4) (q bb4 c5 d5 d5) (h c5 q d5 fermata d5) (q bb4 c5 d5 d5) (h c5 q bb4 fermata d5) (q f5 d5 d5 d5) (h c5 q c5 fermata c5) (q d5 c5 bb4 c5) (h a4 q g4 fermata))) (setf alto '((-h. q d4) (q eb4 e e4 gb4 q g4 g4) (h. gb4 fermata q gb4) (q g4 e g4 gb4 q g4 a4) (h. gb4 fermata q gb4) (q g4 a4 bb4 bb4) (q bb4 e a4 g4 q a4 fermata gb4) (q d4 c4 f4 g4) (q g4 e f4 eb4 q d4 fermata f4) (q f4 e f4 g4 q a4 g4) (e g4 f4 g4 e4 q f4 fermata e f4 eb4) (q d4 e e4 gb4 q g4 g4) (q g4 gb4 d4 fermata))) (setf tenor '((-h. q bb3) (q c4 c4 d4 eb4) (h. a3 fermata q a3) (q bb3 c4 d4 eb4) (h. d4 fermata q d4) (q d4 eb4 f4 f4) (q g4 e f4 eb4 q d4 fermata a3) (q bb3 e f4 eb4 d4 c4 q bb3) (q bb3 a3 f3 fermata bb3) (q c4 d4 e d4 c4 q bb3) (e bb3 a3 bb3 g3 q a3 fermata a3) (q bb3 a3 e g3 bb3 q eb4) (e d4 s c4 bb3 q c4 b3 fermata))) (setf bass '((-h. q g3) (e c4 bb3 q a3 e g3 f3 q eb3) (h. d3 fermata q c3) (q bb2 a2 g2 c3) (h. d3 fermata q d3) (q g3 e f3 eb3 d3 c3 q bb2) (q eb3 f3 gb3 fermata d3) (q g3 a3 e bb3 a3 g3 f3) (q eb3 f3 bb2 fermata bb3) (q a3 bb3 gb3 e g3 f3) (q e3 c3 f3 fermata f3) (q bb2 e c3 d3 q eb3 e d3 c3) (h d3 q g2 fermata))) (def-score bach-bwv-0005 (:title "Bach, BWV-0005" :composer "J. S. Bach" :key-signature '(g min) :time-signature '(4 4) :tempo 96 :layout (piano-layout 'lh 'rh)) (lh :omn (dissolve-voices (merge-voices soprano alto)) :channel 1 :sound 'gm :program 0) (rh :omn (dissolve-voices (merge-voices tenor bass)) :channel 2) ) Best, JP
  12. Like
    ydepps reacted to Stephane Boussuge in Après la pluie Trio   
    Lasse, i write many many unfinished Bits and pieces, and in past almost only that. 
    Long time ago, when speaking with a friend, i said i never finish my piece but i said it was not to important because it was only training, but this friend reply: i understand but finishing a piece is also a training and finishing a piece is a different training than starting a piece....
    From this day and discussion with that friend, i have started to finish some of my pieces :-)
     
    SB.
  13. Like
    ydepps reacted to Rangarajan in Après la pluie Trio   
    André,
    Quite valid points I think.
     
    I believe good tools/environments must provide multiple layers of usability. For the beginner, it is easy to experiment with basic concepts if the tool provides "canned" functionality. Next level is to be able to customise the "canned" functionality by tweaking some parameters. Ultimately, for the expert,the tool must give enough power to express his creativity, by delving deep into the system.
     
    Finally, as I have expressed before, I would love to see a series of good books on Opusmodus, aimed at beginners and advanced practitioners! I am still having trouble understanding some of the aspects of def-score (just one of the many challenges). I am willing to toil till I get the concepts right! 
     
    - Rangarajan
  14. Like
    ydepps reacted to opmo in Opmo 1.3: Loading Common Music -- dependency on CLM broken (FIXED)   
    It looks like you don't know how to use CLM in Opusmodus. You can create new instruments and use them on the spot. Soon I will write a tutorial which demonstrate how to use CLM with OMN and how to create new instruments. It can't be easier 🙂
  15. Like
    ydepps reacted to Stephane Boussuge in Polygon1 for Flute, clarinet, bass clarinet and Piano   
    Hi, here's a new piece with score.
     
       
     
    All the best to all of the Opusmodus users !
    S.B.
     
    18/07/19 => Small update, missing function added.
     
    PolygonsV1-05-Forum.opmo
    Polygons1-05.mp3
  16. Like
    ydepps reacted to torstenanders in Getting precompiled code (e.g., quicklisp, quicklisp libraries, swank, own libraries) running again on recent Opusmodus versions   
    Dear all,
     
    After updating to a recent Opusmodus version 1.3, I ran into some errors when loading code that had been loaded and compiled before, e.g., quicklisp, quicklisp libraries, swank (the interface that allows using Emacs Slime with Opusmodus), and my own Lisp libraries. The errors I saw were rather cryptic, like the following:
     
    Error: The value "CL" is not of the expected type list.
    While executing: (:internal ccl::operation-on-all-specs ccl::%define-package), in process Listener-1(7).
     
    After exchanges with Janusz (thanks a lot for your help!) I learnt that the underlying Common Lisp version of Opusmodus had been upgraded to CCL version 1.12, and the format of compiled files (fasl files or dx64fsl files) of this version had changed.
     
    So, in case you run into similar problems, these can be fixed simply by deleting all previously compiled files (which Lisp stores if they do not change to speed up the load process), so that the Lisp compiler has to compile them again. In the folder  ~/.cache/common-lisp just delete any folders starting with ccl-, so that all compiled files in this directory are compiled again.
     
    Best,
    Torsten
  17. Like
    ydepps reacted to Stephane Boussuge in Mapcar Study 1 for small ensemble   
    Here's a short study for a small ensemble.
     
       
     
    All the best !
    SB.
     
    Mapcar1.opmo
     
  18. Like
    ydepps reacted to JulioHerrlein in Updated library of many custom Opusmodus functions   
    Thank you, Torsten !
    Enjoy !!
    Best,
    Julio
     
     
  19. Like
    ydepps reacted to torstenanders in Providing code examples to students   
    > While I can create a canon, counterpoint and a fugue myself with a bit of time, it would be much less time-consuming for me if I were able to use existing examples. Is there an existing library of OMN examples of these types of compositions?
     
    I cannot offer ready-made examples, but a constraint-based library with various counterpoint (and also harmony) rules ready-made.  
     
    Cluster engine implements the constraint solver, and many functions for applying user-defined rules to various score contexts in a flexible way (e.g., consecutive notes in certain voices, simultaneous notes across voices at certain metric positions etc). 
    https://github.com/tanders/cluster-engine
     
    Cluster rules provides a collection of ready-made rules for the cluster engine library.
    https://github.com/tanders/cluster-rules
     
    Both libraries were initially developed for PWGL, but we ported them to plain Common Lisp to make them usable, e.g., in Opusmodus (where I already used both) and the Max<->Lisp interface I just mentioned in other message.
     
    There are some demo/test examples that come with the library (https://github.com/tanders/cluster-rules/blob/master/tests/first-tests.lisp). More extensive documentation (tutorials) are available with the original PWGL versions of the libraries.
     
    Some code to smoothly interface the Cluster Library with Opusmodus is part of my tot library (e.g. in the file https://github.com/tanders/tot/blob/master/sources/constraints.lisp). For example, there are means to transform Cluster Library scores into Opusmodus scores (actually, my variant of it, see the docs) and some more complex functions that could be seen as example use cases. For example, the function revise-score-harmonically, expects an existing score that you might create with whatever Opusmodus methods, and some underlying harmony definitions, and that re-harmonises the score accordingly, taking some counterpoint rules etc. into account.
     
    I hope the available doc of these packages helps (of which there is also some HTML version online). I cannot provide any more help at this stage, as I am currently extremely busy in my new job...
     
    Best,
    Torsten
  20. Like
    ydepps reacted to opmo in Opusmodus 1.3.24805   
    1.3.24805 
     
    – New functions:
     closest-path  comparative-closest-path  relative-closest-path  
    – Changes:
     CHORD-CLOSEST-PATH renamed to COMPARATIVE-CLOSEST-PATH.
     CHORD-RELATIVE-PATH renamed to RELATIVE-CLOSEST-PATH.
     A new keyword :lc (live coding) added to PS function.
     The default DEF-UNFOLD-SET set name renamed to om.
    :variant and :relative keywords removed from HARMONIC-PROGRESSION function.
     
    – Fixed:
     HARMONIC-PROGRESSION
     HARMONIC-PATH
     PITCH-VARIANT
     PITCH-ROW 
     
    – Documentation updates.
    – 'Quick Start' workspace update.
     
     
    VOICE LEADING FUNCTIONS
     
    CLOSEST-PATH
     
    The function CLOSEST-PATH returns a series of chords taking the closest path to the previous chord.
     
    (closest-path '(b4g4e4c4 c5a4e4f4 b4a4f4d4 b4g4e4d4))
    (closest-path '(c4e4g4 c5e5a5 e5fs5a5b5 d5f5bb5d6 g4c5d5f5))  

     
    (closest-path '(c4e4g4 c5e5a5 e5fs5a5b5 d5f5bb5d6 g4c5d5f5)               :start 'c3eb4f5d5)  
     

     
    (closest-path '(g5 cs3f3bb3gs4c5d5 fs5 a5b5eb6e6g2 cs3f3bb3gs4                 c5 d5fs5a5b5 eb6e6g2cs3 f3 bb3gs4c5 d5fs5a5                 b5eb6e6g2cs3f3 bb3 gs4c5d5fs5 a5b5 eb6e6g2cs3f3                 bb3gs4c5d5 fs5 a5b5eb6e6g2cs3 f3bb3gs4 c5                 d5fs5a5b5 eb6 e6g2cs3f3))  

     
    (closest-path '(g5 cs3f3bb3gs4c5d5 fs5 a5b5eb6e6g2 cs3f3bb3gs4                 c5 d5fs5a5b5 eb6e6g2cs3 f3 bb3gs4c5 d5fs5a5                 b5eb6e6g2cs3f3 bb3 gs4c5d5fs5 a5b5 eb6e6g2cs3f3                 bb3gs4c5d5 fs5 a5b5eb6e6g2cs3 f3bb3gs4 c5                 d5fs5a5b5 eb6 e6g2cs3f3)               :start 'c3eb4f5d6)  

     
    (closest-path '((eb3f3a3 f3a3b3 g3bb3cs4 e3g3bb3)                 (g4bb4cs5 bb4cs5e5 b4eb5f5 a4b4eb5)                 (b3eb4f4 eb4f4a4 e4fs4bb4 c4e4fs4)))  

    (closest-path '((eb3f3a3 f3a3b3 g3bb3cs4 e3g3bb3)                 (g4bb4cs5 bb4cs5e5 b4eb5f5 a4b4eb5)                 (b3eb4f4 eb4f4a4 e4fs4bb4 c4e4fs4)))               :start '(c3eb4 f5d5 eb4f5))  

     
     
     
     
    COMPARATIVE-CLOSEST-PATH
     
    The function COMPARATIVE-CLOSEST-PATH returns a series of chords taking the comparatively closest path to the previous chord, derived from randomising the pitch order of a given chord before the ‘find closest interval’ process.
     
    (comparative-closest-path '(b4g4e4c4 c5a4e4f4 b4a4f4d4 b4g4e4d4))
     
     
    Etc…
     
    (comparative-closest-path '(c4e4g4 c5e5a5 e5fs5a5b5 d5f5bb5d6 g4c5d5f5))  

     
    Etc…
     
     
    (comparative-closest-path '(c4e4g4 c5e5a5 e5fs5a5b5 d5f5bb5d6 g4c5d5f5)                           :start 'c3eb4f5d5)  

     
    Etc…
     
    (comparative-closest-path '(g5 cs3f3bb3gs4c5d5 fs5 a5b5eb6e6g2 cs3f3bb3gs4                             c5 d5fs5a5b5 eb6e6g2cs3 f3 bb3gs4c5 d5fs5a5                             b5eb6e6g2cs3f3 bb3 gs4c5d5fs5 a5b5 eb6e6g2cs3f3                             bb3gs4c5d5 fs5 a5b5eb6e6g2cs3 f3bb3gs4 c5                             d5fs5a5b5 eb6 e6g2cs3f3))  

     
    Etc…
     
    (comparative-closest-path '(g5 cs3f3bb3gs4c5d5 fs5 a5b5eb6e6g2 cs3f3bb3gs4                             c5 d5fs5a5b5 eb6e6g2cs3 f3 bb3gs4c5 d5fs5a5                             b5eb6e6g2cs3f3 bb3 gs4c5d5fs5 a5b5 eb6e6g2cs3f3                             bb3gs4c5d5 fs5 a5b5eb6e6g2cs3 f3bb3gs4 c5                             d5fs5a5b5 eb6 e6g2cs3f3)                           :start 'c3eb4f5d6)  

     
    Etc...
     
    (comparative-closest-path '((eb3f3a3 f3a3b3 g3bb3cs4 e3g3bb3)                             (g4bb4cs5 bb4cs5e5 b4eb5f5 a4b4eb5)                             (b3eb4f4 eb4f4a4 e4fs4bb4 c4e4fs4)))  

     
    Etc…
     
    (comparative-closest-path '((eb3f3a3 f3a3b3 g3bb3cs4 e3g3bb3)                             (g4bb4cs5 bb4cs5e5 b4eb5f5 a4b4eb5)                             (b3eb4f4 eb4f4a4 e4fs4bb4 c4e4fs4))                           :start '(c3eb4 f5d5 eb4f5))  

     
     
    Etc…
     
    With seed and 4 results:
    (gen-eval 4 '(comparative-closest-path               '(b4g4e4c4 c5a4e4f4 b4a4f4d4 b4g4e4d4)               :start '(c3c4c5c5)) :seed 23)  

     
     
     
     
     
    RELATIVE-CLOSEST-PATH
     
    The function RELATIVE-CLOSEST-PATH generates cartesian series of intervals form a given chord. It then selects randomly the relative closest path (transition) to the previous chord.
     
    (relative-closest-path '(b4g4e4c4 c5a4e4f4 b4a4f4d4 b4g4e4d4))  


     
    Etc…
     
    (relative-closest-path '(c4e4g4 c5e5a5 e5fs5a5b5 d5f5bb5d6 g4c5d5f5))  

     
    Etc…
     
    (relative-closest-path '(c4e4g4 c5e5a5 e5fs5a5b5 d5f5bb5d6 g4c5d5f5)                        :start 'c3eb4f5d5)  

     
    Etc…
     
    (relative-closest-path '(g5 cs3f3bb3gs4c5d5 fs5 a5b5eb6e6g2 cs3f3bb3gs4                          c5 d5fs5a5b5 eb6e6g2cs3 f3 bb3gs4c5 d5fs5a5                          b5eb6e6g2cs3f3 bb3 gs4c5d5fs5 a5b5 eb6e6g2cs3f3                          bb3gs4c5d5 fs5 a5b5eb6e6g2cs3 f3bb3gs4 c5                          d5fs5a5b5 eb6 e6g2cs3f3))  

     
    Etc…
     
    (relative-closest-path '(g5 cs3f3bb3gs4c5d5 fs5 a5b5eb6e6g2 cs3f3bb3gs4                          c5 d5fs5a5b5 eb6e6g2cs3 f3 bb3gs4c5 d5fs5a5                          b5eb6e6g2cs3f3 bb3 gs4c5d5fs5 a5b5 eb6e6g2cs3f3                          bb3gs4c5d5 fs5 a5b5eb6e6g2cs3 f3bb3gs4 c5                          d5fs5a5b5 eb6 e6g2cs3f3)                        :start 'c3eb4f5d6)  

     
    Etc…
     
    (relative-closest-path '((eb3f3a3 f3a3b3 g3bb3cs4 e3g3bb3)                          (g4bb4cs5 bb4cs5e5 b4eb5f5 a4b4eb5)                          (b3eb4f4 eb4f4a4 e4fs4bb4 c4e4fs4)))  

     
    Etc…
     
    (relative-closest-path '((eb3f3a3 f3a3b3 g3bb3cs4 e3g3bb3)                          (g4bb4cs5 bb4cs5e5 b4eb5f5 a4b4eb5)                          (b3eb4f4 eb4f4a4 e4fs4bb4 c4e4fs4))                        :start '(c3eb4 f5d5 eb4f5))  

     
    Etc…
     
    (gen-eval 4 '(relative-closest-path               '(b4g4e4c4 c5a4e4f4 b4a4f4d4 b4g4e4d4)) :seed 542) => ((c4e4g4b4 c4e4f4a4 a3b3d4f4 d4e4g4b4)     (c4e4g4b4 e4f4a4c5 d4f4a4b4 b3e4g4d5)     (g3e4b4c5 e3f4a4c5 d3a4b4f5 d3g4b4e5)     (g3e4b4c5 a3f4c5e5 f3a4b4d5 d3e4g4b4))  

     
     
     
     
    Live Coding option in PS function

    The :play :lc (live coding) option allows you to send the result of a PS function to ‘Live Coding Instrument’ in a live coding performance.
     
    (progn   (setf    mat '((-w.)          (h. eb4 pp q g3 -e q gs4 mf -s a5 p tie)          (e. a5 -e q bb4 mf -s q cs5 p -s q. e5 mf -e.)          (q cs5 p h. d5 mf -q c5 pp tie)          (h c5 pp h. gs3 -e a4 p<)          (h. fs5 mp q bb3 c5 p e4 mf tie)          (h e4 -e q cs4 mp h d5 p e f4)          (q d4 pp s eb4 < leg g4 < leg bb4 < leg a4 q. cs5 mf -e             3q gs5 > leg fs5 > leg c5 > b4 > leg f4 leg e4)          (t d4 p< leg eb4 < leg g4 f leg bb4 q. a4 marc             t fs4 mf leg gs4 leg e. c5 e b4 t f5 leg e5 leg d5 leg eb5             3q bb5 > a4 > bb5 > e a4 pp stacc -e)))      (setf    v1 (filter-density '(0.7 0.1 0.2 0.0 0.2 0.3 0.3) mat :type :length)    v2 (filter-density '(0.0 0.2 0.0 0.2 0.2 0.4 0.3) mat :type :length)    v3 (filter-density '(0.2 0.7 0.2 0.2 0.2 0.3 0.2) mat :type :length)    v4 (filter-density '(0.0 0.2 0.2 0.7 0.2 0.2 0.7) mat :type :length))      (setf    vn1 (unfold 'om '(t7 dyn bti vn) v1)    vn2 (unfold 'om '(t7 v? dyn bti vn) v2)    vla (unfold 'om '(v? ra dyn bti va) v3)    vlc (unfold 'om '(t-12 t-5 v? a-12-12 dyn bti vc) v4))      (ps 'gm :sq (list vn1 vn2 vla vlc) :tempo 68 :play :lc)   )  
     
     
    QUICK START WORKSPACE

    To update your 'Quick Start' workspace to the latest version you need to delete the 'Quick Start' folder from the Opusmodus directory first.
    After the deletion go to the Opusmodus menu 'Help' and select 'Install Quick Start Workspace'.
    To open the new 'Quick Start' workspace file simply select 'Open Quick Start Workspace' form the 'Help' menu.
     
    That's all for now,
    best wishes,
    Janusz
  21. Like
    ydepps reacted to opmo in UNFOLD strategie example   
    This short example demonstrates how powerful and flexible the UNFOLD function is, especially when working with short patterns.
    The entire process is very compact and requires only a few lines of code.
     
    Source:
    (progn   (setf    mat1 '((h. eb4 pp q g3 -e q gs4 mf -s a5 p tie)           (e. a5 -e q bb4 mf -s q cs5 p -s q. e5 mf -e.)           (q cs5 p h. d5 mf -q c5 pp tie)           (h c5 pp h. gs3 -e a4 p<)           (h. fs5 mp q bb3 c5 p e4 mf tie)           (h e4 -e q cs4 mp h d5 p e f4))        mat2 '((q d4 pp s eb4 < leg g4 < leg bb4 < leg a4 q. cs5 mf -e                3q gs5 > leg fs5 > leg c5 > b4 > leg f4 leg e4)           (t d4 < leg eb4 < leg g4 < leg bb4 q. a4 marc              t fs4 mf leg gs4 leg e. c5 e b4 t f5 leg e5 leg d5 leg eb5              3q bb5 > a4 > bb5 > e a4 pp stacc -e))        p01 (unfold 'eg '(t7 dyn) mat1)    p02 (unfold 'eg '(t7 v? dyn ob) mat1)    p03 (unfold 'eg '(v? ra dyn) mat1)    p04 (unfold 'eg '(t-12 t-5 dyn v? raf hn) p03)    p05 (unfold 'eg '(t-12 t-5 ld ra dyn bn) p02)        p11 (assemble-seq (unfold 'eg '(t7 dyn) mat1) (unfold 'eg '(t7 dyn) mat2))    p12 (assemble-seq (unfold 'eg '(t-12 v? dyn ob) mat1)                      (unfold 'eg '(t-12 v? dyn ob) mat2))    p13 (assemble-seq (unfold 'eg '(v? raf dyn) mat1) (unfold 'eg '(v? dyn)  mat2))    p14 (unfold 'eg '(t-12 t-5 dyn v? raf dyn hn) p13)    p15 (unfold 'eg '(t-12 t-5 ld ra dyn bn) p12))      (ps 'gm :w5 (list                (assemble-seq p01 p11)                (assemble-seq p02 p12)                (assemble-seq p03 p13)                (assemble-seq p04 p14)                (assemble-seq p05 p15))))  
    Output:

     
    Best, JP
  22. Like
    ydepps reacted to opmo in Opusmodus 1.3.24692   
    1.3.24692 

    – Function name changes: 
    DEF-UNFOLD to DEF-UNFOLD-SET 
    DEF-INSTRUMENT-SETS to DEF-INSTRUMENT-SET 

    – New functions:
    DEF-UNFOLD-SET
    UNFOLD-SET-NAMES
    GET-UNFOLD-SET
    GET-UNFOLD-SET-GROUPS
    GET-UNFOLD-SET-GROUP
    UNFOLD 
    SOUND-SET-NAMES GET-SOUND-SET-PROGRAM-GROUPS GET-SOUND-SET-PROGRAM-GROUP GET-SOUND-SET-PROGRAM GET-SOUND-SET-CONTROLLER-GROUPS GET-SOUND-SET-CONTROLLER-GROUP GET-SOUND-SET-CONTROLLER DEF-INSTRUMENT-SET INSTRUMENT-SET-NAMES GET-INSTRUMENT-SET GET-INSTRUMENT-SET-GROUPS GET-INSTRUMENT-SET-GROUP – New directory in System Library: Libraries.
    – New directory in Def-Libraries: Def-Unfold-Sets.
    – New Extension file: 'OSC Remote Setup.lisp'.

    Fixed: 
    – Documents errors.
     
    Examples:
    SOUND-SET
    (sound-set-names) => (xce-solo-woodwinds-generic vsl-clarinet-bb vsl-cello     sgmo-acoustic-grand-piano k2500r s80 se-1 sgmo-bassoon     sgmo-strings-1 zr vsl-altoflute vsl-prepared-piano     supernova-ii sy55 reaktor sgmo-vibraphone vsl-imperial     vsl-cello-solo trinity ms2000 pr micro-q k1 vsl-cembalo-ks     sgmo-piccolo pianoteq vsl-cembalo vsl-violin vsl-viola-solo     micro-piano gm2 vsl-contrabass trinity-rack sgmo-celesta     sgmo-trombone nord-lead-3 gm sgmo-harp sgmo-glock     karma sgmo-trumpet xv-5080 sgmo-flute sgmo-oboe     vsl-violin-solo sgmo-horn sgmo-timpani k2600 sgmo-marimba     vsl-hornvienna vsl-prepared-piano-ks sgmo-tuba jv-1080     vsl-harmonium-ks vsl-harmonium sgmo jv-2080 sy22 k2500     sgmo-violin virus-b sgmo-cello sgmo-clarinet k2000r k2000     vsl-bassclarinet vsl-upright xce-solo-strings-generic     motif sgmo-viola) (get-sound-set-program-groups 'gm) => (piano percussion organ guitar bass strings ensemble brass reed pipe     synth-lead synth-pad synth-effects ethnic percussive sound-effects) (get-sound-set-program-group 'gm 'Brass) => (trumpet trombone tuba muted-trumpet french-horn     brass-section synth-brass-1 synth-brass-2) (get-sound-set-program 'gm 'trombone) => 57 (get-sound-set-controller-groups 'gm) => (general lsb pedal) (get-sound-set-controller-group 'gm 'general) => (bank-select modulation breath-control foot-control portamento-time     data-entry volume balance pan expression effects-controller1     effects-controller2 gen-purpose1 gen-purpose2 gen-purpose3     gen-purpose4) (get-sound-set-controller 'gm 'expression) => 11  
    UNFOLD
    (unfold-set-names) => (m1 eg) (get-unfold-set-groups 'eg) => (transp basic ambitus) (get-unfold-set-group 'eg 'ambitus) => (ob bn hn) (get-unfold-set 'eg 'ld) => (:length (length-divide 2 2 x))  
    Unfold Set Example:
    (def-unfold-set eg                 :methods   (:group transp           t7   (:pitch (pitch-transpose 7 x))           t-12 (:pitch (pitch-transpose -12 x))                      :group basic           ret  (:all (gen-retrograde x :flatten t))           var  (:pitch (pitch-variant x :variant '?))           gf   (nil (gen-fragment '(3) '(3) x))           ld   (:length (length-divide 2 2 x))           lrq  (:length (length-rational-quantize x))           dyn  (:velocity (velocity-to-dynamic x))           ls   (nil (length-span '(6/4 6/4) x))                      :group ambitus           ob   (:pitch (ambitus 'oboe x))           bn   (:pitch (ambitus 'bassoon x))           hn   (:pitch (ambitus 'french-horn x))           ))  
    INSTRUMENT-SET
    (instrument-set-names) => (vsl gm) (get-instrument-set-groups 'gm) => (clefs grand wind brass strings wind-ensemble     brass-ensemble piano string-ensemble choir) (get-instrument-set-group 'gm 'wind) => (:pic :fl :afl :bfl :ob :eh :oda :cl :acl     :bcl :bn :cbn :ssax :asax :tsax :bsax) (get-instrument-set-group 'gm 'string-ensemble) => (:s3 :sq) (get-instrument-set 'gm :p) => (:layout piano-layout :port nil :channel 1 :sound 'gm     :program 0 :controllers nil :pan (pan 0) :volume 92) (get-instrument-set 'gm :sq) => (:layout string-quartet-layout :port nil :channel '(13 14 15 16)     :sound 'gm :program '(violin violin viola cello)     :controllers nil :pan (pan '(-30 -10 10 30)) :volume 92)  
    Instrument Set Example:
    (def-instrument-set my-inst                     :instruments   (:group wind           :oboe           (:layout oboe-layout                    :port nil                    :channel 1                    :sound 'gm                    :program '(oboe)                    :controllers nil                    :pan (pan 0)                    :volume 92)           :bassoon           (:layout bassoon-layout                    :port nil                    :channel 2                    :sound 'gm                    :program '(bassoon)                    :controllers nil                    :pan (pan -10)                    :volume 92)           ))  
    Note:
    Please create a new directory 'Def-Unfold-Sets' in your '~/Opusmodus/Def-Libraries' directory. This is where you will store your Unfold sets.
    The 'OSC Remote Setup.lisp' file needs to be dragged into your '~/Opusmodus/Extensions' directory.
    OSC Remote Setup.lisp
    Best wishes,
    Janusz
  23. Like
    ydepps reacted to opmo in Opusmodus 1.3.24667   
    New function:
    STOP-ALL-OSC-THREADS
      Fixed:
    Live Coding Instrument hanging note at Stop.
    Few document errors.
     
    Note: Select 'Check for Updates..." from Opusmodus menu.
  24. Like
    ydepps reacted to opmo in Opusmodus 1.3.24622   
    Free update for Opusmodus 1.3. users.
    It includes a support for a second screen and multi voice snippets.
    The new UNFOLD system opens up a whole new set of possibilities for the composer using OPUSMODUS.
    Additional library directory: 'Def-Instrument-Sets'. 
     
    New functions:
    DEF-INSTRUMENT-SETS
    Use this function to define the instrument-sets with a given name. With named instrument-sets a composer can customise OPUSMODUS to reflect MIDI synthesisers or samplers which a studio system (inboard or outboard) might contain. The DEF-INSTRUMENT-SETS function is an essential companion to the PS function (PS stands for ‘Preview Score’ or, ‘Preview Snippet’). To create instrument-sets is fairly easy to do as it resembles the instrument setup from the DEF-SCORE instance.
     
    The instrument-set template:
    <instrument-name> (:layout <layout>   :port <port>   :channel <channel>   :sound <sound-set>   :program <program>   :controllers <controllers>   :pan <panning>   :volume <volume>)  
    To explain how it all works we will define new instrument-sets with two instruments. In our example we will use :oboe and :bassoon as our instrument names with a library name: my-inst. The next step we need to do is to select the corresponding instrument layout. The predefined layouts you will find in the ‘Instrument Layout Presets’ document in the System/Layout library:
     

     
    Examples:
    (def-instrument-sets my-inst                      :instruments   (:group group           :oboe           (:layout oboe-layout                    :port nil                    :channel 1                    :sound 'gm                    :program '(oboe)                    :controllers nil                    :pan (pan 0)                    :volume 92)           :bassoon           (:layout bassoon-layout                    :port nil                    :channel 2                    :sound 'gm                    :program '(bassoon)                    :controllers nil                    :pan (pan -10)                    :volume 92)           ))  
    Here is how an instrument from a defined instrument-sets name might be entered into PS:
    (ps 'my-inst     :oboe (list '((s a4 leg d5 leg fs4 leg d5 leg g4 leg d5)                   (s a4 leg d5 leg fs4 leg d5 leg g4 leg d5)                   (s a4 leg d5 leg cs5 leg b4 leg a4 leg g4 leg)                   (s fs4 leg d4 leg e4 leg cs4 leg e d4)))     :bassoon (list '((e fs3 d3 e3)                      (e fs3 d3 e3)                      (e fs3 g3 a3)                      (e d3 a2 d2)))     :key-signature '(d maj)     :time-signature '(3 8 1)     :tempo 112)  
    You can define as many instrument-sets instances as needed.
     
     
    PS
    Use this function if you are looking for a quick preview of your score or when a snippet (especially for education) needs a full representation of the intended notation. The PS function name stands for ‘Preview Score’ or ‘Preview Snippet’. In the following examples we use the default instrument-sets library, defined in the ‘GM Instrument Sets.lisp’ file, which you will find in the Library panel. How to create your own instrument-sets library, you will find in the DEF-INSTRUMENT-SETS document.
     
    Instrument treble:
    (ps 'gm :treble (list '((s a4 leg d5 leg fs4 leg d5 leg g4 leg d5)                 (s a4 leg d5 leg fs4 leg d5 leg g4 leg d5)                 (s a4 leg d5 leg cs5 leg b4 leg a4 leg g4 leg)                 (s fs4 leg d4 leg e4 leg cs4 leg e d4)))     :key-signature '(d maj)     :time-signature '(3 8 1)     :tempo 112)
     
    Instrument piano:
    (ps 'gm :p (list '((s a4 leg d5 leg fs4 leg d5 leg g4 leg d5)                (s a4 leg d5 leg fs4 leg d5 leg g4 leg d5)                (s a4 leg d5 leg cs5 leg b4 leg a4 leg g4 leg)                (s fs4 leg d4 leg e4 leg cs4 leg e d4))              '((e fs3 d3 e3)                (e fs3 d3 e3)                (e fs3 g3 a3)                (e d3 a2 d2)))     :key-signature '(d maj)     :time-signature '(3 8 1)     :tempo 112     :title "G. Ph. Telemann, 12 Fantasie per clavicembalo TWV 33-n.1, 1732")  

     
    Examples:
    The examples below demonstrate how quickly you can preview your progress at any stage of your work ie. voices, instrumentation etc…
     
    (setf p1 '(q d4 pp s eb4 < leg g4 < leg bb4 < leg a4 q. cs5 mf -e       3q gs5 > leg fs5 > leg c5 > b4 > leg f4 leg e4) p2 '(t d4 < leg eb4 < leg g4 < leg bb4 q. a4 marc       t fs4 mf leg gs4 leg e. c5 e b4 t f5 leg e5 leg d5 leg       eb5 3q bb5 > a4 > bb5 > e a4 pp stacc -e) p3 '(q d5 leg eb5 3q g4 stacc bb4 stacc a4 stacc       e. cs4 marc s gs4 leg q gs4 -q) p4 '(-q. e d4 pp q. eb5 mf e g4 q bb4 trem a4 trem) p5 '(q. fs3 pp 3e c3 < leg b4 < leg f4 e d3 mf s eb3 leg       g3 leg bb3 leg a3 e fs3 leg fs3 3e gs4 > stacc       c5 > stacc b5 > stacc t f5 pp e.. e5) p6 '(q cs3 pp -q t gs3 marc e.. fs3 mf leg e c3 -e       t b3 leg f3 q.. e4 pp) )  
    Please note how the list function is used to enclose the instrument voices. The number of voices in an instrument should not exceed the layout of a particular instrument. For example a piano uses a two staff notation therefore the input should be a two lists in a list (list (list right-hand) (list left-hand)).
     
    (ps 'gm :p (list (list p1) (list p6)))  

     
     
    Instrument oboe, clarinet and bassoon:
    (ps 'gm :ob (list p1)     :cl (list p3)     :bn (list p6))  

     
    Brass Quintet:
    (ps 'gm :b5 (list p1 p2 p3 p4 p5))  
     

     
     
     
    DEF-UNFOLD
    UNFOLD
     
    The DEF-UNFOLD and UNFOLD function opens up a whole new set of possibilities for the composer using OPUSMODUS. It can prove a very powerful tool in defining methods (functions) from the outset, for a specific work or as a global index of your most used functions. To be able to store methods, processes and solutions and call them at anytime becomes a valuable resource for a composers workflow. This function is a companion to the UNFOLD function.
    (def-unfold m1   var (:pitch (pitch-variant x :variant '?))   dyn (:velocity (velocity-to-dynamic x))   )  
    (setf omn '(s bb4 p a4 h. db4 t gs4 mf fs4 c5 b4 q f5 e5))  
    To run the defined methods in a given omn-form sequence use the UNFOLD function:
    (unfold 'm1 '(var dyn) omn)  
    Examples:
    (def-unfold m2   7   (:pitch (pitch-transpose 7 x))   -12 (:pitch (pitch-transpose -12 x))   ret (:all (gen-retrograde x :flatten t))   var (:pitch (pitch-variant x :variant '?))   gf  (nil (gen-fragment '(3) '(3) x))   lrq (:length (length-rational-quantize x))   dyn (:velocity (velocity-to-dynamic x))   ls  (nil (length-span '(6/4 6/4) x))   ob  (:pitch (ambitus 'oboe x))   bn  (:pitch (ambitus 'bassoon x))   hn  (:pitch (ambitus 'french-horn x))   )  
    Please note that the number of methods within an instance can be much bigger than in the example above.
     
    Two bars of omn - opusmodus notation
    (setf mat '((q d4 pp s eb4 < leg g4 < leg bb4 < leg a4 q. cs5 mf              -e 3q gs5 > leg fs5 > leg c5 > b4 > leg f4 leg e4)             (t d4 < leg eb4 < leg g4 < leg bb4 q. a4 marc              t fs4 mf leg gs4 leg e. c5 e b4 t f5 leg e5 leg d5 leg eb5              3q bb5 > a4 > bb5 > e a4 pp stacc -e)))  
    Applying methods:
    (setf t1 (unfold 'm2 7 mat) t2 (unfold 'm2 '(-12 var ob) mat) t3 (unfold 'm2 'var mat) t4 (unfold 'm2 '(-12 gf lrq ls dyn ret var hn) t3) t5 (unfold 'm2 '(gf lrq ls dyn bn) t2) )  
    The result with a Wind-Quintet layout:
    (ps 'gm :w5 (list t1 t2 t3 t4 t5))  

     
     
     
    BIND-TO-INTERVAL
     
    The function BIND-TO-INTERVAL will bind (connect) a series of lists (patterns) to each-other with the given interval. Each transposition value is the sum of the last pitch in the list plus the given interval. The result of the process is a start transposition value for the next list. If rotate and variant options are used, the rotate process is the first followed by variant and finally the start transposition.
     
    In the example below the last pitch in the first list is g4, with binding interval 1 (semitone), therefore the start transposition value of the next list is gs4:
    (bind-to-interval '(1) '((s c4 d4 e4 g4) (s c4 d4 g4 e4))) => ((s c4 d4 e4 g4) (s gs4 bb4 eb5 c5))  
    Examples:
    (setf pattern '((s c4 d4 e4 g4)                 (s c4 d4 g4 e4)                 (s g4 e4 c4 d4)                 (s c4 d4 f4 g4)                 (s c4 d4 g4 f4)                 (s g4 f4 c4 d4)                 (s c4 d4 g4 f4)                 (s g4 gb4 f4 g4)                 (s g4 gb4 f4 a4)                 (s d4 f4 g4 a4)                 (s a4 g4 f4 d4)                 (s d4 f4 g4 c5)))  
    In this example the binding intervals are 1 and 2 randomly selected:
    (bind-to-interval (rnd-sample (length pattern) '(1 2)) pattern) => ((s c4 d4 e4 g4) (s gs4 bb4 eb5 c5) (s d5 b4 g4 a4) (s b4 cs5 e5 fs5)     (s g5 a5 d6 c6) (s d6 c6 g5 a5) (s bb5 c6 f6 eb6) (s f6 e6 eb6 f6)     (s g6 fs6 f6 a6) (s bb6 cs7 eb7 f7) (s fs7 e7 d7 b6) (s cs7 e7 fs7 b7))  
    In the next example the binding intervals are 13 and -13 with random variant:
    (bind-to-interval (rnd-sample (length pattern) '(13 -13)) pattern :variant '?) => ((s c4 d4 e4 g4) (s fs3 a3 e3 d3) (s eb4 fs4 bb4 gs4) (s g3 f3 d3 c3)     (s b1 a1 e1 fs1) (s g2 f2 bb2 c3) (s b1 a1 d2 e2) (s eb1 eb1 d1 cs1)     (s d2 cs2 c2 e2) (s f3 d3 c3 bb2) (s b3 d4 e4 fs4) (s g5 bb5 c6 f6))  
    Here the binding intervals are 1, -1, 2 -2:
    (bind-to-interval '(1 -1 2 -1 2 -1 2) pattern) => ((s c4 d4 e4 g4) (s gs4 bb4 eb5 c5) (s b4 gs4 e4 fs4) (s gs4 bb4 cs5 eb5)     (s d5 e5 a5 g5) (s a5 g5 d5 e5) (s eb5 f5 bb5 gs5) (s bb5 a5 gs5 bb5)     (s b5 bb5 a5 cs6) (s c6 eb6 f6 g6) (s a6 g6 f6 d6) (s cs6 e6 fs6 b6)) (bind-to-interval '(1 -1 2 -1 2 -1 2) pattern :variant '?) => ((s c4 d4 e4 g4) (s gs4 f4 bb4 c5) (s b4 gs4 e4 fs4) (s gs4 bb4 cs5 eb5)     (s d5 c5 a4 g4) (s a4 g4 e4 d4) (s cs4 eb4 gs4 fs4) (s gs4 a4 bb4 gs4)     (s a4 bb4 b4 g4) (s fs4 a4 b4 cs5) (s eb5 c5 bb4 gs4) (s g4 e4 d4 a3))  
    Example with rotation:
    (bind-to-interval (rnd-sample (length pattern) '(1 2)) pattern                   :rotate '(1 2 1 2 1)) => ((s c4 d4 e4 g4) (s a4 f4 g4 c5) (s d5 e5 a5 fs5) (s gs5 cs5 eb5 fs5)     (s gs5 fs5 cs5 eb5) (s e5 a5 g5 d5) (s e5 b4 cs5 fs5) (s g5 a5 a5 gs5)     (s bb5 gs5 g5 fs5) (s g5 a5 d5 f5) (s g5 d6 c6 bb5) (s c6 d5 f5 g5))  
     
    PAN
     
    This function converts mixer panning values in the range from -100(L) to 100(R) into MIDI pan values. The centre position value in the PAN function is 0.
     
    Examples:
    (pan 0) => 64 (pan '(-12 0 12)) => (56 64 72) (pan '(-30 -10 10 30)) => (45 58 70 83)  
    PAN in DEF-SCORE instrument instants definition:
    (def-score SQ            (:title "String Quartet - VSL Show"             :key-signature 'chromatic             :time-signature (get-time-signature vln1)             :tempo tempo             :layout (string-quartet-layout                      'violin1 'violin2 'viola 'cello))      (violin1    :omn vln1    :port 0    :channel 1 :sound 'vsl-violin-solo    :program 0 :pan (pan -30))      (violin2    :omn vln2    :channel 2 :sound 'vsl-violin-solo    :program 0 :pan (pan -10))      (viola    :omn vla    :channel 3 :sound 'vsl-viola-solo    :program 0 :pan (pan 10))      (cello    :omn vlc    :channel 4 :sound 'vsl-cello-solo    :program patches-vc :pan (pan 30))   )  
    PAN in DEF-INSTRUMENT-SETS instance:
    :string-quartet   (:layout string-quartet-layout            :port nil            :channel '(1 2 3 4)            :sound 'gm            :program '(violin violin viola cello)            :controllers nil            :pan (pan '(-30 -10 10 30))            :volume 92)  
     
    Multi Voice Snippet
     
    Select or place the mouse cursor at the end of the expression and press ⌘2.
    This snippet is very useful in sketching and testing the progress of your work ie. instrumentation, voice density etc…
    (setf p1 '(q d4 pp s eb4 < leg g4 < leg bb4 < leg a4 q. cs5 mf -e            3q gs5 > leg fs5 > leg c5 > b4 > leg f4 leg e4)       p2 '(t d4 < leg eb4 < leg g4 < leg bb4 q. a4 marc            t fs4 mf leg gs4 leg e. c5 e b4 t f5 leg e5 leg d5 leg            eb5 3q bb5 > a4 > bb5 > e a4 pp stacc -e)       p3 '(q d5 leg eb5 3q g4 stacc bb4 stacc a4 stacc            e. cs4 marc s gs4 leg q gs4 -q)       p4 '(q. fs3 pp 3e c3 < leg b4 < leg f4 e d3 mf s eb3 leg            g3 leg bb3 leg a3 e fs3 leg fs3 3e gs4 > stacc            c5 > stacc b5 > stacc t f5 pp e.. e5)       p5 '(-q. e d4 pp q. eb5 mf e g4 q bb4 trem a4 trem)       p6 '(q cs4 pp -q t gs4 marc e.. fs4 mf leg e c4 -e            t b4 leg f4 q.. e4 pp)       p7 '(-q e d4 leg eb4 h g4 mf leg q. g4 > -e)       p8 '(s bb3 pp leg a3 h. db3 t gs4 mp fs3 < c5 < b3 q f4 marc e4)       ) (list p1 p2 p3 p4)  

     
     
     
     
    New window display:
    (display-midi *last-score* :display :window) (display-musicxml 'score :display :window)  
    Changes to ‘Evaluate Score’ and ‘Last Score’ shortcut keys.
     
    Best wishes,
    Janusz
  25. Like
    ydepps reacted to opmo in Opusmodus - second monitor   
    The upcoming release will allow you to open display-midi, display-musicxml, graphs and snippets in a separate window. For any of you using second monitor this will be great addition to your work flow.
     
    Examples:
    (display-midi 'score :display :window) (display-musicxml 'score :display :window)  
    Best,
    Janusz
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy