bell notificationshomepageloginNewPostedit profiledmBox

Hoots : How can I create a rest the same length as a block of music? I'm typesetting music (a set of versicles and responses), some of which are accompanied and some of which aren't, and I'm using some custom Scheme functions to - freshhoot.com

10% popularity   0 Reactions

How can I create a rest the same length as a block of music?
I'm typesetting music (a set of versicles and responses), some of which are accompanied and some of which aren't, and I'm using some custom Scheme functions to collect pieces in parallel (and automatically insert common elements).

For the unaccompanied versicles, I wanted to write a Scheme function that would generate a rest of the same length as the block of vocal music (to keep everything aligned in the accompaniment later on), but I can't figure out how to do that. I'm trying make-music 'RestEvent, but nothing I've tried will work for the duration parameter:

a block of music doesn't have a duration property to get
the example in the documentation (just passing a note directly to the constructor) doesn't work for a block (this is probably the same thing as above)
ly:music-length returns a moment, and I can't find any way to convert a moment to a duration

Is there any manageable way to create a rest that is the same length as a generic ly:music? object?


Load Full (1)

Login to follow hoots

1 Comments

Sorted by latest first Latest Oldest Best

10% popularity   0 Reactions

Try Scheme functions mmrest-of-length or more likely skip-of-length which take music as argument and return a music expression that is a multimeasure rest or a plain skip, respectively.

You can write something like $(skip-of-length myMusic) inside of a music expression, assuming that myMusic is a music variable with the desired length.


Back to top Use Dark theme