Jump to content

opmo

Administrators
  • Content Count

    1,821
  • Joined

  • Last visited

Everything posted by opmo

  1. Done. Additional non-sticky user text attribute function: ADD-TEXT-ATTRIBUTES-NS (add-text-attributes-ns ;; motif start signs '(m1 "m1") '(m2 "m2") '(m3 "m3") '(m4 "m4") '(m5 "m5") '(m6 "m6") '(m7 "m7") '(m8 "m8") '(m9 "m9") '(m10 "m10")) '(q c4 m1+leg d4 q c4 m1+leg d4)
  2. Could you send me some example (with score) of the problem.
  3. All this can be done (and more) with PS, DEF-INSTRUMENT-SET, EDIT-EVENTS and UNFOLD functions.
  4. More about function name changes go to 'History': https://opusmodus.com/history/
  5. Yes, the function name has change to GET-AMBITUS. You will need to make a few correction to your code sorry for the inconvenience.
  6. Could you explain a bit more, I don't understand the use of score window and MIDI playback in the same time.
  7. opmo

    maxmsp and lisp?

    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.
  8. – 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) )
  9. Great piano study! Thank you for sharing
  10. 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 :play :lc :title "Dada Quartet - EXP.2 (c) 2019 OPMO") (init-seed nil) ) Best wishes, Janusz P.S. I am almost there with the new release.
  11. 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 -))
  12. 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.
  13. 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.
  14. 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.
  15. A ring-modulating instrument. This CLM instrument will apply ring modulation to a sound file with a specified sinewave. Ring modulation is a fancy name for multiplying the two signals together. When you multiply the two sounds together in the time domain, you get the sum and difference tones in the frequency domain. Contents Source Output Source (with-sound () (ring-modulate-file-synth nil 300.0 0.5 "granis") (ring-modulate-file-synth nil 100.0 0.5 "granis")) Output
  16. opmo

    fm-synth

    A generic multi-type FM instrument. Contents Source Output Source (with-sound () (fm-synth '(:polyw :dly :ncos :sqr :pul :tri :poly) 's (rnd-sample 64 '(c4 ds5 f4 g3 a5)) (rnd-sample 64 '(ppp pp pp mf f)) :bpm 120 :loop t) (fm-synth :cmb '(-s e = -e.) (rnd-sample 20 '(c3)) (rnd-sample 20 '(p mf f)) :bpm 120 :loop t)) Output Next page fm-insect-synth
  17. opmo

    fm-insect-synth

    FM (frequency modulation synthesis) instrument. Computed sound sounds insect like. Contents Source Output Source (progn (defparameter par (library 'tbn-cs3-partials 'partials nil :random 12)) (defparameter dur '(rnd-sample 12 '(-q q. h -h. -w w. d -d.))) (defparameter freq '(rnd-sample 12 (flatten (partial :freq par)))) (defparameter amp '(rnd-sample 12 '(pppp ppp p mp))) (defparameter mod-freq-env '(0 0 40 1 95 1 100 .5)) (defparameter mod-index-env '(0 1 25 .7 75 .78 100 1)) (defparameter amp-env '(0 0 25 1 75 .7 100 0)) (defparameter fm-index '(rnd-number 12 .01 .6)) (defparameter mod-skew '(rnd-number 12 -20.0 -1.0)) (defparameter mod-freq '(rnd-number 12 20 60)) (with-sound '() (fm-insect-synth (eval dur) (eval freq) (eval amp) amp-env (eval mod-freq) (eval mod-skew) mod-freq-env 500.866 mod-index-env (eval fm-index) .500) (fm-insect-synth (eval dur) (eval freq) (eval amp) amp-env (eval mod-freq) (eval mod-skew) mod-freq-env 649.490 mod-index-env (eval fm-index) .500) (fm-insect-synth (eval dur) (eval freq) (eval amp) amp-env (eval mod-freq) (eval mod-skew) mod-freq-env 562.087 mod-index-env (eval fm-index) .500) (fm-insect-synth (eval dur) (eval freq) (eval amp) amp-env (eval mod-freq) (eval mod-skew) mod-freq-env 300.866 mod-index-env (eval fm-index) .500) ) ) Output Next page ring-modulate-file-synth
  18. opmo

    expsrc-synth

    Granulate generator in conjunction with sampling rate conversion (mimic phase vocoder). Contents Source Output Source (with-sound () (expsrc-synth '(5 5 5 5) "granis" 0.5 '(1 2 3.2 2) '(0.4434 0.7 0.3 .1)) (expsrc-synth 20 "granis" 0.5 1 0.5)) Output Next page fm-synth
  19. opmo

    piano-synth

    Piano physical modeling instrument. Contents Source Output Source (progn (setf frames1 (library 'marangona-partials 'partials nil :random 48)) (setf frames2 (library 'marangona-frames 'partials nil :random 48)) (setf par1 (remove-partial frames1 :type :freq :min 27.5 :max 4186)) (setf par2 (remove-partial frames2 :type :freq :min 27.5 :max 4186)) (defparameter freq1 (rnd-order (gen-collect (rnd-sample 24 '(3 5 6 7 8)) (partial :freq par1)))) (defparameter freq2 (rnd-order (gen-collect (rnd-sample 38 '(2 3 4)) (partial :freq par2)))) (with-sound (:reverb jc-reverb) (piano-synth '(3e) (flatten freq1) '(.2 .3 .4) :bpm 72 :drypedalresonancefactor .25 :singlestringdecayrate-table '(21 -5 24.000 -5.000 36.000 -5.4 41.953 -5.867 48.173 -7.113 53.818 -8.016 59.693 -8.875 66.605 -9.434 73.056 -10.035 78.931 -10.293 84.000 -12.185) :singlestringpole-table '(21 .8 24 0.7 36.000 .6 48 .5 60 .3 84 .1 96 .03 108 .03) :stiffnesscoefficient-table '(21.000 -0.920 24.000 -0.900 36.000 -0.700 48.000 -0.250 60.000 -0.100 75.179 -0.040 82.986 -0.040 92.240 .3 96.000 .5 99.000 .7 108.000 .7)) (piano-synth '(e) freq2 '(0.1 0.2 0.3) :bpm 72 :drypedalresonancefactor .55 :detuningfactor-table '(24 5 36 7.0 48 7.5 60 12.0 72 20 84 30 96 100 108 300))) ) Output Next page grani-synth
  20. opmo

    grani-synth

    A comprehensive granular synthesis instrument geared towards granulation of sound-files. Contents Source Output Source (progn (defparameter dur '(q h w d -q -h)) (defparameter amp '(pppp p pp f mp)) (with-sound (:reverb jc-reverb :reverb-channels 2) (grani-synth (rnd-sample 12 dur) "v" (rnd-sample 12 amp) :grain-envelope '(0 0 .2 .2 .5 1 .8 .2 1 0)) (grani-synth (rnd-sample 12 dur) "v" (rnd-sample 12 amp) :grains 10) (grani-synth (rnd-sample 12 dur) "oboe" (rnd-sample 12 amp) :grain-start '(0 .1 .3 .1 1 .6) :amp-envelope '(0 1 1 1) :grain-density 8 :grain-envelope '(0 0 .2 .2 .5 1 .8 .2 1 0) :grain-envelope-end '(0 0 .01 1 .99 1 1 0) :grain-envelope-transition '(0 0 .4 1 .8 0 1 0)) (grani-synth (rnd-sample 12 dur) "oboe" (rnd-sample 12 amp) :grain-start '(0 0 1 1) :amp-envelope '(0 1 1 1) :grain-density 20 :grain-duration '(0 .003 .2 .01 1 .3)) (grani-synth (rnd-sample 12 dur) "v" (rnd-sample 12 amp) :grain-start '(0 0 1 1) :amp-envelope '(0 1 1 1) :grain-density 20 :grain-duration '(0 .003 .2 .01 1 .3) :grain-duration-limit .02) (grani-synth (rnd-sample 12 dur) "oboe" (rnd-sample 12 amp) :amp-envelope '(0 1 1 1) :grain-density 40 :grain-start '(0 .1 .3 .1 1 .6)) (grani-synth (rnd-sample 12 dur) "oboe" (rnd-sample 12 amp) :amp-envelope '(0 1 1 1) :grain-density 40 :grain-start '(0 .1 .3 .1 1 .6) :grain-start-spread .01) (grani-synth (rnd-sample 12 dur) "oboe" (rnd-sample 12 amp) :grain-start '(0 0 1 1) :grain-start-spread 0.01 :amp-envelope '(0 1 1 1) :grain-density 40 :srate '(0 0 .2 0 .6 5 1 5)) (grani-synth (rnd-sample 12 dur) "oboe" (rnd-sample 12 amp) :grain-start '(0 0 1 1) :grain-start-spread .01 :amp-envelope '(0 1 1 1) :grain-density (rnd-sample 12 '(40 30 20)) :srate-base 2 :srate '(0 0 .2 0 .6 -1 1 -1)) (grani-synth (rnd-sample 12 dur) "oboe" (rnd-sample 12 amp) :grain-start '(0 0 1 1) :grain-start-spread .01 :amp-envelope '(0 1 1 1) :grain-density (rnd-sample 12 '(40 30 20)) :srate-linear t :srate (list 0 1 .2 1 .6 (expt 2 5/12) 1 (expt 2 5/12))) (grani-synth (rnd-sample 12 dur) "oboe" (rnd-sample 12 amp) :grain-start '(0 0 1 1) :grain-start-spread .01 :amp-envelope '(0 1 1 1) :grain-envelope '(0 0 .2 .2 .5 1 .8 .2 1 0) :grain-density (rnd-sample 12 '(40 30 20)) :grain-duration '(0 .02 1 0.1) :grain-duration-spread '(0 0 .5 .1 1 0)) (grani-synth (rnd-sample 12 dur) "oboe" (rnd-sample 12 amp) :grain-start '(0 0 1 1) :grain-start-spread 0.01 :amp-envelope '(0 1 1 1) :grain-density (rnd-sample 12 '(40 30 20)) :grain-degree '(0 0 1 90) :grain-degree-spread 10) (grani-synth (rnd-sample 12 dur) "oboe" (rnd-sample 12 amp) :grain-duration .06 :grain-density 20 :grain-density-spread 2 :srate 0) (grani-synth (rnd-sample 12 dur) "oboe" (rnd-sample 12 amp) :grain-duration .08 :grain-density (rnd-sample 12 '(40 30 20)) :grain-density-spread 2 :srate 5 :grain-degree 0 :grain-envelope '(0 0 .2 .2 .5 1 .8 .2 1 0) :grain-envelope-end '(0 0 .01 1 .99 1 1 0)) (grani-synth (rnd-sample 12 dur) "oboe" (rnd-sample 12 amp) :grain-duration .05 :grain-density 35 :grain-density-spread 3 :srate -5 :grain-degree 90 :srate (list 0 1 .3 1 .3 (expt 2 5/12) 1 (expt 2 5/12)))) ) Output Next page expsrc-synth
  21. opmo

    pvoc-synth

    A complete phase vocoder instrument. Contents Source Output Source (with-sound (:scaled-to .99) (pvoc-synth (rnd-sample 12 '(q h e s w d -q -h)) "marangona" '(pppp pp ppp f) :input-start 0 :input-end 12 :pitch-scaler (rnd-sample 12 '(.5 .1 .05 .8 .3 .16)) :pitch-offset (rnd-sample 20 '(20 100 200 300 440 150 730)) :pitch-offset-env '(0 0 20 0 50 100 70 100 80 0 100 0) :pitch-scaler-env '(0 1 50 2 100 1) :amp-env '(0 1 40 0 50 1 60 0 100 1) :gate 70) ) Output Next page piano-synth
  22. opmo

    scanned-synth

    Scanned synthesis Instrument. Contents Source Output Source (progn (defparameter size 120) (setf partials1 (library 'tbn-cs3-partials 'partials nil :random 64)) (setf partials2 (library 'tbn-cs3-partials 'partials nil :random 64)) (setf freq1 (rnd-sample size (partial :freq (flatten partials1)))) (setf freq2 (rnd-sample size (partial :freq (flatten partials2)))) (defparameter dur1 (rnd-sample size '(s s s s))) (defparameter dur2 (rnd-sample size '(q e s s s -s))) (defparameter amp1 (rnd-number size .005 .13)) (defparameter amp2 (rnd-number size .005 .13)) (defparameter waves '(1 2 3 4 5 6 7 8 9 10 11 12 13)) (with-sound (:reverb jc-reverb) (scanned-synth dur1 freq1 amp1 :wave (rnd-sample size waves) :bpm 96 :pts (rnd-sample size '(192 256 512))) (scanned-synth dur2 freq2 amp2 :wave (rnd-sample size waves) :bpm 96 :pts (rnd-sample size '(192 256 512))) ) ) Output Next page pvoc-synth
×
×
  • Create New...