Jump to content

opmo

Administrators
  • Posts

    2,903
  • Joined

  • Last visited

Everything posted by opmo

  1. Could you send me some example (with score) of the problem.
  2. More about function name changes go to 'History': https://opusmodus.com/history/
  3. Yes, the function name has change to GET-AMBITUS. You will need to make a few correction to your code sorry for the inconvenience.
  4. Opusmodus use CCL 1.12, here is the link to CCL 1.12 Clozure/ccl GITHUB.COM Clozure Common Lisp. Contribute to Clozure/ccl development by creating an account on GitHub.
  5. – New function: POLYGON-RHYTHM – Generates a symmetrical polygon to a given n-gon. – Update: LENGTH-WEIGHT – :swallow keyword added. LENGTH-REST-SERIES – omn-form and :swallow keyword added. LENGTH-TO-REST – omn-form and :swallow keyword added. – Documents: Howto Score/Rhythm/Polygon Rhythm.opmo Note: Select 'Check for Updates...' from Opusmodus app menu to get the latest version. POLYGON-RHYTHM This function returns a symmetrical polygon to a given n-gon (sides number) with circle points (denominator) and a given staring point. In this example we use 3-gon in a 16 point circle with the starting point 0: (polygon-rhythm 3 16 0) => (1/16 -1/16 -1/16 -1/16 1/16 -1/16 -1/16 -1/16 -1/16 -1/16 -1/16 -1/16 1/16 -1/16 -1/16 -1/16) Same as above with :legato t added: (polygon-rhythm 3 16 0 :legato t) => (1/4 1/2 1/4) The 3-gon in a 16 point circle with the starting point 0 will produce 7 symmetrical 3-gon’s: Example with start point 5: (polygon-rhythm 3 16 5) => (-1/16 -1/16 -1/16 -1/16 -1/16 1/16 -1/16 -1/16 -1/16 -1/16 -1/16 1/16 -1/16 -1/16 -1/16 1/16) (circle-rhythm-plot (polygon-rhythm 3 16 5) :points 16) Examples: In the following example we create 8 bars of a ‘Drum Set’ rhythm. First we assign the ‘GM Percussion’ names to variables: (setf bd (read-map *gm-percussion* 'acoustic-bass-drum)) (setf sd (read-map *gm-percussion* 'Acoustic-Snare)) (setf ht (read-map *gm-percussion* 'High-Tom)) (setf hh (read-map *gm-percussion* 'Open-Hi-hat)) Next we create 4 polygon rhythms: (setf bd-gon (polygon-rhythm 3 16 0 :pitch bd :seed 5)) (setf sd-gon (polygon-rhythm 2 16 1 :pitch sd :seed 45)) (setf ht-gon (polygon-rhythm 2 16 5 :pitch ht :seed 45)) (setf hh-gon (polygon-rhythm 5 16 2 :pitch hh :seed 5)) With the CIRCLE-RHYTHM-PLOT function you can visualise how the rhythms are working together: (circle-rhythm-plot (list bd-gon sd-gon ht-gon hh-gon) :points 16) Let’s hear the result above, using PS function and ‘GM Instrument Set’ with a 8 times loop: (ps 'gm :ds-bd (list (gen-eval 8 'bd-gon)) :ds-sd (list (gen-eval 8 'sd-gon)) :ds-ht (list (gen-eval 8 'ht-gon)) :ds-hh (list (gen-eval 8 'hh-gon)) :tempo 120) Same as above but without a seed value: (ps 'gm :ds-bd (list (gen-eval 8 '(polygon-rhythm 3 16 0 :pitch bd))) :ds-sd (list (gen-eval 8 '(polygon-rhythm 2 16 1 :pitch sd))) :ds-ht (list (gen-eval 8 '(polygon-rhythm 2 16 5 :pitch ht))) :ds-hh (list (gen-eval 8 '(polygon-rhythm 5 16 2 :pitch hh))) :tempo 120) In the next example we add a few more percussion instruments. The '? start symbol means the start point is selected at random: 0 to 15. (progn (setf bd (read-map *gm-percussion* 'Acoustic-Bass-Drum)) (setf sd (read-map *gm-percussion* 'Acoustic-Snare)) (setf ht (read-map *gm-percussion* 'High-Tom)) (setf hh (read-map *gm-percussion* 'Open-Hi-hat)) (setf lb (read-map *gm-percussion* 'Low-Bongo)) (setf hb (read-map *gm-percussion* 'High-Bongo)) (setf mhc (read-map *gm-percussion* 'Mute-Hi-Conga)) (setf lc (read-map *gm-percussion* 'Low-Conga)) (ps 'gm :ds-bd (list (gen-eval 16 '(polygon-rhythm 3 16 0 :pitch bd))) :ds-sd (list (gen-eval 16 '(polygon-rhythm 2 16 1 :pitch sd))) :ds-ht (list (gen-eval 16 '(polygon-rhythm 2 16 5 :pitch ht))) :ds-hh (list (gen-eval 16 '(polygon-rhythm 5 16 2 :pitch hh))) :rhy (list (gen-eval 16 '(polygon-rhythm 5 16 '? :pitch lb)) (gen-eval 16 '(polygon-rhythm 4 16 '? :pitch hb)) (gen-eval 16 '(polygon-rhythm 7 16 '? :pitch mhc)) (gen-eval 16 '(polygon-rhythm 7 16 '? :pitch lc))) :tempo 120) )
  6. Great piano study! Thank you for sharing
  7. Second example, this time with code. VSL: Soprano Sax, Steinway D, Upright Bass and Jazz DrumSet. (progn (init-seed 3578) (setf bd '(c2 cs2)) (setf sd '(d2 ds2 e2 f2 fs2 g2 gs2 a2 bb2 b2)) (setf lt '(c5 cs5 d5 ds5 e5 f5 fs5 g5 gs5 a5 bb5 b5)) (setf cc '(g7 c7)) (setf rc '(c4 cs7 d7 ds7 e7 f7)) (setf hh '(c4 cs4 d4 ds4 e4)) (setf ds-vel '(ff f fff)) (setf bd-gon (gen-eval 33 '(polygon-rhythm 3 16 0 :pitch (rnd-sample 32 bd) :velocity (rnd-sample 32 ds-vel)))) (setf sd-gon (gen-eval 32 '(polygon-rhythm 2 16 '? :pitch (rnd-sample 32 sd) :velocity (rnd-sample 32 ds-vel)))) (setf lt-gon (gen-eval 32 '(polygon-rhythm 2 16 '? :pitch (rnd-sample 32 lt) :velocity (rnd-sample 32 ds-vel)))) (setf cc-gon (gen-eval 32 '(polygon-rhythm 5 24 '? :pitch (rnd-sample 32 cc) :velocity (rnd-sample 32 ds-vel)))) (setf rc-gon (gen-eval 32 '(polygon-rhythm 5 24 '? :pitch (rnd-sample 32 rc) :velocity (rnd-sample 32 ds-vel)))) (setf hh-gon (gen-eval 33 '(polygon-rhythm 5 16 '? :pitch (rnd-sample 32 hh) :velocity (rnd-sample 32 ds-vel)))) (setf hexachord '(d4 eb4 fs4 g4 a4 bb4)) (setf chords (assemble-seq (gen-eval 16 '(polygon-rhythm 3 16 '? :pitch (gen-chord-series hexachord hexachord :type '? :width '(30 24 36 12) :segment t))) (gen-eval 4 '(polygon-rhythm 5 16 '? :pitch (gen-chord-series hexachord hexachord :type '? :width '(30 24 36 12) :segment t))) (gen-eval 7 '(polygon-rhythm 4 16 '? :pitch (gen-chord-series hexachord hexachord :type '? :width '(30 24 36 12) :segment nil) :legato t)) (gen-eval 5 '(polygon-rhythm 3 16 '? :pitch (gen-chord-series hexachord hexachord :type '? :width '(30 24 36 12) :segment t))))) (setf piano (assemble-seq '((-1) (-1) (-1) (-1)) (rnd-octaves '(c2 b6) (subseq chords 4 31)) '(-1))) (setf ssax (make-omn :length (assemble-seq '((-1) (-1) (-1) (-1) (-1) (-1) (-1)) (polygon-rhythm 6 16 '?) (polygon-rhythm 7 16 '?) (polygon-rhythm 9 16 '?) (polygon-rhythm 3 8 '?) (polygon-rhythm 16 16 '?) (polygon-rhythm 24 24 '?) (polygon-rhythm 8 16 '?) (polygon-rhythm 11 16 '?) (polygon-rhythm 5 16 '?) (polygon-rhythm 16 24 '?) (polygon-rhythm 6 8 '?) (polygon-rhythm 4 16 2) (polygon-rhythm 5 16 2) (polygon-rhythm 7 16 2) (polygon-rhythm 9 16 0) (polygon-rhythm 13 16 0) (polygon-rhythm 16 16 0) (polygon-rhythm 21 24 0) (polygon-rhythm 22 24 0) (polygon-rhythm 20 24 0) (polygon-rhythm 20 24 0) (polygon-rhythm 16 24 0) (polygon-rhythm 4 16 2) '((-1) (-1)) ) :pitch (ambitus 'soprano-sax (pitch-transpose (vector-to-pitch '(fs3 fs4) (mod-sine-waves 5 36 4 0.3 :modulation (gen-sine 120 5 0.4))) (pitch-variant (melodize (omn :pitch chords))))) :velocity '(ff))) (setf bass-line (assemble-seq '((-1) (-1)) (gen-eval 31 '(polygon-rhythm 9 16 '? :pitch (ambitus '(e1 g4) (pitch-variant (pitch-transpose -24 (rnd-air :type :pitch)))) :velocity '(fff))))) (ps 'vsl :ssax (list ssax) :grand (list piano) :cb (list bass-line) :ds-bd (list bd-gon) :ds-sd (list sd-gon) :ds-lt (list lt-gon) :ds-cc (list cc-gon) :ds-rc (list cc-gon) :ds-hh (list hh-gon) :tempo 120 :output :live-coding :title "Dada Quartet - EXP.2 (c) 2019 OPMO") (init-seed nil) ) Best wishes, Janusz P.S. I am almost there with the new release.
  8. The additional swallow keyword (default t) will be part of the next release. (length-weight '((q c4 d4 e4 f4 g4 a4 b4) (q c4 d4 e4 f4 g4 a4 b4)) :weight '((3 1) (5 2)) :swallow nil :seed 875) => ((q c4 d4 e4 f4 g4 - a4) (q c4 d4 - e4 f4 g4 -)) ;; With :swallow T (default) (length-weight '((q c4 d4 e4 f4 g4 a4 b4) (q c4 d4 e4 f4 g4 a4 b4)) :weight '((3 1) (5 2)) :seed 875) => ((q c4 d4 e4 f4 g4 - b4) (q c4 d4 - f4 g4 a4 -))
  9. The forthcoming POLYGON-RHYTHM function will allow you to think and compose in a clear symmetrical structures. The great amount of keywords (OPMO stile) makes this algorithm very powerful. This is a short example using POLYGON-RHYTHM exclusively. Instruments: VSL Tenor Sax and Jazz Drumset.
  10. Is the input omn form or just a length values, this is what I was saying and at what stage of your composition you used the function.
  11. To swallow pitches use GEN-SWALLOW function: (gen-swallow '(1/4 -1/4 1/4 -1/4) '(c4 d4 e4 g4)) All depends on the stage you are using the LENGTH-WEIGTH function and what you want to achieve. Anyway, I could add the swallow process into the function.
  12. (defun gen-rnd-dust (sequence &key (span '(0.1)) (quantize '(1 2 3 4 5 6 7 8)) (scale 1.0) (tolerance 0.05) seed) (let (state) (setf state *init-seed*) (setf seed (rnd-seed seed)) (do-verbose ("gen-rnd-dust, span: ~s quantize: ~s scale: ~s tolerance: ~s seed: ~s" span quantize scale tolerance seed) (disassembling-omn ((sequence plist) sequence :length) (let* ((length sequence) (sp) (out (float-to-ratio (loop with cnt = 0 for i in length do (setf sp (nth cnt span)) when (> i 0) collect (+ i (car (rnd-number 1 0.0 (* i sp) :seed (seed)))) else collect (- i (car (rnd-number 1 0.0 (* i sp) :seed (seed)))) when (< cnt (1- (length span))) do (incf cnt)) :ratio 1))) (init-state state) (quantize out quantize :scale scale :tolerance tolerance)))))) or (with sublists): (defun gen-rnd-dust (sequence &key (span '(0.1)) (quantize '(1 2 3 4 5 6 7 8)) (scale 1.0) (tolerance 0.05) seed) (let (state) (setf state *init-seed*) (setf seed (rnd-seed seed)) (do-verbose ("gen-rnd-dust, span: ~s quantize: ~s scale: ~s tolerance: ~s seed: ~s" span quantize scale tolerance seed) (let ((ts (get-time-signature sequence)) (seq (flatten-omn sequence))) (omn-to-time-signature (disassembling-omn ((seq plist) seq :length) (let* ((length seq) (sp) (out (float-to-ratio (loop with cnt = 0 for i in length do (setf sp (nth cnt span)) when (> i 0) collect (+ i (car (rnd-number 1 0.0 (* i sp) :seed (seed)))) else collect (- i (car (rnd-number 1 0.0 (* i sp) :seed (seed)))) when (< cnt (1- (length span))) do (incf cnt)) :ratio 1))) (init-state state) (quantize out quantize :scale scale :tolerance tolerance))) ts))))) Best, Janusz
  13. – New function: CHORD-PROGRESSION - sorts a sequence of chords and pitches to the lowest or highest chord note. – Update: AMBITUS function allows range smaller than 6 semitones. – Fixed: Quick Start - Lesson 1 - OMN – Documentation updates. CHORD-PROGRESSION This function will sort a sequence of chords and pitches to the lowest or highest chord note. Sorting to lowest chord note: (chord-progression '(g2g3 a2a4 a2a3 g2d4 g2g4 a2e4)) => (g2g3 g2d4 g2g4 a2a3 a2e4 a2a4) Sorting to highest chord note: (chord-progression '(g2g3 a2a4 a2a3 g2d4 g2g4 a2e4) :sort 'high) => (g2g3 a2a3 g2d4 a2e4 g2g4 a2a4) Examples: (setf omn '((q d4a4g5 fs4eb5bb5 eb4fs5d5 bb4g5a5 fs4eb5d6 bb4a5g6) (q g4d4a4 bb4fs4eb4 a4g5d6 eb5bb5fs6 bb4a5g5 eb5d5fs5))) (chord-progression omn) (chord-progression omn :sort 'high) (chord-progression omn :sort '(high low) :reverse '(nil t)) Best wishes, Janusz
  14. Here it is: (chord-progression '(g2g3 a2a4 a2a3 g2d4 g2g4 a2e4)) => (g2g3 g2d4 g2g4 a2a3 a2e4 a2a4) (chord-progression '(g2g3 a2a4 a2a3 g2d4 g2g4 a2e4) :sort 'high) => (g2g3 a2a3 g2d4 a2e4 g2g4 a2a4) The CHORD-PROGRESSION function will be part of the next release.
  15. What would be the result here: '(a2a3 a2a4 a2e4 c3f4 f4cs4 d4e4) Please make a few examples with the input and the output you are looking for.
  16. Do you mean number attributes? '(e c4 num0 cs4 num1 d4 num2 ds4 num3 e4 num4 f4 num5 fs4 num6 g4 num7 gs4 num8 a4 num9 as4 num10 b4 num11) You can extend the list of attributes with: ADD-TEXT-ATTRIBUTES function: (add-text-attributes '(v-ah "ah") '(v-ee "ee") '(v-eh "eh") '(v-ei "ei") '(v-ih "ih") '(v-mm "mm") '(v-oh "oh") '(v-oo "oo") ) The list of new functionality in version 1.3 is quite big, the workflow improved considerably as well not to mention the bug fixes.
  17. – Fixed: Removed AllNotesOff in Live Coding Instrument sequence-loop. – Documentation updates. Finally the Live Coding Instrument is working as it should, no more notes off while waiting. Best wishes, Janusz
  18. Example with time PAN: (def-score pan-test2 (:key-signature 'atonal :time-signature '(4 4) :tempo 60) (instr :omn '(h c4 d4 e4 f4 g4 a4 b4) :tuning '(.5 .33 0 -.5 0 .5 0 0) :pan (gen-controller 7/4 (gen-sine 12 7 1) :time '(1/8 1/4 1/8 1/16)) :channel 1 :program 'violin :sound 'gm)) or (def-score pan-test3 (:key-signature 'atonal :time-signature '(4 4) :tempo 60) (instr :omn '(h c4 d4 e4 f4 g4 a4 b4) :tuning '(.5 .33 0 -.5 0 .5 0 0) :pan '((:desc-asc 127 0 1/32 2) (:asc 34 127 1/32 2) (127 1) (0 1)) :channel 1 :program 'violin :sound 'gm)) Tell Thomas Kummel to make a Kontakt player version.
  19. The PAN is changing on every event: (def-score pan-test (:key-signature 'atonal :time-signature '(4 4) :tempo 60) (instr :omn '(q c4 d4 e4 f4 g4 a4 b4) :tuning '(.5 .33 0 -.5 0 .5 0 0) :pan '(1 127 1 127 1 127 64) :channel 1 :program 'violin :sound 'gm)) If the conTimbre is not changing the PAN on every event then there is a bug in conTimbre midi listener.
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy