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