Jump to content

AM

Members
  • Posts

    717
  • Joined

  • Last visited

Everything posted by AM

  1. i think you should code it yourself, then you'll get what you want greetings andré
  2. an example with 2 pitches = 2 intervals, with microtonal quantification (sort-asc (remove-duplicates (pitch-melodize (append (gen-summationsakkord '(3 5) :typ 'ks :gedachter-grundton 'db0 :quant nil) (gen-summationsakkord '(5 7) :typ 'ks :gedachter-grundton 'db0 :quant nil))))) (sort-asc (remove-duplicates (pitch-melodize (append (gen-summationsakkord '(3 5) :typ 'gs :gedachter-grundton 'db0 :quant nil) (gen-summationsakkord '(5 7) :typ 'gs :gedachter-grundton 'db0 :quant nil)))))
  3. here ist some code to generate "Summationsakkorde" (CLAUS KüHNL)... have a look to the PDF... (from the book "Claus Kühnl: Beiträge zu einer HArmonielehre 2000" Friedrich Hofmeister Musikverlag. p.42+) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun gen-summationsakkord (primaerint &key (n 10)(typ 'ks) (gedachter-grundton 'c0) (quant 1/2) (chord t)) (let ((partial-reihe (hertz-to-pitch (harmonics gedachter-grundton 100 :type :hertz) :quantize quant)) (partial-liste (remove-duplicates (append primaerint (list (sum primaerint)) (loop repeat n with k-int = (sum primaerint) with g-int = (sum primaerint) with a = (first primaerint) with b = (second primaerint) collect (cond ((equal typ 'ks) (setf k-int (+ (car primaerint) k-int))) ((equal typ 'gs) (setf g-int (+ (second primaerint) g-int))) ((equal typ 'fibo) (shiftf a b (+ a b))))))))) (if (null chord) (position-filter (x-b partial-liste 1) partial-reihe) (chordize (position-filter (x-b partial-liste 1) partial-reihe))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (gen-summationsakkord '(2 3) :typ 'ks :gedachter-grundton 'c2) (gen-summationsakkord '(2 3) :typ 'gs :gedachter-grundton 'c2) (gen-summationsakkord '(2 3) :typ 'fibo :gedachter-grundton 'c2) (gen-summationsakkord '(2 3) :typ 'ks :gedachter-grundton 'c2 :quant nil) (gen-summationsakkord '(3 4) :typ 'ks :gedachter-grundton 'f1) (gen-summationsakkord '(3 4) :typ 'gs :gedachter-grundton 'f1) (gen-summationsakkord '(3 4) :typ 'fibo :gedachter-grundton 'f1) Doc - 03.08.2022 - 20-41.pdf
  4. in general: you have to define exactly what you want (in a limited number of cases), if you change your idea along the way, you have to adapt the CODE again... look at the CODE, and the EVENT etc... ;; you have to define al longer length-value in EVENT: (* 4 1/8) = 1/2 => in EVENT '(h c4e4g4b4 mf ten) (setf event '(h c4e4g4b4 mf ten)) (gen-arpeggio* event :rhy '(1/8) :offset nil)
  5. here's a correction (bug) and a variant: okay... you want to "sum" the rests in a sequence 0, 2 ,3, 4 ... by -1/24 rhy. (a special version) so i have to code this case as option. take the new version and use :offset 1 (defun gen-arpeggio* (event &key (rhy'(1/28)) (legato nil) (offset nil)) (let* ((pitches (melodize (omn :pitch event))) (length (car (omn :length event))) (velo (car (omn :velocity event))) (art (car (omn :articulation event))) (rhy (gen-repeat 10 rhy)) (arpeggio-voices (loop repeat (length pitches) for i from 0 to (1- (length pitches)) for j in pitches for rhy in rhy collect (if (= i 0) (length-adjust length (list rhy j velo art)) (length-adjust length (append (gen-length (if (null offset) (list i) (list (+ i offset))) (* -1 rhy)) (list rhy) (list j) (list velo) (list art))))))) (assign-variable 'voice (if (null legato) arpeggio-voices (loop for x in arpeggio-voices collect (length-legato x)))))) (setf event '(q c4e4g4b4 mf ten)) ;;; now it works correct (gen-arpeggio* event :rhy '(1/8 1/12 1/16 1/20)) (list voice1) (list voice2) (list voice3) (list voice4) ;;; what makes intuitiv sense (old version/result) (gen-arpeggio* event :rhy '(1/24) :offset nil) ;; with OFFSET nil: the rests at the beginning are: ;; * 0 rhy ;; * 1 rhy ;; * 2 rhy ;; * 3 rhy (list voice1) (list voice2) (list voice3) (list voice4) ;;; what are you looking for... (gen-arpeggio* event :rhy '(1/24) :offset 1) ;; with OFFSET 1: the rests at the beginning are: ;; * 0 rhy ;; * 2 rhy ;; * 3 rhy ;; * 4 rhy (list voice1) (list voice2) (list voice3) (list voice4)
  6. here is a possible solution... ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; THE FUNCTION ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun gen-arpeggio (event &key (rhy'(1/28)) (legato nil)) (let* ((pitches (melodize (omn :pitch event))) (length (car (omn :length event))) (velo (car (omn :velocity event))) (art (car (omn :articulation event))) (rhy (gen-repeat 10 rhy)) (arpeggio-voices (loop repeat (length pitches) for i from 0 to (1- (length pitches)) for j in pitches for rhy in rhy collect (if (= i 0) (length-rational-quantize (list rhy j velo art) :round length) (length-rational-quantize (append (gen-length (list i) (* -1 rhy)) (list rhy) (list j) (list velo) (list art)) :round length))))) (assign-variable 'voice (if (null legato) arpeggio-voices (loop for x in arpeggio-voices collect (length-legato x)))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; IT WORKS LIKE THAT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; type in ONE single-event (l p v a) with CHORD... for example: (setf event '(q c4e4g4b4 mf ten)) ;;; evaluate the function (with a arpeggio-length, for example :ryh 1/28) (gen-arpeggio event :rhy 1/28) ; now the the result are "bounded" on 4 voices/variables = the number of the chord-pitches ; => (voice1 voice2 voice3 voice4) ;;; list every variable, so you will have the four "arpeggio-rhythm/times", so you can use that for 4 parts on your score (list voice1) (list voice2) (list voice3) (list voice4) ;;; VARIANTS AND OPTIONS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; if you choose ":legato t" => all the voices are like with PEDAL played (gen-arpeggio event :rhy 1/28 :legato t) ;;; if you want to put/merge all that into ONE VOICE just: (merge-voices voice1 voice2 voice3 voice4) => (7q c4 ten e4 ten g4 ten b4 ten -7h.) ;;; if you want to have different rhy's just do it like that (gen-arpeggio event :rhy '(1/28 1/20 1/12 1/8)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  7. try this (it's an old function/setup, sorry)... works for me.... 1) evaluate all 2) evaluate score ;; gen-hoquetus.4 ;;; 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)))) ;; 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) ;; 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))) (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))) ;; 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 (:title "score title" :key-signature '(c maj) :time-signature '(4 4) :tempo 120) (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 2) (violin :omn (gen-hoquetus.4 'vn :pitch pitches :length lengths :instrument-list instrumentation) :channel 3) (viola :omn (gen-hoquetus.4 'va :pitch pitches :length lengths :instrument-list instrumentation) :channel 4) (violoncello :omn (gen-hoquetus.4 'vc :pitch pitches :length lengths :instrument-list instrumentation) :channel 5))
  8. an idea (permutationsfaktor) used by HELMUT LACHENMANN for many of his pieces - to organize/build his strukturnetz. from an article by PIETRO CAVALLOTTI ("Die Funktion des Strukturnetzes am Beispiel von Mouvement (- vor der Erstarrung)")
  9. (defun permute-by-rule (n rule row) (append (list row) (loop repeat n collect (setf row (position-filter rule row))))) ;; row => a row (or a list) ;; n => number of generations ;; rule => new position/order in every generation - keep attention it's 0-based!!! => for 12 pitches use 0 to 11 (permute-by-rule 20 '(2 0 1 5 11 3 8 6 4 9 10 7) (make-scale 'c4 12))
  10. here is a function to MAP a 2d-field to chords (via intervals) // an idea i got from "Nierhaus - Algorithmic Composition" - Cellular Automata (p. 198). so you can "import/map" some GAME-OF-LIFE configurations or whatelse (a pixel photo?) // the PITCH-MAPPING is like in Miranda's CAMUS. ;; FUNCTION ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun 2d-field-to-chord (matrix &key (start 'c4) (merge-chords nil)) (let* ((int-horizontal (x+b (loop for x in (loop for i in matrix collect (position-item 1 i)) when (not (null x)) collect x) 1)) (int-vertical (x+b (loop repeat (length matrix) for n = 0 then (incf n) when (not (null (position-item 1 (nth n matrix)))) collect n) 1)) (chords (loop for h in int-horizontal for v in int-vertical append (loop for z in h collect (chordize (interval-to-pitch (list z v) :start start)))))) (if (null merge-chords) chords (chord-pitch-unique (chordize (flatten chords)))))) ;; interval-matrix ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; numbers are intervals (inverted order then in the book) ;; (different sizes are possible) (setf matrix #|1 2 3 4 5 6 7 8 9 etc..|# #|1|# '((1 0 0 0 0 0 0 0 0 0 0 0) #|2|# (0 1 0 0 0 0 0 0 0 0 0 0) #|3|# (0 0 1 0 0 0 0 0 0 0 0 0) #|4|# (0 0 0 0 0 0 0 0 0 0 0 0) #|5|# (0 0 0 0 0 0 0 0 0 0 0 0) #|6|# (0 0 0 0 0 0 0 0 0 0 0 0) #|7|# (0 0 0 0 0 0 0 0 0 0 0 0) #|etc..|# (0 0 0 0 0 0 0 0 0 0 0 0) (0 0 0 0 0 0 0 0 1 0 0 0) (0 0 0 0 0 0 0 0 0 0 0 0) (0 0 0 0 0 1 0 0 0 0 0 0) (0 0 0 0 0 0 0 0 0 0 0 0))) (2d-field-to-chord matrix) (2d-field-to-chord matrix :start 'd4) (2d-field-to-chord matrix :merge-chords t) (2d-field-to-chord matrix :merge-chords t :start 'd4) ;; as a scale (sort-asc (melodize (2d-field-to-chord matrix :merge-chords t))) ;; with rnd-generated field (by probability) (progn (setf matrix (loop repeat 32 collect (loop repeat 32 collect (prob-pick '((0 0.97) (1 0.03)))))) (2d-field-to-chord matrix)) (progn (setf matrix (loop repeat 32 collect (loop repeat 32 collect (prob-pick '((0 0.99) (1 0.01)))))) (2d-field-to-chord matrix :merge-chords t))
  11. yes, but it's - in my opinion - not very clear like that. difference: what you see and... what you get... i always write it like this: '((-e e a3f4d5 q f4d5a5) (q a3e4c5 q e4c5a5) (-e e a3g4e5 h g4e5a5))) it makes more practical sense to me ... but my functions works for BOTH
  12. violà... here's a solution... but: you have a wrong OMN-structure in your code (-e a3f4d5 q ... => a rest followed by a pitch, i corrected it (setf omnlist '((-e q f4d5a5) (q a3e4c5 q e4c5a5) (-e h g4e5a5))) (defun countbeats (omnlist &key (denom '1/8)) (loop for i in omnlist collect (/ (sum (abs! (flatten (omn :length i)))) denom))) (countbeats omnlist) => (3 4 5) (countbeats omnlist :denom 1/16) => (6 8 10)
  13. your code would be very interesting
  14. here is a pure LISP/CCL solution (loop for i from 1 to 100 collect (list (1+ (random 2)) i)) => ((1 1) (2 2) (2 3) (2 4) (1 5) (1 6) (1 7) (2 8) (1 9) (1 10) (1 11) (1 12) (2 13) (2 14) (1 15) (2 16) (2 17) (2 18) (2 19) (2 20) (1 21) (2 22) (2 23) (1 24) (2 25) (2 26) (1 27) (2 28) (2 29) (2 30) (2 31) (2 32) (2 33) (1 34) (2 35) (2 36) (1 37) (1 38) (2 39) (1 40) (1 41) (1 42) (1 43) (2 44) (2 45) (2 46) (2 47) (1 48) (2 49) (1 50) (2 51) (1 52) (2 53) (1 54) (1 55) (1 56) (2 57) (2 58) (1 59) (2 60) (1 61) (1 62) (1 63) (2 64) (1 65) (1 66) (2 67) (1 68) (1 69) (2 70) (2 71) (2 72) (1 73) (1 74) (2 75) (1 76) (1 77) (2 78) (2 79) (1 80) (2 81) (2 82) (1 83) (2 84) (2 85) (1 86) (1 87) (2 88) (2 89) (1 90) (2 91) (1 92) (1 93) (1 94) (2 95) (2 96) (2 97) (1 98) (1 99) (2 100)) as a function (defun pairs (n) (loop for i from 1 to n collect (list (1+ (random 2)) i))) (pairs 200)
  15. if you are interested, i could show you some SOFTWARE to calculate really special tempo curves, in a very handy way. just write me a PM....
  16. step by step => every code-line for itself cmd-E! i have also some LATENCY with conTimbre-player... but that's LISP in realtime the score player wasn't even intended to play things in parallel (i made a HACK from a HACK :-)). for precise POLYTEMPO things it is best to work via OSC and an external PLAYER (that's how I do it). I only need it in OPMO for sketching
  17. i am very thankful for the HACK. lisp is not a language for real-time things, but for me it suits the approximate simulation perfectly!! thanx janusz!! but: you can try out how it is not to evaluate everything at once, step by step, maybe then there will be less LATENCY?
  18. unfortunately i have no experience with DAW + polytempo... i always needed it for live-instrumental music
  19. thanx, stephane! you are my OPMO-function-MASTER!
  20. you will have the same DURATION when the pitch-loop and tempo-loop (tempo-progression = TIME) have the same length. so you have to stop the pitch-seq at the end of your BAR/tempo-seq!!! process should equal !? (gen-integer 110 60) (gen-integer 61 111)
  21. great function, stephane!! little extension/different mapping ;;; a slightly extended version of stephane's FUNCTION ;;; with integer-output so you could map it on pitchfields/chords (defun pitch-trajectory* (nbpitch range tendency &key (variance 0.5) (type :around) (quantize 1/2) (smooth 1) filter-repeat seed (output 'int) (int-range '(0 24)) ) (setf seed (rnd-seed seed)) (do-verbose ("pitch-trajectory :seed ~s" seed) (let* ((values (gen-tendency nbpitch tendency :variance variance :type type :seed (seed))) (smoothedval (vector-smooth smooth values)) (out (cond ((equal output 'pitch) (vector-to-pitch range smoothedval :quantize quantize)) ((equal output 'int) (vector-round (car int-range) (cadr int-range) smoothedval))))) (if filter-repeat (filter-repeat filter-repeat out) out)))) ;;; pitch-ouput like in stephane's version (pitch-list-plot (pitch-trajectory* 128 '(fs3 g5) '(0.1 1 0.1) :filter-repeat 1 :variance 0.8 :output 'pitch )) ;;; integer-output for MAPPING (list-plot (pitch-trajectory* 128 '(fs3 g5) '(0.1 1 0.1) :filter-repeat 1 :variance 0.8 :output 'int :int-range '(0 23) )) ;;; MAPPING the integers on a scale or pitchfield (loop for i in (pitch-trajectory* 128 '(fs3 g5) '(0.1 1 0.1) :filter-repeat 1 :variance 0.8 :output 'int :int-range '(0 23)) with scale = (make-scale 'c2 24 :alt '(1 2)) collect (nth i scale)) (loop for i in (pitch-trajectory* 128 '(fs3 g5) '(0.1 3 0.1) :filter-repeat 1 :variance 0.9 :output 'int :int-range '(0 23)) with scale = (make-scale 'c2 24 :alt '(2 1 6 5 4)) collect (nth i scale)) ;;; an example with MAPPING and SAMPLING (progn (setf seq (loop for i in (pitch-trajectory* 64 '(fs3 g5) '(0.1 3 0.1) :filter-repeat 1 :variance 0.4 :output 'int :int-range '(0 23)) with scale = (make-scale 'c2 24 :alt '(2 1 6 5 4)) collect (nth i scale))) (make-omn :pitch (loop repeat 20 collect (rnd-sample-seq (rnd-pick '(11 17 29)) seq)) :length (pick-norepeat 20 '(t t. s -t. -t)) :span :pitch))
  22. great, that it works fine now! greetings andré
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy