JulioHerrlein Posted June 17, 2021 Posted June 17, 2021 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 Quote
Stephane Boussuge Posted June 18, 2021 Posted June 18, 2021 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 Quote
JulioHerrlein Posted June 18, 2021 Author Posted June 18, 2021 Thanks a lot, Stephane ! This is interesting for getting lists ordered ! Best ! Julio Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.