opmo Posted July 5, 2019 Share Posted July 5, 2019 – 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) ) AM and lviklund 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts