Node:Different editions from one source, Next:, Previous:Hiding staves, Up:Orchestral music



Different editions from one source

The \tag command marks music expressions with a name. These tagged expressions can be filtered out later. With this mechanism it is possible to make different versions of the same music source.

In the following example, we see two versions of a piece of music, one for the full score, and one with cue notes for the instrumental part:

         c1
         \relative c' <<
             \tag #'part <<
               R1 \\
               {
                   \property Voice.fontSize = #-1
                   c4_"cue" f2 g4 }
             >>
             \tag #'score R1
          >>
          c1
     

The same can be applied to articulations, texts, etc.: they are made by prepending

             -\tag #your-tag
     
to an articulation, for example,
         c1-\tag #'part ^4
     

This defines a note with a conditional fingering indication.

By applying the remove-tag function, tagged expressions can be filtered. For example,

     \simultaneous {
             the music
             \apply #(remove-tag 'score) the music
             \apply #(remove-tag 'part) the music
     }
     
would yield

[picture of music]

The argument of the \tag command should be a symbol, or a list of symbols, for example,

       \tag #'(original-part transposed-part) ...
     

See also

input/regression/tag-filter.ly

This page is for LilyPond-2.0.0 (stable-branch).

Report errors to <bug-lilypond@gnu.org>.