lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating arbitrary/isolated RepeatSlash objects


From: Galen Hazelwood
Subject: Creating arbitrary/isolated RepeatSlash objects
Date: Sat, 20 Aug 2022 18:15:23 -0700

Hello all.

I have another question, this time about percent repeats. I'm repeating a long, complex keyboard figure which extends across both staves, and using a combination of MagnifyMusic reduction and percent repeats to keep things manageable. The only thing is that the repeat slashes only appear on one staff; I'd like to mirror them in the other, just so things look symmetric.

There's a function in the documentation for generating arbitrary percent figures in the score...
makePercent =
#(define-music-function (note) (ly:music?)
   "Make a percent repeat the same length as NOTE."
   (make-music 'PercentEvent
               'length (ly:music-length note)))
...so I assumed I could just substitute a RepeatSlashEvent for the Percent Event. Turns out I can't; it compiles fine, but throws an error when I try to use it. 

ERROR: Wrong type (expecting exact integer): ()

I could just shove the repeat slashes into the middle between the staves, but I'd rather have them mirrored if I could. Is there some way to make a function like this that works, or is there a completely different path that makes more sense?

Thanks,
--Galen

Attachment: example-repeat.ly
Description: Binary data

Attachment: example-repeat.pdf
Description: Adobe PDF document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]