Jump to content

AM

core_group_3
  • Content Count

    445
  • Joined

  • Last visited

  • Days Won

    95

Everything posted by AM

  1. hi all, i think a it's a beginner-question... in SIBELIUS i can write for microtonal things MIDI PITCH BEND MESSAGES to every note i want - or automatically by a plugin. in the score/above the note then it's written for example : ~B0,70 etc.... (my PLAYER (conTimbre) works from SIBELIUS via VST) - now the question: how do i send such MIDI-pitch-bend-messages from OPUSMODUS? the opmo-tuning seems to work different and don't work with conTimbre-player... https://www.contimbre.com/en/ thanx for any help andré
  2. AM

    MIDI-pitch-bend-messages

    i think it's only possible by :controllers with pitch-bend-messages. i have seen the example, but i have no idea how to realize it without a really concrete example - i'm an absolut beginner with MIDI-etc-things 🙄 what i have to write in the :controllers-section - which "midi-number/numbers" for pitch-bend? the bending in conTimbre needs an integer between 1 and 127 => 64 is no-tuning/bend? are there any specialists around in the forum? 🙂
  3. AM

    what's up with quantize?

    okay, so i hope this will be a solution for me - thanx for your work, janusz!!
  4. why are there different results (have a look to the number of length values)? ...i get in troubles with my work - "phase shift" between pitch/length when i change/use QUANTIZE 😕 (setf rhy '(0.375 -0.625 0.25 0.375 0.125 0.125 -0.25 0.625 0.125 -0.625 0.125 0.125 -0.625 0.375 0.25 -0.25 0.625 -0.125 0.125 -0.125 0.125 0.375 0.375 0.125 0.125 0.375 0.125 -0.25 0.125 0.25 -0.25 0.625 0.125 0.375 0.375 0.375 0.375 0.125 -0.25 0.625 0.125 -0.25 0.125 0.125 -0.375 0.125 0.25 -0.375 0.25 -0.375 0.125 -0.125 0.125 -0.25 0.625 -0.5 0.25 0.375 -0.125 0.375 0.25 -0.25 0.625 0.25 -0.125 0.125 0.125 0.125 0.125 0.125 0.375 -0.125 0.125 0.125 1.25 0.375 0.25 -0.125 0.125 0.25 -2.5 0.25 0.375 3.75 0.125 0.125 -0.375 0.375 0.125 0.625 0.25 2.5 0.125 0.125 2.5 -0.125 3.75 -0.375 1.25 -0.125 0.125 0.125 0.125 0.125 0.25 0.625 0.25 -0.375)) (setf l1 (quantize (x+b rhy 0.0) '(1 2 3 5 8))) (length l1) => 116 (setf l2 (quantize (x+b rhy 0.02) '(1 2 3 5 8))) (length l2) => 105
  5. AM

    what's up with quantize?

    okay, i see... but the QUANTIZE-problem (or whatever) stays... wrong number of LENGTH values from time to time -> evaluate this example (with ratios and longer values) a few time... and you will see. so it's not possible to work correct with QUANTIZE 😥 greetings andré ;;; LENGTH (setf rhy (gen-length (rnd-order '(1 3 2 -1 7 1 2 -1 2 1 5 -1 3 2 1)) 16)) (setf float-rhy+fuzziness (loop for i in rhy when (> i 0) collect (+ i (rnd-pick '(0.4 0.2 0.3))) else collect i)) (setf rhy+fuzziness (quantize float-rhy+fuzziness '(1 2 3 4 5 6 7 8) :speed -.2)) ;;; PITCHES (setf pitches '(fs3 bb3 c4 d4 eb4 e4 g4 gs4 a4 b4 cs5 f5)) ;;; MAKE OMN + SCORE (def-score example (:title "example" :key-signature 'atonal :time-signature '(4 4) :tempo 90) (instr :omn (make-omn :length rhy+fuzziness :pitch pitches :velocity '(pppp)) :span :pitch :port 0 :channel 1 :sound 'gm-trumpet))
  6. AM

    what's up with quantize?

    dear janusz IT IS A BUG 🙂 what a strange output you have…?! with this litle LOOP i will never get a value like 0.08125… because the minimum will be 0.125+add (= rnd-pick) => 1/32+add… so THIS could not be the problem!!!! you have to "convert" to FLOAT (you did not in YOUR example) -> then you have not such too-small-values - do it like in MY example above... so NO too small value, BUT SAME QUANTIZE BUG (setf float-rhy '(0.125 0.125 0.375 -0.25 0.625 0.875 0.375 -0.25 0.125 0.625 1.0 -0.875 0.375 0.125 0.25)) (setf float-rhy+fuzziness (loop for i in float-rhy when (> i 0) collect (+ i (rnd-pick '(0.05 0.1 0.15))) else collect i)) and you get the SAME bug with 1/16 as minimum value and much larger adds -> test it 🙂 ;;; LENGTH (setf rhy (gen-length (rnd-order '(1 3 2 -1 7 1 2 -1 2 1 5 -1 3 2 1)) 16)) (setf float-rhy (ratio-to-float rhy)) (setf float-rhy+fuzziness (loop for i in float-rhy when (> i 0) collect (+ i (rnd-pick '(0.1 0.2 0.3))) else collect i)) (setf rhy+fuzziness (quantize float-rhy+fuzziness '(1 2 3 4 5 6 7 8))) ;;; PITCHES (setf pitches '(fs3 bb3 c4 d4 eb4 e4 g4 gs4 a4 b4 cs5 f5)) ;;; MAKE OMN + SCORE (def-score example (:title "example" :key-signature 'atonal :time-signature '(4 4) :tempo 90) (instr :omn (make-omn :length rhy+fuzziness :pitch pitches :velocity '(pppp)) :span :pitch :port 0 :channel 1 :sound 'gm-trumpet)) ;;; the speed-thing changes nothing, same BUG (setf rhy+fuzziness (quantize float-rhy+fuzziness '(1 2 3 4 5 6 7 8) :speed -.2))
  7. AM

    what's up with quantize?

    voilà: here is a concret example - with 12 length-values (in my work there are about 700, so the problems are BIGGER 🙂 ) if you evaluate a few times you get some WRONG output. you see it if the last pitch is not an f5, that's because there are (don't know why) from time to time (from eval to eval) more then 12 length-values in the output - should be 12 length and 3 rest values. this is the problem and makes the result too inconsistent for me... ;;; LENGTH (setf rhy (gen-length '(1 1 3 -2 5 7 3 -2 1 5 8 -7 3 1 2) 32)) (setf float-rhy (ratio-to-float rhy)) (setf float-rhy+fuzziness (loop for i in float-rhy when (> i 0) collect (+ i (rnd-pick '(0.05 0.1 0.15))) else collect i)) (setf rhy+fuzziness (quantize float-rhy+fuzziness '(1 2 3 4 5 6 7 8))) ;;; PITCHES (setf pitches '(fs3 bb3 c4 d4 eb4 e4 g4 gs4 a4 b4 cs5 f5)) ;;; MAKE OMN + SCORE (def-score example (:title "example" :key-signature 'atonal :time-signature '(4 4) :tempo 90) (instr :omn (make-omn :length rhy+fuzziness :pitch pitches) :span :pitch :sound 'gm-trumpet))
  8. AM

    what's up with quantize?

    but with other ADD and QUANTIZE (setf l2 (quantize (x+b rhy 0.22) '(1 2 4 8))) (get-count l2 :length :note) => 82 (setf l2 (quantize (x+b rhy 0.22) '(1 2 3 4 5 6 7 8))) (get-count l2 :length :note) => 86 so for me, quantize works a little bit like a BLACK BOX 🙂 would absolutely GREAT if it would work always with same COUNT! any idea? 🙂 thanx for help!!
  9. AM

    what's up with quantize?

    i know, but the error/wrong output is coming up when would add (individual) float-numbers to RHY and afterwards use QUANTIZE 🙂 the concret idea is: to a basic FLOAT-seq like RHY -values (above) i would like to add some little noisy-floats - 0.5 becomes 0.55 or 0.75 beomes 0.70 etc... so the precise structure beomes some fuzziness - but after quantizing, the snychronization with the pitches is wrong - because QUANTIZE doing more/less length-values
  10. AM

    what's up with quantize?

    here is a very simple example: a sequence in 1/8-structure -> i will add 0.25 (=> + 1/16), and QUANTIZE-output-sequences are with different lengths!! compare: (length rhy) with l1 with l2 (setf rhy '(1.5 -2.5 1.0 1.5 0.5 0.5 -1.0 2.5 0.5 -2.5 0.5 0.5 -2.5 1.5 1.0 -1.0 2.5 -0.5 0.5 -0.5 0.5 1.5 1.5 0.5 0.5 1.5 0.5 -1.0 0.5 1.0 -1.0 2.5 0.5 1.5 1.5 1.5 1.5 0.5 -1.0 2.5 0.5 -1.0 0.5 0.5 -1.5 0.5 1.0 -1.5 1.0 -1.5 0.5 -0.5 0.5 -1.0 2.5 -2.0 1.0 1.5 -0.5 1.5 1.0 -1.0 2.5 1.0 -0.5 0.5 0.5 0.5 0.5 0.5 1.5 -0.5 0.5 0.5 5.0 1.5 1.0 -0.5 0.5 1.0 -10.0 1.0 1.5 15.0 0.5 0.5 -1.5 1.5 0.5 2.5 1.0 10.0 0.5 0.5 10.0 -0.5 15.0 -1.5 5.0 -0.5 0.5 0.5 0.5 0.5 1.0 2.5 1.0 -1.5)) (float-to-ratio rhy) => (3/8 -5/8 1/4 3/8 1/8 1/8 -1/4 5/8 1/8 -5/8 1/8 1/8 -5/8 3/8 1/4 -1/4 5/8 -1/8 1/8 -1/8 1/8 3/8 3/8 1/8 1/8 3/8 1/8 -1/4 1/8 1/4 -1/4 5/8 1/8 3/8 3/8 3/8 3/8 1/8 -1/4 5/8 1/8 -1/4 1/8 1/8 -3/8 1/8 1/4 -3/8 1/4 -3/8 1/8 -1/8 1/8 -1/4 5/8 -1/2 1/4 3/8 -1/8 3/8 1/4 -1/4 5/8 1/4 -1/8 1/8 1/8 1/8 1/8 1/8 3/8 -1/8 1/8 1/8 5/4 3/8 1/4 -1/8 1/8 1/4 -5/2 1/4 3/8 15/4 1/8 1/8 -3/8 3/8 1/8 5/8 1/4 5/2 1/8 1/8 5/2 -1/8 15/4 -3/8 5/4 -1/8 1/8 1/8 1/8 1/8 1/4 5/8 1/4 -3/8) (length rhy) => 108 (setf l1 (quantize (x+b rhy 0.00) '(1 2 4 8))) (length l1) => 135 (setf l2 (quantize (x+b rhy 0.25) '(1 2 4 8))) (length l2) => 137
  11. AM

    what's up with quantize?

    but it makes no sense to get more LENGTH-values by adding 0.02 (also by adding 0.12 what ist no such a little change...)? whats the idea behind it? in that way its not usable for many ways....
  12. hi all the following function could be usefull, it's a first sketch, but it seems to work.... if you want to INSERT a new OMN-seq, perhaps in bar 2 on the 3/20 in your BASIC-OMN-sequence... with this function you can do this, it will overwrite your original phrase. test it or tell me whatelse would be better... greetings andré ;;; ------------------------------------------------------------------------ ;;; INSERTING SEQ BY OVERWRITING ;;; ------------------------------------------------------------------------ ;;; SUB (defun get-resolution2 (beat) (cond ((memberp (cadr beat) '(3 6 12 24 48)) 1/24) ((memberp (cadr beat) '(1 2 4 8 16 32)) 1/16) ((memberp (cadr beat) '(5 10 20 40)) 1/20) ((memberp (cadr beat) '(7 14 28 56)) 1/28))) ;;; MAIN: INSERTING SEQ BY OVERWRITING (defun inserting-on-bar/beat* (seq &key insert time-sign bar beat) (let ((resolution (get-resolution2 beat)) (ord-time-sign time-sign) (time-sign (if (listp (car time-sign)) (loop for i in time-sign when (> (caddr i) 1) append (loop repeat (caddr i) collect (list (car i) (cadr i))) else collect (list (car i) (cadr i))) (append time-sign))) (distance (if (listp (car time-sign)) (+ (car (loop repeat (- bar 1) for i in time-sign collect (/ (* (1- bar) (/ (car i) (cadr i))) (get-resolution2 beat)))) (/ (/ (1- (car beat)) (cadr beat)) (get-resolution2 beat))) (+ (/ (* (1- bar) (/ (car time-sign) (cadr time-sign))) (get-resolution2 beat)) (/ (/ (1- (car beat)) (cadr beat)) (get-resolution2 beat)))))) (omn-to-time-signature (omn-merge-ties (flatten (loop repeat (length (omn-to-time-signature seq (list (numerator resolution) (denominator resolution)))) for cnt = 0 then (incf cnt) with new-seq = (omn-to-time-signature seq (list (numerator resolution) (denominator resolution))) with insert-rounded = (append insert (rest (length-rational-quantize (list (apply '+ (omn :length insert))) :round resolution))) when (= cnt distance) collect insert-rounded and do (setf cnt (+ (/ (get-span (flatten insert-rounded)) resolution) cnt -1)) else collect (nth cnt new-seq)))) ord-time-sign))) ;;; EXAMPLES (inserting-on-bar/beat* '((e c6 a5 h b5 tie) (q b5 b5 a5 tie) (h a5 q a5) (h. g5)) :insert '(s f3 e3 eb3 d3) :time-sign '(3 4) :bar 2 :beat '(2 16)) (inserting-on-bar/beat* '((e c6 a5 h b5 tie) (q b5 b5 a5 tie) (h a5 q a5) (h. g5)) :insert '(3q c5 b4 bb4 a4) :time-sign '(3 4) :bar 1 :beat '(2 12)) ;;; EXAMPLE WITH different TIME-SIGNATURES (inserting-on-bar/beat* '(e c6 a5 h b5 tie q b5 b5 a5 tie h a5 q a5 h. g5) :insert '(5q c5 b4 bb4 a4) :time-sign '((2 4 1) (3 8 1) (5 8 1) (3 4 1)) :bar 3 :beat '(3 20))
  13. AM

    rnd-complete-seq

    ;; a function which fills up a sequence randomly - max-length = length sequence ;; (regardless of the number of cycles) (defun rnd-complete-seq (n &key sequence (step 1) seed (sort '<) (exclude nil) (append-excluded nil)) (let* ((testseq) (sequence (if (null exclude) sequence (filter-remove exclude sequence))) (sequence (loop repeat (length sequence) with sequence = (loop repeat n with seq = '() do (setf seq (append (rnd-unique step sequence :seed seed) seq)) do (setf sequence (filter-remove seq sequence)) collect seq) for i in (if (equal sort '<) (sort-asc sequence) (sort-desc sequence)) collect i))) (if (null append-excluded) sequence (progn (cond ((pitchp (first (car (last sequence)))) (setf testseq (pitch-to-midi sequence))) ((velocityp (first (car (last sequence)))) (setf testseq (get-velocity sequence))) (t (setf testseq sequence))) (if (< (first (car (last testseq))) (second (car (last testseq)))) (list sequence (sort-asc (append exclude (car (last sequence))))) (list sequence (sort-desc (append exclude (car (last sequence)))))))))) ;;; EXAMPLES (rnd-complete-seq 8 :sequence (expand-tonality '(b3 messiaen-mode6))) => ((b3) (b3 a4) (b3 a4 as4) (b3 f4 a4 as4) (b3 e4 f4 a4 as4) (b3 cs4 e4 f4 a4 as4) (b3 cs4 ds4 e4 f4 a4 as4) (b3 cs4 ds4 e4 f4 g4 a4 as4)) ;or => ((as4) (e4 as4) (e4 f4 as4) (cs4 e4 f4 as4) (cs4 e4 f4 g4 as4) (b3 cs4 e4 f4 g4 as4) (b3 cs4 ds4 e4 f4 g4 as4) (b3 cs4 ds4 e4 f4 g4 a4 as4)) ;or .... (rnd-complete-seq 5 :sequence '(0 1 2 3 4 5 6 7 8 9 10 11 12)) => ((1) (1 7) (0 1 7) (0 1 7 9) (0 1 7 9 11)) ;or => ((0) (0 1) (0 1 11) (0 1 6 11) (0 1 6 11 12)) ;or .... (rnd-complete-seq 5 :step 2 :sequence '(0 1 2 3 4 5 6 7 8 9 10 11 12)) => ((1 7) (0 1 7 8) (0 1 5 7 8 12) (0 1 5 7 8 9 10 12) (0 1 2 5 7 8 9 10 11 12)) (rnd-complete-seq 5 :step 2 :sequence '(0 1 2 3 4 5 6 7 8 9 10 11 12) :seed 234) => ((4 12) (3 4 11 12) (2 3 4 10 11 12) (2 3 4 5 9 10 11 12) (1 2 3 4 5 8 9 10 11 12)) (rnd-complete-seq 5 :step 2 :sequence '(0 1 2 3 4 5 6 7 8 9 10 11 12) :sort '> :seed 234) => ((12 4) (12 11 4 3) (12 11 10 4 3 2) (12 11 10 9 5 4 3 2) (12 11 10 9 8 5 4 3 2 1)) (rnd-complete-seq 5 :step 2 :sequence '(pppp ppp pp p mp mf f ff fff ffff) :sort '> :seed 234) => ((ffff p) (ffff fff p pp) (ffff fff ff p pp ppp) (ffff fff ff f mp p pp ppp) (ffff fff ff f mf mp p pp ppp pppp)) ;;; examples with EXCLUDE (rnd-complete-seq 4 :sequence '(1 2 3 4 5 6 7 8) :exclude '(1 8)) => ((5) (4 5) (2 4 5) (2 4 5 6)) (rnd-complete-seq 4 :sequence '(1 2 3 4 5 6 7 8) :exclude '(1 8) :append-excluded t) => (((7) (4 7) (4 5 7) (4 5 6 7)) (1 4 5 6 7 8)) (rnd-complete-seq 4 :sequence '(pppp ppp pp p mp mf f ff fff ffff) :exclude '(pppp ffff) :append-excluded t) => (((mf) (p mf) (ppp p mf) (ppp p mf f)) (pppp ppp p mf f ffff))
  14. AM

    add-text-attributes

    i like to insert many text-attrib (hundreds) into the opmo-function (ADD-TEXT-ATTRIBUTES) ... how can i format it the right way when i generate it by a function? thanx for help!! andré ;;; ordinary... by hand - works fine (add-text-attributes '(nr0 "0") '(nr1 "1") '(nr2 "2") '(nr3 "3") '(nr4 "4") '(nr5 "5")) ;;; generated by a function as a list (if there are many attributes) (setf attr-list (loop for i from 0 to 100 collect (list (compress (list 'nr i)) (write-to-string i)))) ;;; INSERT don't work because of the wrong format.... how can i do that/change the format?? (add-text-attributes attr-list) => Error: Mismatched keys and values, (:notation-text) and ((nr1 "1") (nr2 "2") (nr3 "3") (nr4 "4") (nr5 "5") (nr6 "6") (nr7 "7") (nr8 "8") (nr9 "9") (nr10 "10") (nr11 "11") (nr12 "12") (nr13 "13") (nr14 "14") (nr15 "15") (nr16 "16") (nr17 "17") (nr18 "18") (nr19 "19") (nr20 "20") ...)
  15. AM

    add-text-attributes

    i know.... i tried and failed. perhaps someone could help me....
  16. i would like to number a pitch sequence, so that every pitch has a number which is written in the score (above the pitch). how can i do that...? any idea? thanx for help a.
  17. AM

    how to number pitches

    thanks, so i have to code an algorithm to write such a library (till 1000) - or do it by hand 😉 any idea to code such a format? - i don't know how to code/write such a format with single lists (and not lists in lists) inside a function... thanx for help andré
  18. AM

    how to number pitches

    i know, but i would like to code it and not to write it by hand 🙂 here is the solution: ;;; THE NUM-FUCTION for ARTICULATION (defun gen-num (n &key (start 0)) (loop for i from start to n append (list (compress (list 'num i))))) ;;; (setf pitches (loop repeat 20 collect (rnd-pick '(c4 d4 e4 f4)))) (setf articulation (gen-num (length pitches))) (make-omn :pitch pitches :articulation articulation :length '(t) :span :pitch) => (t f4 num0 e4 num1 c4 num2 d4 num3 e4 num4 f4 num5 d4 num6 d4 num7 f4 num8 f4 num9 c4 num10 d4 num11 e4 num12 d4 num13 f4 num14 f4 num15 e4 num16 d4 num17 e4 num18 c4 num19) @janusz: it works like that... but num0, num1... stops at num100, higher numbers seems not to be possible... but i would need about 1000 🙂
  19. ... a keyword/text search within the feature descriptions would be very useful.... so if i search "all-interval" i could find AIR etc....
  20. AM

    copy-omn-seq

    could be an interesting idea for OPMO? (or already existing?) greetings andré ;;; a function (a sketch - i needed it for my momentary work) which filters ;;; an OMN-sequence in a specific bar, from a specific beat, with a specific ;;; span. (in such a basic version all in quarters (bars/...)) (defun copy-omn-seq (omnseq bar/beat-list &key (measure '(4/4)) (span nil)) (loop for i in bar/beat-list collect (loop repeat (if (null span) (- (/ (car measure) 1/4) (1- (cadr i))) span) for x = (1- (cadr i)) then (incf x) append (nth x (omn-to-measure (nth (1- (car i)) (omn-to-measure omnseq measure)) '(1/4)))))) (setf mat '((e c4 cs4 d4 ds4 e4 f4 fs4 g4) (e c3 cs3 d3 ds3 e3 f3 fs3 g3) (e c6 cs6 d6 ds6 e6 f6 fs6 g6))) (copy-omn-seq mat '((2 3))) ;; bar 2 from beat 3 until end of bar => ((e e3 f3 e fs3 g3)) (copy-omn-seq mat '((1 1)) :span 2) ;; bar 1 from beat 1 for 2 quarters => ((e c4 cs4 e d4 ds4)) (copy-omn-seq mat '((1 2) (2 3) (3 4))) ;; same thing with more then ONE filterings => ((e d4 ds4 e e4 f4 e fs4 g4) (e e3 f3 e fs3 g3) (e fs6 g6)) (copy-omn-seq mat '((1 2) (2 3) (3 4)) :span 1) ;; same - every filtering with span 1 => ((e d4 ds4) (e e3 f3) (e fs6 g6))
  21. AM

    copy-omn-seq

    thanks for the hint 🙂 but don't seems to be equal / not same idea?
  22. ;;; CHANGE-TIME-STRUCTURES ;;; works okay, but not exactly precise because of rhy-to-integer, which is not very easy in some cases ;;; this function changes basic-rhy-structures (if it's all the time perhaps in x/32) ;;; to other/changing sections. the lengths/rests will be rounded like in LENGTH-RATIONAL-QUANTIZE ;;; rhy+span => '((32 2) (44 7)) => means in 32 three values, in 44 seven values (defun change-time-structure (omnseq rhy+span &key (basic-rhy 32) (round 1/4)) (let* ((intseq (loop for i in (omn :length (flatten omnseq)) collect (* i basic-rhy))) (rhyseq (mapcar #'car rhy+span)) (spanseq (mapcar #'cadr rhy+span)) (divided-intseq (gen-divide spanseq intseq))) (length-rational-quantize (flatten (gen-length divided-intseq rhyseq)) :round round))) (change-time-structure '(2/44 -2/44 3/44 5/44 6/44) '((32 2) (20 2) (28 3)) :basic-rhy 44) => (1/16 -1/16 -1/8 3/20 1/4 -1/10 3/14 -1/28) (change-time-structure '(2/32 -2/32 3/32 5/32 6/32) '((20 2) (44 2) (28 3)) :basic-rhy 32) => (1/10 -1/10 -1/20 3/44 5/44 -3/44 3/14 -1/28) could be done better -> go for it 🙂 greetings andré
  23. AM

    Help needed Binary Length values

    something like that? (defun length-to-binary (lengthlist n) (let ((newlist (loop for i in (omn :length lengthlist) collect (/ i n)))) (loop for x in newlist when (> x 0) append (append (list 1) (gen-repeat (1- x) '0)) else append (gen-repeat (abs x) '0)))) (length-to-binary '(-q q e) 1/16) => (0 0 0 0 1 0 0 0 1 0) (length-to-binary '(-q s s q e) 1/16) => (0 0 0 0 1 1 1 0 0 0 1 0)
  24. a sieve/filter-function - filters specific INTERVALS and replacing the others by rests. (don't work perfect, but as a sketch....) ;;; (defun equal/or (n alist) (car (loop for i in alist when (equal i n) collect 't))) ;;; FUNCTION (defun filter-omn-by-intervals (omn-seq intervals) (setf omn-seq (loop with omn-events = (single-events omn-seq) with i = 0 while (not (null (nth i omn-events))) when (equal/or (car (pitch-to-interval (append (omn :pitch (nth i omn-events)) (omn :pitch (nth (1+ i) omn-events))))) intervals) collect (list (nth i omn-events) (nth (1+ i) omn-events)) and do (incf i 2) else collect (neg! (car (omn :length (nth i omn-events)))) and do (incf i)))) ;;; EXAMPLE (setf basic-omn-seq (make-omn :pitch (vector-to-pitch '(c4 c6) (gen-white-noise 100 :type :logistic)) :length '(t) :span :pitch)) ;;; check out all these filter-tests (setf omn-seq (filter-omn-by-intervals basic-omn-seq '(1 2 3))) ;(setf omn-seq (filter-omn-by-intervals basic-omn-seq '(3 -3))) ;(setf omn-seq (filter-omn-by-intervals basic-omn-seq '(1 -1 5 -5 7 -7))) (def-score example (:title "example" :key-signature 'atonal :time-signature '(4 4) :tempo 90) (instrument1 :omn (flatten omn-seq) :channel 1 :sound 'gm-piano) (instrument2 :omn (flatten basic-omn-seq) :velocity 20 :channel 3 :sound 'gm-piano)) here is a more complex example (defvar library) (defvar abfolge) (defvar omn-seq) (defvar rhy) (defvar field) ;;;library + rhy -------------------------------------------------------------------------------- (setf rhy 44) ;;; LIBRARY MIRT RHY-PAAREN! (setf library (list '(eb5 5 p mute) '(e4 5 mf mute) '(gs4 3 f mute) '(g5 3 ppp mute) '(f6 2 p mute) '(cs4 1 f mute) '(d5 1 fff mute) '(b3 4 pppp mute) '(bb5 4 mp mute) '(a4 3 pp mute) '(fs3 (2 7) ppp mute) '(c6 (1 11) mp mute))) (setf library (loop for i in library collect (append (list (car i)) (if (listp (cadr i)) (gen-length (list (rnd-pick (cadr i))) rhy) (gen-length (list (cadr i)) rhy)) (filter-last 2 i)))) ;;; gen seq from library/abfolge--------------------------------------------------------------- (setf field '(eb5 e4 gs4 g5 f6 cs4 d5 b3 bb5 a4 fs3 c6)) (setf abfolge (pick-norepeat 500 field)) (setf omn-seq (loop for x in abfolge with y do (setf y (assoc x library)) append (append (reverse (filter-first 2 y)) (filter-last 2 y)))) (setf basic-omn-seq omn-seq) (setf omn-seq (filter-omn-by-intervals basic-omn-seq '(1 -1 11 -11 13 -13 4 -4 8 -8 16 -16 20 -20 28 -28 32 -32 7 -7 19 -19))) ;;;--------------------------------------------------------------------------------------------- (def-score example2 (:title "example2" :key-signature 'atonal :time-signature '(4 4) :tempo 90) (instrument :omn (flatten omn-seq) :channel 1 :sound 'gm-piano) (hidden-structure :omn (flatten basic-omn-seq) :channel 1 :velocity 0 :sound 'gm-piano)) ;;;--------------------------------------------------------------------------------------------- (omn-list-plot (flatten omn-seq) :join-points t)
  25. do you have some CODE to share?
×