]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/tag-filter.ly
The grand \paper -> \layout, \bookpaper -> \paper renaming.
[lilypond.git] / input / regression / tag-filter.ly
1
2 \version "2.3.22"
3 \header {
4
5 texidoc = "The @code{\\tag} command marks music expressions with a
6 name. These tagged expressions can be filtered out later. This
7 mechanism can be used to make different versions of the same music. In
8 this example, the top stave displays the music expression with all
9 tags included. The bottom two staves are filtered: the part has cue
10 notes and fingerings, but the score has not."
11
12 }
13
14 \layout { raggedright= ##t }
15
16 common =
17  \relative c''  {
18
19     c1
20     \relative c' <<
21         \tag #'part <<
22           R1 \\
23           {
24               \set fontSize = #-1
25               c4_"cue" f2 g4 } 
26         >>
27         \tag #'score R1
28      >>
29     c1-\tag #'part ^4
30 }
31
32
33 \score {
34     \simultaneous { 
35     \new Staff {
36         \set Staff.instrument = #"both"
37         \common
38         }
39     \new Staff {
40         \set Staff.instrument = #"part"
41         \keepWithTag #'part \common
42         }
43     \new Staff {
44         \set Staff.instrument = #"score"
45         \keepWithTag #'score \common
46         }
47     }
48 }
49
50
51
52
53