[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Vertical position of rests on a custom staff
From: |
Paul Morris |
Subject: |
Re: Vertical position of rests on a custom staff |
Date: |
Mon, 3 Jun 2013 02:32:05 -0400 |
Hi Pierre, I tried your suggestion:
> restmusic = \relative f {
> \override Rest #'Y-offset = #0
> \cadenzaOn
> ...
> }
But it put the whole and half rests on a ledger line in the middle of the
custom staff, which was not really what I wanted.
I tried to figure out a way to globally override the rest positioning for
different voices on the same staff -- something like this:
http://www.lilypond.org/doc/v2.16/Documentation/notation/changing-context-default-settings#changing-all-contexts-of-the-same-type
But it doesn't look like it's possible to specify, at the level of a custom
staff context, that "the rests in the 1st voice on this type of staff get
positioned here, and those in the 2nd voice get positioned there," etc.
So I revised my function so it would let you manually turn off/on the custom
rest positions when you have more than one voice on a staff (see attached
files).
After getting that working I checked to see if anything changed between v. 2.16
to 2.17.19 And I'm really glad to say that in 2.17.19 the positioning of the
rests was almost exactly what I wanted by default! The only ones that needed
re-positioning were the rarer ones that were longer than a whole rest. Also
the dots on about half of the rests also still needed re-positioning.
If I'd known this before I probably wouldn't have gone to the trouble of
writing my function. It seems like overkill now. (A good reason to start
using or at least testing with the dev version sooner in the future.) At any
rate, big thanks to all those working on improving LilyPond with each new
version.
I revised my function for use with 2.17.19 -- see attached. While it would be
nice if you didn't have to manually turn the overrides on and off when there
are more than one voice on a staff, at least now this is only needed for rests
that are longer than a whole rest, which do not occur that often.
-Paul Morris
shiftRests2.pdf
Description: Adobe PDF document
shiftRests2.ly
Description: Binary data
- Re: Vertical position of rests on a custom staff,
Paul Morris <=