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