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