Jump to content

opmo

Administrators
  • Posts

    2,894
  • Joined

  • Last visited

Everything posted by opmo

  1. 12-tone row and its variants with randomised octaves. (setf row (rnd-row :type :pitch :transpose '?)) (setf rows (gen-repeat 12 (list row))) (setf variants (pitch-variant rows :variant '?)) (setf pitch (flatten (randomize-octaves '(c2 g7) variants))) Mapping length to pitches. (def-case rhythm (c3 '(h)) (cs3 '(q)) (d3 '(-3q = -)) (eb3 '(e.)) (e3 '(e)) (f3 '(-5q = ---)) (fs3 '(s.)) (g3 '(s)) (gs3 '(-3e - =)) (a3 '(-5e --- = -e)) (bb3 '(t -)) (b3 '(-t =)) (c4 '(h)) (cs4 '(q)) (d4 '(-3q = -)) (eb4 '(e.)) (e4 '(e)) (f4 '(-5q - = --)) (fs4 '(s.)) (g4 '(s)) (gs4 '(-3e - =)) (a4 '(-5e == -- -e)) (bb4 '(t -)) (b4 '(-t =)) (c5 '(h)) (cs5 '(q)) (d5 '(-3q = -)) (eb5 '(e.)) (e5 '(e)) (f5 '(-5q -- = -)) (fs5 '(s.)) (g5 '(s)) (gs5 '(-3e - =)) (a5 '(-5e -- == -e)) (bb5 '(-t =)) (b5 '(t -)) (otherwise '(q))) (setf len (rhythm (flatten variants))) Mapping velocity to pitches. (def-case velocity (c3 'mf) (cs3 'mp) (d3 'ppp) (eb3 'pp) (e3 'p) (f3 'mp) (fs3 'mf) (g3 'f) (gs3 'ff) (a3 'fff) (bb3 'ffff) (b3 'fffff) (c4 'mf) (cs4 'mp) (d4 'ppp) (eb4 'pp) (e4 'p) (f4 'mp) (fs4 'mf) (g4 'f) (gs4 'ff) (a4 'fff) (bb4 'ffff) (b4 'fffff) (c5 'mf) (cs5 'mp) (d5 'ppp) (eb5 'pp) (e5 'p) (f5 'mp) (fs5 'mf) (g5 'f) (gs5 'ff) (a5 'fff) (bb5 'ffff) (b5 'fffff) (otherwise 'mf)) (setf vel (velocity (flatten variants))) Mapping programs to pitches. (def-case program (c3 'pr0) (cs3 'pr1) (d3 'pr2) (eb3 'pr3) (e3 'pr4) (f3 'pr5) (fs3 'pr6) (g3 'pr7) (gs3 'pr8) (a3 'pr9) (bb3 'pr10) (b3 'pr11) (c4 'pr0) (cs4 'pr1) (d4 'pr2) (eb4 'pr3) (e4 'pr4) (f4 'pr5) (fs4 'pr6) (g4 'pr7) (gs4 'pr8) (a4 'pr9) (bb4 'pr10) (b4 'pr11) (c5 'pr0) (cs5 'pr1) (d5 'pr2) (eb5 'pr3) (e5 'pr4) (f5 'pr5) (fs5 'pr6) (g5 'pr7) (gs5 'pr8) (a5 'pr9) (bb5 'pr10) (b5 'pr11) (otherwise 'pr0)) (setf art (program (flatten variants))) Generating chords (setf pitch-serie (gen-chord2 200 (rnd-sample 200 '(1 2 3)) pitch :ambitus-chord '(13))) Putting all into OMN form (setf mat (make-omn :length len :pitch pitch-serie :velocity vel :articulation art)) Tempo (setf tempo (make-tempo (flatten (gen-repeat (rnd-sample 12 '(3 4 5 6)) '((96) (72) (88) (102) (44)))) (get-span len))) Defining score (def-score serial-map (:key-signature 'atonal :time-signature (get-time-signature mat) :tempo tempo :layout (grand-layout 'inst)) (inst :omn mat :sound 'PR :channel 1) )
  2. pitch-rotate rotation-number sequence &key chord section ambitus [Function] Arguments and Values: rotation-number a number or list of numbers. sequence list of pitches. chord NIL or T (chord rotation). The default is T. ambitus instrument name or an integer or pitch list (low high). The default is 'piano. section an integer or list of integers. Selected list or lists to process. Description: The function PITCH-ROTATE employs chordal rotation based on a rotation-number value. (pitch-rotate 1 '(c4 d4 e4 f4 g4 a4 b4)) => (d4 e4 f4 g4 a4 b4 c5) (pitch-rotate 2 '(c4 d4 e4 f4 g4 a4 b4)) => (e4 f4 g4 a4 b4 c5 d5) (pitch-rotate 1 '(c4e4g4 d4f4 e4g4)) => (d4f4 e4g4 e4g4c5) (pitch-rotate 2 '(c4e4g4 d4f4 e4g4)) => (e4g4 e4g4c5 f4d5) Without rotation on the chords :chord NIL (pitch-rotate 2 '(c4e4g4 d4f4 e4g4) :chord nil) => (e4g4 c5e5g5 d5f5) Examples: (setf seq '((a4 a4bb4g4d5 bb4 d5c5bb4a4c5 a4) (bb4a4g4c5 g4 bb4a4g4a4 d5 bb4a4g4) (d5c5bb4a4c5 d5 bb4a4g4c5 c5 bb4a4g4g4))) (pitch-rotate '(1 2 -3) seq) => ((a4bb4g4d5 bb4 d5c5bb4a4c5 a4 a5) (bb4a4g4a4 d5 bb4a4g4 a4g4c5bb5 g5) (c4bb4a4g4 c4 g3bb4a4g4 d5c5bb4a4c5 d5)) Without rotation on the chords :chord NIL (pitch-rotate '(1 2 -3) seq :chord nil) => ((a4bb4g4d5 bb4 d5c5bb4a4c5 a4 a5) (bb4a4g4a4 d5 bb4a4g4 bb5a5g5c6 g5) (bb3a3g3c4 c4 bb3a3g3g3 d5c5bb4a4c5 d5)) Selected lists to process. (pitch-rotate '(1 2 -3 3) (append seq seq) :section '(0 2 3 5)) => ((a4bb4g4d5 bb4 d5c5bb4a4c5 a4 a5) (bb4a4g4c5 g4 bb4a4g4a4 d5 bb4a4g4) (c4bb4a4g4 c4 g3bb4a4g4 d5c5bb4a4c5 d5) (d5c5bb4a4c5 a4 a5 bb4g4d5a5 bb5) (bb4a4g4c5 g4 bb4a4g4a4 d5 bb4a4g4) (bb4a4g4c5 c5 bb4a4g4g4 c5bb4a4c5d6 d6)) OMN (pitch-rotate (rnd-sample 6 (gen-integer -6 6)) '((q a4bb4g4d5 e bb4 = q d5c5bb4a4c5 e a4 a5) (q bb4a4g4c5 e g4 q bb4a4g4a4 e d5 q bb4a4g4) (q c4bb4a4g4 e c4 = q g3bb4a4g4 d5c5bb4a4c5 e d5) (q d5c5bb4a4c5 e a4 a5 q bb4g4d5a5 e bb5) (q bb4a4g4c5 e g4 q bb4a4g4a4 e d5 q bb4a4g4) (q bb4a4g4c5 e c5 q bb4a4g4g4 c5bb4a4c5d6 e d6))) => ((q d4a4bb4g4 e bb3 bb3 q c4d5c5bb4a4 e a3 a4) (q a4g4c5bb5 e g5 q a4g4a4bb5 e d6 q a4g4bb5) (q d5c5bb4a4c5 e d5 bb4a4g4c5 q c5 c5 e bb4a4g4g4) (q c4d5c5bb4a4 e a3 a4 q a4bb4g4d5 e bb4) (q c4bb4a4g4 e g3 q a3bb4a4g4 e d4 q g3bb4a4) (q c4 e g3bb4a4g4 q d5c5bb4a4c5 d5 e bb4a4g4c5))
  3. Home directory -> Opusmodus folder In the home directory you will find - Opusmodus folder. The Extensions folder is the folder where you can add your own source code files. The contents of the folder will load at the startup. Anything dropped into the Documents folder (pdf, images, audio, etc…) will display in the Utilities panel and will be ready for display in the Assistant panel. The same applies with the MIDI folder, here you can put all your collections of midi files which you then can access and play or convert to OMN notation in the workspace window. The Def-Libraries folder is for your midi sound sets (instruments) setups and for your libraries. The Scores folder is the folder where you put and store your scores. In other words, the Opusmodus folder is your Utilities access display. I hope that OMN will help composers to get started, by using the system. Algorithms alone can be intimidating. To explore the OMN grammar quickly, you can also check the Snippets.opmo file which you’ll find in the Howto’s folder in the Documents panel (second button) and the 'OMN - The Language’ documents. The System Function documentation you will find in the Utilities panel on the right (first button). I suggest using contextual menu (right click or ctrl and click) on the Utilities, Assistant and Composer panels - the CM menu is essential. One of the special functionalities in Utilities is the ability to open a few files at once (same title, different format). For example in the Stages Tutorial Guide you will find two formats of docs; one is a score and the other one is a doc. If you click on one of them and choose 'Open All Related', both files will open. If there are more then 2 files (Stage 30) then all three will open.
  4. Version 1.0.15605 is out with a new function added: GEN-CHORD2, ready for download. gen-chord2 count chord-size pitches &key ambitus-chord offset transpose rnd-octaves ambitus seed [Function] Arguments and Values: count an integer or list of integers (number of chords). chord-size an integer or list of integers (size of chords). pitches list or lists of pitches. offset an integer or list of integers. ambitus-chord an integer or list of integers. transpose an integer or list of integers. rnd-octaves NIL or T. The default is NIL. ambitus instrument name or an integer or pitch list (low high). The default is 'piano. seed NIL or number. The default is NIL. Description: The function GEN-CHORD2 enables the composer to generate chords from a list of pitches. The count value sets the number of chords to be generated. The size of the chord is determined by the chord-size parameters. Keywords like :transpose, :ambitus-chord, :rnd-octaves, :ambitus and :offset are further parameters used within the function. (setf row (rnd-row :type :pitch :seed 245)) => (c4 cs4 e4 eb4 b4 fs4 gs4 a4 bb4 d4 f4 g4) (gen-chord2 4 '(3 3 3 3) row) => (c4cs4e4 eb4b4fs4 gs4a4bb4 d4f4g4) (gen-chord2 4 '(2 2 3 4) row :offset '(2 2 -1 1)) => (e4eb4 b4fs4 eb4b4fs4 b4fs4gs4a4) (gen-chord2 4 '(2 2 3 4) row :offset '(2 0 -1 0)) => (e4eb4 e4eb4 cs4e4eb4 cs4e4eb4b4) (gen-chord2 4 '(4 3) row) => (b4fs4gs4a4 a4bb4d4 g4c4cs4e4 e4eb4b4) (gen-chord2 '(12 6) '(3 4) '((c4 cs4 d4 ds4 e4 f4) (fs4 g4 gs4 a4 as4 b4))) => ((eb4e4f4 cs4d4eb4e4 e4f4c4 d4eb4e4f4 f4c4cs4 eb4e4f4c4 c4cs4d4 e4f4c4cs4 cs4d4eb4 f4c4cs4d4 d4eb4e4 c4cs4d4eb4) (a4bb4b4 g4gs4a4bb4 bb4b4fs4 gs4a4bb4b4 b4fs4g4 a4bb4b4fs4) Examples: If :offset is NIL (the default) then the chord-size value determines the offset value. (gen-chord2 4 '(4 3) row :offset '(2 3 -2)) => (e4eb4b4fs4 fs4gs4a4 eb4b4fs4gs4 fs4gs4a4) (gen-chord2 4 '(4 3) row :offset '(2 3 -2) :transpose '(0 6 1 13)) => (e4eb4b4fs4 c5d5eb5 e4c5g4a4 g5a5bb5) (gen-chord2 4 '(4 3) row :offset '(2 3 -2) :transpose '(0 6 1 13) :rnd-octaves t) => (e2eb2b1fs2 c2d2eb2 e2c2g2a1 g6a6bb6)
  5. until
    [b]hcmf// [/b]is an annual, international festival of contemporary and new music, over 10 days consisting of approximately 50 events, including concerts, music-theatre, dance, multi-media, talks and film, with a related Learning and Participation programme devised and implemented to reflect the artistic programme and respond to regional need.
  6. Giant Steps (1959) Theme (setf theme '((h fs5 d5) (h b4 q. g4 e bb4 tie) (h. bb4 -q) (q. b4 eh a4) (h d5 bb4) (h g4 q. ds4 e fs4 tie) (w fs4) (h g4 q. f4 e bb4 tie) (h bb4 -) (h b4 q. a4 e d5 tie) (w d5) (h ds5 q. ds5 e fs5 tie) (h fs5 -) (h g5 q. g5 e bb5 tie) (w bb5) (q. fs5 q fs5 -q.))) Chords (setf chords '((h (b3 maj7) (d3 7)) (h (g3 maj7) (bb3 7)) (w (eb3 maj7)) (h (a3 m7) (d3 7)) (h (g3 maj7) (bb3 7)) (h (eb3 maj7) (gb3 7)) (w (b3 maj7)) (h (f3 m7) (bb3 7)) (w (eb3 maj7)) (h (a3 m7) (d3 7)) (w (g3 maj7)) (h (cs3 m7) (fs3 7)) (w (b3 maj7)) (h (f3 m7) (bb3 7)) (w (eb3 maj)) (h (cs3 m7) (fs3 9)))) Score (def-score giant-steps (:title "Giant Steps" :composer "John Coltrane" :key-signature '(c major) :time-signature '(4 4) :tempo 288 :layout (piano-solo-layout 'theme 'chords)) (theme :omn theme :channel 1 :sound 'gm :program 0) (chords :omn chords :channel 2))
  7. Goodbye Pork Pie Hat Theme (setq theme '((-h.. e c4) (e f4 e_3q ab4 3q f4 ab4 e bb4 q ab4 s f4 db4) (e f4 q ab4 s f4 eb4 q. f4 e c4) (e f4 e_3q ab4 3q f4 ab4 e b4 q bb4 s f4 eb4) (e f4 q ab4 s f4 eb4 q. f4 e) (e c5 e_3q eb5 3q f4 ab4 e bb4 q ab4 s f4 ab4) (e c5 e_3q f5 3q f4 bb4 3h eb5 3q c4 ab4 e4 db4) (3h ab4 b4 f4 e4 b4 g4) (h ab4 q. f4 s b4 bb4) (h ab4 f4) (e bb4 ab4 f4 eb4 b4 bb4 ab4 f4) (h ab4 f4) (3h c4 bb4 ab4 f4 eb4 c4) (w f4))) Chords (setf chords '((-w) (h (f3 7s9) p (db3 9)) (h (gb3 maj7) (b3 7b5 :rotate -2)) (h (eb3 7) (db3 7)) (h (eb3 7) (f3 7)) (h (bb3 m7) (db3 7)) (h (g3 7b5) (c3 7)) (h (d3 7) (g3 7 :rotate -1)) (h (db3 7) (gb3 maj7)) (h (b3 6/7 :rotate -1) (bb3 7 :rotate -1)) (h (c3 7) (eb3 7)) (h (f3 7s9) (db3 7)) (h (gb3 maj7s11) (b3 7b5 :rotate -1)) (w (f3 m11 :rotate -1) p))) Score (def-score Goodbye-Pork-Pie-Hat (:title "Goodbye Pork Pie Hat" :composer "Charles Mingus" :key-signature '(f minor) :time-signature '(4 4) :tempo 56 :layout (piano-solo-layout 'theme 'chords)) (theme :omn theme :channel 1 :sound 'gm :program 'Electric-Piano-1 :volume 127 :pan 64) (chords :omn chords :channel 2))
  8. Round Midnight Theme (setq theme '(-q s bb3 eb4 f4 bb4 q. gb4 e bb3 q. eb4 s d4 eb4 e bb4 ab4 -q - s eb4 gb4 bb4 db5 q. c5 e eb4 a4 s fs4 d4 q gs4 e s f4 db4 q g4 - s ab4 b4 eb5 gb5 q. f5 e b4 h._e bb4 s eb4 f4 q. gb4 s f4 eb4 q. f4 e eb4 d4 hq. bb3 -q s bb3 eb4 f4 bb4 q. gb4 e bb3 q. eb4 s d4 eb4 e bb4 ab4 -q - s eb4 gb4 bb4 db5 q. c5 e eb4 a4 s fs4 d4 q gs4 e s f4 db4 q g4 - s ab4 b4 eb5 gb5 q. f5 e b4 h._e bb4 s eb4 f4 q gb4 e f4 eb4 q f4 e eb4 d4 h._e eb4 e f4 q gb4 e f4 eb4 q. f4 e eb4 d4 eh bb4 e eb4 f4 q gb4 e f4 eb4 q. f4 e eb4 d4 eh bb3 q bb4 q. b4 e q. bb4 e q ab4 gb4 f4 bb4 e eb5 = q e db5 = q q. b4 s eb4 d4 h bb4)) Chords (setf chords '(h (eb3 m7) p (c3 m7b5) h (f3 m7b5) (bb3 7) (eb3 m7) (ab3 7) q (b3 m7) (e3 7) (bb3 m7) (eb3 7) h (ab3 m7 :rotate 1) (db3 7) (eb3 m7) (ab3 7 :rotate -2) q (c3 m7b5) (b3 7b5) h (bb3 7sus4) w (bb3 7) h (eb3 m7) (c3 m7b5) (f3 m7b5) (bb3 7) (eb3 m7) (ab3 7) q (b3 m7) (e3 7) (bb3 m7) (eb3 7) h (ab3 m7 :rotate -1) (db3 7 :rotate -1) (eb3 m7) (ab3 7) q (c3 m7b5 :rotate 1) (b3 7b5) h (bb3 7sus4) w (eb3 m7) h (c3 m7b5) (f3 7) (f3 m7) (bb3 7) (c3 m7b5) (f3 7) (f3 m7) (bb3 7) (ab3 m7) (db3 7 :rotate -1) (b3 7) (bb3 7 :rotate -1) q (bb3 m7) (eb3 7) (ab3 m7) (db3 7) (gb3 m7 :rotate -1) (b3 7 :rotate -2) h (bb3 7 :rotate -3))) Score (def-score round-midnight (:title "Round Midnight" :composer "Thelonious Monk" :key-signature '(eb minor) :time-signature (get-time-signature theme) :tempo 56 :layout (piano-solo-layout 'theme 'chords)) (theme :omn theme :channel 1 :sound 'gm :program 'Electric-Piano-1 :volume 127 :pan 64) (chords :omn chords :channel 2))
  9. My Funny Valentine Theme (setq theme '((h c4 q d4 eb4) (q. d4 e eb4 h d4) (h c4 q d4 eb4) (q. d4 e eb4 h d4) (h c4 q d4 eb4) (h bb4 q ab4 g4) (w f4 tie) (w f4) (h eb4 q f4 g4) (q. f4 e g4 h f4) (h eb4 q f4 g4) (q. f4 e g4 h f4) (h eb4 q f4 g4) (q. d5 e c5 q. bb4 e a4) (w ab4 tie) (h ab4 q g4 f4) (q. d5 e eb4 q eb4 d4) (h eb4 q eb4 d4) (q. c5 e eb4 q eb4 d4) (h eb4 q eb4 d4) (q. d5 e eb4 q eb4 d4) (h eb4 q f4 g4) (w c5 tie) (h c5 d4) (h c4 q d4 eb4) (q. d4 e eb4 h d4) (h eb4 q f4 g4) (h c5 q d5 eb5) (q. d5 e eb5 h d5) (w eb5 tie) (w eb5) (h eb4 q f4 g4) (q. f4 e g4 h f4) (w eb4) (-w))) Chords (setq chords '((w (c3 m)) (w (c3 mmaj7)) (w (c3 m7)) (w (c3 m6)) (w (ab3 maj7)) (h (ab3 m69) (f3 m7b5)) (w (d3 m7b5)) (w (g3 7b9)) (w (c3 m)) (w (c3 mmaj7)) (w (c3 m7)) (w (c3 m6)) (w (ab3 maj7)) (w (f3 m6)) (w (ab3 m6)) (w (bb3 7b9)) (h (eb3 maj7) (f3 m7)) (h (g3 m7) (f3 m7)) (h (eb3 maj7) (f3 m7)) (h (g3 m7) (f3 m7)) (h (eb3 maj7) (g3 7)) (q (c3 m7) (c3 m7) (bb3 m7) (a3 13)) (w (ab3 maj7)) (h (d3 m7b5) (g3 7b9)) (w (c3 m)) (w (c3 mmaj7)) (w (c3 m7)) (w (c3 m6)) (w (ab3 maj7)) (h (d3 m7b5) (g3 7b9)) (w (c3 m)) (h (bb3 m7) (a3 7s11)) (h (f3 m7) (bb3 7b9)) (w (eb3 6)) (h (d3 m7b5) (g3 7b9)))) Score (def-score my-funny-valentine (:title "My Funny Valentine" :composer "Roger/Hard" :key-signature '(c minor) :time-signature '(4 4) :tempo 84 :layout (piano-solo-layout 'theme 'chords)) (theme :omn theme :channel 1 :sound 'gm :program 'Electric-Piano-1 :volume 127 :pan 64) (chords :omn chords :channel 2))
  10. until
    The 2015 NAMM Show in Anaheim, January 22-25, is your chance to build your company's brand and reach the most important music products buyers and decision makers in the world.
  11. until
    The Audio Engineering Society will host its fourth conference on Audio for Games February 11-13 2015.
  12. The GEN-LENGTH-CARTESIAN is a complex function and needs an understanding of the CARTESIAN set. The CARTESIAN function will return all the combinatory possibilities drawn from two or more sets. If you use too many sets then the combinatory possibilities could go on for ever and the program could stop being responsive. The critical part is the number of sets and not the length of the set. Two sets of any length will compute a result very quickly. In Lisp we can test any function run time with TEST macro. (test (cartesian '((a b c d) (1 2 3 4)))) The result of the test is: (cartesian '((a b c d) (1 2 3 4))) took 11 microseconds (0.000011 seconds) to run. During that period, and with 8 available CPU cores, 11 microseconds (0.000011 seconds) were spent in user mode 4 microseconds (0.000004 seconds) were spent in system mode 1,760 bytes of memory allocated. Example with 2 sets each with 12 numbers. As we can see it took 22 microseconds to run the function. (time (cartesian '((0 1 2 3 4 5 6 7 8 9 10 11) (0 1 2 3 4 5 6 7 8 9 10 11)))) The result of the test is: (cartesian '((0 1 2 3 4 5 6 7 8 9 10 11) (0 1 2 3 4 5 6 7 8 9 10 11))) took 22 microseconds (0.000022 seconds) to run. During that period, and with 8 available CPU cores, 21 microseconds (0.000021 seconds) were spent in user mode 8 microseconds (0.000008 seconds) were spent in system mode 9,568 bytes of memory allocated. 1 minor page faults, 0 major page faults, 0 swaps. Here an example with 4 sets of 12 it took 1,926 microseconds (0.001926 seconds) to run. With 12 sets of 12 the run time would take for 'ever'. (cartesian '((0 1 2 3 4 5 6 7 8 9 10 11) (0 1 2 3 4 5 6 7 8 9 10 11) (0 1 2 3 4 5 6 7 8 9 10 11) (0 1 2 3 4 5 6 7 8 9 10 11))) took 1,926 microseconds (0.001926 seconds) to run. 970 microseconds (0.000970 seconds, 50.36%) of which was spent in GC. During that period, and with 8 available CPU cores, 2,893 microseconds (0.002893 seconds) were spent in user mode 304 microseconds (0.000304 seconds) were spent in system mode 1,089,920 bytes of memory allocated. Arguments and Values: (gen-length-cartesian 1 ; min divide value 3 ; max divide value 'm ; argument for group division or maximum count (no division) 'n ; rest position (rnd-sample 20 '(q q h) :seed 12) ; the root length value of the list. (rnd-sample 20 '(2 3) :seed 12) ; number of tuplets groups in the list (numbers of the root length) (rnd-sample 20 (primes 5 3) :seed 12) ; this is the length (count) of each if the list. (rnd-sample 20 '(1 2 3 4 5) :seed 12) ; tuplets value (division). Same as above: (gen-length-cartesian 1 3 'm 'n '(h q h q q q h h q q q h q h q q h h h q) '(3 3 3 2 2 2 3 3 2 2 2 3 2 3 2 3 3 3 3 2) '(13 7 13 5 3 5 13 11 7 5 5 11 5 13 5 7 13 11 13 7) '(5 3 5 2 1 2 5 4 3 2 2 4 2 5 2 3 5 4 5 3)) More GEN-LENGTH-CARTESIAN examples: (gen-length-cartesian 1 1 'd 'n 'q '(2 3) '(13 4) '(1 2 3 4)) => ((1/16 1/16 1/16 1/16 1/4 1/16 1/16 1/16 1/16 1/16 1/16 1/16 1/16) (1/4 1/8 1/8 1/4)) (gen-length-cartesian 1 2 'd 'n 'q '(2 3) '(13 4) '(1 2 3 4)) => ((1/6 1/12 1/12 1/6 1/16 1/16 1/8 1/6 1/12) (1/4 1/4 1/8 1/8)) (gen-length-cartesian 1 1 'd 'n 'q '(2 3) '(7 5) '(1 2 3 4)) => ((1/12 1/12 1/12 1/16 1/16 1/16 1/16) (1/4 1/4 1/12 1/12 1/12)) (gen-length-cartesian 1 3 'd 'n 'q '(2 3) '(7 5) '(1 2 3 4)) => ((1/6 1/12 1/8 1/16 1/16) (1/8 1/8 1/4 1/8 1/8)) Low, High and Maximum: (gen-length-cartesian 1 3 'm 'n '(h) '(3) '(13) '(1 2 3 4 5)) The root length value is 'h 1/2. There are 3 groups of lengths, each 1/2 in value - (* 3 1/2) = 3/2 The length count is 13. The tuplets values are (1 2 3 4 5). Result: => ((1/10 1/10 1/10 1/10 1/10 1/6 1/6 1/6 1/10 1/10 1/10 1/10 1/10)) The length span of the list is 3/2 with three groups of tuplets; 2 quintuplets and 1 of triplet. The low and high multiplier is not used here, as the divide argument 'm (maximum) dose not permit any divisions. Same example as above but this time with the division 'd argument: (gen-length-cartesian 1 3 'd 'n '(h) '(3) '(13) '(1 2 3 4 5)) => ((1/5 3/10 1/5 3/10 1/6 1/3)) In this example we may end up with longer run time. (gen-length-cartesian 1 1 'm 'n '(h) '(7) '(11) '(1 2 3 4 5)) => ((1/2 1/2 1/4 1/4 1/2 1/2 1/4 1/4 1/6 1/6 1/6)) The important part here is to balance the length span (group sum length-value), the size (list length) and finally the tuplet-value. If GEN-LENGTH-CARTESIAN is difficult to use please check the GEN-TUPLET function. This function is part of the GEN-LENGTH-CARTESIAN function and will allow you to get the same result without the worry about the CARTESIAN sets.
  13. There are two ways of creating a VSL sound set library. The first one is with keyswitches - this is the default VSL setup. The second one is to do your own Program Changes sound set to switch between Patches. In this example we use the 'VSL Prepared Piano' instrument. First the keyswitches sound set: (def-sound-set VSL-Prepared-Piano-KS :programs (:group Main chain (:key c7 :key a0) double-screw (:key cs7 :key a0) harmoinic (:key d7 :key a0) harmoinic-secco (:key ds7 :key a0) foil (:key e7 :key a0) glass (:key f7 :key a0) stick (:key fs7 :key a0) stick-roll (:key g7 :key a0) glissandi (:key gs7 :key a0) ) :controllers (:group Default-Settings Pitch 0 Velocity-XF 2 Volume 7 Pan 10 Expression 11 Reverb-Dry/Wet 14 Reverb-On/Off 15 Slot-XF 20 Start-Scaler 21 Master-Attack 22 Master-Release 23 Master-Filter 24 Delay-Scaler 25 Tuning-Scaler 26 Humanize 27 Velocity-XF-On-Off 28 Rsamp-On-Off 29 Dynamics-Scaler 30 :group Pedal Ped 64 Sost-Ped 66 Una-Corda 67 :group Matrix cc1 1 )) Here is the Program Changes sound set: (def-sound-set VSL-Prepared-Piano :programs (:group Main chain (cc101 0) double-screw (cc101 15) harmoinic (cc101 29) harmoinic-secco (cc101 43) foil (cc101 57) glass (cc101 71) stick (cc101 85) stick-roll (cc101 99) glissandi (cc101 113) ) :controllers (:group Default-Settings Pitch 0 Velocity-XF 2 Volume 7 Pan 10 Expression 11 Reverb-Dry/Wet 14 Reverb-On/Off 15 Slot-XF 20 Start-Scaler 21 Master-Attack 22 Master-Release 23 Master-Filter 24 Delay-Scaler 25 Tuning-Scaler 26 Humanize 27 Velocity-XF-On-Off 28 Rsamp-On-Off 29 Dynamics-Scaler 30 :group Pedal Ped 64 Sost-Ped 66 Una-Corda 67 :group Matrix cc101 101)) Please note that if you want to use the full range of the piano you will have to set the keyswitch range outside the range of the piano or set Program Changes to switch between Patches.
  14. An Opusmodus demonstration with a discussion of the thinking behind it with Janusz Podrazik and Stephane Boussuge at the London College of Music - Composer's workshops (Thursday 4 - 6pm).
  15. Algorithmic 'play' with the song "Alle meine Entchen" (All my little ducklings) popular german children song. An example with TONALITY-MAP and GEN-PAUSE functions. A fun exercise for four voices in five parts. The original song Global seed. (init-seed 35) Song in OMN script. (setf song '((e c4 d4 e4 f4) (q g4 =) (e a4 = = =) (q g4 -) (e a4 = = =) (q g4 -) (e f4 = = =) (q e4 =) (e g4 = = =) (q c4 -))) Creating four voices based on the original song. Processing three voices, each with its own random order of its bars. (setf s-rnd (rnd-order song :list t)) (setf a-rnd (rnd-order song :list t)) (setf t-rnd (rnd-order song :list t)) The fourth voice is 10 repetitions of the first bar of the original song. (setf b-rep (gen-repeat 10 (list (first song)))) Transposition of each bar to start pitch. (setf s-trs (pitch-transpose-start '(0 1 2 3 4 5 6 7 8 9 10) s-rnd)) (setf t-trs (pitch-transpose-start '(0 7) t-rnd)) (setf b-trs (pitch-transpose-start '(0 -1 2 -3 4 -5 6 -7 8 -9) b-rep)) Adding accents to the bass voice. (setf b-dyn (subseq (gen-accent 0.2 '(2 3) b-trs) 0 4)) Three voices of the 2nd part are mapped to dorico-flamenco scale. (setf s-2 (tonality-map '(dorico-flamenco :root f3 :ambitus soprano :shift t) s-trs)) (setf t-2 (tonality-map '(dorico-flamenco :root f3 :ambitus tenor :shift t) t-trs)) (setf b-2 (tonality-map '(dorico-flamenco :root f3 :ambitus bass :shift t) b-trs)) The 'bass' voice in the 3rd part is mapped to prometheus-liszt scale. (setf b-3 (tonality-map '(prometheus-liszt :root f3 :ambitus bass :shift t) b-dyn)) All four voices of the 4th part are mapped to minor tonality. (setf s-4 (tonality-map '(minor :root gs4 :ambitus soprano :shift t) s-rnd)) (setf a-4 (tonality-map '(minor :root gs4 :ambitus alto :shift t) a-rnd)) (setf t-4 (tonality-map '(minor :root gs4 :ambitus tenor :shift t) t-rnd)) (setf b-4 (tonality-map '(minor :root gs4 :ambitus bass :shift t) b-rep)) End bar with fermata. (setf end-bar '(e gs3 b3 eb4 e4 fermata)) 10, 4 and 1 bar pause. (setf pause10 (gen-pause song)) (setf pause4 (gen-pause b-dyn)) (setf pause1 (gen-pause end-bar)) Assembling voices. (setf soprano (assemble-seq song s-2 pause4 s-4 pause1)) (setf alto (assemble-seq pause10 pause10 pause4 a-4 pause1)) (setf tenor (assemble-seq pause10 t-2 pause4 t-4 pause1)) (setf bass (assemble-seq pause10 b-2 b-3 b-4 end-bar)) Defining the score and the layout. (def-score Alle-meine-Entchen (:title "Alle meine Entchen" :key-signature '(c maj) :time-signature '(2 4) :tempo '((120 34) (:rit 120 30 1/16 1)) :layout (choir-satb-layout 'soprano 'alto 'tenor 'bass :ignore-velocity t)) (soprano :omn soprano :channel 1 :sound 'gm :program '0) (alto :omn alto) (tenor :omn tenor) (bass :omn bass))
  16. You need to install Opusmodus Version 1.0.15567, there are a few changes and additions.
  17. An example with DEF-CASE and Vienna Symphonic Library sound sets. Initialise random seed to all the other functions which may also use random seed. (init-seed 98) Global value 20 assign to a variable LEN. (setf len '20) Complex length generator using cartesian sets - combinatory possibilities. (setf v1-gcl (gen-length-cartesian 2 3 'm 'n (rnd-sample len '(q q h)) (rnd-sample len '(2 3)) (rnd-sample len (primes 5 3)) (rnd-sample len '(1 2 3 4 5)))) (setf v2-gcl (gen-length-cartesian 2 3 'd '? (rnd-sample len '(q q h)) (rnd-sample len '(2 3)) (rnd-sample len (primes 5 3)) (rnd-sample len '(1 2 3 4 5)))) (setf va-gcl (gen-length-cartesian 2 3 'd '? (rnd-sample len '(q q h)) (rnd-sample len '(2 3)) (rnd-sample len (primes 5 3)) (rnd-sample len '(1 2 3 4 5)))) (setf vc-gcl (gen-length-cartesian 2 3 'd '? (rnd-sample len '(q q h)) (rnd-sample len '(2 3)) (rnd-sample len (primes 5 3)) (rnd-sample len '(1 2 3 4 5)))) Aligning all lists by adding rests to the end of the lists. (setf str-la (length-align (list v1-gcl v2-gcl va-gcl vc-gcl) :type 'r :position 'e)) Rearranging lists to produce unison moments. (setf str-unison (gen-unison str-la :unison '(1 2 3 1))) Assigning VN variables to the str-unison lists - VN0, VN1, etc... (assign-vars 'vn str-unison) The initial interval list. (setq intervals '((2) 6 (0 -6) (-1 -6) 0 (-1 10) -13 (3 6) (-1 6) 9 0 0 6 0 (-6 -13) -8 -11 0 (0 11) (-3 6) -14 (0 14) -6 (3 6) (-6 6) (-2 -13) 20 (9 -6) 11 (-6 2) (-2 -6) -13 9 10 6 0 (-13 6) -9 16 (-10 -11) -8 (2 -6) -2 35 0 (-6 2) (-8 -2) -8 (2 -6) (10 6) 0 (-20 13) (-9 -10) (11 -11) (8 6) (0 -2) (2 -6) -1 (5 6) 4 (10 -6) -23 11 6 (-2 2) 6 6 4 (-6 2) 4 -14 6 (-13 6) (2 2) 11 -6 (6 -13) 8)) Interval list of 200 fragments with length of 3, 4 or 5 values. (setf mat (flatten-sublist (gen-fragment 200 '(3 4 5) intervals :lists t))) Interval to pitch with start pitch 'a5. (setf str-pitch (flatten (interval-map 'a5 mat))) Distribution of a single pitch stream to a series of voices, consecutively. (setf str-cd (consecutive-distribute str-pitch vn0 vn1 vn2 vn3)) Assigning PITCH variables to the str-cd lists - PITCH0, PITCH1, etc... (assign-vars 'pitch str-cd) Align the number of pitches to match the number of length. (setf v1-span (span vn0 pitch0)) (setf v2-span (span vn1 pitch1)) (setf va-span (span vn2 pitch2)) (setf vc-span (span vn3 pitch3)) Variant process of common variant forms on lists of pitches. (setf v1-pv (pitch-variant v1-span :variant '?)) (setf v2-pv (pitch-variant v2-span :variant '?)) (setf va-pv (pitch-variant va-span :variant '?)) (setf vc-pv (pitch-variant vc-span :variant '?)) Setting the instrument AMBITUS (range). (setf v1-p (ambitus '(g3 g6) v1-pv)) (setf v2-p (ambitus '(g3 g6) v2-pv)) (setf va-p (ambitus '(c3 g6) va-pv)) (setf vc-p (ambitus '(c2 c5) vc-pv)) Finding unique lengths. ;(setf len-unique (length-note-unique vn0 vn1 vn2 vn3)) ;=> (1/20 1/16 1/12 1/10 1/8 3/20 1/6 1/5 1/4 3/10 1/2) Defining a function ART name and list of clauses. (def-case art (1/20 'leg) (1/16 'leg) (1/12 (rnd-pick '(stacc pizz snap))) (1/10 'leg) (1/8 (rnd-pick '(stacc pizz snap))) (3/20 (rnd-pick '(stacc pizz snap))) (1/6 'non-vib) (1/5 'tasto) (1/4 (rnd-pick '(tasto ponte))) (3/10 (rnd-pick '(tasto ponte))) (1/3 'tasto+trem) (1/2 'tasto) (otherwise (rnd-pick '(ord tasto)))) Processing ART clauses. (setf v1-art (mapcar 'art vn0)) (setf v2-art (mapcar 'art vn1)) (setf va-art (mapcar 'art vn2)) (setf vc-art (mapcar 'art vn3)) Defining a function name DYN and list of clauses. (def-case dyn (1/20 'mf) (1/16 'mf) (1/12 (rnd-pick '(p mp mf))) (1/10 (rnd-pick '(p mp mf))) (1/8 (rnd-pick '(pp p mp))) (3/20 (rnd-pick '(pp p mp))) (1/6 (rnd-pick '(pp p mp))) (1/5 (rnd-pick '(ppp pp p))) (1/4 (rnd-pick '(ppp pp p))) (3/10 (rnd-pick '(pppp ppp pp))) (1/3 (rnd-pick '(pppp ppp))) (1/2 'pppp) (otherwise (rnd-pick '(pp p)))) Processing DYN clauses. (setf v1-v (mapcar 'dyn vn0)) (setf v2-v (mapcar 'dyn vn1)) (setf va-v (mapcar 'dyn vn2)) (setf vc-v (mapcar 'dyn vn3)) Assemble the separate parameters to OMN script. (setf v1-omn (make-omn :length vn0 :pitch v1-p :velocity v1-v :articulation v1-art)) (setf v2-omn (make-omn :length vn1 :pitch v2-p :velocity v2-v :articulation v2-art)) (setf va-omn (make-omn :length vn2 :pitch va-p :velocity va-v :articulation va-art)) (setf vc-omn (make-omn :length vn3 :pitch vc-p :velocity vc-v :articulation vc-art)) Converting material to pauses. (setf pause1 (gen-pause v1-omn)) (setf pause2 (gen-pause v2-omn)) (setf pause3 (gen-pause va-omn)) (setf pause4 (gen-pause vc-omn)) (setf pause (gen-repeat 6 '((-q)))) Rearranging the bars and assembling a final instrument. (setf v1-seq (assemble-subseq '((v1-omn :start 5 :end 5) (pause :start 1 :end 2) (v1-omn :start 2 :end 2) (v1-omn :start 3 :end 3) (pause :start 1 :end 1) (v1-omn :start 7 :end 9) (v1-omn :start 6 :end 7) (v1-omn :start 8 :end 8)))) (setf v2-seq (assemble-subseq '((v2-omn :start 5 :end 5) (pause :start 1 :end 2) (v2-omn :start 2 :end 2) (v2-omn :start 3 :end 3) (pause :start 1 :end 1) (v2-omn :start 7 :end 9) (v2-omn :start 4 :end 5) (v2-omn :start 8 :end 8)))) (setf va-seq (assemble-subseq '((va-omn :start 5 :end 5) (pause :start 1 :end 2) (va-omn :start 2 :end 2) (va-omn :start 3 :end 3) (pause :start 1 :end 1) (va-omn :start 18 :end 20) (va-omn :start 4 :end 5) (va-omn :start 8 :end 8)))) (setf vc-seq (assemble-subseq '((vc-omn :start 7 :end 7) (pause :start 1 :end 2) (vc-omn :start 2 :end 2) (vc-omn :start 3 :end 3) (vc-omn :start 10 :end 10) (pause4 :start 7 :end 9) (vc-omn :start 5 :end 6) (vc-omn :start 8 :end 8)))) Test if two tone chords are playable. (setf v1 (instrument-clause :violin v1-seq)) (setf v2 (instrument-clause :violin v2-seq)) (setf va (instrument-clause :viola va-seq)) (setf vc (instrument-clause :cello vc-seq)) Generating a tempo list changes. (setf tempo (gen-tempo '(30 40 72)'(1 2) vc)) Defining the score. (def-score clauses (:composer "OPMO" :copyright "Opusmodus" :key-signature 'atonal :time-signature (get-time-signature vc) :tempo tempo :layout (string-quartet-layout 'violin1 'violin2 'viola 'cello)) (violin1 :omn v1 :port 0 :channel 1 :sound 'vsl-violin-solo :pan 32) (violin2 :omn v2 :channel 2 :sound 'vsl-violin-solo :pan 50) (viola :omn va :channel 3 :sound 'vsl-viola-solo :pan 75) (cello :omn vc :channel 4 :sound 'vsl-cello-solo :pan 95)) The score in OMN script reads as follows: Violin 1 v1 => ((q d4 pp tasto e4 p ponte g3fs4 tasto b4bb5 tasto h e5bb5 pppp tasto) (-q) (-q) (-5q - 5qqq a4bb5 p ord f6 ord -5q - 3q f6e6 mp snap - - -h.) (q d4 pp tasto -e - -q gs3 p tasto 5w c4fs4 pp tasto -5h - -) (-q) (-e fs4 p ord 5h c4 pizz -5q - - e gs3 mp -s -) (5h g5a5 mp leg f6fs6 leg fs6c6 leg gs5 mf leg e4 mp leg e cs4 pp pizz eb4cs4 p snap gs3 mp stacc a3 p snap f5b5 pp stacc f4 mp stacc c4 p pizz cs4g4 mp snap) (q gs3d4 pp ponte e eb4a3 mp stacc -s - -w) (q f4g3 ppp ponte -e - q d4 p ord -e - 5hhh eb4 tasto -5h -) (-e fs4 p ord 5h c4 pizz -5q - - e gs3 mp -s -) (5h g5a5 mp leg f6fs6 leg fs6c6 leg gs5 mf leg e4 mp leg e cs4 pp pizz eb4cs4 p snap gs3 mp stacc a3 p snap f5b5 pp stacc f4 mp stacc c4 p pizz cs4g4 mp snap)) Violin 2 v2 => ((q bb5 pp ponte b3 tasto p ponte c4bb4 ponte h d4 pppp tasto) (-q) (-q) (q gs3 pp tasto gs3 tasto cs4 ponte c4bb4 tasto h d4e4 pppp tasto) (q e4 p ponte -e - -q a3gs4 ord 5w fs4gs3 pp ord -5h - -) (-q) (-e g4 p tasto 5h a3eb4 mp snap -5q - - e gs4 mf -s -) (5h c4bb4 mp leg a3 leg cs4 leg d4 leg d4 leg e a3 snap cs4 pizz cs4eb4 pizz e4 pp snap f5 mp pizz f6 pizz bb5 stacc bb5 stacc) (q bb3a4 pp ponte e fs4 stacc -s - -w) (e gs5fs5 pp stacc fs5gs4 pizz 5q a4 mf leg a4 leg cs4d4 leg cs4 leg gs3 -h) (q bb5 pp ponte b3 tasto p ponte c4bb4 ponte h d4 pppp tasto) (5h c4bb4 mp leg a3 leg cs4 leg d4 leg d4 leg e a3 snap cs4 pizz cs4eb4 pizz e4 pp snap f5 mp pizz f6 pizz bb5 stacc bb5 stacc)) Viola va => ((q b4 ppp ponte bb4 p tasto cs3g3 pp tasto bb3e3 tasto h eb3d4 pppp tasto) (-q) (-q) (q eb5 ppp tasto g3 pp ponte fs3c4 p tasto e3eb4 pp tasto h b4 pppp tasto) (5qqq f3b3 pp pizz -5q - - - - 5h d3 p ord -3q - d3 ord -h.) (-q) (-e a3eb3 p tasto 5qqq fs3c4 pizz -5q - -q) (-e e3bb3 pp tasto bb3 snap - q fs3c4 p snap -) (e f3 p pizz - - cs3c4 tasto q fs3gs3 pp ord -h.) (e d3 pp pizz f3b3 pizz 5q bb3gs3 mf leg a4gs5 leg f4 leg d5gs5 leg bb4 -h) (q b4 ppp ponte bb4 p tasto cs3g3 pp tasto bb3e3 tasto h eb3d4 pppp tasto) (5h e3 mp leg d3 p leg eb3 leg gs3 mp leg gs3d3 leg e a3 pp snap e3 mp pizz f3e4 pp pizz a4b4 mp pizz f5g5 stacc b5 pizz d6 pp stacc bb5 snap)) Violoncello vc => ((3q cs4b4 mp pizz a3eb4 p pizz gs4fs3 mf stacc q d4c4 pp ponte c4 tasto) (-q) (-q) (-5q - 5qqq c3 p tasto f3 pp ord -5q - 3q bb4e4 mp snap - - -h.) (q bb2 p tasto gs2d2 pp tasto h cs2 pppp tasto e fs2c3 mp pizz cs4 p stacc d2 pp stacc d2 snap) (-e cs3b2 pp tasto g2 mp snap - q fs2 pp pizz -) (-h.) (-w.) (-w.) (q b4 ppp ponte e4 p ponte f2 pp tasto eb2 ppp tasto h d2 pppp tasto) (5h d4c4 leg fs4c4 leg eb4 leg p leg cs4 mf leg bb3a2 leg a3 p leg g3cs3 mp leg d3e2 p leg cs2 leg h c2 pppp tasto) (5h cs2g2 leg a2eb2 leg fs2 p leg g2 leg gs2 mp leg e gs2a3 p stacc f3 snap pp pizz b4 p stacc g4 pp snap bb4e4 p stacc b4 pp snap bb4a4 snap))
  18. Great piece Stephane, I am sure will inspire others and help with coding in Opusmodus - good score indeed :-)
  19. The cautionary accidentals (composer intent) coming soon.
  20. Students To qualify for the student discount, you must be currently enrolled in a school and have valid identification. Expired identification will not be accepted. For fixed or permanent license, we will need a copy of the identification emailed to sales@opusmodus.com as a small image (maximum size 500 pixels wide). Photos may be taken by camera, phone, or computer. Teachers To qualify for the teacher discount, you must hold a higher education faculty credentials. You will need to send a copy of the credentials, identification, or a letter from a department head. E-mail your teacher credentials/ID to sales@opusmodus.com as a small image (maximum size 500 pixels wide). Photos may be taken by camera, phone, or computer.
  21. Initialise random seed to all functions which may use random seed. (init-seed 347) The GEN-SINE function generates a sequence of vectors that describe and simulate the characteristics of a sine wave. (setf sine1 (gen-sine 60 2 0.6)) (setf sine2 (gen-sine 60 3 0.3)) (setf sine3 (gen-sine 60 4 1.3)) (setf sine4 (gen-sine 60 5 0.4)) (setf sine5 (gen-sine 60 6 0.5)) (setf sine6 (gen-sine 60 7 1.6)) (setf sine7 (gen-sine 60 8 0.7)) (setf sine8 (gen-sine 60 9 0.8)) (setf sine9 (gen-sine 60 4 0.9)) Generate a graph from the data provided in these nine sine sequences. (list-plot (list sine1 sine2 sine3 sine4 sine5 sine6 sine7 sine8 sine9) :zero-based t :point-radius 2 :join-points t) Conversion process from vector to length in a given note-length values. (setf span (rnd-sample 24 '(q q. h))) (setf dur1 (length-span span (vector-to-length '1/32 1 1 sine1))) (setf dur2 (length-span span (vector-to-length '1/32 1 1 sine2))) (setf dur3 (length-span span (vector-to-length '1/16 1 1 sine3))) (setf dur4 (length-span span (vector-to-length '1/32 1 1 sine4))) (setf dur5 (length-span span (vector-to-length '1/16 1 1 sine5))) (setf dur6 (length-span span (vector-to-length '1/32 1 3 sine6))) (setf dur7 (length-span span (vector-to-length '1/32 1 5 sine7))) (setf dur8 (length-span span (vector-to-length '1/32 1 7 sine8))) (setf dur9 (length-span span (vector-to-length '1/16 1 5 sine9))) Conversion process from vector to pitch in a given ambitus. Combining pitches to chords. (setf pitch1a (vector-to-pitch '(g1 bb3) sine6)) (setf pitch2a (vector-to-pitch '(gs1 b3) sine7)) (setf pitch3a (vector-to-pitch '(a1 fs3) sine8)) (setf pitch4a (vector-to-pitch '(ab1 b3) sine9)) (setf pitch5a (vector-to-pitch '(c1 bb3) sine1)) (setf comp6 (gen-combine pitch1a pitch2a)) (setf comp7 (gen-combine pitch1a pitch2a pitch3a)) (setf comp8 (gen-combine pitch1a pitch2a pitch3a pitch4a)) (setf comp9 (gen-combine pitch1a pitch2a pitch3a pitch4a pitch5a)) (setf pitch1 (vector-to-pitch '(g2 gs6) sine1)) (setf pitch2 (vector-to-pitch '(gs2 a6) sine2)) (setf pitch3 (vector-to-pitch '(a2 b6) sine3)) (setf pitch4 (vector-to-pitch '(ab2 d6) sine4)) (setf pitch5 (vector-to-pitch '(c2 gs6) sine5)) (setf pitch6 (chord-pitch-unique (chordize-list comp6))) (setf pitch7 (chord-pitch-unique (chordize-list comp7))) (setf pitch8 (chord-pitch-unique (chordize-list comp8))) (setf pitch9 (chord-pitch-unique (chordize-list comp9))) Generating length lists with the help of RND-SAMPLE function. (setf dyn '((f f f f) (p p p p) (mf mf mf mf) (ff ff ff ff) (mp mp mp mp))) (setf dyn1 (rnd-sample (length (flatten dur1)) dyn)) (setf dyn2 (rnd-sample (length (flatten dur1)) dyn)) (setf dyn3 (rnd-sample (length (flatten dur1)) dyn)) (setf dyn4 (rnd-sample (length (flatten dur1)) dyn)) (setf dyn5 (rnd-sample (length (flatten dur1)) dyn)) (setf dyn6 (rnd-sample (length (flatten dur1)) dyn)) (setf dyn7 (rnd-sample (length (flatten dur1)) dyn)) (setf dyn8 (rnd-sample (length (flatten dur1)) dyn)) (setf dyn9 (rnd-sample (length (flatten dur1)) dyn)) Making OMN lists. (setf p1 (make-omn :length dur1 :pitch pitch1 :velocity dyn1)) (setf p2 (make-omn :length dur2 :pitch pitch2 :velocity dyn2)) (setf p3 (make-omn :length dur3 :pitch pitch3 :velocity dyn3)) (setf p4 (make-omn :length dur4 :pitch pitch4 :velocity dyn4)) (setf p5 (make-omn :length dur5 :pitch pitch5 :velocity dyn5)) (setf p6 (make-omn :length dur6 :pitch pitch6 :velocity dyn6)) (setf p7 (make-omn :length dur7 :pitch pitch7 :velocity dyn7)) (setf p8 (make-omn :length dur8 :pitch pitch8 :velocity dyn8)) (setf p9 (make-omn :length dur9 :pitch pitch9 :velocity dyn9)) Random selection of variants. (setf var1 (pitch-variant p1 :variant '?)) (setf var2 (pitch-variant p2 :variant '?)) (setf var3 (pitch-variant p3 :variant '?)) (setf var4 (pitch-variant p4 :variant '?)) (setf var5 (pitch-variant p5 :variant '?)) (setf var6 (pitch-variant p6 :variant '?)) (setf var7 (pitch-variant p7 :variant '?)) (setf var8 (pitch-variant p8 :variant '?)) (setf var9 (pitch-variant p9 :variant '?)) Transposition. (setf transp (library '12-tone-row 'berg 'r08)) (setf part1 (pitch-transpose-start transp var1)) (setf part2 (pitch-transpose-start transp var2)) (setf part3 (pitch-transpose-start transp var3)) (setf part4 (pitch-transpose-start transp var4)) (setf part5 (pitch-transpose-start transp var5)) (setf part6 (pitch-transpose-start transp var6)) (setf part7 (pitch-transpose-start transp var7)) (setf part8 (pitch-transpose-start transp var8)) (setf part9 (pitch-transpose-start transp var9)) One bar pause. (setf pause (gen-pause (first part9))) Assembling all parts with :start and :end sequence. (setf rh (ambitus-chord 13 (ambitus '(0 36) (assemble-subseq '((pause :start 1 :end 1) (pause :start 1 :end 1) (pause :start 1 :end 1) (part2 :start 2 :end 3) (part2 :start 12 :end 12) (part2 :start 3 :end 8) (part2 :start 4 :end 9) (part3 :start 4 :end 4) (part3 :start 5 :end 5) (part3 :start 8 :end 12) (part3 :start 2 :end 3) (part4 :start 1 :end 4) (part4 :start 12 :end 12) (part4 :start 1 :end 2) (part4 :start 4 :end 7) (part4 :start 11 :end 12) (part5 :start 10 :end 12) (part5 :start 8 :end 9) (part5 :start 9 :end 9)))))) (setf lh (ambitus-chord 13 (ambitus '(-32 -1) (assemble-subseq '((part9 :start 1 :end 1) (part6 :start 1 :end 2) (part1 :start 2 :end 3) (part7 :start 3 :end 4) (part2 :start 4 :end 5) (part7 :start 4 :end 6) (part3 :start 5 :end 7) (part8 :start 6 :end 8) (part1 :start 7 :end 9) (part8 :start 8 :end 10) (part1 :start 9 :end 11) (part9 :start 10 :end 11) (part1 :start 11 :end 12) (part9 :start 12 :end 13) (part2 :start 13 :end 15) (part9 :start 14 :end 15) (part2 :start 15 :end 16) (part9 :start 16 :end 17) (part2 :start 17 :end 18) (part9 :start 18 :end 19) (part3 :start 19 :end 22)))))) Defining a score. (def-score assemble-subsubseq (:composer "OPMO" :copyright "Opusmodus" :key-signature 'atonal :time-signature (get-time-signature lh :group '((1 1) (1 1 1) (1 1 1 1))) :tempo 72 :layout (piano-solo-layout 'rh 'lh)) (rh :omn rh :port 0 :sound 'gm :channel 1 :program 0) (lh :omn lh))
  22. An example of algorithmic composition in a few simple steps. Initialise random seed to all functions which may use random seed. (init-seed 8975) Six lists (bars) of note-length values. (setf len '((s s q s) (s q -s s) (s s s s) (s s -s s) (s e s) (s -s e))) The GEN-SINE function generates a sequence of vectors that describe and simulate the characteristics of a sine wave. (setf sine1 (gen-sine 12 2 0.3)) (setf sine2 (gen-sine 24 3 0.4)) (setf sine3 (gen-sine 30 4 0.5)) (setf sine4 (gen-sine 36 5 0.6)) Generate a graph from the data provided in these four sine sequences. (list-plot (list sine1 sine2 sine3 sine4) :zero-based t :point-radius 2 :join-points t) Conversion process from vector to pitch in a given ambitus. (setf pitch1 (vector-to-pitch '(g3 g6) sine1)) (setf pitch2 (vector-to-pitch '(gs3 g6) sine2)) (setf pitch3 (vector-to-pitch '(a3 g6) sine3)) (setf pitch4 (vector-to-pitch '(as3 g6) sine4)) Combining pitches to chords. (setf chords2 (chordize-list (gen-combine pitch1 pitch2))) (setf chords3 (chordize-list (gen-combine pitch1 pitch2 pitch3))) (setf chords4 (chordize-list (gen-combine pitch1 pitch2 pitch3 pitch4))) (setf chords (chord-pitch-unique (flatten (list chords2 chords3 chords4)))) Generating length lists with the help of RND-SAMPLE and RND-ORDER functions. (setf dur1 (rnd-order (rnd-sample 6 (rnd-sample 4 len)))) (setf dur2 (rnd-order (rnd-sample 4 (rnd-sample 4 len)))) (setf dur3 (rnd-order (rnd-sample 2 (rnd-sample 4 len)))) (setf dur4 (rnd-order (rnd-sample 4 (rnd-sample 4 len)))) (setf dur5 (rnd-order (rnd-sample 10 (rnd-sample 4 len)))) Generating velocity lists with the help of RND-SAMPLE function. (setf dyn1 '(p mp mf f ff)) (setf dyn2 (rnd-sample 6 dyn1)) (setf dyn3 (rnd-sample 12 dyn1)) (setf dyn4 (rnd-sample 24 dyn1)) (setf dyn5 (rnd-sample 36 dyn1)) Making OMN lists. (setf m1 (make-omn :length dur1 :pitch pitch1 :velocity dyn1)) (setf m2 (make-omn :length dur2 :pitch pitch2 :velocity dyn2)) (setf m3 (make-omn :length dur3 :pitch pitch3 :velocity dyn3)) (setf m4 (make-omn :length dur4 :pitch pitch4 :velocity dyn4)) (setf m5 (make-omn :length dur5 :pitch chords :velocity dyn5)) Random selection of variants. (setf part1 (pitch-variant m1 :variant '?)) (setf part2 (pitch-variant m2 :variant '?)) (setf part3 (pitch-variant m3 :variant '?)) (setf part4 (pitch-variant m4 :variant '?)) (setf part5 (pitch-variant m5 :variant '?)) A pause of 1 quarter. (setf pause '(-1/4)) Assembling a sequence. (setf result (assemble-seq part1 pause part2 pause part3 pause part4 pause part3 pause part2 part1 part5)) Finally, defining a score with GRAND-LAYOUT instrument - direct conversion to standard notation. (def-score wave-to-pitch (:composer "OPMO" :copyright "Opusmodus" :key-signature 'atonal :time-signature (get-time-signature result) :tempo 108 :layout (grand-layout 'piano)) (piano :omn result :sound 'gm :channel 1 :program 0))
  23. J.S. Bach, Chorale cantata, BWV 5 Four voices. (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 function defines a score. (def-score bach-bwv-0005 (:title "Bach, BWV-0005" :composer "J. S. Bach" :key-signature '(g min) :time-signature '(4 4) :tempo 96 :layout (choir-satb-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))
  24. An example of the direct conversion of OMN score to the standard notation.J.S. Bach, Goldberg-Variationen, Variation 18 a 1 Clav. Right hand (1st voices).(setf rh1 '((repeat (-h g5 tie) (h g5 fs5 tie) (q fs5 e g5 fs5 h e5 tie) (q e5 e d5 cs5 h d5) (-h e5 tie) (q e5 e d5 e5 h fs5 tie) (q fs5 e a5 g5 h a5 tie) (e a5 g5 a5 fs5 h g5) (-h e5 tie) (h e5 d5 tie) (q d5 e e5 fs5 h g5 tie) (e g5 fs5 g5 e5 h fs5 tie) (q fs5 fs5 h e5 tie) (q e5 e5 h d5 tie) (q d5 g5 e cs5 d5 q e5 tie) (h e5 d5)) (-h a5 tie) (h a5 g5 tie) (q g5 e a5 b5 h c6 tie) (e c6 b5 q c6 h b5) (-h e5 tie) (h e5 q ds5 e5) (h. fs5 e e5 fs5) (h_e g5 e fs5 e5 d5) (q c5 -q h a5 tie) (h a5 g5 tie) (q g5 e a5 b5 h c6 tie) (e c6 b5 c6 a5 h b5 tie) (q b5 b5 h a5 tie) (q a5 a5 h g5 tie) (q g5 c6 e fs5 g5 q a5 tie) (h a5 g5))) Right hand (2nd voice). (setf rh2 '((repeat (w b4) (h. a4 e b4 a4) (h. g4 e fs4 e4) (h fs4 -h) (h. g4 e fs4 g4) (h. a4 e c5 b4) (h_e c5 e b4 c5 a4) (h b4 -) (w g4) (h. fs4 e g4 a4) (h_e b4 e a4 b4 g4) (h. a4 q) (h. g4 q) (h. fs4 q b4) (e e4 fs4 h. g4) (w fs4)) (w c5) (h. b4 e c5 d5) (h_e e5 e ds5 q e5) (w ds5) (w g4) (q fs4 g4 h a4 tie) (q a4 e g4 a4 h b4 tie) (e b4 a4 g4 fs4 h e4) (w c5) (h. b4 e c5 d5) (h_e e5 e d5 e5 c5) (h. d5 q) (h. c5 q) (h. b4 q e5) (e a4 b4 h. c5) (w b4)))Left hand (setf lh '((repeat (-q e g3 a3 q b3 c4) (q d4 d3 h d4) (-q e e4 d4 q cs4 a3) (q d4 d3 d4 c4) (q b3 mordent1 e a3 b3 q c4 c3) (q c4 e b3 c4 q d4 a3) (q d3 e fs3 e3 q fs3 d3) (q g3 d3 g2 e g3 a3) (q b3 e a3 b3 q cs4 e b3 cs4) (q d4 cs4 b3 a3) (q g3 fs3 e3 d3) (q cs3 e b2 cs3 q d3 e cs3 d3) (q b2 e a2 b2 q cs3 e b2 cs3) (q as2 e gs2 as2 b2 a2 g2 fs2) (q g2 e2 a2 a1) (q d2 a2 h d3)) (-q e d3 e3 q fs3 d3) (q g3 g2 g3 e a3 b3) (q c4 b3 a3 e g3 a3) (q. b3 e a3 g3 fs3 e3 ds3) (q e3 e e4 d4 q c4 b3) (q a3 e b3 c4 q fs3 e g3 a3) (q ds3 e e3 fs3 q b2 e cs3 ds3) (q e3 e e4 ds4 q e4 e fs4 g4) (q a4 e g4 a4 q fs4 e e4 fs4) (q g4 fs4 e4 d4) (q c4 b3 a3 g3) (q fs3 e e3 fs3 q g3 e fs3 g3) (q e3 e d3 e3 q fs3 e e3 fs3) (q ds3 e cs3 ds3 e3 d3 c3 b2) (q c3 a2 d3 d2) (q g2 d3 h g3)))Defining a score with PIANO-SOLO-LAYOUT instrument. (def-score voices (:title "Goldberg-Variationen" :subtitle "Variation 18 a 1 Clav." :composer "J.S. Bach" :key-signature '(c maj) :time-signature '(2 2) :tempo '("Canone alla Sesta" q 182) :layout (piano-solo-layout '(pno-rh1 pno-rh2) 'pno-lh)) (pno-rh1 :omn rh1 :channel 1 :sound 'gm :program 0) (pno-rh2 :omn rh2) (pno-lh :omn lh))
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy