Jump to content

All Activity

This stream auto-updates

  1. Earlier
  2. Another possible way: (setf chords '(c4e4g4 e4g4c5)) (setf durations '(q e q e s)) (setf repetitions '(7 1 6 2 5 3 4 4)) (setf out (gen-repeat repetitions (make-omn :pitch (mclist chords) :length (gen-trim (length repetitions) (mclist durations)) ))) S.
  3. This seems to work - let me know if there's a more elegant way to do this (defun pattern-maker (chords durations repetitions) (let ((longest (cond ((> (length chords) (and (length durations) (length repetitions))) chords) ((> (length durations) (and (length chords) (length repetitions))) durations) ((> (length repetitions) (and (length chords) (length durations))) repetitions)) )) (loop :for i in (span longest chords) :for j in (span longest durations) :for k in (span longest repetitions) :collect (make-omn :length (gen-repeat k j) :pitch (gen-repeat k i)))))
  4. Yes - that last condition is exactly what I was looking for! My lisp chops are not that great.... How would you incorporate this condition into the main function 'pattern-maker'? Many thanks!
  5. (setf num '(4 3 2 2 3 4 5)) (setf pitch '(a4 b4 c4 d4 e4)) (if (< (length num) (length pitch)) pitch num) =>(4 3 2 2 3 4 5) ;;;;;; (setf num '(4 3 2)) (setf pitch '(a4 b4 c4 d4 e4)) (if (< (length num) (length pitch)) pitch num) =>(a4 b4 c4 d4 e4) hth Edit: I think you need cond to compare the length of three lists with each other: (setf durations '(q e q e s)) (setf chords '(c4e4g4 e4g4c5)) (setf repetitions '(7 1 6 2 5 3 4 4)) (cond ((> (length chords) (and (length durations) (length repetitions))) chords) ((> (length durations) (and (length chords) (length repetitions))) durations) ((> (length repetitions) (and (length chords) (length durations))) repetitions))
  6. Ok - So as a simple example - (setf chords '(c4e4g4 e4g4c5)) (setf durations '(q e q e s)) (setf repetitions '(7 1 6 2 5 3 4 4)) (length (span chords repetitions)) (defun pattern-maker (chords durations repetitions) (loop :for i in chords :for j in durations :for k in repetitions :collect (make-omn :length (gen-repeat k j) :pitch (gen-repeat k i)))) Would give the following I got this by running: (pattern-maker (span repetitions chords) (span repetitions durations) repetitions) Which is fine - but if "repetitions" was shorter than "chords" I would need to span everything to chords. So I guess I need a condition and define a variable that chooses the largest list of the three and span onto that list. I don't know how to do that Many thanks!
  7. Imagery function with the output (what you are looking for) otherwise not possible to help.
  8. Great! Thank you!! So can you help me with this function? I basically want all three elements to be spanned into the longest of the three. How would you suggest I do this? (defun pattern-maker (chords durations repetitions) (loop :for i in chords :for j in durations :for k in repetitions :collect (make-omn :length (gen-repeat k j) :pitch (gen-repeat k i)))) Thanks!
  9. span is your friend (setf num '(4 3 2)) (setf pitch '(a4 b4 c4 d4 e4)) (span pitch num) ==>(4 3 2 4 3)
  10. Is there a simple way to repeat a list until it is the length of another list? Basically do the same thing that make-omn does but for other parameters. For example if I have a list of numbers '(4 3 2) and pitches '(a4 b4 c4 d4 e4), I would like to repeat the numbers until there are exactly the same number of elements in each list. Thanks!
  11. The port to LW is progressing very good.
  12. Hi Julio, the distribution is not made according to beats but just in order based on delta-time. But I agree I would like to have more control on distribution like the possibility to distribute list of pitch structure on vertical events (events with the same delta time) to be able to get a better control on the resultant harmonies. Best Stéphane
  13. Dear Friends, This is the example in the docs for the distribute-stream function. (setf sym '(c4 cs4 d4 eb4 e4 f4 fs4 g4 gs4 a4 bb4 c5 cs5 d5 eb5 e5)) (setf v1 '(1/8 1/8 -1/8 2/8 -1/8 5/8)) (setf v2 '(1/8 1/8 1/8 -1/8 2/8 1/8)) (setf va '(-2/8 1/8 1/8 -5/8 1/8)) (setf vc '(-1/8 3/8 3/8 1/8 1/8)) (setf inst (distribute-stream sym (list v1 v2 va vc))) (setf in1 (make-omn :length v1 :pitch (1~ inst))) (setf in2 (make-omn :length v2 :pitch (2~ inst))) (setf in3 (make-omn :length va :pitch (3~ inst))) (setf in4 (make-omn :length vc :pitch (4~ inst))) (list in1 in2 in3 in4) The result shows that the chromatic pitch sequence is distributed in the voices almost like in every beat, like a 1/4 span. An interesting feature would be the option to specify a series of different length time spans to spread the notes, making the spreading of chords, voicings or serial structures (like hexachords) more controllable. Is it possible , with a keyword ? Another possibility (maybe even better) is to spread the notes according to length sublists of each voice, Best, Julio
  14. i think you should code it yourself, then you'll get what you want greetings andré
  15. Oh yes thats fine now and works really great! But whether I have different rhythms I don't quite get the same effect. I'd like to get somehow polyrhytmical effect. So Id just enter (1/8 1/12) and get sth like this: But notes apreggiates: Or from '(1/16 1/16 1/12 1/16 1/12 1/16: Arpeggio: Best, Vili
  16. 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)))))
  17. 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
  18. 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)
  19. That's now really working good!! Many thanks.. I just now I have problems with different rhys. I can't get more than 2 voices from that: (gen-arpeggio* event :rhy '(1/8) :offset nil) Sorry again.
  20. 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)
  21. I am really sorry to bother you again, I am just wondering If is in any way possible that I would get more this effect: From (gen-arpeggio event :rhy '(1/8 1/12)) I am receiving: I hope I don't take you too much time, you helped me already a lot!
  22. You are just awesome, thank you so so so much!!! You helped me so much.
  23. 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)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  24. Dear André, the function works perfectly. could you maybe try to help me how to do this? Best, Vili
  1. Load more activity
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy