]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/advanced-notation.itely
Whoops, I got a bit carried away. Split Repeats, Simultaneous, Staff, and
[lilypond.git] / Documentation / user / advanced-notation.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @c This file is part of lilypond.tely
3 @ignore
4     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5
6     When revising a translation, copy the HEAD committish of the
7     version that you are working on.  See TRANSLATION for details.
8 @end ignore
9
10 @c A menu is needed before every deeper *section nesting of @node's; run
11 @c     M-x texinfo-all-menus-update
12 @c to automatically fill in these menus before saving changes
13
14
15 @node Advanced notation
16 @chapter Advanced notation
17
18 This chapter deals with rarely-used and advanced notation.
19
20 @menu
21 * Preparing parts::             
22 @end menu
23
24
25
26 @node Preparing parts
27 @section Preparing parts
28
29 This section describes various notation that are useful for preparing
30 individual parts.
31
32 @menu
33 * Multi measure rests::         
34 * Metronome marks::             
35 * Rehearsal marks::             
36 * Bar numbers::                 
37 * Instrument names::            
38 * Instrument transpositions::   
39 * Ottava brackets::             
40 * Different editions from one source::  
41 @end menu
42
43
44 @anchor{Different editions from one source}
45 @unnumberedsubsubsec Different editions from one source
46
47 @funindex \tag
48 @cindex tag
49
50 The @code{\tag} command marks music expressions with a name.  These
51 tagged expressions can be filtered out later.  With this mechanism it
52 is possible to make different versions of the same music source.
53
54 In the following example, we see two versions of a piece of music, one
55 for the full score, and one with cue notes for the instrumental part
56
57 @example
58 c1
59 <<
60   \tag #'part <<
61     R1 \\
62     @{
63       \set fontSize = #-1
64       c4_"cue" f2 g4 @}
65   >>
66   \tag #'score R1
67 >>
68 c1
69 @end example
70
71 The same can be applied to articulations, texts, etc.: they are
72 made by prepending
73 @example
74 -\tag #@var{your-tag}
75 @end example
76 to an articulation, for example,
77 @example
78 c1-\tag #'part ^4
79 @end example
80
81 This defines a note with a conditional fingering indication.
82
83 @cindex keepWithTag
84 @cindex removeWithTag
85 By applying the @code{\keepWithTag} and @code{\removeWithTag}
86 commands, tagged expressions can be filtered.  For example,
87 @example
88 <<
89   @var{the music}
90   \keepWithTag #'score @var{the music}
91   \keepWithTag #'part @var{the music}
92 >>
93 @end example
94 would yield
95
96 @lilypondfile[ragged-right,quote]{tag-filter.ly}
97
98 The arguments of the @code{\tag} command should be a symbol
99 (such as @code{#'score} or @code{#'part}), followed by a
100 music expression.  It is possible to put multiple tags on
101 a piece of music with multiple @code{\tag} entries,
102
103 @example
104   \tag #'original-part \tag #'transposed-part @dots{}
105 @end example
106
107
108 @seealso
109
110 Examples: @lsr{parts,tag@/-filter@/.ly}
111
112
113 @refbugs
114
115 Multiple rests are not merged if you create the score with both tagged
116 sections.
117