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