Jump to content

Featured Replies

Posted

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

 

image.png.05b69cc6fece4c7b9ac2e6afc91c314c.png

 

(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

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

  • Author

Thanks a lot, Stephane !

This is interesting for getting lists ordered !

Best !

Julio

Create an account or sign in to comment


Copyright © 2014-2025 Opusmodus™ Ltd. All rights reserved.
Product features, specifications, system requirements and availability are subject to change without notice.
Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd.
All other trademarks contained herein are the property of their respective owners.

Powered by Invision Community

Important Information

Terms of Use Privacy Policy