]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/positioning-multi-measure-rests.ly
Run makelsr
[lilypond.git] / Documentation / snippets / positioning-multi-measure-rests.ly
1 % DO NOT EDIT this file manually; it is automatically
2 % generated from Documentation/snippets/new
3 % Make any changes in Documentation/snippets/new/
4 % and then run scripts/auxiliar/makelsr.py
5 %
6 % This file is in the public domain.
7 %% Note: this file works from version 2.19.20
8
9 \version "2.19.20"
10
11 \header {
12   lsrtags = "rhythms, tweaks-and-overrides"
13
14   texidoc = "
15 Unlike ordinary rests, there is no predefined command to change the
16 staff position of a multi-measure rest symbol of either form by
17 attaching it to a note.  However, in polyphonic music multi-measure
18 rests in odd-numbered and even-numbered voices are vertically
19 separated. The positioning of multi-measure rests can be controlled as
20 follows:
21
22 "
23   doctitle = "Positioning multi-measure rests"
24 } % begin verbatim
25
26
27 \relative c'' {
28   % Multi-measure rests by default are set under the fourth line
29   R1
30   % They can be moved using an override
31   \override MultiMeasureRest.staff-position = #-2
32   R1
33   \override MultiMeasureRest.staff-position = #0
34   R1
35   \override MultiMeasureRest.staff-position = #2
36   R1
37   \override MultiMeasureRest.staff-position = #3
38   R1
39   \override MultiMeasureRest.staff-position = #6
40   R1
41   \revert MultiMeasureRest.staff-position
42   \break
43
44   % In two Voices, odd-numbered voices are under the top line
45   << { R1 } \\ { a1 } >>
46   % Even-numbered voices are under the bottom line
47   << { a1 } \\ { R1 } >>
48   % Multi-measure rests in both voices remain separate
49   << { R1 } \\ { R1 } >>
50
51   % Separating multi-measure rests in more than two voices
52   % requires an override
53   << { R1 } \\ { R1 } \\
54      \once \override MultiMeasureRest.staff-position = #0
55      { R1 }
56   >>
57
58   % Using compressed bars in multiple voices requires another override
59   % in all voices to avoid multiple instances being printed
60   \compressMMRests
61   <<
62    \revert MultiMeasureRest.direction
63     { R1*3 }
64     \\
65    \revert MultiMeasureRest.direction
66     { R1*3 }
67   >>
68 }