terekita Posted January 24, 2019 Posted January 24, 2019 Hello, For various reasons, I need to start with rhythms defined in one time signature and remap them. I'm having trouble doing this because of what happens to ties when you use omn :length (though I realize they are being collected under :articulation). In this case, I'm taking bars of 4/4 regrouping into bars of 2/4. (setf myr '( (s s -s s -e s s -s s -e t t t t s s) (e e_q -h))) (setf tr (omn-to-time-signature myr '(2 4))) Now I take the result of the above and assign it to a new variable ( this would be the same as (setf foo tr) ): (setf foo '((s c4 c4 - c4 -e s c4 c4) (-s c4 -e t c4 c4 c4 c4 s s) (e c4 c4 tie q) (-h))) As you can see, there is a tie in the third bar. Now, how can I extract that rhythm so that I can apply to another set of pitches? If I do the following, I no longer have the tie represented in the rhythm: (omn :length foo) ;; results in ;; ((1/16 1/16 -1/16 1/16 -1/8 1/16 1/16) (-1/16 1/16 -1/8 1/32 1/32 1/32 1/32 1/16 1/16) (1/8 1/8 1/4) (-1/2)) ;; i.e., no tie in the third bar Also, if I try to span the rhythm onto another set of pitches, I again get a result that is missing the tie: (setf my-pitches '(c4 d4 e4)) (make-omn :length foo :pitch my-pitches) What I'd really love is to get back a list of lengths that is like my original list, just regrouped in new time signatures. So, ideally something like: (setf myr '( (s s -s s -e s s -s s -e t t t t s s) (e e_q -h))) ;; imaginary function (regroup-to-two-four myr) ;;would result in the following: ;; ((s s -s s -e s s)(-s s -e t t t t s s)(e e_q)(-h)) Finally, I should add that in a related problem, I need to extract the number of attacks in a bar after it has been regrouped. So, for this reason again, I need to figure out how to extract the rhythm while preserving ties and not re-attacking tied notes. I'd very appreciate and thank you kindly for any assistance in doing this. Thanks very much, Michael Quote
terekita Posted January 24, 2019 Author Posted January 24, 2019 Ah, looks like omn-merge-ties is my friend here... 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.