opmo

Administrators
  • Content count

    995
  • Joined

  • Last visited

  • Days Won

    127

Everything posted by opmo

  1. Opusmodus 1.2.22226
  2. Update to GEN-CONTROLLER function: The GEN-CONTROLLER function generates controller values in a given span (total length) with a defined time for each of the values (<value> <time>). The count of the sent messages is the sum of the time values equal to the span value. For example span 1/4 with time 1/128 will produce 32 values. (setf values (gen-sine 32 4 1.0)) (gen-controller 1/4 values) => ((64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (64 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128)) The :min and :max option allows you to control the minimum and maximum value of the sent messages: (gen-controller 1/4 values :min 20 :max 80) => ((50 1/128) (71 1/128) (80 1/128) (71 1/128) (50 1/128) (29 1/128) (20 1/128) (29 1/128) (50 1/128) (71 1/128) (80 1/128) (71 1/128) (50 1/128) (29 1/128) (20 1/128) (29 1/128) (50 1/128) (71 1/128) (80 1/128) (71 1/128) (50 1/128) (29 1/128) (20 1/128) (29 1/128) (50 1/128) (71 1/128) (80 1/128) (71 1/128) (50 1/128) (29 1/128) (20 1/128) (29 1/128)) If the values count is less than the sum of the time values equal to the span then the last value of the list is used to complete the count. (gen-controller 1/2 values) => ((64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (64 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128)) The loop option will trim the values to complete the time count: (gen-controller 1/2 values :loop t) => ((64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (64 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (64 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128)) Example with user defined times: (setf length '(q = s = = = h)) (gen-controller 2 values :time length) => ((64 1/4) (108 1/4) (127 1/16) (108 1/16) (63 1/16) (19 1/16) (0 1/2) (19 1/4) (64 1/4) (108 1/16) (127 1/16) (108 1/16) (64 1/16)) GEN-CONTROLLER inside the DEF-SCORE instrument instance: :controllers (45 (gen-controller 1/2 values :loop t)) Score Example: (progn (setf vec1 (gen-sine 1024 3 1)) (setf vec2 (gen-sine 1024 4 1)) (setf vec3 (gen-sine 1024 10 0.5)) (def-score ctrl (:key-signature 'chromatic :time-signature '(8 4) :tempo 78) (ctrl :omn '((w c4 c4) (w cs5 cs5) (w d4 d4) (w eb5 eb5) (d eb5)) :sound 'gm :channel 1 :program 'String-Ensemble-1 :volume (gen-controller 10 vec1 :min 20 :max 100) :tuning '((0 0.25) (-0.5 0) (0 0.5) (0.5 0.75) (0.5)) :pan (assemble-seq (gen-controller 5 vec2) (gen-controller 5 vec1)) :controllers (1 (assemble-seq '(127 5) (gen-controller 5 vec1)))) )) Best wishes, JP
  3. Just use numbers to pitch, lengths etc... conversion. I would advise you to check the System Function documentation and play with the examples a bit :-) Example: (setf fib (interval-modus (fibonacci 0 23) :mod 12)) (setf pitch (integer-to-pitch fib)) => (c4 cs4 cs4 d4 eb4 f4 gs4 cs4 a4 bb4 g4 f4 c4 f4 f4 bb4 eb4 cs4 e4 f4 a4 d4 b4 cs4) (setf length (vector-to-length 1/16 1 2 fib)) => (1/16 1/16 1/16 1/16 1/16 1/16 1/8 1/16 1/8 1/8 1/8 1/16 1/16 1/16 1/16 1/8 1/16 1/16 1/16 1/16 1/8 1/16 1/8 1/16) (make-omn :length length :pitch pitch) => (s c4 cs4 cs4 d4 eb4 f4 e gs4 s cs4 e a4 bb4 g4 s f4 c4 f4 f4 e bb4 s eb4 cs4 e4 f4 e a4 s d4 e b4 s cs4)
  4. There are endless possibilities: Example 1 (let* ((l '(0 1 -1 0)) (r l)) (loop repeat 3 collect (x+b l (car (setf r (gen-rotate -1 r)))) into bag finally (return (append (list l) bag)))) => ((0 1 -1 0) (1 2 0 1) (-1 0 -2 -1) (0 1 -1 0)) Example 2 (gen-eval 4 '(x+b (rnd-order '(0 1 -1 0)) (rnd-pick '(0 1 -1 0)))) => ((0 0 1 -1) (-1 -2 0 -1) (1 2 0 1) (-1 0 -2 -1)) Example 3 (progn (setf l '(0 1 -1 0)) (gen-eval 4 '(setf l (x+b (rnd-order l) (rnd-pick '(0 1 -1 0)))))) => ((1 0 2 1) (2 3 2 1) (1 0 1 2) (1 0 2 1))
  5. New functions: HALF-SINE, HALF-SAWTOOTH, HALF-TRIANGLE, HALF-SQUARE JOIN-ATTRIBUTES, DISJOIN-ATTRIBUTES HALF-SINE The HALF-SINE function generates a sequence of vectors that describe and simulate the characteristics of a half sine wave. First the GEN-SINE: (gen-sine 32 1 0.5) Now the HALF-SINE: (half-sine 32 0.5) With control over resolution (the length of the wave), frequency and amplitude (and additional control over phase and modulation) this function can be a remarkably effective tool for creating gestural forms in pitch, rhythm, dynamics and structure. Examples: With the shortcut ⌃1 (menu: Plot/Numbers) as a guide it's possible to experiment with shapes and forms before applying these to musical parameters. (half-sine 120 1.0 :phase 90) In the example below the keyword :modulation is applied and its values are generated by the GEN-SINE function. (half-sine 120 1.0 :phase 90 :modulation (gen-sine 120 1 0.2)) In the example below the amplitude parameter '(0.5 0.2 0.1) has three values. These represent a sequence of alternating amplitudes. (half-sine 120 '(0.5 0.2 0.1)) In this final example the keyword :phase is used to produce a different start point (90) in the 360 degree range. (half-sine 120 '(0.5 0.2 0.1) :phase 90) In this final example the GEN-SINE the amplitude values are generated by the HALF-SINE function: (gen-sine 120 5 (half-sine 120 1.0 :phase 180)) (gen-sine 120 5 (half-sine 240 1.0 :phase 180)) Here below there's a clear example of how alternating amplitude values can affect the wave output when the vectors are mapped to pitches. (vector-to-pitch '(g3 g5) (gen-sine 120 32 (half-sine 120 1.0 :phase 180)) HALF-TRIANGLE The HALF-TRIANGLE function generates a sequence of vectors that describe and simulate the characteristics of a half triangle wave. First the GEN-TRIANGLE: (gen-triangle 32 1 0.5) Now the HALF-TRIANGLE: (half-triangle 32 0.5) With control over resolution (the length of the wave), frequency and amplitude (and additional control over phase and modulation) this function can be a remarkably effective tool for creating gestural forms in pitch, rhythm, dynamics and structure. Examples: With the shortcut ⌃1 (menu: Plot/Numbers) as a guide it's possible to experiment with shapes and forms before applying these to musical parameters. (half-triangle 120 1.0 :phase 45) In the example below the keyword :modulation is applied and its values are generated by the GEN-TRIANGLE function. (half-triangle 120 1.0 :phase 45 :modulation (gen-triangle 120 1 0.2)) In the example below the amplitude parameter '(0.5 0.2 0.1) has three values. These represent a sequence of alternating amplitudes. (half-triangle 120 '(0.5 0.2 0.1)) In this final example the keyword :phase is used to produce a different start point (90) in the 360 degree range. (half-triangle 120 '(0.5 0.2 0.1) :phase 90) In this final example the GEN-TRIANGLE the amplitude values are generated by the HALF-TRIANGLE function: (gen-triangle 120 5 (half-triangle 120 1.0 :phase 180)) (gen-triangle 120 5 (half-triangle 240 1.0 :phase 180)) Here below there's a clear example of how alternating amplitude values can affect the wave output when the vectors are mapped to pitches. (vector-to-pitch '(g3 g5) (gen-triangle 120 32 (half-triangle 120 1.0 :phase 180)) HALF-SQUARE The HALF-SQUARE function generates a sequence of vectors that describe and simulate the characteristics of a half square wave. First the GEN-SQUARE: (gen-square 32 1 0.5) Now the HALF-SQUARE: (half-square 32 0.5) With control over resolution (the length of the wave), frequency and amplitude (and additional control over phase and modulation) this function can be a remarkably effective tool for creating gestural forms in pitch, rhythm, dynamics and structure. Examples: With the shortcut ⌃1 (menu: Plot/Numbers) as a guide it's possible to experiment with shapes and forms before applying these to musical parameters. (half-square 120 1.0 :phase 45) In the example below the keyword :modulation is applied and its values are generated by the GEN-SQUARE function. (half-square 120 1.0 :phase 90 :modulation (gen-square 120 1 0.7)) In the example below the amplitude parameter '(0.5 0.2 0.1) has three values. These represent a sequence of alternating amplitudes. (half-square 120 '(0.5 0.2 0.1)) In this final example the keyword :phase is used to produce a different start point (90) in the 360 degree range. (half-square 120 '(0.5 0.2 0.1) :phase 90) In this final example the GEN-SQUARE the amplitude values are generated by the HALF-SQUARE function: (gen-square 120 5 (half-square 120 1.0 :phase 180)) (gen-square 120 5 (half-square 240 1.0 :phase 180)) Here below there's a clear example of how alternating amplitude values can affect the wave output when the vectors are mapped to pitches. (vector-to-pitch '(g3 g5) (gen-square 120 32 (half-square 120 1.0 :phase 180)) HALF-SAWTOOTH The HALF-SAWTOOTH function generates a sequence of vectors that describe and simulate the characteristics of a half sawtooth wave. First the GEN-SAWTOOTH: (gen-sawtooth 32 1 0.5) Now the HALF-SAWTOOTH: (half-sawtooth 32 0.5) With control over resolution (the length of the wave), frequency and amplitude (and additional control over phase and modulation) this function can be a remarkably effective tool for creating gestural forms in pitch, rhythm, dynamics and structure. Examples: With the shortcut ⌃1 (menu: Plot/Numbers) as a guide it's possible to experiment with shapes and forms before applying these to musical parameters. (half-sawtooth 120 1.0 :phase 90) In the example below the keyword :modulation is applied and its values are generated by the GEN-SAWTOOTH function. (half-sawtooth 120 1.0 :phase 90 :modulation (gen-sawtooth 120 1 0.7)) In the example below the amplitude parameter '(0.5 0.2 0.1) has three values. These represent a sequence of alternating amplitudes. (half-sawtooth 120 '(0.5 0.2 0.1)) In this final example the keyword :phase is used to produce a different start point (90) in the 360 degree range. (half-sawtooth 120 '(0.5 0.2 0.1) :phase 90) In this final example the GEN-SAWTOOTH the amplitude values are generated by the HALF-SAWTOOTH function: (gen-sawtooth 120 5 (half-sawtooth 120 1.0 :phase 180)) (gen-sawtooth 120 5 (half-sawtooth 240 1.0 :phase 180)) Here below there's a clear example of how alternating amplitude values can affect the wave output when the vectors are mapped to pitches. (vector-to-pitch '(g3 g5) (gen-sawtooth 120 32 (half-sawtooth 120 1.0 :phase 180)) DISJOIN-ATTRIBUTES The function DISJOIN-ATTRIBUTES separates a combined articulations into a list of its individual attributes. (disjoin-attributes 'leg+ponte) => (leg ponte) (disjoin-attributes 'leg+ponte+stacc) => (leg ponte stacc) JOIN-ATTRIBUTES The function JOIN-ATTRIBUTES merges a list of attributes into one articulation. (join-attributes '(leg ponte)) => leg+ponte (join-attributes '(leg+ponte stacc)) => leg+ponte+stacc Fix to OMN-REPLACE :articulation Best wishes, JP
  6. You define the sound set for the virtual instrument and not for the DAW. Opusmodus supports any CC and naturally continuously sending of messages, for that you use the :controller keyword. The :tuning is not a controller. If the span is 1/4 and the resolution is 1/128 then 32 values are need it. (/ 1/4 1/128) => 32 Test1: (length (gen-controller 1/4 (gen-sine 120 3 1))) => 32 (length (gen-controller 1/4 (gen-sine 1200 3 1))) => 32 (find-sum (mapcar '2~ (gen-controller 1/4 (gen-sine 120 3 1)))) => 1/4 (find-sum (mapcar '2~ (gen-controller 1/4 (gen-sine 1200 3 1)))) => 1/4 If the span is 2 and the resolution is 1/128 then 256 values are need it. (/ 2 1/128) => 256 Test2: (length (gen-controller 2 (gen-sine 256 3 1))) => 256 (length (gen-controller 2 (gen-sine 1200 3 1))) => 256 (find-sum (mapcar '2~ (gen-controller 2 (gen-sine 256 3 1)))) => 2 (find-sum (mapcar '2~ (gen-controller 2 (gen-sine 1200 3 1)))) => 2 You can control the time (resolution): (gen-controller 4 (gen-sine 1024 4 1) :time '(1/2 1/4 1/128 1/128)) => ((64 1/2) (65 1/4) (67 1/128) (68 1/128) (70 1/2) (71 1/4) (73 1/128) (74 1/128) (76 1/2) (77 1/4) (79 1/128) (80 1/128) (82 1/2) (83 1/4) (85 1/128) (86 1/128) (88 1/2) (89 1/4) (91 1/128) (92 1/128) (93 11/64)) I make some changes (more control) to the function. Release soon with updated doc.
  7. Logic, Reaktor, Kontakt and VSL Ensemble Pro works beautifully with Opusmodus. The Mozarteum is using Opusmodus with Reaper as well :-)
  8. The :tuning has no timing resolution control. To control the timing you must use :controller keyword.
  9. The new PPRINT-SCORE function will print the bar numbers in each of the instruments: (pprint-score (compile-score 'add-triangle :output :score)) Result: (def-score add-triangle (:title "Waves Add-Triangle" :composer "OPMO" :copyright "© 2014 Opusmodus" :key-signature 'chromatic :layout '(:brace (:flexible-treble rh) (:flexible-bass lh) :name "" :abbr "" :flexible-clef t) :rewrite-lengths 't :time-signature '((1 4 1) (3 8 1) (5 16 1) (3 8 2) (1 4 3) (5 16 2) (3 8 1) (1 4 1) (5 16 1) (3 8 2) (5 16 2) (1 4 2) (3 8 1) (1 4 1) (3 8 1) (7 16 1) (5 16 2) (7 16 1) (1 4 1) (5 16 1) (1 4 3) (3 8 1) (5 16 1) (3 8 2) (1 4 3) (5 16 2) (3 8 1) (1 4 1) (5 16 1) (3 8 2) (5 16 2) (1 4 2) (3 8 1)) :tempo '120) (rh :omn '(#|1|# (s g1 ff gs1 mf a1 p b1 mf) #|2|# (e c2 p cs2 ff s d2 p e2 mf) #|3|# (e f2 s fs2 ff g2 p a2 ff) #|4|# (e b2 ff c3 s cs3 eb3) #|5|# (e e3 mf f3 ff s fs3 a3 mf) #|6|# (s bb3 b3 ff c4 mf e4 ff) #|7|# (s e4 p f4 ff mf b4 p) #|8|# (s b4 mf ff mf fs5) #|9|# (s fs5 p e f5 mf s p cs6) #|10|# (s cs6 mf c6 b5 ff e g6 mf) #|11|# (s g6 ff e e f6 s g6) #|12|# (s g6 p ff g6 fs6) #|13|# (s g6 ff g6 e s fs6) #|14|# (e fs6 mf s e p s ff) #|15|# (s fs6 p e s e mf) #|16|# (s fs6 ff e s s f6 mf) #|17|# (e fs6 ff s mf p f6 mf) #|18|# (s f6 ff fs6 fs6 mf f6 ff) #|19|# (s f6 ff fs6 p ff f6 p) #|20|# (e f6 p s ff e fs6 mf s f6) #|21|# (s f6 ff mf p ff) #|22|# (s f6 ff mf e p ff) #|23|# (e f6 ff f6 f6 p s mf) #|24|# (s f6 f6 e ff s) #|25|# (s f6 p f6 e mf s) #|26|# (e f6 p mf s p e) #|27|# (s f6 p f6 e6 f6 mf) #|28|# (s f6 ff e6 p e eb6 s f6 ff) #|29|# (s f6 mf e6 ff d6 f6 p) #|30|# (s f6 mf e6 d6 ff f6) #|31|# (s f6 mf e6 p cs6 ff f6 p) #|32|# (e f6 p mf s cs6 ff f6 mf) #|33|# (e f6 s p cs6 fs6 ff) #|34|# (e f6 ff e6 p s bb5 f6 mf) #|35|# (e e6 p b5 ff s f5 mf eb6 p) #|36|# (s bb5 mf fs5 p cs5 mf a5 ff) #|37|# (s e5 p c5 mf gs4 p d5 mf) #|38|# (s bb4 ff fs4 p d4 g4) #|39|# (s e4 ff e d4 mf s b3 p eb4) #|40|# (s cs4 ff bb3 p gs3 mf e c4) #|41|# (s a3 ff e p b3 s gs3 mf) #|42|# (s bb3 ff c4 d4 mf b3 ff) #|43|# (s cs4 p eb4 e f4 mf s eb4 ff) #|44|# (e e4 mf s fs4 e gs4 p s fs4 mf) #|45|# (s g4 p e a4 s bb4 ff e a4 mf) #|46|# (s bb4 p e c5 ff s cs5 p c5) #|47|# (e cs5 p s eb5 e5 eb5 mf) #|48|# (s e5 ff fs5 g5 mf fs5 p) #|49|# (s g5 mf gs5 a5 p mf) #|50|# (e bb5 p s b5 e c6 s)) :channel 1 :sound 'gm :program 'acoustic-grand-piano :volume 90 :pan 64) (lh :omn '(#|1|# (s gs1 p g1 b0 mf a0 ff) #|2|# (e c1 p cs1 mf s d1 p e1 mf) #|3|# (e a1 p s g1 mf fs1 f1) #|4|# (e b1 ff c2 s cs2 mf eb2) #|5|# (e e2 ff f2 mf s fs2 a2 p) #|6|# (s e3 mf c3 p b2 mf bb2 ff) #|7|# (s b3 mf f4 f4 ff fs4) #|8|# (s b3 ff p mf fs4 p) #|9|# (s cs5 mf e a5 s p gs5 mf) #|10|# (s g5 ff eb6 p d6 mf e cs6 ff) #|11|# (s g5 p e a5 mf g5 ff s) #|12|# (s fs5 p g5 mf g5 g5 ff) #|13|# (s g5 ff mf e p s fs5 ff) #|14|# (e fs5 p s ff e p s mf) #|15|# (s fs5 p e s mf e p) #|16|# (s f5 mf e fs5 ff s s mf) #|17|# (e f5 ff s fs5 mf fs5 fs5) #|18|# (s f5 e5 p e5 f5 ff) #|19|# (s f5 ff e5 e5 mf f5 ff) #|20|# (e f5 ff s fs5 mf e f5 ff s mf) #|21|# (s f5 ff mf ff f5) #|22|# (s f5 ff f5 e e) #|23|# (e f5 mf ff p s ff) #|24|# (s f5 p ff e p s) #|25|# (s f5 mf ff e mf s ff) #|26|# (e f5 mf f5 s p e mf) #|27|# (s f5 p f5 fs5 f5 ff) #|28|# (s f5 ff fs5 p e g5 s f5) #|29|# (s f5 mf f5 e5 p d5 mf) #|30|# (s f5 gs5 fs5 p f5 mf) #|31|# (s f5 p fs5 a5 ff f5) #|32|# (e f5 ff p s a5 f5 mf) #|33|# (e fs5 s f5 p ff cs5) #|34|# (e f5 ff fs5 p s c6 ff f5) #|35|# (e e5 ff b4 s f4 mf eb5 p) #|36|# (s bb4 mf d5 p g5 ff b4 mf) #|37|# (s e4 p gs4 c5 fs4 mf) #|38|# (s g3 p d3 mf fs3 p bb3) #|39|# (s e3 mf e fs3 ff s a3 p f3 mf) #|40|# (s c3 ff gs2 mf bb2 p e cs3) #|41|# (s b2 p e a2 ff mf s gs2) #|42|# (s b2 gs2 p bb2 mf c3) #|43|# (s eb3 f3 p e eb3 mf s cs3 ff) #|44|# (e fs3 ff s gs3 e fs3 s e3 p) #|45|# (s g3 p e a3 ff s bb3 mf e a3) #|46|# (s c4 ff e cs4 s c4 mf bb3 ff) #|47|# (e e4 p s eb4 eb4 cs4 ff) #|48|# (s e4 mf fs4 ff g4 p fs4 ff) #|49|# (s a4 mf p bb4 mf b4 ff) #|50|# (e bb4 p s a4 e gs4 s)) :channel 1 :sound 'gm :program 'acoustic-grand-piano :volume 90 :pan 64)) But you don't need to use the function PPRINT-SCORE. After the evaluation of the score just press ⌥⌘⇥
  10. There are many occasions when we would like to add articulations by hand to our generated scores. The first thing we need to do is to convert (output) the score into omn format. Algorithmically generated score. (setf size 200) (setf vector (add-triangle-waves 4 size 1 0.6 :modulation (gen-triangle size 1 '(0.5 0.4 0.3 0.6) :modulation (gen-triangle size 1 0.3 :phase 180)))) (setf pitches (gen-divide 4 (vector-to-pitch '(g1 g6) vector))) (setf transpose (pitch-transpose -12 pitches)) (setf variants (pitch-variant transpose :variant '?)) (setf length (rnd-sample 120 '(s e s s))) (setf time (span pitches length)) (setf dynamics '(p mf ff)) (def-score add-triangle (:title "Waves Add-Triangle" :composer "OPMO" :copyright "© 2014 Opusmodus" :key-signature 'chromatic :time-signature (get-time-signature time) :tempo 120 :layout (piano-solo-layout 'rh 'lh :flexible-clef t)) (rh :length time :pitch pitches :velocity (rnd-sample size dynamics) :port 0 :sound 'gm :channel 1 :program 'acoustic-grand-piano) (lh :length time :pitch variants :velocity (rnd-sample size dynamics))) The expression below will convert the score into omn score format. (compile-score 'add-triangle :output :score) To get a more readable version of the score add PPRINT (print pretty) at the beginning of the expression. (pprint (compile-score 'add-triangle :output :score)) Output in the Listener: (def-score add-triangle (:title "Waves Add-Triangle" :composer "OPMO" :copyright "© 2014 Opusmodus" :key-signature 'chromatic :layout '(:brace (:flexible-treble rh) (:flexible-bass lh) :name "" :abbr "" :flexible-clef t) :time-signature '((1 4 2) (5 16 2) (1 4 1) (5 16 1) (3 8 2) (5 16 2) (3 8 1) (5 16 2) (1 4 1) (5 16 1) (1 4 1) (3 8 2) (1 4 1) (3 8 1) (5 16 1) (3 8 1) (5 16 2) (3 8 1) (7 16 1) (1 4 1) (3 8 1) (1 4 1) (5 16 1) (1 4 2) (5 16 2) (1 4 1) (5 16 1) (3 8 2) (5 16 2) (3 8 1) (5 16 2) (1 4 1) (5 16 1) (1 4 1) (3 8 2) (1 4 1) (3 8 1)) :tempo '120) (rh :omn '((s g1 ff gs1 p a1 ff b1) (s c2 mf cs2 ff d2 e2 mf) (e f2 p s fs2 ff g2 p a2) (s b2 mf e c3 s cs3 ff eb3) (s e3 mf f3 ff fs3 p a3 mf) (s bb3 ff b3 e c4 p s e4) (e e4 ff s f4 e s b4 p) (e b4 s s mf e fs5 ff) (s fs5 mf f5 p mf e cs6) (s cs6 c6 p e b5 mf s g6 ff) (s g6 p ff e f6 g6 mf) (s g6 g6 p ff e fs6) (s g6 mf p e s fs6) (s fs6 fs6 ff mf ff) (e fs6 p s ff fs6 fs6 mf) (s fs6 fs6 ff p f6) (s fs6 ff mf e e f6) (s f6 e fs6 fs6 p s f6) (s f6 mf fs6 fs6 p f6) (e f6 f6 ff s fs6 p f6 ff) (s f6 p e s s) (s f6 e mf p s ff) (s f6 mf p mf e ff) (s f6 p e s mf p) (s f6 ff e mf s e p) (e f6 s e ff mf) (s f6 p mf e6 ff f6 p) (s f6 ff e6 mf e eb6 p f6 mf) (s f6 e6 d6 f6) (s f6 e6 ff d6 e f6 p) (s f6 mf e6 ff cs6 f6 mf) (s f6 ff f6 cs6 mf f6 ff) (e f6 mf s s cs6 p fs6 mf) (s f6 ff e e6 p s bb5 mf f6) (s e6 p b5 f5 eb6) (s bb5 fs5 ff e cs5 p s a5 mf) (e e5 ff s c5 e gs4 mf s d5) (e bb4 s fs4 d4 e g4) (s e4 ff d4 b3 mf e eb4) (s cs4 p bb3 mf e gs3 p s c4 ff) (s a3 a3 mf e b3 ff gs3) (s bb3 c4 d4 e b3 mf) (s cs4 p eb4 mf e f4 p s eb4 ff) (s e4 fs4 gs4 p fs4 ff) (e g4 p s a4 mf bb4 a4) (s bb4 c5 cs5 p c5 mf) (s cs5 eb5 ff e e5 mf eb5 ff) (s e5 mf e fs5 g5 p s fs5 ff) (s g5 mf gs5 a5 p a5) (e bb5 ff b5 mf s c6 ff c6)) :channel 1 :sound 'gm :program 'acoustic-grand-piano :volume 90 :pan 64) (lh :omn '((s b0 p a0 mf gs1 g1) (s e1 d1 cs1 ff c1) (e a1 mf s g1 p fs1 mf f1) (s eb2 ff e cs2 s c2 mf b1 p) (s e2 mf eb2 d2 b1 p) (s e3 mf c3 p e b2 ff s bb2) (e b3 p s f3 mf e s e3 ff) (e b3 p s s ff e e3 mf) (s cs5 ff a5 p a5 e gs5 mf) (s cs5 ff c5 e b4 mf s g5 ff) (s g5 mf a5 ff e g5 p g5) (s g5 g5 mf g5 e fs5 ff) (s g5 p g5 e ff s gs5 mf) (s fs5 fs5 ff mf fs5) (e fs5 s p mf fs5) (s fs5 p ff p f5 mf) (s f5 p fs5 mf e e) (s f5 p e e5 e5 ff s f5) (s f5 p e5 e5 f5) (e f5 ff fs5 p s f5 ff f5) (s f5 e s p f5) (s f5 ff e e p s ff) (s f5 mf f5 f5 e p) (s f5 e ff s mf ff) (s f5 mf e p s e mf) (e f5 s e p f5) (s e5 f5 mf p f5) (s f5 g5 ff e fs5 p f5 ff) (s f5 fs5 mf gs5 f5 ff) (s f5 d5 e5 e f5 mf) (s cs5 e5 f5 f5 p) (s f5 ff mf p cs5) (e cs5 ff s f5 mf p fs5 mf) (s f5 e fs5 s c6 f5) (s e5 b4 p f4 eb5 mf) (s bb4 p a4 mf e fs4 p s cs4 ff) (e e4 mf s gs4 p e c5 mf s fs4 ff) (e bb3 s fs3 d3 e g3 mf) (s e3 p d3 b2 e eb3 ff) (s c3 mf e3 p e d3 ff s b2 mf) (s b2 ff a2 p e e gs2) (s b2 ff gs2 mf bb2 ff e c3 p) (s cs3 b2 mf e a2 ff s b2 p) (s fs3 e3 mf fs3 p gs3) (e g3 ff s f3 e3 p f3 ff) (s c4 mf cs4 c4 bb3) (s cs4 p eb4 mf e e4 eb4) (s fs4 p e g4 mf fs4 s e4) (s g4 gs4 p a4 a4) (e c5 ff mf s cs5 ff d5 p)) :channel 1 :sound 'gm :program 'acoustic-grand-piano :volume 90 :pan 64)) Copy the score from the Listener and paste it into the Composer panel. Now we are ready to add articulations etc... to the score by hand.
  11. I just tested the Ableton Live and Opusmodus Live Coding system - no problems here, but only on 1 port. added 6 minutes later Any program (Ableton Live, Logic etc...) can be controlled by OM. It is important to make a DEF-SOUND-SET file for your system first.
  12. Using length symbols is even better :-) (init-seed 434) (setf pitch '(a3 b3 c4 d4 a3 b3 c4 d4)) (setf theme1 (make-omn :pitch (gen-eval 12 '(rnd-octaves '(c1 c7) (rnd-order pitch))) :length '(e - - - = - - -) :velocity '(ff) :span :pitch )) (setf theme2 (make-omn :pitch (gen-eval 12 '(rnd-order pitch)) :length '(-e s = -e - - = - -) :velocity '(ff) :span :pitch )) (setf theme3 (make-omn :pitch (gen-eval 12 '(rnd-order pitch)) :length '(-e - = - - - = -) :velocity '(ff) :span :pitch )) (setf theme4 (make-omn :pitch (gen-eval 12 '(rnd-order pitch)) :length '(-e - - = - - - 3e = =) :velocity '(ff) :span :pitch )) (def-score temp ( :key-signature 'chromatic :time-signature '(4 4) :composer "Alain Jamot" :copyright "Copyright © 2017 alain jamot" :tempo 120 :flexible-clef t :ignore-velocity t ) (piano :omn theme1 :channel 1 :sound 'gm :program 'acoustic-grand-piano ) (flute :omn theme2 :channel 2 :sound 'gm :program 'flute ) (violin :omn theme3 :channel 3 :sound 'gm :program 'violin ) (marimba :omn theme4 :channel 4 :sound 'gm :program 'marimba ) )
  13. You might find the function OMN-RECONSTRUCT useful in your work: (omn-reconstruct '(e c4 mp stacc -3/16 -1/2 e. c4 p ord -1/8)) => (e c4 mp stacc -e. -h e. c4 p ord -e) (omn-reconstruct '(e c4 mp stacc -3/16 -1/2 e. c4 p ord -1/8 (leg q c4 d4 e4))) => (e c4 mp stacc -e. -h e. c4 p ord -e q c4 leg d4 leg e4) (omn-reconstruct '((e c4 p stacc -3/16) (-1/2 e. c4 ord) (-1/8 (leg q c4 d4 e4)))) => ((e c4 p stacc -e.) (-h e. c4 ord) (-e q c4 leg d4 leg e4)) (omn-reconstruct '((e c4 p stacc -3/16) (-1/2 e. c4 ord) (-1/8 (leg q c4 d4 e4))) :velocityp t) => ((e c4 p stacc -e.) (-h e. c4 p ord) (-e q c4 p leg d4 leg e4))
  14. Note: It Is better to add the velocity with MAKE-OMN. You can hide the the velocity symbols with :ignore-velocity t As you are using repeat (length) you can :span the lengths to :pitch (count). I made the example a bit longer using GEN-EVAL function :-) (init-seed 434) (setf pitch '(a3 b3 c4 d4 a3 b3 c4 d4)) (setf theme1 (make-omn :pitch (gen-eval 12 '(rnd-octaves '(c1 c7) (rnd-order pitch))) :length '(1/8 -1/8 -1/8 -1/8 1/8 -1/8 -1/8 -1/8) :velocity '(ff) :span :pitch )) (setf theme2 (make-omn :pitch (gen-eval 12 '(rnd-order pitch)) :length '(-1/8 1/16 1/16 -1/8 -1/8 -1/8 1/8 -1/8 -1/8) :velocity '(ff) :span :pitch )) (setf theme3 (make-omn :pitch (gen-eval 12 '(rnd-order pitch)) :length '(-1/8 -1/8 1/8 -1/8 -1/8 -1/8 1/8 -1/8) :velocity '(ff) :span :pitch )) (setf theme4 (make-omn :pitch (gen-eval 12 '(rnd-order pitch)) :length '(-1/8 -1/8 -1/8 1/8 -1/8 -1/8 -1/8 1/24 1/24 1/24) :velocity '(ff) :span :pitch )) (def-score temp ( :key-signature 'chromatic :time-signature '(4 4) :composer "Alain Jamot" :copyright "Copyright © 2017 alain jamot" :tempo 120 :flexible-clef t :ignore-velocity t ) (piano :omn theme1 :channel 1 :sound 'gm :program 'acoustic-grand-piano ) (flute :omn theme2 :channel 2 :sound 'gm :program 'flute ) (violin :omn theme3 :channel 3 :sound 'gm :program 'violin ) (marimba :omn theme4 :channel 4 :sound 'gm :program 'marimba ) )
  15. Alain, could you give me an example (input, output) of what you are trying to do. Why would you like to use separate channel for each of the articulations. What samples (virtual instrument) you are using.
  16. I would suggest to make the sound-sets setup. There is no need to separate the articulations.
  17. New: Two new menu items: 'PPrint Expression' and PPrint Last Score'. PPrint Expression (Snippet) Place the mouse cursor at the end of the expression and press ⌃⌥⇥ The function PPRINT-LAST-SCORE prints a def-score-form of the *last-score* with the bar numbers in the Listener. MIDI Import to score has a new header and is using PPrint with the bar numbers by default. The function PPRINT-INSTRUMENT prints instrument values of a given score with the bar numbers in the Listener. Examples: (progn (setf size 200) (setf vector (add-triangle-waves 4 size 1 0.6 :modulation (gen-triangle size 1 '(0.5 0.4 0.3 0.6) :modulation (gen-triangle size 1 0.3 :phase 180)))) (setf pitches (gen-divide 4 (vector-to-pitch '(g1 g6) vector))) (setf transpose (pitch-transpose -12 pitches)) (setf variants (pitch-variant transpose :variant '?)) (setf length (rnd-sample 120 '(s e s s))) (setf time (span pitches length)) (setf dynamics '(p mf ff)) (def-score add-triangle (:title "Waves Add-Triangle" :composer "Janusz Podrazik" :copyright "© 2014 Opusmodus" :key-signature 'chromatic :time-signature (get-time-signature time) :tempo 120 :flexible-clef t :octave-shift '(c2 c6) :layout (piano-solo-layout 'rh 'lh :ignore-velocity t)) (rh :length time :pitch pitches :velocity (rnd-sample size dynamics) :sound 'gm :channel 1 :program 'acoustic-grand-piano) (lh :length time :pitch variants :velocity (rnd-sample size dynamics))) ) (pprint-instrument 'add-triangle 'rh) The rh instrument output in the Listener: (setf rh '(#|1|# (s g1 p gs1 ff a1 p b1 ff) #|2|# (s c2 ff cs2 p d2 mf e2 p) #|3|# (s f2 p fs2 mf g2 ff e a2 mf) #|4|# (s b2 c3 cs3 eb3 ff) #|5|# (s e3 mf f3 p e fs3 a3 ff) #|6|# (e bb3 mf s b3 ff c4 e4) #|7|# (s e4 mf e f4 s p b4) #|8|# (e b4 ff s p mf fs5 ff) #|9|# (e fs5 p f5 ff s e cs6) #|10|# (s cs6 p c6 ff b5 g6) #|11|# (e g6 mf s p f6 ff e g6 mf) #|12|# (s g6 g6 p ff e fs6 p) #|13|# (s g6 p mf e p s fs6) #|14|# (s fs6 mf fs6 fs6 fs6) #|15|# (s fs6 p ff p ff) #|16|# (e fs6 p s ff p e f6 ff) #|17|# (s fs6 ff e p s ff f6 p) #|18|# (s f6 p fs6 ff e s f6 p) #|19|# (e f6 ff s fs6 e p f6) #|20|# (s f6 ff p e fs6 mf s f6 p) #|21|# (s f6 p f6 f6 mf e ff) #|22|# (s f6 p ff p f6) #|23|# (s f6 mf f6 f6 p mf) #|24|# (s f6 p e s mf ff) #|25|# (s f6 p e e s) #|26|# (s f6 p mf ff mf) #|27|# (e f6 f6 e6 s f6) #|28|# (s f6 ff e e6 p s eb6 f6 ff) #|29|# (s f6 mf e6 p d6 mf f6) #|30|# (s f6 ff e e6 p s d6 f6 mf) #|31|# (s f6 e6 p cs6 mf f6) #|32|# (s f6 f6 cs6 p f6) #|33|# (s f6 mf f6 cs6 p e fs6 mf) #|34|# (s f6 e6 bb5 f6) #|35|# (s e6 b5 e f5 p eb6 ff) #|36|# (e bb5 ff s fs5 mf cs5 p a5 mf) #|37|# (s e5 p e c5 s gs4 mf d5 ff) #|38|# (e bb4 mf s fs4 p d4 mf g4) #|39|# (e e4 ff d4 s b3 mf e eb4 ff) #|40|# (s cs4 mf bb3 p gs3 ff c4 p) #|41|# (e a3 p s ff b3 mf e gs3 ff) #|42|# (s bb3 mf c4 ff d4 p e b3) #|43|# (s cs4 mf eb4 e f4 ff s eb4) #|44|# (s e4 p fs4 ff gs4 p fs4) #|45|# (s g4 ff a4 p bb4 a4) #|46|# (e bb4 mf s c5 p cs5 ff e c5) #|47|# (s cs5 ff e eb5 mf s e5 ff eb5 mf) #|48|# (s e5 ff fs5 e g5 mf s fs5 ff) #|49|# (e g5 p s gs5 ff e a5 mf a5) #|50|# (s bb5 p b5 mf e c6 ff s mf) )) Best wishes, JP
  18. (omn-merge-ties '(q a4 stacc+tie e gliss+tie)) => (q. a4 stacc+gliss+tie)) (omn-merge-ties '(q a4 stacc+tie e gliss)) => (q. a4 stacc+gliss))
  19. (apply #'mapcar #'list '((1 3 5) (2 4 6)))
  20. (matrix-transpose '((1 2 3) (a b c) (4 5 6)))
  21. At the beginning of the score: (init-seed 32) added 5 minutes later You could use few of them between blocks of expressions - more control :-)
  22. The notation in your examples are correct. The 23w length value is a tuplet and is a 23rd part of the whole note. The best thing I would suggest is to spend some time to read the introduction to OMN. This way you will progress without to much frustration. Experimentation is the way to learn but the basics are paramount. Here are the documents I suggest to read: Introduction to OMN 1st Element - Length 2nd Element - Pitch 3rd Element - Velocity 4th Element - Attribute (Articulation) The Length, Pitch and Velocity are essentials to understand. This will give you a good basis to play, explore and experiment with Opusmodus. Next, check the 'Snippet.opmo' examples. This document illustrates the omn grammar. After that I would go through the Howto documentation. All this will take no more than a few hours. All the document you’ll find in the Utilities/Documentation panel on the right - second icon. As for the prime numbers - simple example. First we generate a few prime numbers: (setf pnum (primes-to 10)) => (2 3 5 7) Now the duration with our prime numbers: (setf len (gen-length pnum '1/16)) => (1/8 3/16 5/16 7/16) And a few more: (setf my-lengths (gen-eval 12 '(rnd-order len))) => ((5/16 1/8 3/16 7/16) (1/8 5/16 3/16 7/16) (5/16 3/16 1/8 7/16) (1/8 3/16 5/16 7/16) (3/16 5/16 1/8 7/16) (7/16 5/16 3/16 1/8) (7/16 3/16 5/16 1/8) (5/16 7/16 3/16 1/8) (3/16 1/8 5/16 7/16) (1/8 3/16 5/16 7/16) (5/16 7/16 3/16 1/8) (3/16 5/16 7/16 1/8)) Now we generate a 12tone row (at random): (setf my-pitches (rnd-row :type :pitch)) => (c4 b4 bb4 fs4 f4 d4 g4 cs4 eb4 a4 e4 gs4) The MAKE-OMN funtion allows us to put all our parameters together: (setf my-mat (make-omn :length my-lengths :pitch my-pitches)) => ((qs c4 e. eb4 e e4 q.. a4) (e. f4 q.. fs4 qs b4 e g4) (q.. d4 qs cs4 e gs4 e. bb4) (e. c4 q.. eb4 qs e4 e a4) (e f4 q.. fs4 qs b4 e. g4) (e d4 q.. cs4 e. gs4 qs bb4) (e c4 qs eb4 e. e4 q.. a4) (e f4 qs fs4 q.. b4 e. g4) (e. d4 qs cs4 q.. gs4 e bb4) (q.. c4 qs eb4 e e4 e. a4) (e f4 e. fs4 qs b4 q.. g4) (q.. d4 qs cs4 e gs4 e. bb4)) Here we use the TONALITY-MAP function to force the minor scale on our material. (tonality-map '(minor :map step) my-mat) => ((qs c4 e. eb4 e f4 q.. bb4) (e. f4 q.. qs bb4 e g4) (q.. d4 qs e gs4 e. bb4) (e. c4 q.. eb4 qs f4 e gs4) (e f4 q.. qs bb4 e. g4) (e d4 q.. e. gs4 qs bb4) (e c4 qs eb4 e. q.. bb4) (e f4 qs q.. bb4 e. g4) (e. d4 qs q.. gs4 e bb4) (q.. c4 qs eb4 e e. gs4) (e f4 e. qs c5 q.. g4) (q.. d4 qs e gs4 e. bb4)) What about lessons with Stephane Boussuge, here is the link to the request: https://opusmodus.com/lessons.html Best, JP
  23. Some changes to the Text & Lyrics tools. If you used one of them please check the new functions. The text-to-pitch function is replaced with TEXT-MAP with more options and functionality. text-map map text &key flat rnd-order otherwise seed [Function] Arguments and Values: map a list of lists (<letter><symbol>) text a string, a string list list of a list of letters. flat T or NIL. The default is T. rnd-order T or NIL. The default is NIL. otherwise Nil, symbol or list of symbols. The default is NIL. seed an integer - ensure the same result each time the code is evaluated. The default is NIL. Description: This function converts a body of text into any symbol (parameter). It’s a further way to use words ("text") or a list of letters to create parametric material. Notice, that the function creates lists for each word and that punctuation is ignored. In the following examples we will map a text to integers. First we create a map: (defparameter *map-integer1* '(((a à á â ã ä å æ ą) 0) (b 1) ((c ç ć) 2) (d 3) ((e è é ê ë ę) 4) (f 5) (g 6) (h 7) ((i ì î ï) 8) (j 9) (k 10) ((l ł) 11) (m 12) ((n ñ ń) 13) ((o ò ó ô õ ö) 14) (p 15) (q 16) (r 17) ((s ś) 18) (t 19) ((u ù ú û ü) 20) (v 21) (w 22) (x 23) ((y ý ÿ) 24) ((z ż ź) 25))) (setf text '("To be, or not to be, that is the question")) (text-map *map-integer1* text) => ((19 14) (1 4) (14 17) (13 14 19) (19 14) (1 4) (19 7 0 19) (8 18) (19 7 4) (16 20 4 18 19 8 14 13)) In the following map each letter is mapped into a list of two integer values. The letter (a à á â ã ä å æ ą) is mapped to 0 and -12. Every time the letter (a à á â ã ä å æ ą) is processed, 0 or -12 integer is picked at random. (defparameter *map-integer2* '(((a à á â ã ä å æ ą) (0 -12)) (b (1 -1)) ((c ç ć) (2 -2)) (d (3 -3)) ((e è é ê ë ę) (4 -4)) (f (5 -5)) (g (6 -6)) (h (7 -7)) ((i ì î ï) (8 -8)) (j (9 -9)) (k (10 -10)) ((l ł) (11 -11)) (m (12 -12)) ((n ñ ń) (13 -13)) ((o ò ó ô õ ö) (14 -14)) (p (15 -15)) (q (16 -16)) (r (17 -14)) ((s ś) (18 -18)) (t (19 -19)) ((u ù ú û ü) (20 -20)) (v (21 -21)) (w (22 -22)) (x (23 -23)) ((y ý ÿ) (24 -24)) ((z ż ź) (25 -25)))) (text-map *map-integer2* text) => ((19 -14) (-1 -4) (14 17) (-13 -14 -19) (-19 -14) (1 4) (19 7 0 -19) (-8 18) (19 -7 -4) (-16 20 -4 -18 19 8 -14 -13)) (text-map *map-integer2* text) => ((-19 14) (1 -4) (-14 17) (13 14 19) (19 14) (1 4) (19 7 0 19) (8 18) (19 -7 -4) (16 20 4 18 -19 8 -14 -13)) A seed will ensure the same result each time the code is evaluated: (text-map *map-integer2* text :seed 48) => ((19 -14) (1 -4) (14 -14) (-13 -14 19) (19 -14) (-1 4) (19 7 -12 -19) (8 18) (-19 -7 4) (16 -20 -4 18 19 -8 -14 -13)) In the following examples we map a text to lengths. If a letter is mapped to a nested list ((e e. s)) then the entire list is selected. (defparameter *map-length* '(((a à á â ã ä å æ ą) ((s s s))) (b ((s e s))) ((c ç ć) ((e s s))) (d ((s s e))) ((e è é ê ë ę) ((e e. s))) (f ((q e. s))) (g ((e. e s))) (h ((q s s))) ((i ì î ï) ((s e. e))) (j ((s e. e))) (k ((s s q))) ((l ł) ((e s e.))) (m ((e e e))) ((n ñ ń) ((e q e))) ((o ò ó ô õ ö) ((q e e))) (p ((e e q))) (q ((q q. e))) (r ((h q. e))) ((s ś) ((q e q.))) (t ((h e e))) ((u ù ú û ü) ((e q. q))) (v ((q. e h))) (w ((e e h))) (x ((q e q.))) ((y ý ÿ) ((q q q))) ((z ż ź) ((q h q))))) (text-map *map-length* text) => ((h e e q e e) (s e s e e. s) (q e e h q. e) (e q e q e e h e e) (h e e q e e) (s e s e e. s) (h e e q s s s s s h e e) (s e. e q e q.) (h e e q s s e e. s) (q q. e e q. q e e. s q e q. h e e s e. e q e e e q e)) (text-map *map-length* text :flat nil) => ((h e e) (q e e) (s e s) (e e. s) (q e e) (h q. e) (e q e) (q e e) (h e e) (h e e) (q e e) (s e s) (e e. s) (h e e) (q s s) (s s s) (h e e) (s e. e) (q e q.) (h e e) (q s s) (e e. s) (q q. e) (e q. q) (e e. s) (q e q.) (h e e) (s e. e) (q e e) (e q e)) With the rnd-order option we can randomise the order of the elements in the list: (text-map *map-length* text :flat nil :rnd-order t) => ((h e e) (q e e) (s e s) (s e. e) (e e q) (h e q.) (e q e) (e q e) (h e e) (h e e) (e q e) (s e s) (s e e.) (e h e) (q s s) (s s s) (e e h) (e. e s) (q. q e) (e h e) (s q s) (s e e.) (q. e q) (q. e q) (s e e.) (q q. e) (e h e) (s e e.) (e q e) (e e q)) In the following examples we map text to pitches. First we create a simple map with a letter mapped to a single pitch: (defparameter *map-pitch1* '(((a à á â ã ä å æ ą) c3) (b cs3) ((c ç ć) d3) (d eb3) ((e è é ê ë ę) e3) (f f3) (g fs3) (h g3) ((i ì î ï) gs3) (j a4) (k bb3) ((l ł) b3) (m c4) ((n ñ ń) cs4) ((o ò ó ô õ ö) d4) (p eb4) (q e4) (r f4) ((s ś) fs4) (t g4) ((u ù ú û ü) gs4) (v a4) (w bb4) (x b4) ((y ý ÿ) c5) ((z ż ź) cs5))) (text-map *map-pitch1* text) => ((g4 d4) (cs3 e3) (d4 f4) (cs4 d4 g4) (g4 d4) (cs3 e3) (g4 g3 c3 g4) (gs3 fs4) (g4 g3 e3) (e4 gs4 e3 fs4 g4 gs3 d4 cs4)) Here we map a letter to a list of two pitches: (defparameter *map-pitch2* '(((a à á â ã ä å æ ą) (c4 c3)) (b (cs4 b3)) ((c ç ć) (d4 bb3)) (d (eb4 a3)) ((e è é ê ë ę) (e4 gs3)) (f (f4 g3)) (g (fs4 fs3)) (h (g4 f3)) ((i ì î ï) (gs4 e3)) (j (a4 eb3)) (k (bb4 d3)) ((l ł) (b4 cs3)) (m (c5 c3)) ((n ñ ń) (cs5 b2)) ((o ò ó ô õ ö) (d5 bb2)) (p (eb5 a2)) (q (e5 gs2)) (r (f5 g2)) ((s ś) (fs5 fs2)) (t (g5 f2)) ((u ù ú û ü) (gs5 e2)) (v (a5 eb2)) (w (bb5 d2)) (x (b5 cs2)) ((y ý ÿ) (c6 c2)) ((z ż ź) (cs6 b1)))) (text-map *map-pitch2* text) => ((g5 bb2) (b3 e4) (bb2 f5) (b2 d5 f2) (f2 d5) (b3 gs3) (f2 f3 c4 f2) (gs4 fs5) (g5 g4 gs3) (gs2 gs5 gs3 fs2 f2 gs4 bb2 cs5)) Example with a velocity map: (defparameter *map-velocity* '(((a à á â ã ä å æ ą) ppp) (b ppp) ((c ç ć) ppp) (d pp) ((e è é ê ë ę) pp) (f pp) (g p) (h p) ((i ì î ï) p) (j mp) (k mp) ((l ł) mp) (m mf) ((n ñ ń) mf) ((o ò ó ô õ ö) mf) (p f) (q f) (r f) ((s ś) ff) (t ff) ((u ù ú û ü) ff) (v fff) (w fff) (x fff) ((y ý ÿ) ffff) ((z ż ź) ffff))) (text-map *map-velocity* '(o p u s m o d u s)) => (mf f ff ff mf mf pp ff ff) Example with binary map: (defparameter *map-binary* '(((a à á â ã ä å æ ą) ((1))) (b ((1 0))) ((c ç ć) ((1 1))) (d ((1 0 0))) ((e è é ê ë ę) ((1 0 1))) (f ((1 1 0))) (g ((1 1 1))) (h ((1 0 0 0))) ((i ì î ï) ((1 0 0 1))) (j ((1 0 1 0))) (k ((1 0 1 1))) ((l ł) ((1 1 0 0))) (m ((1 1 0 1))) ((n ñ ń) ((1 1 1 0))) ((o ò ó ô õ ö) ((1 1 1 1))) (p ((1 0 0 0 0))) (q ((1 0 0 0 1))) (r ((1 0 0 1 0))) ((s ś) ((1 0 0 1 1))) (t ((1 0 1 0 0))) ((u ù ú û ü) ((1 0 1 0 1))) (v ((1 0 1 1 0))) (w ((1 0 1 1 1))) (x ((1 1 0 0 0))) ((y ý ÿ) ((1 1 0 0 1))) ((z ż ź) ((1 1 0 1 0))))) (text-map *map-binary* '(o p u s m o d u s)) => ((1 1 1 1) (1 0 0 0 0) (1 0 1 0 1) (1 0 0 1 1) (1 1 0 1) (1 1 1 1) (1 0 0) (1 0 1 0 1) (1 0 0 1 1)) Example with otherwise option. (setf map4 '((e e3) (f f3) (g fs3) (h g3) (i gs3) (j a4) (k bb3) (l b3) (m c4) (n cs4) (o d4))) (text-map map4 '(o p u s m o d u s)) => (d4 c4 d4) The result of the expression above is not equal to the length of the (o p u s m o d u s) list because the letters d, p, s and u are not in the map. Use the otherwise option to get the same count: (text-map map4 '(o p u s m o d u s) :otherwise '((eb4e5) (f3fs4))) => (d4 (eb4e5) (f3fs4) (eb4e5) c4 d4 (eb4e5) (f3fs4) (f3fs4)) In the following examples our maps are created algorithmically: (setf map (mapcar 'list (make-alphabet) (integer-to-pitch (gen-integer-step 0 26 '(1 -2 3 1))))) => ((a c4) (b cs4) (c b3) (d d4) (e eb4) (f e4) (g d4) (h f4) (i fs4) (j g4) (k f4) (l gs4) (m a4) (n bb4) (o gs4) (p b4) (q c5) (r cs5) (s b4) (t d5) (u eb5) (v e5) (w d5) (x f5) (y fs5) (z g5)) (text-map map text) => ((d5 gs4) (cs4 eb4) (gs4 cs5) (bb4 gs4 d5) (d5 gs4) (cs4 eb4) (d5 f4 c4 d5) (fs4 b4) (d5 f4 eb4) (c5 eb5 eb4 b4 d5 fs4 gs4 bb4)) (setf map2 (mapcar 'list (make-alphabet) (mapcar 'list (integer-to-pitch (gen-integer-step 0 26 '(1 -2 3 1))) (integer-to-pitch (gen-integer-step -6 26 '(1 -2 3 1)))))) => ((a (c4 fs3)) (b (cs4 g3)) (c (b3 f3)) (d (d4 gs3)) (e (eb4 a3)) (f (e4 bb3)) (g (d4 gs3)) (h (f4 b3)) (i (fs4 c4)) (j (g4 cs4)) (k (f4 b3)) (l (gs4 d4)) (m (a4 eb4)) (n (bb4 e4)) (o (gs4 d4)) (p (b4 f4)) (q (c5 fs4)) (r (cs5 g4)) (s (b4 f4)) (t (d5 gs4)) (u (eb5 a4)) (v (e5 bb4)) (w (d5 gs4)) (x (f5 b4)) (y (fs5 c5)) (z (g5 cs5))) (text-map map2 text :seed 63) => ((d5 d4) (g3 a3) (d4 cs5) (bb4 gs4 d5) (d5 d4) (g3 a3) (d5 b3 c4 d5) (c4 f4) (d5 f4 eb4) (c5 eb5 eb4 b4 d5 c4 gs4 bb4)) In the next example we map a group of letters to a group of pitches. Example: a = (c4 cs4 d4) b = (c4 cs4 d4) and c = (c4 cs4 d4) etc... (setf map3 (mapcar 'list (gen-divide 3 (make-alphabet)) (integer-to-pitch (gen-divide 3 (gen-integer 26))))) => (((a b c) (c4 cs4 d4)) ((d e f) (eb4 e4 f4)) ((g h i) (fs4 g4 gs4)) ((j k l) (a4 bb4 b4)) ((m n o) (c5 cs5 d5)) ((p q r) (eb5 e5 f5)) ((s t u) (fs5 g5 gs5)) ((v w x) (a5 bb5 b5)) ((y z) (c6 cs6 d6))) (text-map map3 text) => ((g5 c5) (cs4 f4) (c5 f5) (cs5 d5 g5) (gs5 d5) (c4 f4) (fs5 gs4 d4 g5) (g4 fs5) (gs5 g4 f4) (e5 gs5 f4 fs5 g5 gs4 c5 d5)) => ((gs5 c5) (c4 e4) (c5 eb5) (c5 c5 g5) (gs5 c5) (c4 e4) (g5 gs4 cs4 fs5) (gs4 fs5) (gs5 fs4 e4) (eb5 gs5 eb4 fs5 gs5 fs4 cs5 c5)) => . . . Best wishes to all, JP