lilypond-user
[Top][All Lists]
Advanced

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

Re: Creating arbitrary/isolated RepeatSlash objects


From: Jean Abou Samra
Subject: Re: Creating arbitrary/isolated RepeatSlash objects
Date: Sun, 21 Aug 2022 19:51:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0



Le 21/08/2022 à 03:15, Galen Hazelwood a écrit :
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?



In the lower staff, instead of

  s1 s1 s1

use

  \repeat percent 6 { \repeat unfold 16 { s32 } }

You have to use \repeat unfold 16 { s32 } instead of s2 because
the durations inside \repeat percent determine how many slashes
are printed.

Cheers,
Jean




reply via email to

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