Posted June 17, 20214 yr Dear Friends, I think a good companion to the gen-divide option to count rests would be a function that counts the positive rhythm items (the positive value attacks, excluding the pauses). It would be great to calculate the size and to align rhythms and its groupings for later span processing of lists related to pitches (or any other use you might think). Is there already a function like this: GET-COUNT-ATTACKS (get-count-attacks '((1/8 7/8) (1/8 7/8) (1/4 1/12 1/12 1/12 3/16 5/16) (-3/8 1/8 1/4 -1/8 1/8))) would return: (2)(2)(7)(3) or maybe (2 2 7 3) in flatten version Best, Julio I think (get-count omnseq :length :note) do the job... Best
June 18, 20214 yr You can do it like that: (setf len '((1/8 7/8) (1/8 7/8) (1/4 1/12 1/12 1/12 3/16 5/16) (-3/8 1/8 1/4 -1/8 1/8))) (setf count (mapcar (lambda(x) (count-item 1 x)) (length-to-binary len))) But you are right, we could simply do it with GET-COUNT: (get-count len :length :note ) Best ! Stéphane
June 18, 20214 yr Author Thanks a lot, Stephane ! This is interesting for getting lists ordered ! Best ! Julio
Create an account or sign in to comment