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