Paul Morris <p...@paulwmorris.com> writes:

> I am working on adjusting the vertical position of rests on a custom
> staff and have run into a problem.  I basically want the rests to be
> positioned as they are on the standard staff, but in my custom staff
> there is no center line so the rests become oriented to the next line
> above that (except for whole rests which stay the same).  See the
> attached files.
>
> I wrote an override function that moves the rests down to where I want
> them.  Half rests move down further, and I had to adjust the position
> of the dots for dotted rests as well.
>
> So far so good.  The problem I ran into is that when the music
> includes \voiceOne and \voiceTwo, the rests appear in the right place
> by default, and my adjustment then puts them in the wrong place.  You
> can see this on the right hand side of the PDF.
>
> Any thoughts on how to work around this?

Make your function do different things depending on the value of
(ly:grob-property-data 'direction grob)

This will be +1 or -1 for \voiceOne and \voiceTwo (or their
equivalents), and something else (0 or a function) when in \oneVoice
mode.

-- 
David Kastrup


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to