]> git.donarmstrong.com Git - lilypond.git/blob
638bbd7ba04e2b4030fb18add588e67f289b3454
[lilypond.git] /
1 %%  Do not edit this file; it is auto-generated from LSR!
2 \version "2.11.23"
3
4 \header { texidoc = "
5 In an orchestral score, you may find it useful to hide multi-bar rests
6 using @code{\RemoveEmptyStaffContext} to produce a \"Frenched\" score,
7 but this can prove problematic when you want to make such bars visible.
8
9
10 For example, imagine you are using a @code{PianoStaff} for a harp part.
11 When there is music in one stave, you will want both staves to be
12 visible. Of course, adding hidden notes to the invisible staff will
13 make the stave visible, but this is a rather ugly kludge.
14
15
16 A more elegant solution is to use the property
17 @code{keepAliveInterfaces}. This determines which items of musical
18 output are interesting enough to keep a bar visible when
19 @code{remove-empty} is set. By default, it looks like this:
20
21
22 @code{keepAliveInterfaces = #'(
23     rhythmic-grob-interface
24     lyric-interface
25     stanza-number-interface
26     percent-repeat-interface)}
27
28
29 If you insert @code{multi-measure-rest-interface} into this list,
30 multi-bar rests count as interesting items. You can then create macros
31 to switch this behaviour on and off as required:
32
33
34 @code{showMultiRests = @{ \set Staff.keepAliveInterfaces = #'(
35     rhythmic-grob-interface
36     multi-measure-rest-interface
37     lyric-interface
38     stanza-number-interface
39     percent-repeat-interface) @}}
40
41
42 @code{hideMultiRests = \unset Staff.keepAliveInterfaces}
43
44
45 For this to work successfully, you must place these macros carefully,
46 otherwise they tend to interfere with the visibility of other hidden
47 staves. 
48 " }
49
50 showMultiRests = { \set Staff.keepAliveInterfaces = #'(
51     rhythmic-grob-interface
52     multi-measure-rest-interface
53     lyric-interface
54     stanza-number-interface
55     percent-repeat-interface)
56 }
57 hideMultiRests = \unset Staff.keepAliveInterfaces
58 one = { \repeat unfold 4 { a1 b c' d' \break }
59     R1 \showMultiRests R R \hideMultiRests R \break %Macro positioning is critical - overrides are inside each system,
60     R1*4 \break                                     %i.e. after first rest and before last
61     R
62 }
63 two = { \override MultiMeasureRest #'color = #red
64     R1*4
65     R1 \showMultiRests R R \hideMultiRests R
66     R1*4
67     R
68     R1 \showMultiRests R R R
69     R R R \hideMultiRests R
70     R1*4
71 }
72 three = { \override MultiMeasureRest #'color = #blue
73     R1*4
74     R
75     R1 \showMultiRests R R \hideMultiRests R
76     R1*4
77     R1 \showMultiRests R R \hideMultiRests R
78     R1*4
79     R1 \showMultiRests R R R
80 }
81 \score {
82     \new StaffGroup <<
83     \context Staff = one \one
84     \context Staff = two \two
85     \context Staff = three \three
86     >>
87     \layout {
88         \context { \RemoveEmptyStaffContext }
89     }
90 }