Jump to content

AM

Members
  • Posts

    793
  • Joined

  • Last visited

Reputation Activity

  1. Thanks
    AM reacted to Stephane Boussuge in mapping integer?   
    With vector-map function, you can map anything:
     
    (vector-map (expand-tonality '(c4 messiaen-mode5)) '(0 1 2 3 4 2 1 5 3 1)) SB.
  2. Thanks
    AM got a reaction from JulioHerrlein in mapping integer?   
    i coded a function now, that maps all integers to all TONALITIES, like i want it... 
    SORTING OLIVIER's MODI and going crazy 🙂
     
    ;;; SUB (defun multiple-expand-tonality (&key startpitch octaves tonality) (remove-duplicates ;remove is for "cutting" if there are too much pitches (OMN loops last octave!) (loop repeat octaves with pitch = startpitch with cnt = 0 when (= cnt (length tonality)) do (setq cnt 0) append (expand-tonality (list pitch (nth cnt tonality))) do (incf cnt) do (setq pitch (car (pitch-transpose 12 (list pitch))))))) ;;; MAIN (defun integer-to-tonality (seq tonality &key (startpitch 'c4)) (progn (if (not (pitchp (car tonality))) (setf tonality (multiple-expand-tonality :startpitch startpitch :octaves 8 :tonality tonality)) tonality) (loop for i in seq collect (nth i tonality)))) ;;;;;;;;;;;;; (setf seq (flatten (gen-sort (rnd-order (gen-integer 24) :seed 49) :type 'selection))) (def-score example-score (:key-signature 'atonal :time-signature '(4 4) :tempo 90 :layout (piano-solo-layout 'rhand 'lhand)) (rhand :omn (make-omn :pitch (integer-to-tonality seq '(messiaen-mode4 messiaen-mode5 messiaen-mode6) :startpitch 'c4) :length (gen-repeat (length seq) 't))) (lhand :omn (make-omn :pitch (integer-to-tonality (x+b seq 3) ; transp integer-seq '(messiaen-mode3 messiaen-mode1 messiaen-mode2) :startpitch 'c2) :length (gen-repeat (length seq) 't))))  
  3. Thanks
    AM got a reaction from JulioHerrlein in mapping integer?   
    in LISP
     
    (loop for i in '(0 1 2 3 4 2 1 5 3 1) collect (nth i (expand-tonality '(c4 messiaen-mode5))))  
  4. Like
    AM reacted to opmo in shift-length-proportions / morph   
    Note to all. Please add to your examples the results of the expressions. This will help to understand the idea on the spot :-) 
  5. Like
    AM reacted to opmo in sorting algorithms   
    A random sort '? - RND-PICK from ascending and descending result of a sequence.
     
    Ascending:
    (list-plot  (flatten (sorting (rnd-number 20 1 10 :seed 2346) :type 'selection :sort '<))   :zero-based t   :point-radius 1   :join-points t)
     
    Descending:
    (list-plot  (flatten (sorting (rnd-number 20 1 10 :seed 2346) :type 'selection :sort '>))   :zero-based t   :point-radius 1   :join-points t)  

     
    At random:
    (list-plot  (flatten (sorting (rnd-number 20 1 10 :seed 2346) :type 'selection :sort '?))   :zero-based t   :point-radius 1   :join-points t)
     
    In 5 steps:
    (list-plot  (flatten (sorting (rnd-number 20 1 10 :seed 2346) :type 'selection :sort '? :step 5))   :zero-based t   :point-radius 1   :join-points t)
     
    The default sort is ascending.
     
  6. Like
    AM reacted to opmo in sorting algorithms   
    The step default is NIL - whole process.
  7. Like
    AM reacted to opmo in sorting algorithms   
    Will add the MIN-MAX as well to the SORTING function.
  8. Like
    AM got a reaction from opmo in sorting algorithms   
    hm, but isn't it replacing (rnd), and not sorting?
     
    would like to code exactly something like this this:
    15 Sorting Algorithms in 6 Minutes
     
    ...to SHOW the process of sorting algorithms....
  9. Like
    AM got a reaction from Stephane Boussuge in sorting algorithms   
    MIN/MAX-SORT
     
    a new function: min/max -> 1. max-pitch, 2. min-pitch, 3.rest of the seq .... starting next gen.... have a look at the list-plot.
     
     
    minmax-sort.opmo
    functions.opmo
     
    ;;; ordinary examples (make-omn :pitch (setf n (sorting (vector-to-pitch'(g4 eb5) (gen-white-noise 40)) :algorithm 'min/max)) :length (gen-repeat (length n) (append (gen-repeat 40 '(t)) (list '-e)))) (make-omn :pitch (setf n (sorting (vector-to-pitch'(g4 eb5) (gen-white-noise 40)) :algorithm 'min/max :n '>)) :length (gen-repeat (length n) (append (gen-repeat 40 '(t)) (list '-e)))) (make-omn :pitch (setf n (sorting (vector-to-pitch'(c4 bb5) (gen-white-noise 40)) :algorithm 'min/max)) :length (gen-repeat (length n) (append (gen-repeat 40 '(t)) (list '-e)))) (make-omn :pitch (setf n (sorting (vector-to-pitch'(c4 bb5) (gen-white-noise 40)) :algorithm 'min/max :n '>)) :length (gen-repeat (length n) (append (gen-repeat 40 '(t)) (list '-e)))) (make-omn :pitch (setf n (sorting (rnd-order '(g4 gs4 a4 bb4 b4 c5 cs5 d5 eb5 e5 f5 fs5)) :algorithm 'min/max)) :length (gen-repeat (length n) (append (gen-repeat 12 '(t)) (list '-e)))) (make-omn :pitch (setf n (sorting (rnd-order '(g4 gs4 a4 bb4 b4 c5 cs5 d5 eb5 e5 f5 fs5)) :algorithm 'min/max :n '>)) :length (gen-repeat (length n) (append (gen-repeat 12 '(t)) (list '-e)))) ;;; combined with filter-tie -> ties all pitch repetitions!! (filter-tie (make-omn :pitch (setf n (sorting (vector-to-pitch'(c4 bb5) (gen-white-noise 40)) :algorithm 'min/max)) :length (gen-repeat (length n) (append (gen-repeat 40 '(t)) (list '-e))))) (filter-tie (make-omn :pitch (setf n (sorting (vector-to-pitch'(c4 bb5) (gen-white-noise 40)) :algorithm 'min/max :n '>)) :length (gen-repeat (length n) (append (gen-repeat 40 '(t)) (list '-e))))) ;;; THREE SCORES with min/max (def-score example-score (:key-signature 'atonal :time-signature '(4 4) :tempo 120 :layout (piano-solo-layout 'rhand 'lhand)) (rhand :omn (make-omn :pitch (setf n (sorting (rnd-order '(g6 gs6 a6 bb6 b6 c7 cs7 d7 eb7 e7 f7 fs7)) :algorithm 'min/max :n '<)) :length (gen-repeat (length n) (append (gen-repeat 12 '(t)) (list '-e)))) :channel 1 :sound 'gm :program 0) (lhand :omn (make-omn :pitch (setf n (sorting (rnd-order '(g1 gs1 a1 bb1 b1 c2 cs2 d2 eb2 e2 f2 fs2)) :algorithm 'min/max :n '>)) :length (gen-repeat (length n) (append (gen-repeat 12 '(t)) (list '-e)))) :channel 2)) (def-score example-score (:key-signature 'atonal :time-signature '(4 4) :tempo 120 :layout (piano-solo-layout 'rhand 'lhand)) (rhand :omn (filter-tie (make-omn :pitch (setf n (sorting (rnd-repeat 100 '(g6 gs6 a6 bb6 b6 c7 cs7 d7 eb7 e7 f7 fs7)) :algorithm 'min/max :n '<)) :length (gen-repeat (length n) (append (gen-repeat 100 '(t)) (list '-e))))) :channel 1 :sound 'gm :program 0) (lhand :omn (filter-tie (make-omn :pitch (setf n (sorting (rnd-repeat 100 '(g1 gs1 a1 bb1 b1 c2 cs2 d2 eb2 e2 f2 fs2)) :algorithm 'min/max :n '>)) :length (gen-repeat (length n) (append (gen-repeat 100 '(t)) (list '-e))))) :channel 2)) (def-score example-score (:key-signature 'atonal :time-signature '(4 4) :tempo 120 :layout (piano-solo-layout 'rhand 'lhand)) (rhand :omn (filter-tie (make-omn :pitch (setf n (sorting (rnd-repeat 100 '(g6 gs6 a6 bb6 b6 c7 cs7)) :algorithm 'min/max :n '<)) :length (gen-repeat (length n) (append (gen-repeat 100 '(t)) (list '-e))))) :channel 1 :sound 'gm :program 0) (lhand :omn (filter-tie (make-omn :pitch (setf n (sorting (rnd-repeat 100 '(c2 cs2 d2 eb2 e2 f2 fs2)) :algorithm 'min/max :n '>)) :length (gen-repeat (length n) (append (gen-repeat 100 '(t)) (list '-e))))) :channel 2))  
  10. Thanks
    AM got a reaction from loopyc in sorting algorithms   
    i solved the problems. here is a workspace/files to experiment with SORTING ALGORITHMS 
    thanx to torsten and philippe!
     
    greetings
    andré
     
    functions.opmo
    abstract examples.opmo
    sound examples.opmo
    sorting algorithms.opmows
  11. Thanks
    AM got a reaction from opmo in sorting algorithms   
    MIN/MAX-SORT
     
    a new function: min/max -> 1. max-pitch, 2. min-pitch, 3.rest of the seq .... starting next gen.... have a look at the list-plot.
     
     
    minmax-sort.opmo
    functions.opmo
     
    ;;; ordinary examples (make-omn :pitch (setf n (sorting (vector-to-pitch'(g4 eb5) (gen-white-noise 40)) :algorithm 'min/max)) :length (gen-repeat (length n) (append (gen-repeat 40 '(t)) (list '-e)))) (make-omn :pitch (setf n (sorting (vector-to-pitch'(g4 eb5) (gen-white-noise 40)) :algorithm 'min/max :n '>)) :length (gen-repeat (length n) (append (gen-repeat 40 '(t)) (list '-e)))) (make-omn :pitch (setf n (sorting (vector-to-pitch'(c4 bb5) (gen-white-noise 40)) :algorithm 'min/max)) :length (gen-repeat (length n) (append (gen-repeat 40 '(t)) (list '-e)))) (make-omn :pitch (setf n (sorting (vector-to-pitch'(c4 bb5) (gen-white-noise 40)) :algorithm 'min/max :n '>)) :length (gen-repeat (length n) (append (gen-repeat 40 '(t)) (list '-e)))) (make-omn :pitch (setf n (sorting (rnd-order '(g4 gs4 a4 bb4 b4 c5 cs5 d5 eb5 e5 f5 fs5)) :algorithm 'min/max)) :length (gen-repeat (length n) (append (gen-repeat 12 '(t)) (list '-e)))) (make-omn :pitch (setf n (sorting (rnd-order '(g4 gs4 a4 bb4 b4 c5 cs5 d5 eb5 e5 f5 fs5)) :algorithm 'min/max :n '>)) :length (gen-repeat (length n) (append (gen-repeat 12 '(t)) (list '-e)))) ;;; combined with filter-tie -> ties all pitch repetitions!! (filter-tie (make-omn :pitch (setf n (sorting (vector-to-pitch'(c4 bb5) (gen-white-noise 40)) :algorithm 'min/max)) :length (gen-repeat (length n) (append (gen-repeat 40 '(t)) (list '-e))))) (filter-tie (make-omn :pitch (setf n (sorting (vector-to-pitch'(c4 bb5) (gen-white-noise 40)) :algorithm 'min/max :n '>)) :length (gen-repeat (length n) (append (gen-repeat 40 '(t)) (list '-e))))) ;;; THREE SCORES with min/max (def-score example-score (:key-signature 'atonal :time-signature '(4 4) :tempo 120 :layout (piano-solo-layout 'rhand 'lhand)) (rhand :omn (make-omn :pitch (setf n (sorting (rnd-order '(g6 gs6 a6 bb6 b6 c7 cs7 d7 eb7 e7 f7 fs7)) :algorithm 'min/max :n '<)) :length (gen-repeat (length n) (append (gen-repeat 12 '(t)) (list '-e)))) :channel 1 :sound 'gm :program 0) (lhand :omn (make-omn :pitch (setf n (sorting (rnd-order '(g1 gs1 a1 bb1 b1 c2 cs2 d2 eb2 e2 f2 fs2)) :algorithm 'min/max :n '>)) :length (gen-repeat (length n) (append (gen-repeat 12 '(t)) (list '-e)))) :channel 2)) (def-score example-score (:key-signature 'atonal :time-signature '(4 4) :tempo 120 :layout (piano-solo-layout 'rhand 'lhand)) (rhand :omn (filter-tie (make-omn :pitch (setf n (sorting (rnd-repeat 100 '(g6 gs6 a6 bb6 b6 c7 cs7 d7 eb7 e7 f7 fs7)) :algorithm 'min/max :n '<)) :length (gen-repeat (length n) (append (gen-repeat 100 '(t)) (list '-e))))) :channel 1 :sound 'gm :program 0) (lhand :omn (filter-tie (make-omn :pitch (setf n (sorting (rnd-repeat 100 '(g1 gs1 a1 bb1 b1 c2 cs2 d2 eb2 e2 f2 fs2)) :algorithm 'min/max :n '>)) :length (gen-repeat (length n) (append (gen-repeat 100 '(t)) (list '-e))))) :channel 2)) (def-score example-score (:key-signature 'atonal :time-signature '(4 4) :tempo 120 :layout (piano-solo-layout 'rhand 'lhand)) (rhand :omn (filter-tie (make-omn :pitch (setf n (sorting (rnd-repeat 100 '(g6 gs6 a6 bb6 b6 c7 cs7)) :algorithm 'min/max :n '<)) :length (gen-repeat (length n) (append (gen-repeat 100 '(t)) (list '-e))))) :channel 1 :sound 'gm :program 0) (lhand :omn (filter-tie (make-omn :pitch (setf n (sorting (rnd-repeat 100 '(c2 cs2 d2 eb2 e2 f2 fs2)) :algorithm 'min/max :n '>)) :length (gen-repeat (length n) (append (gen-repeat 100 '(t)) (list '-e))))) :channel 2))  
  12. Like
    AM got a reaction from Stephane Boussuge in sorting algorithms   
    i solved the problems. here is a workspace/files to experiment with SORTING ALGORITHMS 
    thanx to torsten and philippe!
     
    greetings
    andré
     
    functions.opmo
    abstract examples.opmo
    sound examples.opmo
    sorting algorithms.opmows
  13. Like
    AM reacted to opmo in Easiest way to add click track / Metronome in OM   
    This example illustrate how this could be done:
     
      (metronome    :omn (metronome phrase-lh)    :channel 16    :sound 'gm    :program 'woodblock)  
    Function:
    (defun metronome (sequence &key (pitch 'c4) (velocity 'ff)) (let* ((ts (get-time-signature sequence)) (len (loop for i in ts collect (gen-repeat (last1 i) (gen-repeat (car i) (list (/ 1 (second i))))))) (vel (loop for i in ts collect (append (list velocity) (gen-repeat (1- (car i)) (list 'mf)))))) (make-omn :length len :pitch (list pitch) :velocity vel))) (setf sequence '((-h.) (-e g3cs3 mp arp fs3b2 arp-down g3as2 arp-down gs3as2 arp) (-e - fs3c3 f fs3as2 g3cs3 a3as2 gs3c3 gs3cs3) (-q._q))) (metronome sequence) => ((q c4 ff mf c4) (e c4 ff mf c4 c4 c4) (q c4 ff mf c4 c4) (e c4 ff mf c4 c4 c4))  
    Score example:
    (setf phrase-rh '((h. cs3gs2as5cs5cs4as3gs3g3as4gs4g4 f arp) (-e g5d5g4 mp arp fs5ds5fs4 arp-down g5ds5g4 arp-down gs5e5gs4 arp) (-e - a5d5 f c6f5 d5b5 g5d5 gs5ds5 gs5e5) (-e h c6d5cs5g4cs4g3d3 p arp-down))) (setf phrase-lh '((-h.) (-e g3cs3 mp arp fs3b2 arp-down g3as2 arp-down gs3as2 arp) (-e - fs3c3 f fs3as2 g3cs3 a3as2 gs3c3 gs3cs3) (-q._q))) (setf ts (get-time-signature phrase-lh)) (def-score arpeggiation-chords-3 (:key-signature 'chromatic :time-signature ts :tempo 60 :layout (harp-grand-layout '(rh lh))) (metronome :omn (metronome phrase-lh) :channel 16 :sound 'gm :program 'woodblock) (rh :omn phrase-rh :channel 1 :sound 'gm :program 'orchestral-harp) (lh :omn phrase-lh) )  
    I will add the METRONOME function to the next release.
    JP
  14. Like
    AM reacted to torstenanders in Easiest way to add click track / Metronome in OM   
    Wow, that is fancy :)
     
    Here is one that is even slightly more fancy, where the resulting softer velocity values also react to the velocity input, and also the pitch of easy beats is slightly different.   
     
    (defun metronome (sequence &key (pitch 'c4) (velocity 90))
      (let* ((ts (get-time-signature sequence))
             (len (loop for i in ts
                    collect (gen-repeat (car i) (list (/ 1 (second i))))))
             (vel (loop for i in ts
                    collect (append (get-velocity (list velocity) :type :symbol)
                                    (gen-repeat (1- (car i)) 
                                                (get-velocity (list (- velocity 25))
                                                              :type :symbol)))))
             (pitch (loop for i in ts
                      collect (cons pitch
                                    (pitch-transpose 
                                     -2 (gen-repeat (1- (car i)) pitch))))))
        (make-omn :length len
                  :pitch pitch
                  :velocity vel)))
     
    TA
  15. Like
    AM reacted to opmo in Easiest way to add click track / Metronome in OM   
    I like the easy beats :-)
     
    This function works with omn-form sequence and time-signature-form sequence:
     
    (defun metronome (sequence &key (pitch 'c4) (velocity 0.8)) (do-verbose ("metronome") (let* ((get-ts (if (omn-formp sequence) (get-time-signature sequence) sequence)) (ts (loop for i in (lists! get-ts) collect (cons (if (listp (first i)) (apply #'+ (first i)) (first i)) (rest i)))) (len (assemble-seq (loop for i in ts collect (if (equal 1 (last1 i)) (gen-repeat (first i) (list (/ 1 (second i)))) (gen-repeat (last1 i) (list (gen-repeat (first i) (list (/ 1 (second i)))))))))) (vel (loop for i in len collect (cons velocity (gen-repeat (1- (length i)) (list (- velocity 0.15)))))) (pch (loop for i in len collect (cons pitch (pitch-transpose -2 (gen-repeat (1- (length i)) pitch)))))) (make-omn :length len :pitch pch :velocity vel))))  
  16. Thanks
    AM reacted to Yuichi Yamamoto in Quantization   
    Hi people,

    Though I've been using Opusmodus for about 2 years now, and in great love with it,
    I haven't really had a chance to share my work on the community.

    But here I have my piano piece vastly written with Opusmodus, and guess what, it's got a cool video, too!

    Yamaha corporation kindly offered me to use their automated piano for filming, and I think an algorithmic music like this goes very well with it!

    Yuichi
  17. Thanks
    AM reacted to opmo in Quantisation?   
    Few QUANTIZE examples:
     
    (setf val1 (gen-white-noise 19 :seed 56)) => (0.42731586 0.21048035 0.14944322 0.05199222 0.33933866 0.8851649 0.93565786 0.93476516 0.3839242 0.03127964 0.39819628 0.18478736 0.9568939 0.6663358 0.26542348 0.4052874 0.68264747 0.95090246 0.12790146) (quantize val1 '(3 5 7)) => (7h. 7q 7q 7q 7q_3q 3h_t e. t_e.. t_s t s. t t_5w 5q_e s s_5q 5h. 5q_e. s)
     
    (setf val2 (gen-white-noise 19 :scale 2.2 :seed 875)) => (0.5896695 1.3854954 1.7601246 0.15660097 1.0577743 2.005573 0.8151905 0.83697665 0.17089269 1.5035293 0.97181803 0.54288834 1.810276 1.551678 2.1626956 0.7790575 1.5867842 1.6030518 1.3905888) (quantize val2 '(3 5 7)) => (e e_e.. t_q_7wq 7q 7q_e.. t_q_e.. t_3h 3q_e s s_q_e e_s e s_q_e e_q_s e._q_e e_5q 5w_e e_q_e e_q)
     
    (setf val3 (vector-range -1.0 1.0 (gen-white-noise 19 :seed 154))) => (-0.24158841 -0.9634026 -0.99552864 -0.4178778 0.9713292 -0.58351946 -0.77635634 0.532539 0.4349326 -0.85446167 -0.9610649 -0.9799211 1.000001 -0.4322123 0.3123653 -1.0 0.74611676 0.66992795 -0.034718752) (quantize val3 '(3 5 7)) => (-3q -3h -3q -3h -3q -3q 3q_e -e -7q -7wq 7q_3q 3q -3q -3h -3q -e -e -e e_e -e -s s -e -e e_e e)
     
    Best wishes, J
  18. Like
    AM got a reaction from JulioHerrlein in figured-bass function   
    ...except that makes you a fun and makes you happy - and that is just as important!
    added 10 minutes later so the question will be what can be better, which will be more exciting than what deep learning (or traditional algorithms) can produce. very fast then - in my opinion - the production becomes quite simple and well done, but this has nothing to do with art (if you want) - it will be the "imitation of art", also algorithmic tools pushing you in this direction - is it "music" or the simulation of "music"?. but as VON FOERSTER said: "the map is the territory"... counteracting (radical-constructivistic) the phrase "the map is not the territory"...
     
     
  19. Like
    AM reacted to opmo in Quantisation?   
    Achim Bornhoeft and I we had a brain storming session on quantisation here in Venice for two days.
    The code will be ready for testing in few days.
    The holidays might delay the release a bit.
    The test are already very promising :-)
  20. Like
    AM reacted to torstenanders in Quantisation?   
    Does Opusmodus perhaps already have some quantisation function that expects a list of floats and that basically rounds these floats into a metric rhythm, including using tuplets? 
     
    I am aware of vector-to-length – that implements a simple form of what I am looking for, but it does not support tuplets. Other algorithmic composition systems have more sophisticated quantisation facilities. For example, OpenMusic provides the box omquantify (among other functions in the Kant library). 
     
      http://support.ircam.fr/docs/om/om6-manual/co/Quantification.html
     
    I am aware that quantification is a complex process, but perhaps that is already there in Opusmodus.
     
    Best,
    Torsten
     
     
  21. Like
    AM got a reaction from lviklund in Length-Legato opposite function   
    it was necessary to re-organize "OMN with ties" by "omn-merge-ties" first...
    and find a solution if  staccato-length = length ...
    added 2 minutes later you're welcome... 
    it's a bit like "BRAINFOOD" solving such things... but TORSTEN is the "code-master" for the complicated things!! 🙂
     
    so, i have to compose now, the real hard work.
  22. Like
    AM got a reaction from JulioHerrlein in muting every other note   
    code from another project, but should work in a similar way. take it, modify it, or code it properly :-)
    regards
    andré
     
    ;; gen-hoquetus.4 https://en.wikipedia.org/wiki/Hocket ;;; andré meier / 27-4-2016 ;;; write a instrumentation-list (instrument + techniques + velocity), pitch-list ;;; and length-list. the gen-hoquetus-function will split the melody ;;; off... in any possibilities, techniques/articulations/velocities will be added ;;; this is only a function i coded for my actual work... perhaps you could use ;;; it or code it properly :-) ;;; HAVE FUN! regards, andré (setq instrumentation '(((pno ponte ppp)) ((vn pizz p)) ((vn pizz f) (va ponte f)) ((pno tasto ff)) ((pno pizz fff)) ((vn tasto mf) (pno ord ff) (vc tasto mf) (trp ord pp)) ((trp mute pp) (vn ponte mf)))) ;; subfunctions (defun generate-events.4 (durations pitches &key (velocity '(mf)) (articulation '(-)) (optional_data 'nil)) (loop repeat (length durations) with cnt-d = 0 with cnt-rest = 0 when (> (nth cnt-d durations) 0) collect (list (nth cnt-d durations) (nth cnt-rest pitches) (nth cnt-rest velocity) (nth cnt-rest articulation) (nth cnt-rest optional_data)) and do (incf cnt-rest) and do (incf cnt-d) else collect (list (nth cnt-d durations) 'nil 'nil 'nil 'nil) and do (incf cnt-d))) (generate-events.4 '(1 2 -3 4) '(60 61 62) :optional_data instrumentation) ;; (defun filtering-color.4 (selected-color event-stream) (loop for i in event-stream with match = 0 append (loop for x in (fifth i) when (equal (first x) selected-color) do (setq articulation (second x) velocity (third x)) and do (setq match 1)) when (and (= match 1) (> (first i) 0)) append (list (first i) (second i) velocity articulation) else collect (* -1 (abs (first i))) do (setq match 0))) (filtering-color.4 'vn (generate-events.4 (gen-length '(1 -100 2 3 4 5) 1/32) '(c4 d4 e4 e5) :optional_data instrumentation)) ;; mainfuction: (defun gen-hoquetus.4 (filtered-instrument &key pitch length instrument-list) (let ((events (generate-events.4 length pitch :optional_data instrument-list))) (filtering-color.4 filtered-instrument events))) (gen-hoquetus.4 'vn :pitch '(c4 d4 e5 f6) :length '(1/32 2/32 3/32 4/32) :instrument-list instrumentation) ;; OMN_EXAMPLE: (setq pitches (midi-to-pitch '(60 61 62 63 64 65 66 67 68 69 70))) ; only an example (setq lengths (gen-length '(1 2 3 -4 5 6 5 -4 3 -2 1) 1/16)) ; only an example (setq instrumentation (loop repeat 10 collect (rnd-pick '(((pno ponte ppp)) ; only an example ((vn pizz p)) ((vn pizz f) (va ponte f)) ((pno tasto ff)) ((pno pizz fff)) ((vn tasto mf) (pno ord ff) (vc tasto mf) (trp ord pp)) ((trp mute pp) (vn ponte mf)))))) (def-score hoquetus.4 (:key-signature '(c maj) :time-signature '(4 4) :tempo '(120) :layout (bracket-group (trumpet-layout 'trumpet) (piano-grand-layout 'piano) (violin-layout 'violin) (viola-layout 'viola) (violoncello-layout 'violoncello))) (trumpet :omn (gen-hoquetus.4 'trp :pitch pitches :length lengths :instrument-list instrumentation) :channel 1) (piano :omn (gen-hoquetus.4 'pno :pitch pitches :length lengths :instrument-list instrumentation) :channel 1) (violin :omn (gen-hoquetus.4 'vn :pitch pitches :length lengths :instrument-list instrumentation) :channel 1) (viola :omn (gen-hoquetus.4 'va :pitch pitches :length lengths :instrument-list instrumentation) :channel 1) (violoncello :omn (gen-hoquetus.4 'vc :pitch pitches :length lengths :instrument-list instrumentation) :channel 1))  
  23. Thanks
    AM got a reaction from JulioHerrlein in Length-Legato opposite function   
    it was necessary to re-organize "OMN with ties" by "omn-merge-ties" first...
    and find a solution if  staccato-length = length ...
    added 2 minutes later you're welcome... 
    it's a bit like "BRAINFOOD" solving such things... but TORSTEN is the "code-master" for the complicated things!! 🙂
     
    so, i have to compose now, the real hard work.
  24. Thanks
    AM got a reaction from JulioHerrlein in Length-Legato opposite function   
    the solution...
     
    (defun length-staccato (n alist) (let ((newlengths) (new-omn (omn-merge-ties (flatten alist))) (time-sign (get-time-signature alist))) (progn (setf newlengths (loop for i in (omn :length new-omn) when (> i 0) append (if (= n i) (list i) (list n (* -1 (abs (- i n))))) else collect i)) (if (omn-formp alist) (omn-to-time-signature (make-omn :length newlengths :pitch (omn :pitch new-omn) :velocity (omn :velocity new-omn) :articulation (omn :articulation new-omn)) time-sign) newlengths)))) (length-staccato 1/16 '(q -q q q)) (length-staccato 1/16 '(q e4 mp q tasto q -q q q)) (length-staccato 1/16 '((e. c4 eb4 fs4 a4 tie) (s a4 e. cs4 e4 g4 e bb4 tie) (e bb4 e. d4 f4 gs4 s b4)))  
  25. Thanks
    AM reacted to o_e in Multiple/Simultaneous Voices, Each With Different BPM's?   
    Did you see my workaround in the post mentioned by André (to lock the smpte of the track and then change the overall tempo in Logic)?
    Now I'am working with Reaper (https://www.reaper.fm/ )
    which is worth to checkout, very cheap and unbelievable powerful (a bit of a learning curve I admit), no problem to change the tempo of every midi file seperatly..
     
    best  ole
     
     
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy