]> git.donarmstrong.com Git - lilypond.git/blob - input/new/positioning-multi--measure-rests.ly
Merge master into nested-bookparts
[lilypond.git] / input / new / positioning-multi--measure-rests.ly
1 \version "2.11.61"
2 \header {
3   lsrtags = "rhythms,tweaks-and-overrides"
4   texidoc = "
5 Unlike ordinary rests, there is no predefined command
6 to change the staff position of a multi-measure
7 rest symbol of either form by attaching it to a note.  However,
8 in polyphonic music multi-measure rests in odd-numbered and
9 even-numbered voices are vertically separated.  The positioning
10 of multi-measure rests can be controlled as follows:
11  "
12   doctitle = "Positioning multi-measure rests"
13 }
14
15 \relative c'' {
16   % Multi-measure rests by default are set under the second line
17   R1
18   % They can be moved with an override
19   \override MultiMeasureRest #'staff-position = #-2
20   R1
21   % A value of 0 is the default position;
22   % the following trick moves the rest to the center line
23   \override MultiMeasureRest #'staff-position = #-0.01
24   R1
25   % Multi-measure rests in odd-numbered voices are under the top line
26   << { R1 } \\ { a1 } >>
27   % Multi-measure rests in even-numbered voices are under the bottom line
28   << { c1 } \\ { R1 } >>
29   % They remain separated even in empty measures
30   << { R1 } \\ { R1 } >>
31   % This brings them together even though there are two voices
32   \compressFullBarRests
33   <<
34     \revert MultiMeasureRest #'staff-position
35     { R1*3 }
36     \\
37     \revert MultiMeasureRest #'staff-position
38     { R1*3 }
39   >>
40 }