Jump to content

Stephane Boussuge

Moderators
  • Posts

    1,066
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Stephane Boussuge got a reaction from opmo in Couleurs du temps présent pour Flute et Piano   
    Here's a new piece made in Opusmodus.
     
       
     
    The pdf itself is raw output of Opusmodus, I've just added Title, name etc... with PdfExpert software.
    Enjoy.
     
    SB.
     
    CouleursDuTempsPourFluteEtPiano.pdf
  2. Like
    Stephane Boussuge reacted to JulioHerrlein in Couleurs du temps présent pour Flute et Piano   
    Very nice ! Some Messiaen touch.
  3. Thanks
    Stephane Boussuge got a reaction from JulioHerrlein in Couleurs du temps présent pour Flute et Piano   
    Here's a new piece made in Opusmodus.
     
       
     
    The pdf itself is raw output of Opusmodus, I've just added Title, name etc... with PdfExpert software.
    Enjoy.
     
    SB.
     
    CouleursDuTempsPourFluteEtPiano.pdf
  4. Like
    Stephane Boussuge got a reaction from hujairi in split-point   
    Hi,
     
    here's a function i've made for my own usage and i think could be useful for others.
    It is a split point function which divide an OMN flux according to a list of split points.
     
    Attached, you will find the French doc of the function 😉
    ;;; SPLIT-POINT ;;; SB. 2020 ;;; Fonction utile pour séparer les 2 mains pour une partie de piano ;;; renvoie une liste de listes (defun split-point (split-points omn-seq) (do-verbose ("split-point") (let* ( (spltconvert (if (numberp (car split-points)) split-points (pitch-to-integer split-points))) (spltp (gen-trim (length omn-seq) spltconvert)) (p1 (loop for sp in spltp for l in omn-seq collect (ambitus-filter `(,sp 128) l) )) (p2 (loop for sp in spltp for l in omn-seq collect (ambitus-filter `(-128 ,(- sp 1)) l) )) ) (list p1 p2)))) #| (split-point '(c4 d4) '((e a3d4 c4e4 f4c5 q g3d4 e4)(e a3d4 c4e4 f4c5 q g3d4 e4))) => (((e d4 c4e4 f4c5 q d4 e4)(q d4 e4 f4c5 d4 e4)) ((e a3 - - q g3 -)(e a3 c4 - q g3 -))) ;;; Example (setf pmat (make-scale 'c2 32 :alt '(2 1 2 3))) (setf pch (rnd-sample 128 pmat)) (setf chrd (chordize-list (gen-divide (rnd-number 8 1 4) pch))) (setf mat (length-legato (gen-filter-euclidean 8 16 4 16 chrd 's '(mf)))) (setf split (split-point '(c4) mat)) (setf piano-rh (ambitus-chord 12 (first split))) (setf piano-lh (ambitus-chord 12 (second split))) (ps 'gm :p (list piano-rh piano-lh) ) |#  
    SB.
    split-point.rtfd.zip
  5. Thanks
    Stephane Boussuge reacted to torstenanders in Getting precompiled code (e.g., quicklisp, quicklisp libraries, swank, own libraries) running again on recent Opusmodus versions   
    Dear all,
     
    After updating to a recent Opusmodus version 1.3, I ran into some errors when loading code that had been loaded and compiled before, e.g., quicklisp, quicklisp libraries, swank (the interface that allows using Emacs Slime with Opusmodus), and my own Lisp libraries. The errors I saw were rather cryptic, like the following:
     
    Error: The value "CL" is not of the expected type list.
    While executing: (:internal ccl::operation-on-all-specs ccl::%define-package), in process Listener-1(7).
     
    After exchanges with Janusz (thanks a lot for your help!) I learnt that the underlying Common Lisp version of Opusmodus had been upgraded to CCL version 1.12, and the format of compiled files (fasl files or dx64fsl files) of this version had changed.
     
    So, in case you run into similar problems, these can be fixed simply by deleting all previously compiled files (which Lisp stores if they do not change to speed up the load process), so that the Lisp compiler has to compile them again. In the folder  ~/.cache/common-lisp just delete any folders starting with ccl-, so that all compiled files in this directory are compiled again.
     
    Best,
    Torsten
  6. Like
    Stephane Boussuge got a reaction from AM in split-point   
    Hi,
     
    here's a function i've made for my own usage and i think could be useful for others.
    It is a split point function which divide an OMN flux according to a list of split points.
     
    Attached, you will find the French doc of the function 😉
    ;;; SPLIT-POINT ;;; SB. 2020 ;;; Fonction utile pour séparer les 2 mains pour une partie de piano ;;; renvoie une liste de listes (defun split-point (split-points omn-seq) (do-verbose ("split-point") (let* ( (spltconvert (if (numberp (car split-points)) split-points (pitch-to-integer split-points))) (spltp (gen-trim (length omn-seq) spltconvert)) (p1 (loop for sp in spltp for l in omn-seq collect (ambitus-filter `(,sp 128) l) )) (p2 (loop for sp in spltp for l in omn-seq collect (ambitus-filter `(-128 ,(- sp 1)) l) )) ) (list p1 p2)))) #| (split-point '(c4 d4) '((e a3d4 c4e4 f4c5 q g3d4 e4)(e a3d4 c4e4 f4c5 q g3d4 e4))) => (((e d4 c4e4 f4c5 q d4 e4)(q d4 e4 f4c5 d4 e4)) ((e a3 - - q g3 -)(e a3 c4 - q g3 -))) ;;; Example (setf pmat (make-scale 'c2 32 :alt '(2 1 2 3))) (setf pch (rnd-sample 128 pmat)) (setf chrd (chordize-list (gen-divide (rnd-number 8 1 4) pch))) (setf mat (length-legato (gen-filter-euclidean 8 16 4 16 chrd 's '(mf)))) (setf split (split-point '(c4) mat)) (setf piano-rh (ambitus-chord 12 (first split))) (setf piano-lh (ambitus-chord 12 (second split))) (ps 'gm :p (list piano-rh piano-lh) ) |#  
    SB.
    split-point.rtfd.zip
  7. Like
    Stephane Boussuge got a reaction from Jorgalad in Score 139, a practical example of using OM   
    Hi,
     
    here's an example showing many possible techniques in OM like pattern matching articulations, chaining sections, row segmentation, reservoir/cells based approach etc....
    SB.
    ;;; ================================== ;;; SCORE 139 ;;; SB.20.03.2020 ;;; COPYRIGHT 2020 S.BOUSSUGE ;;; ================================== ;;; KEYWORDS: strings quartet pcs pitch class set sets reservoir ;;; ================================== ;;; GLOBAL PARAMETERS ;;;================== ;;; LENGTH (setf lenres1 '((w)(h h)(h -q q)(q h -q)(-q q q -q)(-q h -q))) (setf lenres2 (append lenres1 '((e e q h)(e e e e -q e e)(s s s s q -e s s q)(3q = = q -q)(q e e)(e. s q -q)))) (setf lenres3 (append lenres2 '((5q = = = = q -e s s)(s s s s s s s s q e e)))) (setf lenres4 (butlast (reverse lenres3) 3)) (setf lenres5 (butlast (reverse lenres3) 6)) (setf lenres6 (butlast (reverse lenres3) 10)) ;;; PITCH (setf pmat (rnd-row :type :pitch)) (setf set1 (subseq pmat 0 4)) (setf set2 (subseq pmat 4 9)) (setf set3 (subseq pmat 6)) (setf set4 (subseq pmat 2 10)) (setf set5 (subseq pmat 0 9)) (setf set6 (subseq pmat 4)) ;;; DYNAMIC (setf velres1 '((ppp)(pp)(p))) (setf velres2 '((pp)(p)(mp))) (setf velres3 '((p)(mp)(mf))) (setf velres4 '((mp)(mf)(f))) (setf velres5 '((mf)(f))) (setf velres6 '((f))) ;;; ARTICULATION (setf articulation-map1 '( ;; mapping on reservoir motives ((w)(ord)) ((h h)(ord ord)) ((h -q q)(ord stacc)) ((q h -q)(ord ord)) ((-q q q -q)(ord ord)) ((-q h -q)(ord)) ((e e q h)(leg ord stacc ord)) ((e e e e -q e e)(leg ord leg ord stacc stacc)) ((s s s s q -e s s q)(leg leg leg ord marc stacc stacc marc)) ((3q = = q -q)(leg leg ord ord)) ((q e e)(stacc leg ord)) ((e. s q -q)(ord stacc ord)) ((5q = = = = q -e s s)(leg leg leg leg ord stacc leg ord)) ((s s s s s s s s q e e)(leg leg leg ord leg leg leg ord stacc leg ord)) ;; complementary utils mapping ((s s s s)(leg leg leg ord)) ((5q = = = =)(leg leg leg leg ord)) ((e e)(leg ord)) ((3q = =)(leg leg ord)) )) ;;; SECTIONS SIZES (setf s1.size 12) (setf s2.size 12) (setf s3.size 12) (setf s4.size 12) (setf s5.size 12) (setf s6.size 12) ;;; SECTIONS TEMPI (setf s1.tempo `("Calme" q 72 ,s1.size)) (setf s2.tempo `("Modéré" q 92 ,s2.size)) (setf s3.tempo `("Vif" q 102 ,s3.size)) (setf s4.tempo `("Décidé" q 108 ,s4.size)) (setf s5.tempo `("Vif" q 112 ,s5.size)) (setf s6.tempo `("Vif" q 112 ,s6.size)) ;;; SECTIONS INSTRUMENTS LOCAL TRANSPOSITIONS ;;; section 1 (setf s1-i1tp (rnd-number s1.size -6 6)) (setf s1-i2tp s1-i1tp) (setf s1-i3tp s1-i1tp) (setf s1-i4tp s1-i1tp) ;;; section 2 (setf s2-i1tp (rnd-number s2.size -6 6)) (setf s2-i2tp (rnd-number s2.size -6 6)) (setf s2-i3tp s2-i1tp) (setf s2-i4tp s2-i1tp) ;;; section 3 (setf s3-i1tp (rnd-number s3.size -6 6)) (setf s3-i2tp (rnd-number s3.size -6 6)) (setf s3-i3tp (rnd-number s3.size -6 6)) (setf s3-i4tp (rnd-number s3.size -6 6)) ;;; section 4 (setf s4-i1tp (rnd-number s4.size -6 6)) (setf s4-i2tp (rnd-number s4.size -6 6)) (setf s4-i3tp (rnd-number s4.size -6 6)) (setf s4-i4tp (rnd-number s4.size -6 6)) ;;; section 5 (setf s5-i1tp (rnd-number s5.size -6 6)) (setf s5-i2tp (rnd-number s5.size -6 6)) (setf s5-i3tp (rnd-number s5.size -6 6)) (setf s5-i4tp (rnd-number s5.size -6 6)) ;;; section 6 (setf s6-i1tp (rnd-number s6.size -6 6)) (setf s6-i2tp (rnd-number s6.size -6 6)) (setf s6-i3tp (rnd-number s6.size -6 6)) (setf s6-i4tp (rnd-number s6.size -6 6)) ;;; SECTION GLOBAL TRANSPOSITIONS ;;; section 1 (setf s1-gtp (rnd-number s1.size -6 6)) ;;; section 2 (setf s2-gtp (rnd-number s2.size -6 6)) ;;; section 1 (setf s3-gtp (rnd-number s3.size -6 6)) ;;; section 1 (setf s4-gtp (rnd-number s4.size -6 6)) ;;; section 1 (setf s5-gtp (rnd-number s5.size -6 6)) ;;; section 1 (setf s6-gtp (rnd-number s6.size -6 6)) ;;; SECTION GROUP INSTRUMENTATIONS (Play/Mute system) ;;; section 1 (setf s1-i1pm (gen-trim s1.size '(-))) (setf s1-i2pm (gen-trim s1.size '(-))) (setf s1-i3pm (gen-trim s1.size '(-))) (setf s1-i4pm (gen-trim s1.size '(-))) ;;; section 2 (setf s2-i1pm (gen-trim s2.size '(-))) (setf s2-i2pm (gen-trim s2.size '(-))) (setf s2-i3pm (gen-trim s2.size '(-))) (setf s2-i4pm (gen-trim s2.size '(-))) ;;; section 3 (setf s3-i1pm (rnd-sample s3.size '(- - x))) (setf s3-i2pm (rnd-sample s3.size '(- - x))) (setf s3-i3pm (rnd-sample s3.size '(- - x))) (setf s3-i4pm (rnd-sample s3.size '(- - x))) ;;; section 4 (setf s4-i1pm (rnd-sample s4.size '(- - x))) (setf s4-i2pm (rnd-sample s4.size '(- - x))) (setf s4-i3pm (rnd-sample s4.size '(- - x))) (setf s4-i4pm (rnd-sample s4.size '(- - x))) ;;; section 5 (setf s5-i1pm (rnd-sample s5.size '(- - x))) (setf s5-i2pm (rnd-sample s5.size '(- - x))) (setf s5-i3pm (rnd-sample s5.size '(- - x))) (setf s5-i4pm (rnd-sample s5.size '(- - x))) ;;; section 6 (setf s6-i1pm (rnd-sample s6.size '(- - x))) (setf s6-i2pm (rnd-sample s6.size '(- - x))) (setf s6-i3pm (rnd-sample s6.size '(- - x))) (setf s6-i4pm (rnd-sample s6.size '(- - x))) ;;; PROCESS ;;;======== ;;; SECTION 1 ;;; =================== (setf vn1-1 (make-omn :length (setf len (rnd-sample s1.size lenres1)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set1))) :velocity (rnd-sample (length len) velres1) :articulation (pattern-map articulation-map1 len :otherwise '(ord)) )) (setf spn1 (get-span vn1-1)) (setf vn2-1 (length-span spn1 (make-omn :length (setf len (rnd-sample s1.size lenres1)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set1))) :velocity (rnd-sample (length len) velres1) :articulation (pattern-map articulation-map1 len :otherwise '(ord)) ))) (setf vla-1 (length-span spn1 (make-omn :length (setf len (rnd-sample s1.size lenres1)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set1))) :velocity (rnd-sample (length len) velres1) :articulation (pattern-map articulation-map1 len :otherwise '(ord)) ))) (setf vlc-1 (length-span spn1 (make-omn :length (setf len (rnd-sample s1.size lenres1)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set1))) :velocity (rnd-sample (length len) velres1) :articulation (pattern-map articulation-map1 len :otherwise '(ord)) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-1.itp (pitch-transpose s1-i1tp vn1-1)) (setf vn2-1.itp (pitch-transpose s1-i2tp vn2-1)) (setf vla-1.itp (pitch-transpose s1-i3tp vla-1)) (setf vlc-1.itp (pitch-transpose s1-i4tp vlc-1)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-1.gtp (pitch-transpose s1-gtp vn1-1.itp)) (setf vn2-1.gtp (pitch-transpose s1-gtp vn2-1.itp)) (setf vla-1.gtp (pitch-transpose s1-gtp vla-1.itp)) (setf vlc-1.gtp (pitch-transpose s1-gtp vlc-1.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-1.r (omn :length vn1-1.gtp)) (setf vn2-1.r (omn :length vn2-1.gtp)) (setf vla-1.r (omn :length vla-1.gtp)) (setf vlc-1.r (omn :length vlc-1.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-1.arl (pattern-map articulation-map1 vn1-1.r :otherwise '(ord))) (setf vn2-1.arl (pattern-map articulation-map1 vn2-1.r :otherwise '(ord))) (setf vla-1.arl (pattern-map articulation-map1 vla-1.r :otherwise '(ord))) (setf vlc-1.arl (pattern-map articulation-map1 vlc-1.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-1.a (omn-replace :articulation vn1-1.arl vn1-1.gtp)) (setf vn2-1.a (omn-replace :articulation vn2-1.arl vn2-1.gtp)) (setf vla-1.a (omn-replace :articulation vla-1.arl vla-1.gtp)) (setf vlc-1.a (omn-replace :articulation vlc-1.arl vlc-1.gtp)) ;;; SECTION OUTPUT (setf vn1-1e vn1-1.a) (setf vn2-1e vn2-1.a) (setf vla-1e vla-1.a) (setf vlc-1e vlc-1.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-1e ,s1-i1pm vn2-1e ,s1-i2pm vla-1e ,s1-i3pm vlc-1e ,s1-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 2 ;;; =================== (setf vn1-2 (make-omn :length (setf len (rnd-sample s2.size lenres2)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set2))) :velocity (rnd-sample (length len) velres2) )) (setf spn2 (get-span vn1-2)) (setf vn2-2 (length-span spn2 (make-omn :length (setf len (rnd-sample s2.size lenres2)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set2))) :velocity (rnd-sample (length len) velres2) ))) (setf vla-2 (length-span spn2 (make-omn :length (setf len (rnd-sample s2.size lenres2)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set2))) :velocity (rnd-sample (length len) velres2) ))) (setf vlc-2 (length-span spn2 (make-omn :length (setf len (rnd-sample s2.size lenres2)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set2))) :velocity (rnd-sample (length len) velres2) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-2.itp (pitch-transpose s2-i1tp vn1-2)) (setf vn2-2.itp (pitch-transpose s2-i2tp vn2-2)) (setf vla-2.itp (pitch-transpose s2-i3tp vla-2)) (setf vlc-2.itp (pitch-transpose s2-i4tp vlc-2)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-2.gtp (pitch-transpose s2-gtp vn1-2.itp)) (setf vn2-2.gtp (pitch-transpose s2-gtp vn2-2.itp)) (setf vla-2.gtp (pitch-transpose s2-gtp vla-2.itp)) (setf vlc-2.gtp (pitch-transpose s2-gtp vlc-2.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-2.r (omn :length vn1-2.gtp)) (setf vn2-2.r (omn :length vn2-2.gtp)) (setf vla-2.r (omn :length vla-2.gtp)) (setf vlc-2.r (omn :length vlc-2.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-2.arl (pattern-map articulation-map1 vn1-2.r :otherwise '(ord))) (setf vn2-2.arl (pattern-map articulation-map1 vn2-2.r :otherwise '(ord))) (setf vla-2.arl (pattern-map articulation-map1 vla-2.r :otherwise '(ord))) (setf vlc-2.arl (pattern-map articulation-map1 vlc-2.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-2.a (omn-replace :articulation vn1-2.arl vn1-2.gtp)) (setf vn2-2.a (omn-replace :articulation vn2-2.arl vn2-2.gtp)) (setf vla-2.a (omn-replace :articulation vla-2.arl vla-2.gtp)) (setf vlc-2.a (omn-replace :articulation vlc-2.arl vlc-2.gtp)) ;;; SECTION OUTPUT (setf vn1-2e vn1-2.a) (setf vn2-2e vn2-2.a) (setf vla-2e vla-2.a) (setf vlc-2e vlc-2.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-2e ,s2-i1pm vn2-2e ,s2-i2pm vla-2e ,s2-i3pm vlc-2e ,s2-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 3 ;;; =================== (setf vn1-3 (make-omn :length (setf len (rnd-sample s3.size lenres3)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set3))) :velocity (rnd-sample (length len) velres3) )) (setf spn3 (get-span vn1-3)) (setf vn2-3 (length-span spn3 (make-omn :length (setf len (rnd-sample s3.size lenres3)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set3))) :velocity (rnd-sample (length len) velres3) ))) (setf vla-3 (length-span spn3 (make-omn :length (setf len (rnd-sample s3.size lenres3)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set3))) :velocity (rnd-sample (length len) velres3) ))) (setf vlc-3 (length-span spn3 (make-omn :length (setf len (rnd-sample s3.size lenres3)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set3))) :velocity (rnd-sample (length len) velres3) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-3.itp (pitch-transpose s3-i1tp vn1-3)) (setf vn2-3.itp (pitch-transpose s3-i2tp vn2-3)) (setf vla-3.itp (pitch-transpose s3-i3tp vla-3)) (setf vlc-3.itp (pitch-transpose s3-i4tp vlc-3)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-3.gtp (pitch-transpose s3-gtp vn1-3.itp)) (setf vn2-3.gtp (pitch-transpose s3-gtp vn2-3.itp)) (setf vla-3.gtp (pitch-transpose s3-gtp vla-3.itp)) (setf vlc-3.gtp (pitch-transpose s3-gtp vlc-3.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-3.r (omn :length vn1-3.gtp)) (setf vn2-3.r (omn :length vn2-3.gtp)) (setf vla-3.r (omn :length vla-3.gtp)) (setf vlc-3.r (omn :length vlc-3.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-3.arl (pattern-map articulation-map1 vn1-3.r :otherwise '(ord))) (setf vn2-3.arl (pattern-map articulation-map1 vn2-3.r :otherwise '(ord))) (setf vla-3.arl (pattern-map articulation-map1 vla-3.r :otherwise '(ord))) (setf vlc-3.arl (pattern-map articulation-map1 vlc-3.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-3.a (omn-replace :articulation vn1-3.arl vn1-3.gtp)) (setf vn2-3.a (omn-replace :articulation vn2-3.arl vn2-3.gtp)) (setf vla-3.a (omn-replace :articulation vla-3.arl vla-3.gtp)) (setf vlc-3.a (omn-replace :articulation vlc-3.arl vlc-3.gtp)) ;;; SECTION OUTPUT (setf vn1-3e vn1-3.a) (setf vn2-3e vn2-3.a) (setf vla-3e vla-3.a) (setf vlc-3e vlc-3.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-3e ,s3-i1pm vn2-3e ,s3-i2pm vla-3e ,s3-i3pm vlc-3e ,s3-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 4 ;;; =================== (setf vn1-4 (make-omn :length (setf len (rnd-sample s4.size lenres4)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 12 set4))) :velocity (rnd-sample (length len) velres4) )) (setf spn4 (get-span vn1-4)) (setf vn2-4 (length-span spn4 (make-omn :length (setf len (rnd-sample s4.size lenres4)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set4))) :velocity (rnd-sample (length len) velres4) ))) (setf vla-4 (length-span spn4 (make-omn :length (setf len (rnd-sample s4.size lenres4)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set4))) :velocity (rnd-sample (length len) velres4) ))) (setf vlc-4 (length-span spn4 (make-omn :length (setf len (rnd-sample s4.size lenres4)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set4))) :velocity (rnd-sample (length len) velres4) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-4.itp (pitch-transpose s4-i1tp vn1-4)) (setf vn2-4.itp (pitch-transpose s4-i2tp vn2-4)) (setf vla-4.itp (pitch-transpose s4-i3tp vla-4)) (setf vlc-4.itp (pitch-transpose s4-i4tp vlc-4)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-4.gtp (pitch-transpose s4-gtp vn1-4.itp)) (setf vn2-4.gtp (pitch-transpose s4-gtp vn2-4.itp)) (setf vla-4.gtp (pitch-transpose s4-gtp vla-4.itp)) (setf vlc-4.gtp (pitch-transpose s4-gtp vlc-4.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-4.r (omn :length vn1-4.gtp)) (setf vn2-4.r (omn :length vn2-4.gtp)) (setf vla-4.r (omn :length vla-4.gtp)) (setf vlc-4.r (omn :length vlc-4.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-4.arl (pattern-map articulation-map1 vn1-4.r :otherwise '(ord))) (setf vn2-4.arl (pattern-map articulation-map1 vn2-4.r :otherwise '(ord))) (setf vla-4.arl (pattern-map articulation-map1 vla-4.r :otherwise '(ord))) (setf vlc-4.arl (pattern-map articulation-map1 vlc-4.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-4.a (omn-replace :articulation vn1-4.arl vn1-4.gtp)) (setf vn2-4.a (omn-replace :articulation vn2-4.arl vn2-4.gtp)) (setf vla-4.a (omn-replace :articulation vla-4.arl vla-4.gtp)) (setf vlc-4.a (omn-replace :articulation vlc-4.arl vlc-4.gtp)) ;;; SECTION OUTPUT (setf vn1-4e vn1-4.a) (setf vn2-4e vn2-4.a) (setf vla-4e vla-4.a) (setf vlc-4e vlc-4.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-4e ,s4-i1pm vn2-4e ,s4-i2pm vla-4e ,s4-i3pm vlc-4e ,s4-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 5 ;;; =================== (setf vn1-5 (make-omn :length (setf len (rnd-sample s5.size lenres5)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 12 set5))) :velocity (rnd-sample (length len) velres5) )) (setf spn5 (get-span vn1-5)) (setf vn2-5 (length-span spn5 (make-omn :length (setf len (rnd-sample s5.size lenres5)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 12 set5))) :velocity (rnd-sample (length len) velres5) ))) (setf vla-5 (length-span spn5 (make-omn :length (setf len (rnd-sample s5.size lenres5)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set5))) :velocity (rnd-sample (length len) velres5) ))) (setf vlc-5 (length-span spn5 (make-omn :length (setf len (rnd-sample s5.size lenres5)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set5))) :velocity (rnd-sample (length len) velres5) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-5.itp (pitch-transpose s5-i1tp vn1-5)) (setf vn2-5.itp (pitch-transpose s5-i2tp vn2-5)) (setf vla-5.itp (pitch-transpose s5-i3tp vla-5)) (setf vlc-5.itp (pitch-transpose s5-i4tp vlc-5)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-5.gtp (pitch-transpose s5-gtp vn1-5.itp)) (setf vn2-5.gtp (pitch-transpose s5-gtp vn2-5.itp)) (setf vla-5.gtp (pitch-transpose s5-gtp vla-5.itp)) (setf vlc-5.gtp (pitch-transpose s5-gtp vlc-5.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-5.r (omn :length vn1-5.gtp)) (setf vn2-5.r (omn :length vn2-5.gtp)) (setf vla-5.r (omn :length vla-5.gtp)) (setf vlc-5.r (omn :length vlc-5.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-5.arl (pattern-map articulation-map1 vn1-5.r :otherwise '(ord))) (setf vn2-5.arl (pattern-map articulation-map1 vn2-5.r :otherwise '(ord))) (setf vla-5.arl (pattern-map articulation-map1 vla-5.r :otherwise '(ord))) (setf vlc-5.arl (pattern-map articulation-map1 vlc-5.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-5.a (omn-replace :articulation vn1-5.arl vn1-5.gtp)) (setf vn2-5.a (omn-replace :articulation vn2-5.arl vn2-5.gtp)) (setf vla-5.a (omn-replace :articulation vla-5.arl vla-5.gtp)) (setf vlc-5.a (omn-replace :articulation vlc-5.arl vlc-5.gtp)) ;;; SECTION OUTPUT (setf vn1-5e vn1-5.a) (setf vn2-5e vn2-5.a) (setf vla-5e vla-5.a) (setf vlc-5e vlc-5.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-5e ,s5-i1pm vn2-5e ,s5-i2pm vla-5e ,s5-i3pm vlc-5e ,s5-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 6 ;;; =================== (setf vn1-6 (make-omn :length (setf len (rnd-sample s6.size lenres6)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set6))) :velocity (rnd-sample (length len) velres6) )) (setf spn6 (get-span vn1-6)) (setf vn2-6 (length-span spn6 (make-omn :length (setf len (rnd-sample s6.size lenres6)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set6))) :velocity (rnd-sample (length len) velres6) ))) (setf vla-6 (length-span spn6 (make-omn :length (setf len (rnd-sample s6.size lenres6)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set6))) :velocity (rnd-sample (length len) velres6) ))) (setf vlc-6 (length-span spn6 (make-omn :length (setf len (rnd-sample s6.size lenres6)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set6))) :velocity (rnd-sample (length len) velres6) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-6.itp (pitch-transpose s6-i1tp vn1-6)) (setf vn2-6.itp (pitch-transpose s6-i2tp vn2-6)) (setf vla-6.itp (pitch-transpose s6-i3tp vla-6)) (setf vlc-6.itp (pitch-transpose s6-i4tp vlc-6)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-6.gtp (pitch-transpose s6-gtp vn1-6.itp)) (setf vn2-6.gtp (pitch-transpose s6-gtp vn2-6.itp)) (setf vla-6.gtp (pitch-transpose s6-gtp vla-6.itp)) (setf vlc-6.gtp (pitch-transpose s6-gtp vlc-6.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-6.r (omn :length vn1-6.gtp)) (setf vn2-6.r (omn :length vn2-6.gtp)) (setf vla-6.r (omn :length vla-6.gtp)) (setf vlc-6.r (omn :length vlc-6.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-6.arl (pattern-map articulation-map1 vn1-6.r :otherwise '(ord))) (setf vn2-6.arl (pattern-map articulation-map1 vn2-6.r :otherwise '(ord))) (setf vla-6.arl (pattern-map articulation-map1 vla-6.r :otherwise '(ord))) (setf vlc-6.arl (pattern-map articulation-map1 vlc-6.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-6.a (omn-replace :articulation vn1-6.arl vn1-6.gtp)) (setf vn2-6.a (omn-replace :articulation vn2-6.arl vn2-6.gtp)) (setf vla-6.a (omn-replace :articulation vla-6.arl vla-6.gtp)) (setf vlc-6.a (omn-replace :articulation vlc-6.arl vlc-6.gtp)) ;;; SECTION OUTPUT (setf vn1-6e vn1-6.a) (setf vn2-6e vn2-6.a) (setf vla-6e vla-6.a) (setf vlc-6e vlc-6.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-6e ,s6-i1pm vn2-6e ,s6-i2pm vla-6e ,s6-i3pm vlc-6e ,s6-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SCORING ;;; ======= ;; THIS PARTICULAR DISPOSITION ALLOW TO COMMENT SOME SECTION LIKE HERE SECTION 5 (AS AN EXAMPLE) (setf vn1 (ambitus 'violin (assemble-seq vn1-1e vn1-2e vn1-3e vn1-4e ;vn1-5e vn1-6e ))) (setf vn2 (ambitus 'violin (assemble-seq vn2-1e vn2-2e vn2-3e vn2-4e ;vn2-5e vn2-6e ))) (setf vla (ambitus 'viola (assemble-seq vla-1e vla-2e vla-3e vla-4e ;vla-5e vla-6e ))) (setf vlc (ambitus 'violoncello (assemble-seq vlc-1e vlc-2e vlc-3e vlc-4e ;vlc-5e vlc-6e ))) (setf tempo-events (list s1.tempo s2.tempo s3.tempo s4.tempo ;s5.tempo s6.tempo )) (ps 'gm :sq (list vn1 vn2 vla vlc) :tempo tempo-events :time-signature (get-time-signature vn1) :flexible-clef nil ) ;;; =============== END OF FILE ================ SB.
     
    Score139.opmo
  8. Like
    Stephane Boussuge got a reaction from AM in omn-replace-articulation-if-repeat   
    Hi,
    i've made this function for my own usage.
    Sharing here if it can be useful for some others.
    It is a function who replace articulation by a given one on repeated notes.
    Best
    SB.
     
    ;;; OMN-REPLACE-ARTICULATION-IF-REPEAT (defun omn-replace-articulation-if-repeat (new-art omn-sequence) (do-verbose ("omn-replace-articulation-if-repeat") (let ((spn '()) (res '()) ) (progn (setf spn (get-span omn-sequence)) (setf res (loop for i from 0 to (- (length (flatten-sublist (single-events omn-sequence))) 1) collect (if (or (eq (second (nth i (flatten-sublist (single-events omn-sequence)))) (second (nth (+ 1 i) (flatten-sublist (single-events omn-sequence))))) (if (> i 0) (eq (second (nth i (flatten-sublist (single-events omn-sequence)))) (second (nth (- i 1) (flatten-sublist (single-events omn-sequence))))) ) ) (omn-replace :articulation new-art (nth i (flatten-sublist (single-events omn-sequence)))) (nth i (flatten-sublist (single-events omn-sequence))) ))) (length-span spn (flatten res)))))) ;;; EXEMPLE #| (setf mat '((s c4 p leg d4 leg e4 leg f4 q g4 f marc)(s a4 mp leg g4 leg leg f4 leg e4 leg leg leg d4 q c4 mf marc))) (omn-replace-articulation-if-repeat '(stacc) mat) => '((s c4 p leg d4 leg e4 leg f4 q g4 f marc) (s a4 mp leg g4 stacc g4 stacc f4 leg e4 stacc e4 stacc e4 stacc d4 q c4 mf marc)) |#  
     
  9. Thanks
    Stephane Boussuge got a reaction from hujairi in omn-replace-articulation-if-repeat   
    Hi,
    i've made this function for my own usage.
    Sharing here if it can be useful for some others.
    It is a function who replace articulation by a given one on repeated notes.
    Best
    SB.
     
    ;;; OMN-REPLACE-ARTICULATION-IF-REPEAT (defun omn-replace-articulation-if-repeat (new-art omn-sequence) (do-verbose ("omn-replace-articulation-if-repeat") (let ((spn '()) (res '()) ) (progn (setf spn (get-span omn-sequence)) (setf res (loop for i from 0 to (- (length (flatten-sublist (single-events omn-sequence))) 1) collect (if (or (eq (second (nth i (flatten-sublist (single-events omn-sequence)))) (second (nth (+ 1 i) (flatten-sublist (single-events omn-sequence))))) (if (> i 0) (eq (second (nth i (flatten-sublist (single-events omn-sequence)))) (second (nth (- i 1) (flatten-sublist (single-events omn-sequence))))) ) ) (omn-replace :articulation new-art (nth i (flatten-sublist (single-events omn-sequence)))) (nth i (flatten-sublist (single-events omn-sequence))) ))) (length-span spn (flatten res)))))) ;;; EXEMPLE #| (setf mat '((s c4 p leg d4 leg e4 leg f4 q g4 f marc)(s a4 mp leg g4 leg leg f4 leg e4 leg leg leg d4 q c4 mf marc))) (omn-replace-articulation-if-repeat '(stacc) mat) => '((s c4 p leg d4 leg e4 leg f4 q g4 f marc) (s a4 mp leg g4 stacc g4 stacc f4 leg e4 stacc e4 stacc e4 stacc d4 q c4 mf marc)) |#  
     
  10. Like
    Stephane Boussuge reacted to opmo in Opusmodus 2.0.25716   
    I spent some time making the TONNETZ function a truly compositional tool. I have extended the Tonnetz to 12 spaces (nets) with a possibility of net transitions.
     
    Here is how it works.
     
    Arguments and Values:
     
    chord - a chord or pitch list (intervalic content, one of 12 Tonnetz numbers).
    transition - list of transition names: p, r, l, n, s, h and 0 (repeat).
    net - an integer. Tonnetz net label: 1 to 12.
    join - 0 (a transition) or 1 (a joined transition).
    step - a list of integers. Number of axis steps: 0 (no change), 1 (1 step up), -1 (1 step down) etc…
    rotate -  a list of integers. Chordal rotation based on a rotate-number value.
    transpose - a list of integers (transposition value).
    ambitus - instrument name or an integer or a pitch list (low high). The default is 'piano.
     
    Description:
     
    The principal transformations of neo-Riemannian triadic theory connect triads (major and minor), and are their own inverses (a second application undoes the first). These transformations are purely harmonic, and do not need any particular voice leading between chords: all instances of motion from a C major to a C minor triad represent the same neo-Riemannian transformation, no matter how the voices are distributed in register.
     
    The three transformations move one of the three notes of the triad to produce a different triad:
     
    The P transformation exchanges a triad for its Parallel. In a Major Triad move the third down a semitone (C major to C minor), in a Minor Triad move the third up a semitone (C minor to C major). The R transformation exchanges a triad for its Relative. In a Major Triad move the fifth up a tone (C major to A minor), in a Minor Triad move the root down a tone (A minor to C major). The L transformation exchanges a triad for its Leading-Tone Exchange. In a Major Triad the root moves down by a semitone (C major to E minor), in a Minor Triad the fifth moves up by a semitone (E minor to C major).  
    Observe that P preserves the perfect fifth interval (so given say C and G there are only two candidates for the third note: E and Eb), L preserves the minor third interval (given E and G our candidates are C and B) and R preserves the major third interval (given C and E our candidates are G and A).
     
    Secondary operations can be constructed by combining these basic operations:
     
    The N (or Nebenverwandt) relation exchanges a major triad for its minor subdominant, and a minor triad for its major dominant (C major and F minor). The N transformation can be obtained by applying R, L, and P successively. The S (or Slide) relation exchanges two triads that share a third (C major and Cs minor); it can be obtained by applying L, P, and R successively in that order. The H relation (LPL) exchanges a triad for its hexatonic pole (C major and Ab minor).  
    Any combination of the L, P, and R transformations will act inversely on major and minor triads: for instance, R-then-P transposes C major down a minor third, to A major via A minor, whilst transposing C minor to Eb minor up a minor 3rd via Eb major.
     
    Neo-Riemannian transformations can be modelled with several interrelated geometric structures. The Riemannian Tonnetz (‘tonal space’, shown below) is a planar array of pitches along three simplicial axes, corresponding to the three consonant intervals. Major and minor triads are represented by triangles which tile the plane of the Tonnetz. Edge-adjacent triads share two common pitches, and so the principal transformations are expressed as minimal motion of the Tonnetz.
     
    One step transformation (basic transformations):
    P (parallel)
    R (relative)
    L (leading)
     
    Secondary One step transformation (combine transformations):
    N (RLP)
    S (LPR)
    H (LPL)
     
    Two step transformations:
    Parallel: PR and PL
    Relative: RL and RP
    Leading: LR and LP
     
    Three step transformations:
    Parallel: PLR and PRL
    Relative: RLP and RPL
    Leading: LPR and LRP
     
    Reflection:
    PLR and RLP are equal.
    PRL and LRP are equal.
    RPL and LPR are equal.
     
    Basic examples with default Tonnetz 11 (3 4 5). The result of a TONNETZ process is a list of chords or a lists of pitches equal to a length of transition values.
    (tonnetz '(c4e4g4) '(p p r r l l)) => (c4eb4g4 c4e4g4 c4e4a4 c4e4g4 b3e4g4 c4e4g4)  
    A start list containing pitches will return melodic lists:
    (tonnetz '(c4 e4 g4) '(p p r r l l)) => ((c4 eb4 g4) (c4 e4 g4) (c4 e4 a4)     (c4 e4 g4) (b3 e4 g4) (c4 e4 g4)) (tonnetz '(e4g4b4) '(l r l r p l r l r p)) => (e4g4c5 e4a4c5 f4a4c5 f4a4d5 fs4a4d5 fs4a4cs5     e4a4cs5 e4gs4cs5 e4gs4b4 e4g4b4) (tonnetz '(ab3c4eb4) '(p l p l p l p l)) => (gs3b3eb4 gs3b3e4 g3b3e4 g3c4e4     g3c4eb4 gs3c4eb4 gs3b3eb4 gs3b3e4) (tonnetz '(ab3c4eb4) '(pl pl pl pl)) => (gs3b3e4 g3c4e4 gs3c4eb4 gs3b3e4) (tonnetz '(ab4b4eb5) '(p n l s l n)) => (gs4c5eb5 gs4cs5e5 a4cs5e5 bb4cs5f5 bb4cs5fs5 b4d5fs5) (tonnetz '(c4e4g4) '(plp rpr lpl rpr lpl lpl rprp lpl)) => (b3eb4gs4 a3d4fs4 bb3cs4f4 gs3b3e4 g3c4eb4 gs3b3e4 bb3d4f4 a3cs4fs4)  
    12 Tonnetz structures
     
    In Opusmodus there are 12 Tonnetz structures labelled by a number and by an intervallic content of the composite chord. The intervallic content is a number of semitones associated with the different interval axis. As you will notice each of the intervallic content sum up to 12:
    1 (1 1 10) 2 (1 2 9) 3 (1 3 8) 4 (1 4 7) 5 (1 5 6) 6 (2 2 8) 7 (2 3 7) 8 (2 4 6) 9 (2 5 5) 10 (3 3 6) 11 (3 4 5) 12 (4 4 4)  
    In musical tuning and harmony, the Tonnetz (German: tone-network) is a conceptual lattice diagram representing tonal space (net) first described by Leonhard Euler in 1739. Various visual representations of the Tonnetz can be used to show traditional harmonic relationships in European classical music.
     
     Examples:
     
    With transition value 0 (zero) we define a repeat of the previous transition:
    (tonnetz '(c4e4g4) '(0 0 l 0 r 0 p 0)) => (c4e4g4 c4e4g4 b3e4g4 b3e4g4 b3d4g4 b3d4g4 bb3d4g4 bb3d4g4)  
    In this example we apply transition successively with the result of the last transition in the sequence:
    (tonnetz '(c4e4g4) '(0l 0rl 0lr 0pl 0rl 0rl 0lr 0lr)) => (b3e4g4 b3d4fs4 b3e4g4 b3eb4gs4 bb3eb4fs4 bb3cs4f4 bb3eb4fs4 b3eb4gs4)  
    With join value 1 we chordize the successive transition to a chord:
    (tonnetz '(c4e4g4) '(0l 0rl 0lr 0pl 0rl 0rl 0lr 0lr) :join 1) => (b3c4e4g4 b3d4e4fs4g4 b3d4e4fs4g4 b3eb4e4g4gs4     bb3b3eb4fs4gs4 bb3cs4eb4f4fs4 bb3cs4eb4f4fs4 bb3b3eb4fs4gs4) (tonnetz '(c4e4g4) '(0l 0rl 0lr 0pl 0rl 0rl 0lr 0lr)          :join '(1 0 1 0 1 0 1 0)) => (b3c4e4g4 b3d4fs4 b3d4e4fs4g4 b3eb4gs4     bb3b3eb4fs4gs4 bb3cs4f4 bb3cs4eb4f4fs4 b3eb4gs4)  
    transition transposition:
    (tonnetz '(c4e4g4) '(0l 0rl 0lr 0pl 0rl 0rl 0lr 0lr)          :join '(1 0 1 0 1 0 1 0)          :transpose '(0 12)) => (b3c4e4g4 b4d5fs5 b3d4e4fs4g4 b4eb5gs5     bb3b3eb4fs4gs4 bb4cs5f5 bb3cs4eb4f4fs4 b4eb5gs5)  
    The step value 1 will move the next transition one step up on the axis of the first interval of the last transition:
    (tonnetz '(c4e4g4) '(0l 0rl 0lr 0pl 0rl 0rl 0lr 0lr)          :join '(1 0 1 0 1 0 1 0)          :transpose '(0 12)          :step '(1 0 1 0 1 0 1 0)) => (d4eb4g4bb4 d5f5a5 f4gs4bb4c5cs5 f5a5d6     g4gs4c5eb5f5 g5bb5d6 bb4cs5eb5f5fs5 b5eb6gs6)  
    The rotate value is a chordal rotation step number:
    (tonnetz '(c4e4g4) '(0l 0rl 0lr 0pl 0rl 0rl 0lr 0lr)          :join '(1 0 1 0 1 0 1 0)          :transpose '(0 12)          :step '(1 0 1 0 1 0 1 0)          :rotate '(2 0 2 0 2 0 2 0)) => (g4bb4d5eb5 d5f5a5 bb4c5cs5f5gs5 f5a5d6     c5eb5f5g5gs5 g5bb5d6 eb5f5fs5bb5cs6 b5eb6gs6) (tonnetz '(c4e4g4) '(0l 0rl 0lr 0pl 0rl 0rl 0lr 0lr)          :net '(11 8 12)          :join 1          :transpose '(0 12)          :step '(1 0 1 0 1 0 1 0)) => (d4eb4g4bb4 d5e5gs5bb5 fs4bb4d5 f5fs5a5bb5cs6     g4a4cs5eb5 g5b5eb6 bb4cs5eb5f5fs5 bb5c6e6fs6bb6) (tonnetz '(c4e4g4) '(p lrp n h s plrpr n s)          :net '(11 8 12)          :join 1          :transpose '(0 6 -6)          :step '(1 0 1 0 1 0 1 0)) => (eb4fs4bb4 a4b4eb5f5g5 cs4f4a4 fs4g4bb4b4eb5     d5e5fs5bb5c6 e4gs4c5 b4c5eb5e5gs5 fs5gs5bb5c6e6) (tonnetz '(fs4bb4cs5) '(p lrp n h s plrpr n s)          :net '(11 8 12)          :join 1          :transpose '(0 6 -6)          :step '(1 -2 1 -2 1 -2 1 -2)) => (a4c5e5 b4cs5f5g5a5 eb4g4b4 d4eb4fs4g4b4     bb4c5d5fs5gs5 e3gs3c4 b3c4eb4e4gs4 d4e4fs4gs4c5)  
    In the next example we use all 12 Tonnetz with a transition variable (0n).  A (0n) transition contains a 0 (repeat) and a n (rlp) successive transition. The alternative writing to (0n) variable is (0rlp).
    (tonnetz '(c4e4g4) '(0n 0n 0n 0n 0n 0n 0n 0n 0n 0n 0n 0n)          :net '(1 2 3 4 5 6 7 8 9 10 11 12)          :join 1          :step '(1 0 1 0 1 0 1 0)) => (e3cs4d4eb4 f3fs3g3cs4d4e4 g3gs3c4cs4eb4e4 fs3a3bb3c4cs4f4     bb3b3c4e4f4 f3b3cs4eb4 gs3a3b3cs4eb4fs4 a3b3cs4eb4f4     bb3cs4eb4gs4 bb3cs4e4g4 d4eb4e4fs4g4b4 eb4g4b4)  
    Preview Score examples:
     
    In the following example we use Tonnetz 11 with the intervallic content (3 4 5) of minor third, major third and perfect fourth. The join value 1 will join the transition sequence to a chord size 4 and 5.
     
    Preview:
    (setf length '(w h = - q = = = = = w = -q = = = = h =                q = = h = -q = = = w -q = = = h = w =)) (setf velocity (gen-prob 64 '((p .4) (mp .6) (mf .2)))) (setf tt1 (tonnetz '(c4e4g4) (rnd-sample 32 '(0l 0rl 0lr) :seed 90198)                     :join 1                     :rotate (rnd-sample 32 '(0 -1 1) :seed 431458))) (setf omn1 (make-omn :length length :pitch tt1 :velocity velocity)) (ps 'gm :pg (list omn1) :time-signature '(4 4) :tempo 88)  
       
     
     
     
    To examine the intervalic content of three Tonnetz used in the following two examples we run the TONNETZ-STRUCTURE function:
    (tonnetz-structure '(7 8 12)) => ((2 3 7) (2 4 6) (4 4 4)) Names:
    (get-interval-name (tonnetz-structure '(7 8 12))) => ((major-second minor-third perfect-fifth)     (major-second major-third tritone)     (major-third major-third major-third))  
    Preview:
    (progn   (init-seed 7654)   (setf tt2 (tonnetz '(c4eb4g4) (rnd-sample 32 '(0l 0rl 0lr))                      :net (rnd-sample 32 '(7 8 12))                      :step (rnd-sample 32 '(0 1))                      :transpose (rnd-sample 32 '(12 -6 6))))      (setf omn2 (make-omn :length length :pitch tt2 :velocity velocity))   (ps 'gm :pg (list (relative-closest-path omn2 :unique t))       :time-signature '(4 4) :tempo 88)   (init-seed nil)   )  
       
     
     
     
    Tonnetz content:
    (tonnetz-structure '(1 2 3)) => ((1 1 10) (1 2 9) (1 3 8)) Names:
    (get-interval-name (tonnetz-structure '(1 2 3))) => ((minor-second minor-second minor-seventh)     (minor-second major-second major-sixth)     (minor-second minor-third minor-sixth))  
    Preview:
    (progn   (init-seed 47)   (setf tt3  (tonnetz '(c4eb4g4)                       (rnd-sample 32 '(p l r lr lp rp rl pr pl                                        plr rpl pr lrp lpr pp))                       :join 1                       :net (rnd-sample 32 '(1 2 3))                       :step (rnd-sample 32 '(0 1 2 -2))                       :rotate (rnd-sample 32 '(0 1 -1))))      (setf omn3 (make-omn :length length :pitch tt3 :velocity velocity))   (ps 'gm :pg (list (relative-closest-path omn3 :unique t))       :time-signature '(4 4) :tempo 88)   (init-seed nil)   )  
       
     
     
     
     
    Best wishes,
    Janusz
  11. Like
    Stephane Boussuge reacted to opmo in Opusmodus 2.0.25669 Update   
    2.0.25669
     
    – Fixes:
    COUNTERPOINT – span added an additional 1/4 length.
    PS – error if controller option in an instrument.
    CREATE-CHORD – error if incorrect chord arguments.
    ttrem – error in display when ttrem inside a tuplet.
    Italian documentation – misspels and typos.

    – Changes:
    Changes to method names in default Unfold Set OM.lisp file.
    Update to Quick Start folder.

    How to install the new Quick Start workspace:
    1. Delete the Quick Start folder from your Opusmodus directory.
    2. Select the Install Quick Start Workspace command from the Opusmodus Help menu.
    3. New Quick Start workspace will open. 
  12. Like
    Stephane Boussuge got a reaction from lviklund in Score 139, a practical example of using OM   
    Hi,
     
    here's an example showing many possible techniques in OM like pattern matching articulations, chaining sections, row segmentation, reservoir/cells based approach etc....
    SB.
    ;;; ================================== ;;; SCORE 139 ;;; SB.20.03.2020 ;;; COPYRIGHT 2020 S.BOUSSUGE ;;; ================================== ;;; KEYWORDS: strings quartet pcs pitch class set sets reservoir ;;; ================================== ;;; GLOBAL PARAMETERS ;;;================== ;;; LENGTH (setf lenres1 '((w)(h h)(h -q q)(q h -q)(-q q q -q)(-q h -q))) (setf lenres2 (append lenres1 '((e e q h)(e e e e -q e e)(s s s s q -e s s q)(3q = = q -q)(q e e)(e. s q -q)))) (setf lenres3 (append lenres2 '((5q = = = = q -e s s)(s s s s s s s s q e e)))) (setf lenres4 (butlast (reverse lenres3) 3)) (setf lenres5 (butlast (reverse lenres3) 6)) (setf lenres6 (butlast (reverse lenres3) 10)) ;;; PITCH (setf pmat (rnd-row :type :pitch)) (setf set1 (subseq pmat 0 4)) (setf set2 (subseq pmat 4 9)) (setf set3 (subseq pmat 6)) (setf set4 (subseq pmat 2 10)) (setf set5 (subseq pmat 0 9)) (setf set6 (subseq pmat 4)) ;;; DYNAMIC (setf velres1 '((ppp)(pp)(p))) (setf velres2 '((pp)(p)(mp))) (setf velres3 '((p)(mp)(mf))) (setf velres4 '((mp)(mf)(f))) (setf velres5 '((mf)(f))) (setf velres6 '((f))) ;;; ARTICULATION (setf articulation-map1 '( ;; mapping on reservoir motives ((w)(ord)) ((h h)(ord ord)) ((h -q q)(ord stacc)) ((q h -q)(ord ord)) ((-q q q -q)(ord ord)) ((-q h -q)(ord)) ((e e q h)(leg ord stacc ord)) ((e e e e -q e e)(leg ord leg ord stacc stacc)) ((s s s s q -e s s q)(leg leg leg ord marc stacc stacc marc)) ((3q = = q -q)(leg leg ord ord)) ((q e e)(stacc leg ord)) ((e. s q -q)(ord stacc ord)) ((5q = = = = q -e s s)(leg leg leg leg ord stacc leg ord)) ((s s s s s s s s q e e)(leg leg leg ord leg leg leg ord stacc leg ord)) ;; complementary utils mapping ((s s s s)(leg leg leg ord)) ((5q = = = =)(leg leg leg leg ord)) ((e e)(leg ord)) ((3q = =)(leg leg ord)) )) ;;; SECTIONS SIZES (setf s1.size 12) (setf s2.size 12) (setf s3.size 12) (setf s4.size 12) (setf s5.size 12) (setf s6.size 12) ;;; SECTIONS TEMPI (setf s1.tempo `("Calme" q 72 ,s1.size)) (setf s2.tempo `("Modéré" q 92 ,s2.size)) (setf s3.tempo `("Vif" q 102 ,s3.size)) (setf s4.tempo `("Décidé" q 108 ,s4.size)) (setf s5.tempo `("Vif" q 112 ,s5.size)) (setf s6.tempo `("Vif" q 112 ,s6.size)) ;;; SECTIONS INSTRUMENTS LOCAL TRANSPOSITIONS ;;; section 1 (setf s1-i1tp (rnd-number s1.size -6 6)) (setf s1-i2tp s1-i1tp) (setf s1-i3tp s1-i1tp) (setf s1-i4tp s1-i1tp) ;;; section 2 (setf s2-i1tp (rnd-number s2.size -6 6)) (setf s2-i2tp (rnd-number s2.size -6 6)) (setf s2-i3tp s2-i1tp) (setf s2-i4tp s2-i1tp) ;;; section 3 (setf s3-i1tp (rnd-number s3.size -6 6)) (setf s3-i2tp (rnd-number s3.size -6 6)) (setf s3-i3tp (rnd-number s3.size -6 6)) (setf s3-i4tp (rnd-number s3.size -6 6)) ;;; section 4 (setf s4-i1tp (rnd-number s4.size -6 6)) (setf s4-i2tp (rnd-number s4.size -6 6)) (setf s4-i3tp (rnd-number s4.size -6 6)) (setf s4-i4tp (rnd-number s4.size -6 6)) ;;; section 5 (setf s5-i1tp (rnd-number s5.size -6 6)) (setf s5-i2tp (rnd-number s5.size -6 6)) (setf s5-i3tp (rnd-number s5.size -6 6)) (setf s5-i4tp (rnd-number s5.size -6 6)) ;;; section 6 (setf s6-i1tp (rnd-number s6.size -6 6)) (setf s6-i2tp (rnd-number s6.size -6 6)) (setf s6-i3tp (rnd-number s6.size -6 6)) (setf s6-i4tp (rnd-number s6.size -6 6)) ;;; SECTION GLOBAL TRANSPOSITIONS ;;; section 1 (setf s1-gtp (rnd-number s1.size -6 6)) ;;; section 2 (setf s2-gtp (rnd-number s2.size -6 6)) ;;; section 1 (setf s3-gtp (rnd-number s3.size -6 6)) ;;; section 1 (setf s4-gtp (rnd-number s4.size -6 6)) ;;; section 1 (setf s5-gtp (rnd-number s5.size -6 6)) ;;; section 1 (setf s6-gtp (rnd-number s6.size -6 6)) ;;; SECTION GROUP INSTRUMENTATIONS (Play/Mute system) ;;; section 1 (setf s1-i1pm (gen-trim s1.size '(-))) (setf s1-i2pm (gen-trim s1.size '(-))) (setf s1-i3pm (gen-trim s1.size '(-))) (setf s1-i4pm (gen-trim s1.size '(-))) ;;; section 2 (setf s2-i1pm (gen-trim s2.size '(-))) (setf s2-i2pm (gen-trim s2.size '(-))) (setf s2-i3pm (gen-trim s2.size '(-))) (setf s2-i4pm (gen-trim s2.size '(-))) ;;; section 3 (setf s3-i1pm (rnd-sample s3.size '(- - x))) (setf s3-i2pm (rnd-sample s3.size '(- - x))) (setf s3-i3pm (rnd-sample s3.size '(- - x))) (setf s3-i4pm (rnd-sample s3.size '(- - x))) ;;; section 4 (setf s4-i1pm (rnd-sample s4.size '(- - x))) (setf s4-i2pm (rnd-sample s4.size '(- - x))) (setf s4-i3pm (rnd-sample s4.size '(- - x))) (setf s4-i4pm (rnd-sample s4.size '(- - x))) ;;; section 5 (setf s5-i1pm (rnd-sample s5.size '(- - x))) (setf s5-i2pm (rnd-sample s5.size '(- - x))) (setf s5-i3pm (rnd-sample s5.size '(- - x))) (setf s5-i4pm (rnd-sample s5.size '(- - x))) ;;; section 6 (setf s6-i1pm (rnd-sample s6.size '(- - x))) (setf s6-i2pm (rnd-sample s6.size '(- - x))) (setf s6-i3pm (rnd-sample s6.size '(- - x))) (setf s6-i4pm (rnd-sample s6.size '(- - x))) ;;; PROCESS ;;;======== ;;; SECTION 1 ;;; =================== (setf vn1-1 (make-omn :length (setf len (rnd-sample s1.size lenres1)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set1))) :velocity (rnd-sample (length len) velres1) :articulation (pattern-map articulation-map1 len :otherwise '(ord)) )) (setf spn1 (get-span vn1-1)) (setf vn2-1 (length-span spn1 (make-omn :length (setf len (rnd-sample s1.size lenres1)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set1))) :velocity (rnd-sample (length len) velres1) :articulation (pattern-map articulation-map1 len :otherwise '(ord)) ))) (setf vla-1 (length-span spn1 (make-omn :length (setf len (rnd-sample s1.size lenres1)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set1))) :velocity (rnd-sample (length len) velres1) :articulation (pattern-map articulation-map1 len :otherwise '(ord)) ))) (setf vlc-1 (length-span spn1 (make-omn :length (setf len (rnd-sample s1.size lenres1)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set1))) :velocity (rnd-sample (length len) velres1) :articulation (pattern-map articulation-map1 len :otherwise '(ord)) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-1.itp (pitch-transpose s1-i1tp vn1-1)) (setf vn2-1.itp (pitch-transpose s1-i2tp vn2-1)) (setf vla-1.itp (pitch-transpose s1-i3tp vla-1)) (setf vlc-1.itp (pitch-transpose s1-i4tp vlc-1)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-1.gtp (pitch-transpose s1-gtp vn1-1.itp)) (setf vn2-1.gtp (pitch-transpose s1-gtp vn2-1.itp)) (setf vla-1.gtp (pitch-transpose s1-gtp vla-1.itp)) (setf vlc-1.gtp (pitch-transpose s1-gtp vlc-1.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-1.r (omn :length vn1-1.gtp)) (setf vn2-1.r (omn :length vn2-1.gtp)) (setf vla-1.r (omn :length vla-1.gtp)) (setf vlc-1.r (omn :length vlc-1.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-1.arl (pattern-map articulation-map1 vn1-1.r :otherwise '(ord))) (setf vn2-1.arl (pattern-map articulation-map1 vn2-1.r :otherwise '(ord))) (setf vla-1.arl (pattern-map articulation-map1 vla-1.r :otherwise '(ord))) (setf vlc-1.arl (pattern-map articulation-map1 vlc-1.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-1.a (omn-replace :articulation vn1-1.arl vn1-1.gtp)) (setf vn2-1.a (omn-replace :articulation vn2-1.arl vn2-1.gtp)) (setf vla-1.a (omn-replace :articulation vla-1.arl vla-1.gtp)) (setf vlc-1.a (omn-replace :articulation vlc-1.arl vlc-1.gtp)) ;;; SECTION OUTPUT (setf vn1-1e vn1-1.a) (setf vn2-1e vn2-1.a) (setf vla-1e vla-1.a) (setf vlc-1e vlc-1.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-1e ,s1-i1pm vn2-1e ,s1-i2pm vla-1e ,s1-i3pm vlc-1e ,s1-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 2 ;;; =================== (setf vn1-2 (make-omn :length (setf len (rnd-sample s2.size lenres2)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set2))) :velocity (rnd-sample (length len) velres2) )) (setf spn2 (get-span vn1-2)) (setf vn2-2 (length-span spn2 (make-omn :length (setf len (rnd-sample s2.size lenres2)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set2))) :velocity (rnd-sample (length len) velres2) ))) (setf vla-2 (length-span spn2 (make-omn :length (setf len (rnd-sample s2.size lenres2)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set2))) :velocity (rnd-sample (length len) velres2) ))) (setf vlc-2 (length-span spn2 (make-omn :length (setf len (rnd-sample s2.size lenres2)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set2))) :velocity (rnd-sample (length len) velres2) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-2.itp (pitch-transpose s2-i1tp vn1-2)) (setf vn2-2.itp (pitch-transpose s2-i2tp vn2-2)) (setf vla-2.itp (pitch-transpose s2-i3tp vla-2)) (setf vlc-2.itp (pitch-transpose s2-i4tp vlc-2)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-2.gtp (pitch-transpose s2-gtp vn1-2.itp)) (setf vn2-2.gtp (pitch-transpose s2-gtp vn2-2.itp)) (setf vla-2.gtp (pitch-transpose s2-gtp vla-2.itp)) (setf vlc-2.gtp (pitch-transpose s2-gtp vlc-2.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-2.r (omn :length vn1-2.gtp)) (setf vn2-2.r (omn :length vn2-2.gtp)) (setf vla-2.r (omn :length vla-2.gtp)) (setf vlc-2.r (omn :length vlc-2.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-2.arl (pattern-map articulation-map1 vn1-2.r :otherwise '(ord))) (setf vn2-2.arl (pattern-map articulation-map1 vn2-2.r :otherwise '(ord))) (setf vla-2.arl (pattern-map articulation-map1 vla-2.r :otherwise '(ord))) (setf vlc-2.arl (pattern-map articulation-map1 vlc-2.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-2.a (omn-replace :articulation vn1-2.arl vn1-2.gtp)) (setf vn2-2.a (omn-replace :articulation vn2-2.arl vn2-2.gtp)) (setf vla-2.a (omn-replace :articulation vla-2.arl vla-2.gtp)) (setf vlc-2.a (omn-replace :articulation vlc-2.arl vlc-2.gtp)) ;;; SECTION OUTPUT (setf vn1-2e vn1-2.a) (setf vn2-2e vn2-2.a) (setf vla-2e vla-2.a) (setf vlc-2e vlc-2.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-2e ,s2-i1pm vn2-2e ,s2-i2pm vla-2e ,s2-i3pm vlc-2e ,s2-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 3 ;;; =================== (setf vn1-3 (make-omn :length (setf len (rnd-sample s3.size lenres3)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set3))) :velocity (rnd-sample (length len) velres3) )) (setf spn3 (get-span vn1-3)) (setf vn2-3 (length-span spn3 (make-omn :length (setf len (rnd-sample s3.size lenres3)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set3))) :velocity (rnd-sample (length len) velres3) ))) (setf vla-3 (length-span spn3 (make-omn :length (setf len (rnd-sample s3.size lenres3)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set3))) :velocity (rnd-sample (length len) velres3) ))) (setf vlc-3 (length-span spn3 (make-omn :length (setf len (rnd-sample s3.size lenres3)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set3))) :velocity (rnd-sample (length len) velres3) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-3.itp (pitch-transpose s3-i1tp vn1-3)) (setf vn2-3.itp (pitch-transpose s3-i2tp vn2-3)) (setf vla-3.itp (pitch-transpose s3-i3tp vla-3)) (setf vlc-3.itp (pitch-transpose s3-i4tp vlc-3)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-3.gtp (pitch-transpose s3-gtp vn1-3.itp)) (setf vn2-3.gtp (pitch-transpose s3-gtp vn2-3.itp)) (setf vla-3.gtp (pitch-transpose s3-gtp vla-3.itp)) (setf vlc-3.gtp (pitch-transpose s3-gtp vlc-3.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-3.r (omn :length vn1-3.gtp)) (setf vn2-3.r (omn :length vn2-3.gtp)) (setf vla-3.r (omn :length vla-3.gtp)) (setf vlc-3.r (omn :length vlc-3.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-3.arl (pattern-map articulation-map1 vn1-3.r :otherwise '(ord))) (setf vn2-3.arl (pattern-map articulation-map1 vn2-3.r :otherwise '(ord))) (setf vla-3.arl (pattern-map articulation-map1 vla-3.r :otherwise '(ord))) (setf vlc-3.arl (pattern-map articulation-map1 vlc-3.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-3.a (omn-replace :articulation vn1-3.arl vn1-3.gtp)) (setf vn2-3.a (omn-replace :articulation vn2-3.arl vn2-3.gtp)) (setf vla-3.a (omn-replace :articulation vla-3.arl vla-3.gtp)) (setf vlc-3.a (omn-replace :articulation vlc-3.arl vlc-3.gtp)) ;;; SECTION OUTPUT (setf vn1-3e vn1-3.a) (setf vn2-3e vn2-3.a) (setf vla-3e vla-3.a) (setf vlc-3e vlc-3.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-3e ,s3-i1pm vn2-3e ,s3-i2pm vla-3e ,s3-i3pm vlc-3e ,s3-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 4 ;;; =================== (setf vn1-4 (make-omn :length (setf len (rnd-sample s4.size lenres4)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 12 set4))) :velocity (rnd-sample (length len) velres4) )) (setf spn4 (get-span vn1-4)) (setf vn2-4 (length-span spn4 (make-omn :length (setf len (rnd-sample s4.size lenres4)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set4))) :velocity (rnd-sample (length len) velres4) ))) (setf vla-4 (length-span spn4 (make-omn :length (setf len (rnd-sample s4.size lenres4)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set4))) :velocity (rnd-sample (length len) velres4) ))) (setf vlc-4 (length-span spn4 (make-omn :length (setf len (rnd-sample s4.size lenres4)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set4))) :velocity (rnd-sample (length len) velres4) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-4.itp (pitch-transpose s4-i1tp vn1-4)) (setf vn2-4.itp (pitch-transpose s4-i2tp vn2-4)) (setf vla-4.itp (pitch-transpose s4-i3tp vla-4)) (setf vlc-4.itp (pitch-transpose s4-i4tp vlc-4)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-4.gtp (pitch-transpose s4-gtp vn1-4.itp)) (setf vn2-4.gtp (pitch-transpose s4-gtp vn2-4.itp)) (setf vla-4.gtp (pitch-transpose s4-gtp vla-4.itp)) (setf vlc-4.gtp (pitch-transpose s4-gtp vlc-4.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-4.r (omn :length vn1-4.gtp)) (setf vn2-4.r (omn :length vn2-4.gtp)) (setf vla-4.r (omn :length vla-4.gtp)) (setf vlc-4.r (omn :length vlc-4.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-4.arl (pattern-map articulation-map1 vn1-4.r :otherwise '(ord))) (setf vn2-4.arl (pattern-map articulation-map1 vn2-4.r :otherwise '(ord))) (setf vla-4.arl (pattern-map articulation-map1 vla-4.r :otherwise '(ord))) (setf vlc-4.arl (pattern-map articulation-map1 vlc-4.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-4.a (omn-replace :articulation vn1-4.arl vn1-4.gtp)) (setf vn2-4.a (omn-replace :articulation vn2-4.arl vn2-4.gtp)) (setf vla-4.a (omn-replace :articulation vla-4.arl vla-4.gtp)) (setf vlc-4.a (omn-replace :articulation vlc-4.arl vlc-4.gtp)) ;;; SECTION OUTPUT (setf vn1-4e vn1-4.a) (setf vn2-4e vn2-4.a) (setf vla-4e vla-4.a) (setf vlc-4e vlc-4.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-4e ,s4-i1pm vn2-4e ,s4-i2pm vla-4e ,s4-i3pm vlc-4e ,s4-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 5 ;;; =================== (setf vn1-5 (make-omn :length (setf len (rnd-sample s5.size lenres5)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 12 set5))) :velocity (rnd-sample (length len) velres5) )) (setf spn5 (get-span vn1-5)) (setf vn2-5 (length-span spn5 (make-omn :length (setf len (rnd-sample s5.size lenres5)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 12 set5))) :velocity (rnd-sample (length len) velres5) ))) (setf vla-5 (length-span spn5 (make-omn :length (setf len (rnd-sample s5.size lenres5)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set5))) :velocity (rnd-sample (length len) velres5) ))) (setf vlc-5 (length-span spn5 (make-omn :length (setf len (rnd-sample s5.size lenres5)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set5))) :velocity (rnd-sample (length len) velres5) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-5.itp (pitch-transpose s5-i1tp vn1-5)) (setf vn2-5.itp (pitch-transpose s5-i2tp vn2-5)) (setf vla-5.itp (pitch-transpose s5-i3tp vla-5)) (setf vlc-5.itp (pitch-transpose s5-i4tp vlc-5)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-5.gtp (pitch-transpose s5-gtp vn1-5.itp)) (setf vn2-5.gtp (pitch-transpose s5-gtp vn2-5.itp)) (setf vla-5.gtp (pitch-transpose s5-gtp vla-5.itp)) (setf vlc-5.gtp (pitch-transpose s5-gtp vlc-5.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-5.r (omn :length vn1-5.gtp)) (setf vn2-5.r (omn :length vn2-5.gtp)) (setf vla-5.r (omn :length vla-5.gtp)) (setf vlc-5.r (omn :length vlc-5.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-5.arl (pattern-map articulation-map1 vn1-5.r :otherwise '(ord))) (setf vn2-5.arl (pattern-map articulation-map1 vn2-5.r :otherwise '(ord))) (setf vla-5.arl (pattern-map articulation-map1 vla-5.r :otherwise '(ord))) (setf vlc-5.arl (pattern-map articulation-map1 vlc-5.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-5.a (omn-replace :articulation vn1-5.arl vn1-5.gtp)) (setf vn2-5.a (omn-replace :articulation vn2-5.arl vn2-5.gtp)) (setf vla-5.a (omn-replace :articulation vla-5.arl vla-5.gtp)) (setf vlc-5.a (omn-replace :articulation vlc-5.arl vlc-5.gtp)) ;;; SECTION OUTPUT (setf vn1-5e vn1-5.a) (setf vn2-5e vn2-5.a) (setf vla-5e vla-5.a) (setf vlc-5e vlc-5.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-5e ,s5-i1pm vn2-5e ,s5-i2pm vla-5e ,s5-i3pm vlc-5e ,s5-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 6 ;;; =================== (setf vn1-6 (make-omn :length (setf len (rnd-sample s6.size lenres6)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set6))) :velocity (rnd-sample (length len) velres6) )) (setf spn6 (get-span vn1-6)) (setf vn2-6 (length-span spn6 (make-omn :length (setf len (rnd-sample s6.size lenres6)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set6))) :velocity (rnd-sample (length len) velres6) ))) (setf vla-6 (length-span spn6 (make-omn :length (setf len (rnd-sample s6.size lenres6)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set6))) :velocity (rnd-sample (length len) velres6) ))) (setf vlc-6 (length-span spn6 (make-omn :length (setf len (rnd-sample s6.size lenres6)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set6))) :velocity (rnd-sample (length len) velres6) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-6.itp (pitch-transpose s6-i1tp vn1-6)) (setf vn2-6.itp (pitch-transpose s6-i2tp vn2-6)) (setf vla-6.itp (pitch-transpose s6-i3tp vla-6)) (setf vlc-6.itp (pitch-transpose s6-i4tp vlc-6)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-6.gtp (pitch-transpose s6-gtp vn1-6.itp)) (setf vn2-6.gtp (pitch-transpose s6-gtp vn2-6.itp)) (setf vla-6.gtp (pitch-transpose s6-gtp vla-6.itp)) (setf vlc-6.gtp (pitch-transpose s6-gtp vlc-6.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-6.r (omn :length vn1-6.gtp)) (setf vn2-6.r (omn :length vn2-6.gtp)) (setf vla-6.r (omn :length vla-6.gtp)) (setf vlc-6.r (omn :length vlc-6.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-6.arl (pattern-map articulation-map1 vn1-6.r :otherwise '(ord))) (setf vn2-6.arl (pattern-map articulation-map1 vn2-6.r :otherwise '(ord))) (setf vla-6.arl (pattern-map articulation-map1 vla-6.r :otherwise '(ord))) (setf vlc-6.arl (pattern-map articulation-map1 vlc-6.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-6.a (omn-replace :articulation vn1-6.arl vn1-6.gtp)) (setf vn2-6.a (omn-replace :articulation vn2-6.arl vn2-6.gtp)) (setf vla-6.a (omn-replace :articulation vla-6.arl vla-6.gtp)) (setf vlc-6.a (omn-replace :articulation vlc-6.arl vlc-6.gtp)) ;;; SECTION OUTPUT (setf vn1-6e vn1-6.a) (setf vn2-6e vn2-6.a) (setf vla-6e vla-6.a) (setf vlc-6e vlc-6.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-6e ,s6-i1pm vn2-6e ,s6-i2pm vla-6e ,s6-i3pm vlc-6e ,s6-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SCORING ;;; ======= ;; THIS PARTICULAR DISPOSITION ALLOW TO COMMENT SOME SECTION LIKE HERE SECTION 5 (AS AN EXAMPLE) (setf vn1 (ambitus 'violin (assemble-seq vn1-1e vn1-2e vn1-3e vn1-4e ;vn1-5e vn1-6e ))) (setf vn2 (ambitus 'violin (assemble-seq vn2-1e vn2-2e vn2-3e vn2-4e ;vn2-5e vn2-6e ))) (setf vla (ambitus 'viola (assemble-seq vla-1e vla-2e vla-3e vla-4e ;vla-5e vla-6e ))) (setf vlc (ambitus 'violoncello (assemble-seq vlc-1e vlc-2e vlc-3e vlc-4e ;vlc-5e vlc-6e ))) (setf tempo-events (list s1.tempo s2.tempo s3.tempo s4.tempo ;s5.tempo s6.tempo )) (ps 'gm :sq (list vn1 vn2 vla vlc) :tempo tempo-events :time-signature (get-time-signature vn1) :flexible-clef nil ) ;;; =============== END OF FILE ================ SB.
     
    Score139.opmo
  13. Like
    Stephane Boussuge got a reaction from AM in Score 139, a practical example of using OM   
    Hi,
     
    here's an example showing many possible techniques in OM like pattern matching articulations, chaining sections, row segmentation, reservoir/cells based approach etc....
    SB.
    ;;; ================================== ;;; SCORE 139 ;;; SB.20.03.2020 ;;; COPYRIGHT 2020 S.BOUSSUGE ;;; ================================== ;;; KEYWORDS: strings quartet pcs pitch class set sets reservoir ;;; ================================== ;;; GLOBAL PARAMETERS ;;;================== ;;; LENGTH (setf lenres1 '((w)(h h)(h -q q)(q h -q)(-q q q -q)(-q h -q))) (setf lenres2 (append lenres1 '((e e q h)(e e e e -q e e)(s s s s q -e s s q)(3q = = q -q)(q e e)(e. s q -q)))) (setf lenres3 (append lenres2 '((5q = = = = q -e s s)(s s s s s s s s q e e)))) (setf lenres4 (butlast (reverse lenres3) 3)) (setf lenres5 (butlast (reverse lenres3) 6)) (setf lenres6 (butlast (reverse lenres3) 10)) ;;; PITCH (setf pmat (rnd-row :type :pitch)) (setf set1 (subseq pmat 0 4)) (setf set2 (subseq pmat 4 9)) (setf set3 (subseq pmat 6)) (setf set4 (subseq pmat 2 10)) (setf set5 (subseq pmat 0 9)) (setf set6 (subseq pmat 4)) ;;; DYNAMIC (setf velres1 '((ppp)(pp)(p))) (setf velres2 '((pp)(p)(mp))) (setf velres3 '((p)(mp)(mf))) (setf velres4 '((mp)(mf)(f))) (setf velres5 '((mf)(f))) (setf velres6 '((f))) ;;; ARTICULATION (setf articulation-map1 '( ;; mapping on reservoir motives ((w)(ord)) ((h h)(ord ord)) ((h -q q)(ord stacc)) ((q h -q)(ord ord)) ((-q q q -q)(ord ord)) ((-q h -q)(ord)) ((e e q h)(leg ord stacc ord)) ((e e e e -q e e)(leg ord leg ord stacc stacc)) ((s s s s q -e s s q)(leg leg leg ord marc stacc stacc marc)) ((3q = = q -q)(leg leg ord ord)) ((q e e)(stacc leg ord)) ((e. s q -q)(ord stacc ord)) ((5q = = = = q -e s s)(leg leg leg leg ord stacc leg ord)) ((s s s s s s s s q e e)(leg leg leg ord leg leg leg ord stacc leg ord)) ;; complementary utils mapping ((s s s s)(leg leg leg ord)) ((5q = = = =)(leg leg leg leg ord)) ((e e)(leg ord)) ((3q = =)(leg leg ord)) )) ;;; SECTIONS SIZES (setf s1.size 12) (setf s2.size 12) (setf s3.size 12) (setf s4.size 12) (setf s5.size 12) (setf s6.size 12) ;;; SECTIONS TEMPI (setf s1.tempo `("Calme" q 72 ,s1.size)) (setf s2.tempo `("Modéré" q 92 ,s2.size)) (setf s3.tempo `("Vif" q 102 ,s3.size)) (setf s4.tempo `("Décidé" q 108 ,s4.size)) (setf s5.tempo `("Vif" q 112 ,s5.size)) (setf s6.tempo `("Vif" q 112 ,s6.size)) ;;; SECTIONS INSTRUMENTS LOCAL TRANSPOSITIONS ;;; section 1 (setf s1-i1tp (rnd-number s1.size -6 6)) (setf s1-i2tp s1-i1tp) (setf s1-i3tp s1-i1tp) (setf s1-i4tp s1-i1tp) ;;; section 2 (setf s2-i1tp (rnd-number s2.size -6 6)) (setf s2-i2tp (rnd-number s2.size -6 6)) (setf s2-i3tp s2-i1tp) (setf s2-i4tp s2-i1tp) ;;; section 3 (setf s3-i1tp (rnd-number s3.size -6 6)) (setf s3-i2tp (rnd-number s3.size -6 6)) (setf s3-i3tp (rnd-number s3.size -6 6)) (setf s3-i4tp (rnd-number s3.size -6 6)) ;;; section 4 (setf s4-i1tp (rnd-number s4.size -6 6)) (setf s4-i2tp (rnd-number s4.size -6 6)) (setf s4-i3tp (rnd-number s4.size -6 6)) (setf s4-i4tp (rnd-number s4.size -6 6)) ;;; section 5 (setf s5-i1tp (rnd-number s5.size -6 6)) (setf s5-i2tp (rnd-number s5.size -6 6)) (setf s5-i3tp (rnd-number s5.size -6 6)) (setf s5-i4tp (rnd-number s5.size -6 6)) ;;; section 6 (setf s6-i1tp (rnd-number s6.size -6 6)) (setf s6-i2tp (rnd-number s6.size -6 6)) (setf s6-i3tp (rnd-number s6.size -6 6)) (setf s6-i4tp (rnd-number s6.size -6 6)) ;;; SECTION GLOBAL TRANSPOSITIONS ;;; section 1 (setf s1-gtp (rnd-number s1.size -6 6)) ;;; section 2 (setf s2-gtp (rnd-number s2.size -6 6)) ;;; section 1 (setf s3-gtp (rnd-number s3.size -6 6)) ;;; section 1 (setf s4-gtp (rnd-number s4.size -6 6)) ;;; section 1 (setf s5-gtp (rnd-number s5.size -6 6)) ;;; section 1 (setf s6-gtp (rnd-number s6.size -6 6)) ;;; SECTION GROUP INSTRUMENTATIONS (Play/Mute system) ;;; section 1 (setf s1-i1pm (gen-trim s1.size '(-))) (setf s1-i2pm (gen-trim s1.size '(-))) (setf s1-i3pm (gen-trim s1.size '(-))) (setf s1-i4pm (gen-trim s1.size '(-))) ;;; section 2 (setf s2-i1pm (gen-trim s2.size '(-))) (setf s2-i2pm (gen-trim s2.size '(-))) (setf s2-i3pm (gen-trim s2.size '(-))) (setf s2-i4pm (gen-trim s2.size '(-))) ;;; section 3 (setf s3-i1pm (rnd-sample s3.size '(- - x))) (setf s3-i2pm (rnd-sample s3.size '(- - x))) (setf s3-i3pm (rnd-sample s3.size '(- - x))) (setf s3-i4pm (rnd-sample s3.size '(- - x))) ;;; section 4 (setf s4-i1pm (rnd-sample s4.size '(- - x))) (setf s4-i2pm (rnd-sample s4.size '(- - x))) (setf s4-i3pm (rnd-sample s4.size '(- - x))) (setf s4-i4pm (rnd-sample s4.size '(- - x))) ;;; section 5 (setf s5-i1pm (rnd-sample s5.size '(- - x))) (setf s5-i2pm (rnd-sample s5.size '(- - x))) (setf s5-i3pm (rnd-sample s5.size '(- - x))) (setf s5-i4pm (rnd-sample s5.size '(- - x))) ;;; section 6 (setf s6-i1pm (rnd-sample s6.size '(- - x))) (setf s6-i2pm (rnd-sample s6.size '(- - x))) (setf s6-i3pm (rnd-sample s6.size '(- - x))) (setf s6-i4pm (rnd-sample s6.size '(- - x))) ;;; PROCESS ;;;======== ;;; SECTION 1 ;;; =================== (setf vn1-1 (make-omn :length (setf len (rnd-sample s1.size lenres1)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set1))) :velocity (rnd-sample (length len) velres1) :articulation (pattern-map articulation-map1 len :otherwise '(ord)) )) (setf spn1 (get-span vn1-1)) (setf vn2-1 (length-span spn1 (make-omn :length (setf len (rnd-sample s1.size lenres1)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set1))) :velocity (rnd-sample (length len) velres1) :articulation (pattern-map articulation-map1 len :otherwise '(ord)) ))) (setf vla-1 (length-span spn1 (make-omn :length (setf len (rnd-sample s1.size lenres1)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set1))) :velocity (rnd-sample (length len) velres1) :articulation (pattern-map articulation-map1 len :otherwise '(ord)) ))) (setf vlc-1 (length-span spn1 (make-omn :length (setf len (rnd-sample s1.size lenres1)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set1))) :velocity (rnd-sample (length len) velres1) :articulation (pattern-map articulation-map1 len :otherwise '(ord)) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-1.itp (pitch-transpose s1-i1tp vn1-1)) (setf vn2-1.itp (pitch-transpose s1-i2tp vn2-1)) (setf vla-1.itp (pitch-transpose s1-i3tp vla-1)) (setf vlc-1.itp (pitch-transpose s1-i4tp vlc-1)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-1.gtp (pitch-transpose s1-gtp vn1-1.itp)) (setf vn2-1.gtp (pitch-transpose s1-gtp vn2-1.itp)) (setf vla-1.gtp (pitch-transpose s1-gtp vla-1.itp)) (setf vlc-1.gtp (pitch-transpose s1-gtp vlc-1.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-1.r (omn :length vn1-1.gtp)) (setf vn2-1.r (omn :length vn2-1.gtp)) (setf vla-1.r (omn :length vla-1.gtp)) (setf vlc-1.r (omn :length vlc-1.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-1.arl (pattern-map articulation-map1 vn1-1.r :otherwise '(ord))) (setf vn2-1.arl (pattern-map articulation-map1 vn2-1.r :otherwise '(ord))) (setf vla-1.arl (pattern-map articulation-map1 vla-1.r :otherwise '(ord))) (setf vlc-1.arl (pattern-map articulation-map1 vlc-1.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-1.a (omn-replace :articulation vn1-1.arl vn1-1.gtp)) (setf vn2-1.a (omn-replace :articulation vn2-1.arl vn2-1.gtp)) (setf vla-1.a (omn-replace :articulation vla-1.arl vla-1.gtp)) (setf vlc-1.a (omn-replace :articulation vlc-1.arl vlc-1.gtp)) ;;; SECTION OUTPUT (setf vn1-1e vn1-1.a) (setf vn2-1e vn2-1.a) (setf vla-1e vla-1.a) (setf vlc-1e vlc-1.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-1e ,s1-i1pm vn2-1e ,s1-i2pm vla-1e ,s1-i3pm vlc-1e ,s1-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 2 ;;; =================== (setf vn1-2 (make-omn :length (setf len (rnd-sample s2.size lenres2)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set2))) :velocity (rnd-sample (length len) velres2) )) (setf spn2 (get-span vn1-2)) (setf vn2-2 (length-span spn2 (make-omn :length (setf len (rnd-sample s2.size lenres2)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set2))) :velocity (rnd-sample (length len) velres2) ))) (setf vla-2 (length-span spn2 (make-omn :length (setf len (rnd-sample s2.size lenres2)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set2))) :velocity (rnd-sample (length len) velres2) ))) (setf vlc-2 (length-span spn2 (make-omn :length (setf len (rnd-sample s2.size lenres2)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set2))) :velocity (rnd-sample (length len) velres2) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-2.itp (pitch-transpose s2-i1tp vn1-2)) (setf vn2-2.itp (pitch-transpose s2-i2tp vn2-2)) (setf vla-2.itp (pitch-transpose s2-i3tp vla-2)) (setf vlc-2.itp (pitch-transpose s2-i4tp vlc-2)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-2.gtp (pitch-transpose s2-gtp vn1-2.itp)) (setf vn2-2.gtp (pitch-transpose s2-gtp vn2-2.itp)) (setf vla-2.gtp (pitch-transpose s2-gtp vla-2.itp)) (setf vlc-2.gtp (pitch-transpose s2-gtp vlc-2.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-2.r (omn :length vn1-2.gtp)) (setf vn2-2.r (omn :length vn2-2.gtp)) (setf vla-2.r (omn :length vla-2.gtp)) (setf vlc-2.r (omn :length vlc-2.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-2.arl (pattern-map articulation-map1 vn1-2.r :otherwise '(ord))) (setf vn2-2.arl (pattern-map articulation-map1 vn2-2.r :otherwise '(ord))) (setf vla-2.arl (pattern-map articulation-map1 vla-2.r :otherwise '(ord))) (setf vlc-2.arl (pattern-map articulation-map1 vlc-2.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-2.a (omn-replace :articulation vn1-2.arl vn1-2.gtp)) (setf vn2-2.a (omn-replace :articulation vn2-2.arl vn2-2.gtp)) (setf vla-2.a (omn-replace :articulation vla-2.arl vla-2.gtp)) (setf vlc-2.a (omn-replace :articulation vlc-2.arl vlc-2.gtp)) ;;; SECTION OUTPUT (setf vn1-2e vn1-2.a) (setf vn2-2e vn2-2.a) (setf vla-2e vla-2.a) (setf vlc-2e vlc-2.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-2e ,s2-i1pm vn2-2e ,s2-i2pm vla-2e ,s2-i3pm vlc-2e ,s2-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 3 ;;; =================== (setf vn1-3 (make-omn :length (setf len (rnd-sample s3.size lenres3)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set3))) :velocity (rnd-sample (length len) velres3) )) (setf spn3 (get-span vn1-3)) (setf vn2-3 (length-span spn3 (make-omn :length (setf len (rnd-sample s3.size lenres3)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set3))) :velocity (rnd-sample (length len) velres3) ))) (setf vla-3 (length-span spn3 (make-omn :length (setf len (rnd-sample s3.size lenres3)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set3))) :velocity (rnd-sample (length len) velres3) ))) (setf vlc-3 (length-span spn3 (make-omn :length (setf len (rnd-sample s3.size lenres3)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set3))) :velocity (rnd-sample (length len) velres3) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-3.itp (pitch-transpose s3-i1tp vn1-3)) (setf vn2-3.itp (pitch-transpose s3-i2tp vn2-3)) (setf vla-3.itp (pitch-transpose s3-i3tp vla-3)) (setf vlc-3.itp (pitch-transpose s3-i4tp vlc-3)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-3.gtp (pitch-transpose s3-gtp vn1-3.itp)) (setf vn2-3.gtp (pitch-transpose s3-gtp vn2-3.itp)) (setf vla-3.gtp (pitch-transpose s3-gtp vla-3.itp)) (setf vlc-3.gtp (pitch-transpose s3-gtp vlc-3.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-3.r (omn :length vn1-3.gtp)) (setf vn2-3.r (omn :length vn2-3.gtp)) (setf vla-3.r (omn :length vla-3.gtp)) (setf vlc-3.r (omn :length vlc-3.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-3.arl (pattern-map articulation-map1 vn1-3.r :otherwise '(ord))) (setf vn2-3.arl (pattern-map articulation-map1 vn2-3.r :otherwise '(ord))) (setf vla-3.arl (pattern-map articulation-map1 vla-3.r :otherwise '(ord))) (setf vlc-3.arl (pattern-map articulation-map1 vlc-3.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-3.a (omn-replace :articulation vn1-3.arl vn1-3.gtp)) (setf vn2-3.a (omn-replace :articulation vn2-3.arl vn2-3.gtp)) (setf vla-3.a (omn-replace :articulation vla-3.arl vla-3.gtp)) (setf vlc-3.a (omn-replace :articulation vlc-3.arl vlc-3.gtp)) ;;; SECTION OUTPUT (setf vn1-3e vn1-3.a) (setf vn2-3e vn2-3.a) (setf vla-3e vla-3.a) (setf vlc-3e vlc-3.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-3e ,s3-i1pm vn2-3e ,s3-i2pm vla-3e ,s3-i3pm vlc-3e ,s3-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 4 ;;; =================== (setf vn1-4 (make-omn :length (setf len (rnd-sample s4.size lenres4)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 12 set4))) :velocity (rnd-sample (length len) velres4) )) (setf spn4 (get-span vn1-4)) (setf vn2-4 (length-span spn4 (make-omn :length (setf len (rnd-sample s4.size lenres4)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set4))) :velocity (rnd-sample (length len) velres4) ))) (setf vla-4 (length-span spn4 (make-omn :length (setf len (rnd-sample s4.size lenres4)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set4))) :velocity (rnd-sample (length len) velres4) ))) (setf vlc-4 (length-span spn4 (make-omn :length (setf len (rnd-sample s4.size lenres4)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set4))) :velocity (rnd-sample (length len) velres4) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-4.itp (pitch-transpose s4-i1tp vn1-4)) (setf vn2-4.itp (pitch-transpose s4-i2tp vn2-4)) (setf vla-4.itp (pitch-transpose s4-i3tp vla-4)) (setf vlc-4.itp (pitch-transpose s4-i4tp vlc-4)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-4.gtp (pitch-transpose s4-gtp vn1-4.itp)) (setf vn2-4.gtp (pitch-transpose s4-gtp vn2-4.itp)) (setf vla-4.gtp (pitch-transpose s4-gtp vla-4.itp)) (setf vlc-4.gtp (pitch-transpose s4-gtp vlc-4.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-4.r (omn :length vn1-4.gtp)) (setf vn2-4.r (omn :length vn2-4.gtp)) (setf vla-4.r (omn :length vla-4.gtp)) (setf vlc-4.r (omn :length vlc-4.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-4.arl (pattern-map articulation-map1 vn1-4.r :otherwise '(ord))) (setf vn2-4.arl (pattern-map articulation-map1 vn2-4.r :otherwise '(ord))) (setf vla-4.arl (pattern-map articulation-map1 vla-4.r :otherwise '(ord))) (setf vlc-4.arl (pattern-map articulation-map1 vlc-4.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-4.a (omn-replace :articulation vn1-4.arl vn1-4.gtp)) (setf vn2-4.a (omn-replace :articulation vn2-4.arl vn2-4.gtp)) (setf vla-4.a (omn-replace :articulation vla-4.arl vla-4.gtp)) (setf vlc-4.a (omn-replace :articulation vlc-4.arl vlc-4.gtp)) ;;; SECTION OUTPUT (setf vn1-4e vn1-4.a) (setf vn2-4e vn2-4.a) (setf vla-4e vla-4.a) (setf vlc-4e vlc-4.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-4e ,s4-i1pm vn2-4e ,s4-i2pm vla-4e ,s4-i3pm vlc-4e ,s4-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 5 ;;; =================== (setf vn1-5 (make-omn :length (setf len (rnd-sample s5.size lenres5)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 12 set5))) :velocity (rnd-sample (length len) velres5) )) (setf spn5 (get-span vn1-5)) (setf vn2-5 (length-span spn5 (make-omn :length (setf len (rnd-sample s5.size lenres5)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 12 set5))) :velocity (rnd-sample (length len) velres5) ))) (setf vla-5 (length-span spn5 (make-omn :length (setf len (rnd-sample s5.size lenres5)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set5))) :velocity (rnd-sample (length len) velres5) ))) (setf vlc-5 (length-span spn5 (make-omn :length (setf len (rnd-sample s5.size lenres5)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set5))) :velocity (rnd-sample (length len) velres5) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-5.itp (pitch-transpose s5-i1tp vn1-5)) (setf vn2-5.itp (pitch-transpose s5-i2tp vn2-5)) (setf vla-5.itp (pitch-transpose s5-i3tp vla-5)) (setf vlc-5.itp (pitch-transpose s5-i4tp vlc-5)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-5.gtp (pitch-transpose s5-gtp vn1-5.itp)) (setf vn2-5.gtp (pitch-transpose s5-gtp vn2-5.itp)) (setf vla-5.gtp (pitch-transpose s5-gtp vla-5.itp)) (setf vlc-5.gtp (pitch-transpose s5-gtp vlc-5.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-5.r (omn :length vn1-5.gtp)) (setf vn2-5.r (omn :length vn2-5.gtp)) (setf vla-5.r (omn :length vla-5.gtp)) (setf vlc-5.r (omn :length vlc-5.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-5.arl (pattern-map articulation-map1 vn1-5.r :otherwise '(ord))) (setf vn2-5.arl (pattern-map articulation-map1 vn2-5.r :otherwise '(ord))) (setf vla-5.arl (pattern-map articulation-map1 vla-5.r :otherwise '(ord))) (setf vlc-5.arl (pattern-map articulation-map1 vlc-5.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-5.a (omn-replace :articulation vn1-5.arl vn1-5.gtp)) (setf vn2-5.a (omn-replace :articulation vn2-5.arl vn2-5.gtp)) (setf vla-5.a (omn-replace :articulation vla-5.arl vla-5.gtp)) (setf vlc-5.a (omn-replace :articulation vlc-5.arl vlc-5.gtp)) ;;; SECTION OUTPUT (setf vn1-5e vn1-5.a) (setf vn2-5e vn2-5.a) (setf vla-5e vla-5.a) (setf vlc-5e vlc-5.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-5e ,s5-i1pm vn2-5e ,s5-i2pm vla-5e ,s5-i3pm vlc-5e ,s5-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 6 ;;; =================== (setf vn1-6 (make-omn :length (setf len (rnd-sample s6.size lenres6)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set6))) :velocity (rnd-sample (length len) velres6) )) (setf spn6 (get-span vn1-6)) (setf vn2-6 (length-span spn6 (make-omn :length (setf len (rnd-sample s6.size lenres6)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set6))) :velocity (rnd-sample (length len) velres6) ))) (setf vla-6 (length-span spn6 (make-omn :length (setf len (rnd-sample s6.size lenres6)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set6))) :velocity (rnd-sample (length len) velres6) ))) (setf vlc-6 (length-span spn6 (make-omn :length (setf len (rnd-sample s6.size lenres6)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set6))) :velocity (rnd-sample (length len) velres6) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-6.itp (pitch-transpose s6-i1tp vn1-6)) (setf vn2-6.itp (pitch-transpose s6-i2tp vn2-6)) (setf vla-6.itp (pitch-transpose s6-i3tp vla-6)) (setf vlc-6.itp (pitch-transpose s6-i4tp vlc-6)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-6.gtp (pitch-transpose s6-gtp vn1-6.itp)) (setf vn2-6.gtp (pitch-transpose s6-gtp vn2-6.itp)) (setf vla-6.gtp (pitch-transpose s6-gtp vla-6.itp)) (setf vlc-6.gtp (pitch-transpose s6-gtp vlc-6.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-6.r (omn :length vn1-6.gtp)) (setf vn2-6.r (omn :length vn2-6.gtp)) (setf vla-6.r (omn :length vla-6.gtp)) (setf vlc-6.r (omn :length vlc-6.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-6.arl (pattern-map articulation-map1 vn1-6.r :otherwise '(ord))) (setf vn2-6.arl (pattern-map articulation-map1 vn2-6.r :otherwise '(ord))) (setf vla-6.arl (pattern-map articulation-map1 vla-6.r :otherwise '(ord))) (setf vlc-6.arl (pattern-map articulation-map1 vlc-6.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-6.a (omn-replace :articulation vn1-6.arl vn1-6.gtp)) (setf vn2-6.a (omn-replace :articulation vn2-6.arl vn2-6.gtp)) (setf vla-6.a (omn-replace :articulation vla-6.arl vla-6.gtp)) (setf vlc-6.a (omn-replace :articulation vlc-6.arl vlc-6.gtp)) ;;; SECTION OUTPUT (setf vn1-6e vn1-6.a) (setf vn2-6e vn2-6.a) (setf vla-6e vla-6.a) (setf vlc-6e vlc-6.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-6e ,s6-i1pm vn2-6e ,s6-i2pm vla-6e ,s6-i3pm vlc-6e ,s6-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SCORING ;;; ======= ;; THIS PARTICULAR DISPOSITION ALLOW TO COMMENT SOME SECTION LIKE HERE SECTION 5 (AS AN EXAMPLE) (setf vn1 (ambitus 'violin (assemble-seq vn1-1e vn1-2e vn1-3e vn1-4e ;vn1-5e vn1-6e ))) (setf vn2 (ambitus 'violin (assemble-seq vn2-1e vn2-2e vn2-3e vn2-4e ;vn2-5e vn2-6e ))) (setf vla (ambitus 'viola (assemble-seq vla-1e vla-2e vla-3e vla-4e ;vla-5e vla-6e ))) (setf vlc (ambitus 'violoncello (assemble-seq vlc-1e vlc-2e vlc-3e vlc-4e ;vlc-5e vlc-6e ))) (setf tempo-events (list s1.tempo s2.tempo s3.tempo s4.tempo ;s5.tempo s6.tempo )) (ps 'gm :sq (list vn1 vn2 vla vlc) :tempo tempo-events :time-signature (get-time-signature vn1) :flexible-clef nil ) ;;; =============== END OF FILE ================ SB.
     
    Score139.opmo
  14. Like
    Stephane Boussuge got a reaction from opmo in Score 139, a practical example of using OM   
    Hi,
     
    here's an example showing many possible techniques in OM like pattern matching articulations, chaining sections, row segmentation, reservoir/cells based approach etc....
    SB.
    ;;; ================================== ;;; SCORE 139 ;;; SB.20.03.2020 ;;; COPYRIGHT 2020 S.BOUSSUGE ;;; ================================== ;;; KEYWORDS: strings quartet pcs pitch class set sets reservoir ;;; ================================== ;;; GLOBAL PARAMETERS ;;;================== ;;; LENGTH (setf lenres1 '((w)(h h)(h -q q)(q h -q)(-q q q -q)(-q h -q))) (setf lenres2 (append lenres1 '((e e q h)(e e e e -q e e)(s s s s q -e s s q)(3q = = q -q)(q e e)(e. s q -q)))) (setf lenres3 (append lenres2 '((5q = = = = q -e s s)(s s s s s s s s q e e)))) (setf lenres4 (butlast (reverse lenres3) 3)) (setf lenres5 (butlast (reverse lenres3) 6)) (setf lenres6 (butlast (reverse lenres3) 10)) ;;; PITCH (setf pmat (rnd-row :type :pitch)) (setf set1 (subseq pmat 0 4)) (setf set2 (subseq pmat 4 9)) (setf set3 (subseq pmat 6)) (setf set4 (subseq pmat 2 10)) (setf set5 (subseq pmat 0 9)) (setf set6 (subseq pmat 4)) ;;; DYNAMIC (setf velres1 '((ppp)(pp)(p))) (setf velres2 '((pp)(p)(mp))) (setf velres3 '((p)(mp)(mf))) (setf velres4 '((mp)(mf)(f))) (setf velres5 '((mf)(f))) (setf velres6 '((f))) ;;; ARTICULATION (setf articulation-map1 '( ;; mapping on reservoir motives ((w)(ord)) ((h h)(ord ord)) ((h -q q)(ord stacc)) ((q h -q)(ord ord)) ((-q q q -q)(ord ord)) ((-q h -q)(ord)) ((e e q h)(leg ord stacc ord)) ((e e e e -q e e)(leg ord leg ord stacc stacc)) ((s s s s q -e s s q)(leg leg leg ord marc stacc stacc marc)) ((3q = = q -q)(leg leg ord ord)) ((q e e)(stacc leg ord)) ((e. s q -q)(ord stacc ord)) ((5q = = = = q -e s s)(leg leg leg leg ord stacc leg ord)) ((s s s s s s s s q e e)(leg leg leg ord leg leg leg ord stacc leg ord)) ;; complementary utils mapping ((s s s s)(leg leg leg ord)) ((5q = = = =)(leg leg leg leg ord)) ((e e)(leg ord)) ((3q = =)(leg leg ord)) )) ;;; SECTIONS SIZES (setf s1.size 12) (setf s2.size 12) (setf s3.size 12) (setf s4.size 12) (setf s5.size 12) (setf s6.size 12) ;;; SECTIONS TEMPI (setf s1.tempo `("Calme" q 72 ,s1.size)) (setf s2.tempo `("Modéré" q 92 ,s2.size)) (setf s3.tempo `("Vif" q 102 ,s3.size)) (setf s4.tempo `("Décidé" q 108 ,s4.size)) (setf s5.tempo `("Vif" q 112 ,s5.size)) (setf s6.tempo `("Vif" q 112 ,s6.size)) ;;; SECTIONS INSTRUMENTS LOCAL TRANSPOSITIONS ;;; section 1 (setf s1-i1tp (rnd-number s1.size -6 6)) (setf s1-i2tp s1-i1tp) (setf s1-i3tp s1-i1tp) (setf s1-i4tp s1-i1tp) ;;; section 2 (setf s2-i1tp (rnd-number s2.size -6 6)) (setf s2-i2tp (rnd-number s2.size -6 6)) (setf s2-i3tp s2-i1tp) (setf s2-i4tp s2-i1tp) ;;; section 3 (setf s3-i1tp (rnd-number s3.size -6 6)) (setf s3-i2tp (rnd-number s3.size -6 6)) (setf s3-i3tp (rnd-number s3.size -6 6)) (setf s3-i4tp (rnd-number s3.size -6 6)) ;;; section 4 (setf s4-i1tp (rnd-number s4.size -6 6)) (setf s4-i2tp (rnd-number s4.size -6 6)) (setf s4-i3tp (rnd-number s4.size -6 6)) (setf s4-i4tp (rnd-number s4.size -6 6)) ;;; section 5 (setf s5-i1tp (rnd-number s5.size -6 6)) (setf s5-i2tp (rnd-number s5.size -6 6)) (setf s5-i3tp (rnd-number s5.size -6 6)) (setf s5-i4tp (rnd-number s5.size -6 6)) ;;; section 6 (setf s6-i1tp (rnd-number s6.size -6 6)) (setf s6-i2tp (rnd-number s6.size -6 6)) (setf s6-i3tp (rnd-number s6.size -6 6)) (setf s6-i4tp (rnd-number s6.size -6 6)) ;;; SECTION GLOBAL TRANSPOSITIONS ;;; section 1 (setf s1-gtp (rnd-number s1.size -6 6)) ;;; section 2 (setf s2-gtp (rnd-number s2.size -6 6)) ;;; section 1 (setf s3-gtp (rnd-number s3.size -6 6)) ;;; section 1 (setf s4-gtp (rnd-number s4.size -6 6)) ;;; section 1 (setf s5-gtp (rnd-number s5.size -6 6)) ;;; section 1 (setf s6-gtp (rnd-number s6.size -6 6)) ;;; SECTION GROUP INSTRUMENTATIONS (Play/Mute system) ;;; section 1 (setf s1-i1pm (gen-trim s1.size '(-))) (setf s1-i2pm (gen-trim s1.size '(-))) (setf s1-i3pm (gen-trim s1.size '(-))) (setf s1-i4pm (gen-trim s1.size '(-))) ;;; section 2 (setf s2-i1pm (gen-trim s2.size '(-))) (setf s2-i2pm (gen-trim s2.size '(-))) (setf s2-i3pm (gen-trim s2.size '(-))) (setf s2-i4pm (gen-trim s2.size '(-))) ;;; section 3 (setf s3-i1pm (rnd-sample s3.size '(- - x))) (setf s3-i2pm (rnd-sample s3.size '(- - x))) (setf s3-i3pm (rnd-sample s3.size '(- - x))) (setf s3-i4pm (rnd-sample s3.size '(- - x))) ;;; section 4 (setf s4-i1pm (rnd-sample s4.size '(- - x))) (setf s4-i2pm (rnd-sample s4.size '(- - x))) (setf s4-i3pm (rnd-sample s4.size '(- - x))) (setf s4-i4pm (rnd-sample s4.size '(- - x))) ;;; section 5 (setf s5-i1pm (rnd-sample s5.size '(- - x))) (setf s5-i2pm (rnd-sample s5.size '(- - x))) (setf s5-i3pm (rnd-sample s5.size '(- - x))) (setf s5-i4pm (rnd-sample s5.size '(- - x))) ;;; section 6 (setf s6-i1pm (rnd-sample s6.size '(- - x))) (setf s6-i2pm (rnd-sample s6.size '(- - x))) (setf s6-i3pm (rnd-sample s6.size '(- - x))) (setf s6-i4pm (rnd-sample s6.size '(- - x))) ;;; PROCESS ;;;======== ;;; SECTION 1 ;;; =================== (setf vn1-1 (make-omn :length (setf len (rnd-sample s1.size lenres1)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set1))) :velocity (rnd-sample (length len) velres1) :articulation (pattern-map articulation-map1 len :otherwise '(ord)) )) (setf spn1 (get-span vn1-1)) (setf vn2-1 (length-span spn1 (make-omn :length (setf len (rnd-sample s1.size lenres1)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set1))) :velocity (rnd-sample (length len) velres1) :articulation (pattern-map articulation-map1 len :otherwise '(ord)) ))) (setf vla-1 (length-span spn1 (make-omn :length (setf len (rnd-sample s1.size lenres1)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set1))) :velocity (rnd-sample (length len) velres1) :articulation (pattern-map articulation-map1 len :otherwise '(ord)) ))) (setf vlc-1 (length-span spn1 (make-omn :length (setf len (rnd-sample s1.size lenres1)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set1))) :velocity (rnd-sample (length len) velres1) :articulation (pattern-map articulation-map1 len :otherwise '(ord)) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-1.itp (pitch-transpose s1-i1tp vn1-1)) (setf vn2-1.itp (pitch-transpose s1-i2tp vn2-1)) (setf vla-1.itp (pitch-transpose s1-i3tp vla-1)) (setf vlc-1.itp (pitch-transpose s1-i4tp vlc-1)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-1.gtp (pitch-transpose s1-gtp vn1-1.itp)) (setf vn2-1.gtp (pitch-transpose s1-gtp vn2-1.itp)) (setf vla-1.gtp (pitch-transpose s1-gtp vla-1.itp)) (setf vlc-1.gtp (pitch-transpose s1-gtp vlc-1.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-1.r (omn :length vn1-1.gtp)) (setf vn2-1.r (omn :length vn2-1.gtp)) (setf vla-1.r (omn :length vla-1.gtp)) (setf vlc-1.r (omn :length vlc-1.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-1.arl (pattern-map articulation-map1 vn1-1.r :otherwise '(ord))) (setf vn2-1.arl (pattern-map articulation-map1 vn2-1.r :otherwise '(ord))) (setf vla-1.arl (pattern-map articulation-map1 vla-1.r :otherwise '(ord))) (setf vlc-1.arl (pattern-map articulation-map1 vlc-1.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-1.a (omn-replace :articulation vn1-1.arl vn1-1.gtp)) (setf vn2-1.a (omn-replace :articulation vn2-1.arl vn2-1.gtp)) (setf vla-1.a (omn-replace :articulation vla-1.arl vla-1.gtp)) (setf vlc-1.a (omn-replace :articulation vlc-1.arl vlc-1.gtp)) ;;; SECTION OUTPUT (setf vn1-1e vn1-1.a) (setf vn2-1e vn2-1.a) (setf vla-1e vla-1.a) (setf vlc-1e vlc-1.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-1e ,s1-i1pm vn2-1e ,s1-i2pm vla-1e ,s1-i3pm vlc-1e ,s1-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 2 ;;; =================== (setf vn1-2 (make-omn :length (setf len (rnd-sample s2.size lenres2)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set2))) :velocity (rnd-sample (length len) velres2) )) (setf spn2 (get-span vn1-2)) (setf vn2-2 (length-span spn2 (make-omn :length (setf len (rnd-sample s2.size lenres2)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set2))) :velocity (rnd-sample (length len) velres2) ))) (setf vla-2 (length-span spn2 (make-omn :length (setf len (rnd-sample s2.size lenres2)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set2))) :velocity (rnd-sample (length len) velres2) ))) (setf vlc-2 (length-span spn2 (make-omn :length (setf len (rnd-sample s2.size lenres2)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set2))) :velocity (rnd-sample (length len) velres2) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-2.itp (pitch-transpose s2-i1tp vn1-2)) (setf vn2-2.itp (pitch-transpose s2-i2tp vn2-2)) (setf vla-2.itp (pitch-transpose s2-i3tp vla-2)) (setf vlc-2.itp (pitch-transpose s2-i4tp vlc-2)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-2.gtp (pitch-transpose s2-gtp vn1-2.itp)) (setf vn2-2.gtp (pitch-transpose s2-gtp vn2-2.itp)) (setf vla-2.gtp (pitch-transpose s2-gtp vla-2.itp)) (setf vlc-2.gtp (pitch-transpose s2-gtp vlc-2.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-2.r (omn :length vn1-2.gtp)) (setf vn2-2.r (omn :length vn2-2.gtp)) (setf vla-2.r (omn :length vla-2.gtp)) (setf vlc-2.r (omn :length vlc-2.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-2.arl (pattern-map articulation-map1 vn1-2.r :otherwise '(ord))) (setf vn2-2.arl (pattern-map articulation-map1 vn2-2.r :otherwise '(ord))) (setf vla-2.arl (pattern-map articulation-map1 vla-2.r :otherwise '(ord))) (setf vlc-2.arl (pattern-map articulation-map1 vlc-2.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-2.a (omn-replace :articulation vn1-2.arl vn1-2.gtp)) (setf vn2-2.a (omn-replace :articulation vn2-2.arl vn2-2.gtp)) (setf vla-2.a (omn-replace :articulation vla-2.arl vla-2.gtp)) (setf vlc-2.a (omn-replace :articulation vlc-2.arl vlc-2.gtp)) ;;; SECTION OUTPUT (setf vn1-2e vn1-2.a) (setf vn2-2e vn2-2.a) (setf vla-2e vla-2.a) (setf vlc-2e vlc-2.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-2e ,s2-i1pm vn2-2e ,s2-i2pm vla-2e ,s2-i3pm vlc-2e ,s2-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 3 ;;; =================== (setf vn1-3 (make-omn :length (setf len (rnd-sample s3.size lenres3)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set3))) :velocity (rnd-sample (length len) velres3) )) (setf spn3 (get-span vn1-3)) (setf vn2-3 (length-span spn3 (make-omn :length (setf len (rnd-sample s3.size lenres3)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set3))) :velocity (rnd-sample (length len) velres3) ))) (setf vla-3 (length-span spn3 (make-omn :length (setf len (rnd-sample s3.size lenres3)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set3))) :velocity (rnd-sample (length len) velres3) ))) (setf vlc-3 (length-span spn3 (make-omn :length (setf len (rnd-sample s3.size lenres3)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set3))) :velocity (rnd-sample (length len) velres3) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-3.itp (pitch-transpose s3-i1tp vn1-3)) (setf vn2-3.itp (pitch-transpose s3-i2tp vn2-3)) (setf vla-3.itp (pitch-transpose s3-i3tp vla-3)) (setf vlc-3.itp (pitch-transpose s3-i4tp vlc-3)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-3.gtp (pitch-transpose s3-gtp vn1-3.itp)) (setf vn2-3.gtp (pitch-transpose s3-gtp vn2-3.itp)) (setf vla-3.gtp (pitch-transpose s3-gtp vla-3.itp)) (setf vlc-3.gtp (pitch-transpose s3-gtp vlc-3.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-3.r (omn :length vn1-3.gtp)) (setf vn2-3.r (omn :length vn2-3.gtp)) (setf vla-3.r (omn :length vla-3.gtp)) (setf vlc-3.r (omn :length vlc-3.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-3.arl (pattern-map articulation-map1 vn1-3.r :otherwise '(ord))) (setf vn2-3.arl (pattern-map articulation-map1 vn2-3.r :otherwise '(ord))) (setf vla-3.arl (pattern-map articulation-map1 vla-3.r :otherwise '(ord))) (setf vlc-3.arl (pattern-map articulation-map1 vlc-3.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-3.a (omn-replace :articulation vn1-3.arl vn1-3.gtp)) (setf vn2-3.a (omn-replace :articulation vn2-3.arl vn2-3.gtp)) (setf vla-3.a (omn-replace :articulation vla-3.arl vla-3.gtp)) (setf vlc-3.a (omn-replace :articulation vlc-3.arl vlc-3.gtp)) ;;; SECTION OUTPUT (setf vn1-3e vn1-3.a) (setf vn2-3e vn2-3.a) (setf vla-3e vla-3.a) (setf vlc-3e vlc-3.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-3e ,s3-i1pm vn2-3e ,s3-i2pm vla-3e ,s3-i3pm vlc-3e ,s3-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 4 ;;; =================== (setf vn1-4 (make-omn :length (setf len (rnd-sample s4.size lenres4)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 12 set4))) :velocity (rnd-sample (length len) velres4) )) (setf spn4 (get-span vn1-4)) (setf vn2-4 (length-span spn4 (make-omn :length (setf len (rnd-sample s4.size lenres4)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set4))) :velocity (rnd-sample (length len) velres4) ))) (setf vla-4 (length-span spn4 (make-omn :length (setf len (rnd-sample s4.size lenres4)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set4))) :velocity (rnd-sample (length len) velres4) ))) (setf vlc-4 (length-span spn4 (make-omn :length (setf len (rnd-sample s4.size lenres4)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set4))) :velocity (rnd-sample (length len) velres4) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-4.itp (pitch-transpose s4-i1tp vn1-4)) (setf vn2-4.itp (pitch-transpose s4-i2tp vn2-4)) (setf vla-4.itp (pitch-transpose s4-i3tp vla-4)) (setf vlc-4.itp (pitch-transpose s4-i4tp vlc-4)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-4.gtp (pitch-transpose s4-gtp vn1-4.itp)) (setf vn2-4.gtp (pitch-transpose s4-gtp vn2-4.itp)) (setf vla-4.gtp (pitch-transpose s4-gtp vla-4.itp)) (setf vlc-4.gtp (pitch-transpose s4-gtp vlc-4.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-4.r (omn :length vn1-4.gtp)) (setf vn2-4.r (omn :length vn2-4.gtp)) (setf vla-4.r (omn :length vla-4.gtp)) (setf vlc-4.r (omn :length vlc-4.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-4.arl (pattern-map articulation-map1 vn1-4.r :otherwise '(ord))) (setf vn2-4.arl (pattern-map articulation-map1 vn2-4.r :otherwise '(ord))) (setf vla-4.arl (pattern-map articulation-map1 vla-4.r :otherwise '(ord))) (setf vlc-4.arl (pattern-map articulation-map1 vlc-4.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-4.a (omn-replace :articulation vn1-4.arl vn1-4.gtp)) (setf vn2-4.a (omn-replace :articulation vn2-4.arl vn2-4.gtp)) (setf vla-4.a (omn-replace :articulation vla-4.arl vla-4.gtp)) (setf vlc-4.a (omn-replace :articulation vlc-4.arl vlc-4.gtp)) ;;; SECTION OUTPUT (setf vn1-4e vn1-4.a) (setf vn2-4e vn2-4.a) (setf vla-4e vla-4.a) (setf vlc-4e vlc-4.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-4e ,s4-i1pm vn2-4e ,s4-i2pm vla-4e ,s4-i3pm vlc-4e ,s4-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 5 ;;; =================== (setf vn1-5 (make-omn :length (setf len (rnd-sample s5.size lenres5)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 12 set5))) :velocity (rnd-sample (length len) velres5) )) (setf spn5 (get-span vn1-5)) (setf vn2-5 (length-span spn5 (make-omn :length (setf len (rnd-sample s5.size lenres5)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 12 set5))) :velocity (rnd-sample (length len) velres5) ))) (setf vla-5 (length-span spn5 (make-omn :length (setf len (rnd-sample s5.size lenres5)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set5))) :velocity (rnd-sample (length len) velres5) ))) (setf vlc-5 (length-span spn5 (make-omn :length (setf len (rnd-sample s5.size lenres5)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set5))) :velocity (rnd-sample (length len) velres5) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-5.itp (pitch-transpose s5-i1tp vn1-5)) (setf vn2-5.itp (pitch-transpose s5-i2tp vn2-5)) (setf vla-5.itp (pitch-transpose s5-i3tp vla-5)) (setf vlc-5.itp (pitch-transpose s5-i4tp vlc-5)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-5.gtp (pitch-transpose s5-gtp vn1-5.itp)) (setf vn2-5.gtp (pitch-transpose s5-gtp vn2-5.itp)) (setf vla-5.gtp (pitch-transpose s5-gtp vla-5.itp)) (setf vlc-5.gtp (pitch-transpose s5-gtp vlc-5.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-5.r (omn :length vn1-5.gtp)) (setf vn2-5.r (omn :length vn2-5.gtp)) (setf vla-5.r (omn :length vla-5.gtp)) (setf vlc-5.r (omn :length vlc-5.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-5.arl (pattern-map articulation-map1 vn1-5.r :otherwise '(ord))) (setf vn2-5.arl (pattern-map articulation-map1 vn2-5.r :otherwise '(ord))) (setf vla-5.arl (pattern-map articulation-map1 vla-5.r :otherwise '(ord))) (setf vlc-5.arl (pattern-map articulation-map1 vlc-5.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-5.a (omn-replace :articulation vn1-5.arl vn1-5.gtp)) (setf vn2-5.a (omn-replace :articulation vn2-5.arl vn2-5.gtp)) (setf vla-5.a (omn-replace :articulation vla-5.arl vla-5.gtp)) (setf vlc-5.a (omn-replace :articulation vlc-5.arl vlc-5.gtp)) ;;; SECTION OUTPUT (setf vn1-5e vn1-5.a) (setf vn2-5e vn2-5.a) (setf vla-5e vla-5.a) (setf vlc-5e vlc-5.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-5e ,s5-i1pm vn2-5e ,s5-i2pm vla-5e ,s5-i3pm vlc-5e ,s5-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SECTION 6 ;;; =================== (setf vn1-6 (make-omn :length (setf len (rnd-sample s6.size lenres6)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set6))) :velocity (rnd-sample (length len) velres6) )) (setf spn6 (get-span vn1-6)) (setf vn2-6 (length-span spn6 (make-omn :length (setf len (rnd-sample s6.size lenres6)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose 0 set6))) :velocity (rnd-sample (length len) velres6) ))) (setf vla-6 (length-span spn6 (make-omn :length (setf len (rnd-sample s6.size lenres6)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -12 set6))) :velocity (rnd-sample (length len) velres6) ))) (setf vlc-6 (length-span spn6 (make-omn :length (setf len (rnd-sample s6.size lenres6)) :pitch (span len (rnd-sample (length (flatten len)) (pitch-transpose -24 set6))) :velocity (rnd-sample (length len) velres6) ))) ;;; SECTION LOCAL INSTRUMENTS TRANSPOSITIONS (setf vn1-6.itp (pitch-transpose s6-i1tp vn1-6)) (setf vn2-6.itp (pitch-transpose s6-i2tp vn2-6)) (setf vla-6.itp (pitch-transpose s6-i3tp vla-6)) (setf vlc-6.itp (pitch-transpose s6-i4tp vlc-6)) ;;; SECTION GLOBAL TRANSPOSITION (setf vn1-6.gtp (pitch-transpose s6-gtp vn1-6.itp)) (setf vn2-6.gtp (pitch-transpose s6-gtp vn2-6.itp)) (setf vla-6.gtp (pitch-transpose s6-gtp vla-6.itp)) (setf vlc-6.gtp (pitch-transpose s6-gtp vlc-6.itp)) ;;; GET THE LENGTH FOR APPLYING PATTERN MATCHING ARTICULATIONS PROCESS (setf vn1-6.r (omn :length vn1-6.gtp)) (setf vn2-6.r (omn :length vn2-6.gtp)) (setf vla-6.r (omn :length vla-6.gtp)) (setf vlc-6.r (omn :length vlc-6.gtp)) ;;; GENERATE ARTICULATIONS LIST BASED ON PATTERN MATCHING (setf vn1-6.arl (pattern-map articulation-map1 vn1-6.r :otherwise '(ord))) (setf vn2-6.arl (pattern-map articulation-map1 vn2-6.r :otherwise '(ord))) (setf vla-6.arl (pattern-map articulation-map1 vla-6.r :otherwise '(ord))) (setf vlc-6.arl (pattern-map articulation-map1 vlc-6.r :otherwise '(ord))) ;;; ADDING(REPLACING) ARTICULATIONS (setf vn1-6.a (omn-replace :articulation vn1-6.arl vn1-6.gtp)) (setf vn2-6.a (omn-replace :articulation vn2-6.arl vn2-6.gtp)) (setf vla-6.a (omn-replace :articulation vla-6.arl vla-6.gtp)) (setf vlc-6.a (omn-replace :articulation vlc-6.arl vlc-6.gtp)) ;;; SECTION OUTPUT (setf vn1-6e vn1-6.a) (setf vn2-6e vn2-6.a) (setf vla-6e vla-6.a) (setf vlc-6e vlc-6.a) ;;; PLAY/MUTE SYSTEM (do-timeline `( vn1-6e ,s6-i1pm vn2-6e ,s6-i2pm vla-6e ,s6-i3pm vlc-6e ,s6-i4pm ) '(gen-pause x) ) ;;; ==================== ;;; SCORING ;;; ======= ;; THIS PARTICULAR DISPOSITION ALLOW TO COMMENT SOME SECTION LIKE HERE SECTION 5 (AS AN EXAMPLE) (setf vn1 (ambitus 'violin (assemble-seq vn1-1e vn1-2e vn1-3e vn1-4e ;vn1-5e vn1-6e ))) (setf vn2 (ambitus 'violin (assemble-seq vn2-1e vn2-2e vn2-3e vn2-4e ;vn2-5e vn2-6e ))) (setf vla (ambitus 'viola (assemble-seq vla-1e vla-2e vla-3e vla-4e ;vla-5e vla-6e ))) (setf vlc (ambitus 'violoncello (assemble-seq vlc-1e vlc-2e vlc-3e vlc-4e ;vlc-5e vlc-6e ))) (setf tempo-events (list s1.tempo s2.tempo s3.tempo s4.tempo ;s5.tempo s6.tempo )) (ps 'gm :sq (list vn1 vn2 vla vlc) :tempo tempo-events :time-signature (get-time-signature vn1) :flexible-clef nil ) ;;; =============== END OF FILE ================ SB.
     
    Score139.opmo
  15. Like
    Stephane Boussuge reacted to opmo in Attribute substitution   
    The function allows you to use the omn-form sequence as well: 🙂
    (attribute-replace '((pizz arco) (arco pizz)) '(q c4 ten+arco e4 pizz f4 arco d4 pizz+marc)) => (q c4 ten+pizz e4 arco f4 pizz d4 arco+marc)  
  16. Like
    Stephane Boussuge reacted to jfcharles in Attribute substitution   
    And here is what I have as "replace" version. For instance if you want to replace pizz by arco and arco by pizz:
    (defun attribute-replace (new-old-list list-of-attributes) (mapcar (lambda (list) (join-attributes list)) (replace-map new-old-list (mapcar (lambda (attr) (disjoin-attributes attr)) list-of-attributes)))) (attribute-replace '((pizz arco) (arco pizz)) '(ten+arco pizz arco pizz+marc)) => (ten+pizz arco pizz arco+marc) Let me know if there are other ways of doing this, thanks!
  17. Thanks
    Stephane Boussuge got a reaction from erka in Pluton for Orchestra   
    In memoriam Narcis Bonet who was one of my teachers.
     

    Opusmodus score attached.
    SB.
    PlutonV1-02.opmo
  18. Thanks
    Stephane Boussuge got a reaction from torstenanders in Controlling Counterpoint Output   
    Here i'm applying in bar 3 soprano part the method t-3 to event 6 and event 7:
     
    (setf p01 '((-e e4 stacc g4 stacc b4 stacc s e4 fs4 leg e g4 leg fs4 b3 leg))) (setf p02 '(((leg -e b5 b5 a5 a5 eb5 q eb5 leg)))) (setf voices (counterpoint (list p01 p02) '( ((1 -) :methods (- -) :polyphony (7 o)) ((2 1) :methods (t-12 -) :polyphony (7 o)) ((2 1) :methods (((t-3 1 (6 7)) t-5) r) :polyphony (7 ?)) ))) (ps 'gm :fl (list (assemble-voices 1 voices)) :cl (list (assemble-voices 2 voices)) :tempo '(80) :time-signature '(4 4) :start 1) SB.
  19. Like
    Stephane Boussuge got a reaction from Jorgalad in Controlling Counterpoint Output   
    Here i'm applying in bar 3 soprano part the method t-3 to event 6 and event 7:
     
    (setf p01 '((-e e4 stacc g4 stacc b4 stacc s e4 fs4 leg e g4 leg fs4 b3 leg))) (setf p02 '(((leg -e b5 b5 a5 a5 eb5 q eb5 leg)))) (setf voices (counterpoint (list p01 p02) '( ((1 -) :methods (- -) :polyphony (7 o)) ((2 1) :methods (t-12 -) :polyphony (7 o)) ((2 1) :methods (((t-3 1 (6 7)) t-5) r) :polyphony (7 ?)) ))) (ps 'gm :fl (list (assemble-voices 1 voices)) :cl (list (assemble-voices 2 voices)) :tempo '(80) :time-signature '(4 4) :start 1) SB.
  20. Like
    Stephane Boussuge reacted to AM in Change Velocity Repeating Notes   
    like that..?... some code...
    greetings
    andré
     
    (defun replace-velocities-in-a-seq (omn-list &key pitch velocity-list) (flatten (loop with cnt = 0 for i in (single-events omn-list) when (equal (cadr i) pitch) collect (omn-replace :velocity (nth cnt velocity-list) i) and do (incf cnt) else collect i when (> cnt (length velocity-list)) do (setf cnt 0)))) (replace-velocities-in-a-seq '(e c4 ppppp d4 d4 e4 f4 d4 d4 g4 b4 d4 d4 d4 d4) :pitch 'd4 :velocity-list '(p mp mf f ff)) ;=> (e c4 ppppp e d4 p e d4 mp e e4 ppppp e f4 ppppp e d4 mf e d4 f e g4 ppppp e b4 ppppp e d4 ff e d4 ppppp e d4 p e d4 mp) ;; if there are more 'd4's then velocity-values, -> it starts again with first velocity-value (= cycle)  
  21. Like
    Stephane Boussuge got a reaction from Jorgalad in reduce note lengths in a list programmatically?   
    You can also try this for fun:
     
    (setf scale '(c4 d4 e4 f4 g4 a4)) (gen-euclidean-omn 24 16 1 16 scale 's '(mf)) SB.
  22. Like
    Stephane Boussuge reacted to etu in reduce note lengths in a list programmatically?   
    This is incredible!  I love these fun, playful little snippets!
  23. Thanks
    Stephane Boussuge reacted to opmo in OPUSMODUS 2.0 OUT NOW!   
  24. Thanks
    Stephane Boussuge got a reaction from JulioHerrlein in Generate gestures through midi input   
    I've made a video showing a prelude composition from originally midi imported material:
     
    https://opusmodus.com/forums/videos/view-28-composing-a-piano-prelude/
     
    As Julio mentionned before, Unfold is also another powerful way for variations.
     
    Happy Opusmodusing !!
     
    Stéphane
  25. Like
    Stephane Boussuge got a reaction from opmo in Score Examples   
    ;;; Classical Accompaniment Exemple ;;;--------------------------------------------------------- ;;; Parameters ;;;--------------------------------------------------------- ;;; Motif definition (setf mtf1 '((s c5 leg g5 leg e6 leg g5 c5 leg g5 leg e6 leg g5))) (setf mtf2 (pitch-transpose 4 mtf1)) (setf mtf3 '((-q e5))) (setf mtf4 '((-q g4c5))) (setf mtf5 '((q c2 -))) ;;; Chords definition (setf chords (library 'harmoprog1 'minor-4vx 'prog2)) ;;; Ostinati (setf ost1 (gen-repeat (length chords) mtf1)) (setf ost2 (gen-repeat (length chords) mtf2)) (setf ost3 (gen-repeat (length chords) mtf3)) (setf ost4 (gen-repeat (length chords) mtf4)) (setf ost5 (gen-repeat (length chords) mtf5)) ;;; Tonality-map series (setf tm-path (tonality-series chords)) ;;; Here we apply the map 'tm-path' into arpegio sequence. (setf ost1.map (tonality-map tm-path ost1)) (setf ost2.map (tonality-map tm-path ost2)) ;;; Here we apply our library chords into chord sequence. ;;; The harmonic-path preserves the voice leading. (setf ost3.map (harmonic-path chords ost3)) (setf ost4.map (harmonic-path chords ost4)) (setf ost5.map (harmonic-path chords ost5)) (setf violin1 (ambitus '(g3 c7) ost2.map)) (setf violin2 (ambitus '(g3 c6) ost1.map)) (setf viola (ambitus '(c3 e4) ost3.map)) (setf violoncello (ambitus-chord 12 (pitch-transpose -12 ost4.map))) (setf bass ost5.map) ;;;--------------------------------------------------------- ;;; Score and Layout ;;;--------------------------------------------------------- (def-score Classical-accomp (:title "Classical accompaniment example" :composer "S.Boussuge" :copyright "Copyright © 2018 s.boussuge" :key-signature 'chromatic :time-signature '((1 1 1 1) 4) :tempo 108 :layout (bracket-group (violin-layout 'violin1 :name "Violin-1") (violin-layout 'violin2 :name "Violin-2") (viola-layout 'viola) (violoncello-layout 'violoncello) (contrabass-layout 'bass) ) ) (violin1 :omn violin1 :channel 1 :sound 'gm :program 'String-Ensemble-1 :volume 100 :pan 48 :controllers (91 '(68)) ) (violin2 :omn violin2 :channel 2 :sound 'gm :program 'String-Ensemble-1 :volume 100 :pan 48 :controllers (91 '(68)) ) (viola :omn viola :channel 3 :sound 'gm :program 'String-Ensemble-1 :volume 90 :pan 64 :controllers (91 '(68)) ) (violoncello :omn violoncello :channel 4 :sound 'gm :program 'String-Ensemble-1 :volume 90 :pan 80 :controllers (91 '(68)) ) (bass :omn bass :channel 5 :sound 'gm :program 'String-Ensemble-1 :volume 90 :pan 80 :controllers (91 '(68)) ) )  
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy