August 24, 2025Aug 24 Hi all,I created the following material (preview with cmd-2) and would like to extend the longest voice to fit a complete measure (e.g. 4/4) by adding rests and adjust all the other to the same length by adding rests as well.Any ideas how to achieve this?(setf beethoven-ode '(q e4 e4 f4 g4 g4 f4 e4 d4 c4 c4 d4 e4 q. e4 e d4 h d4)) (setf trans (loop for j in (gen-transition 0 0.1 8 1) collect (quantum ode-mat :fraction j :quantize '(1 2 4 5))))Thanks for your help.Achim
August 24, 2025Aug 24 Function length-adjust maybe ? Or fit-to-span.When I want to align some material I like to use also length-span.
August 24, 2025Aug 24 Author fit-to-span is working.(setf beethoven-ode '(q e4 e4 f4 g4 g4 f4 e4 d4 c4 c4 d4 e4 q. e4 e d4 h d4)) (setf trans (loop for j in (gen-transition 0 0.1 8 1) collect (quantum ode-mat :fraction j :seed 123))) (setf trans-fit (loop with span-val = (max-of-seq (get-span trans)) for i in trans collect (quantize (fit-to-span span-val i) '(1 2 3 4 5)))) ;; (get-span trans-fit) => (5 5 5 5 5 5 5 5)Unfortunately get-max-span works only on lists as arguments.Therefore I have to use (max-of-seq (get-span trans))... and it needs to be quantized at the end ...Thanks for the hint.
August 25, 2025Aug 25 14 hours ago, born said:Unfortunately get-max-span works only on lists as arguments. Forntunaly works this way :-)you are looking for:(find-max (get-span trans-fit))
Create an account or sign in to comment