LEFT | RIGHT |
1 @c -*- coding: utf-8; mode: texinfo; -*- | 1 @c -*- coding: utf-8; mode: texinfo; -*- |
2 @ignore | 2 @ignore |
3 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH | 3 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH |
4 | 4 |
5 When revising a translation, copy the HEAD committish of the | 5 When revising a translation, copy the HEAD committish of the |
6 version that you are working on. For details, see the Contributors' | 6 version that you are working on. For details, see the Contributors' |
7 Guide, node Updating translation committishes.. | 7 Guide, node Updating translation committishes.. |
8 @end ignore | 8 @end ignore |
9 | 9 |
10 @c \version "2.17.6" | 10 @c \version "2.19.21" |
11 | 11 |
12 @node Editorial annotations | 12 @node Editorial annotations |
13 @section Editorial annotations | 13 @section Editorial annotations |
14 | 14 |
15 @lilypondfile[quote]{editorial-headword.ly} | 15 @lilypondfile[quote]{editorial-headword.ly} |
16 | 16 |
17 This section discusses the various ways to change the appearance of | 17 This section discusses the various ways to change the appearance of |
18 notes and add analysis or educational emphasis. | 18 notes and add analysis or educational emphasis. |
19 | 19 |
20 @menu | 20 @menu |
(...skipping 21 matching lines...) Expand all Loading... |
42 @unnumberedsubsubsec Selecting notation font size | 42 @unnumberedsubsubsec Selecting notation font size |
43 | 43 |
44 @cindex font size (notation) scaling | 44 @cindex font size (notation) scaling |
45 @cindex font size (notation) | 45 @cindex font size (notation) |
46 @cindex selecting font size (notation) | 46 @cindex selecting font size (notation) |
47 @cindex notation font size | 47 @cindex notation font size |
48 @cindex note heads | 48 @cindex note heads |
49 | 49 |
50 @funindex fontSize | 50 @funindex fontSize |
51 @funindex font-size | 51 @funindex font-size |
| 52 @funindex magnification->font-size |
52 @funindex magstep | 53 @funindex magstep |
53 @funindex \huge | 54 @funindex magnifyMusic |
54 @funindex \large | 55 @funindex teeny |
| 56 @funindex tiny |
| 57 @funindex small |
| 58 @funindex normalsize |
| 59 @funindex large |
| 60 @funindex huge |
| 61 @funindex \magnifyMusic |
| 62 @funindex \teeny |
| 63 @funindex \tiny |
55 @funindex \normalsize | 64 @funindex \normalsize |
56 @funindex \small | 65 @funindex \small |
57 @funindex \tiny | 66 @funindex \large |
58 @funindex \teeny | 67 @funindex \huge |
59 @funindex huge | 68 |
60 @funindex large | 69 @warning{@* |
61 @funindex normalsize | 70 For font sizes of text, see @ref{Selecting font and font size}.@* |
62 @funindex small | 71 For staff size, see @ref{Setting the staff size}.@* |
63 @funindex tiny | 72 For cue notes, see @ref{Formatting cue notes}.@* |
64 @funindex teeny | 73 For ossia staves, see @ref{Ossia staves}.} |
65 | 74 |
66 The font size of notation elements may be altered. It does not | 75 To change the size of the notation without changing the staff |
67 change the size of variable symbols, such as beams or slurs. | 76 size, specify a magnification factor with the @code{\magnifyMusic} |
68 | 77 command: |
69 @warning{For font sizes of text, see | 78 |
70 @ref{Selecting font and font size}.} | 79 @c Grieg Piano Concerto (mvt.1 cadenza) |
71 | 80 @lilypond[verbatim,quote] |
72 @lilypond[verbatim,quote,relative=2] | 81 \new Staff << |
73 \huge | 82 \new Voice \relative { |
74 c4.-> d8---3 | 83 \voiceOne |
75 \large | 84 <e' e'>4 <f f'>8. <g g'>16 <f f'>8 <e e'>4 r8 |
76 c4.-> d8---3 | 85 } |
77 \normalsize | 86 \new Voice \relative { |
78 c4.-> d8---3 | 87 \voiceTwo |
79 \small | 88 \magnifyMusic 0.63 { |
80 c4.-> d8---3 | 89 \override Score.SpacingSpanner.spacing-increment = #(* 1.2 0.63) |
81 \tiny | 90 r32 c'' a c a c a c r c a c a c a c |
82 c4.-> d8---3 | 91 r c a c a c a c a c a c a c a c |
83 \teeny | 92 } |
84 c4.-> d8---3 | 93 } |
85 @end lilypond | 94 >> |
86 | 95 @end lilypond |
87 Internally, this sets the @code{fontSize} property. This in turn | 96 |
88 causes the @code{font-size} property to be set in all layout | 97 The @code{\override} in the example above is a bug workaround. |
89 objects. The value of @code{font-size} is a number indicating the | 98 See the @qq{Known issues and warnings} at the end of this section. |
90 size relative to the standard size for the current staff height. | 99 |
91 Each step up is an increase of approximately 12% of the font size. | 100 If a normal sized note head is merged with a smaller one, the size |
92 Six steps is exactly a factor of two. The Scheme function | 101 of the smaller note may need to be reset (with |
93 @code{magstep} converts a @code{font-size} number to a scaling | 102 @w{@samp{\once@tie{}\normalsize}}) so that the stems and |
94 factor. The @code{font-size} property can also be set directly, | 103 accidentals align properly: |
95 so that only certain layout objects are affected. | 104 |
96 | 105 @c Chopin Prelude op.28 no.8 |
97 @lilypond[verbatim,quote,relative=2] | 106 @lilypond[verbatim,quote] |
98 \set fontSize = #3 | 107 \new Staff << |
99 c4.-> d8---3 | 108 \key fis \minor |
100 \override NoteHead.font-size = #-4 | 109 \mergeDifferentlyDottedOn |
101 c4.-> d8---3 | 110 \new Voice \relative { |
102 \override Script.font-size = #2 | 111 \voiceOne |
103 c4.-> d8---3 | 112 \magnifyMusic 0.63 { |
104 \override Stem.font-size = #-5 | 113 \override Score.SpacingSpanner.spacing-increment = #(* 1.2 0.63) |
105 c4.-> d8---3 | 114 \once \normalsize cis'32( cis' gis b a fis \once \normalsize d d' |
106 @end lilypond | 115 \once \normalsize cis, cis' gis b a gis \once \normalsize fis fis' |
| 116 \once \normalsize fis, fis' ais, cis b gis \once \normalsize eis eis' |
| 117 \once \normalsize a, a' bis, d cis b \once \normalsize gis gis') |
| 118 } |
| 119 } |
| 120 \new Voice \relative { |
| 121 \voiceTwo |
| 122 cis'8. d16 cis8. fis16 fis8. eis16 a8. gis16 |
| 123 } |
| 124 >> |
| 125 @end lilypond |
| 126 |
| 127 The @code{\magnifyMusic} command is not intended for cue notes, |
| 128 grace notes, or ossia staves---there are more appropriate methods |
| 129 of entering each of those constructs. Instead, it is useful when |
| 130 the notation size changes in a single instrumental part on one |
| 131 staff, and where grace notes are not appropriate, such as in |
| 132 cadenza-like passages or in cases such as the above examples. |
| 133 Setting the @code{\magnifyMusic} value to 0.63 duplicates the |
| 134 dimensions of the @code{CueVoice} context. |
| 135 |
| 136 @warning{The @code{@bs{}magnifyMusic} command should @i{not} be |
| 137 used when also resizing the staff. See @ref{Setting the staff |
| 138 size}.} |
| 139 |
| 140 |
| 141 @subsubsubheading Resizing individual layout objects |
| 142 |
| 143 An individual layout object can be resized by using the |
| 144 @code{\tweak} or @code{\override} commands to adjust its |
| 145 @code{font-size} property: |
| 146 |
| 147 @lilypond[quote,verbatim] |
| 148 \relative { |
| 149 % resize a note head |
| 150 <f' \tweak font-size -4 b e>-5 |
| 151 % resize a fingering |
| 152 bes-\tweak font-size 0 -3 |
| 153 % resize an accidental |
| 154 \once \override Accidental.font-size = -4 bes!-^ |
| 155 % resize an articulation |
| 156 \once \override Script.font-size = 4 bes!-^ |
| 157 } |
| 158 @end lilypond |
| 159 |
| 160 The default @code{font-size} value for each layout object is |
| 161 listed in the Internals Reference. The @code{font-size} property |
| 162 can only be set for layout objects that support the |
| 163 @code{font-interface} layout interface. If @code{font-size} is |
| 164 not specified in the object's @q{Standard@tie{}settings} list, its |
| 165 value is 0. See @rinternals{All layout objects}. |
| 166 |
| 167 |
| 168 @subsubsubheading Understanding the @code{fontSize} property |
| 169 |
| 170 The @code{fontSize} context property adjusts the relative size of |
| 171 all glyph-based notational elements in a context: |
| 172 |
| 173 @lilypond[verbatim,quote] |
| 174 \relative { |
| 175 \time 3/4 |
| 176 d''4---5 c8( b a g) | |
| 177 \set fontSize = -6 |
| 178 e'4-- c!8-4( b a g) | |
| 179 \set fontSize = 0 |
| 180 fis4---3 e8( d) fis4 | |
| 181 g2. |
| 182 } |
| 183 @end lilypond |
| 184 |
| 185 The @code{fontSize} value is a number indicating the size relative |
| 186 to the standard size for the current staff height. The default |
| 187 @code{fontSize} is 0; adding 6 to any @code{fontSize} value |
| 188 doubles the printed size of the glyphs, and subtracting 6 halves |
| 189 the size. Each step increases the size by approximately 12%. |
| 190 |
| 191 The scheme function @code{magnification->font-size} is provided |
| 192 for convenience since the logarithmic units of the |
| 193 @code{font-size} property are not entirely intuitive. For |
| 194 example, to adjust the musical notation to 75% of the default |
| 195 size, use: |
| 196 |
| 197 @example |
| 198 \set fontSize = #(magnification->font-size 0.75) |
| 199 @end example |
| 200 |
| 201 The scheme function @code{magstep} does the opposite: it converts |
| 202 a @code{font-size} value into a magnification factor. |
| 203 |
| 204 The @code{fontSize} property will only affect notational elements |
| 205 that are drawn with glyphs, such as noteheads, accidentals, |
| 206 scripts, etc. It will not affect the size of the staff itself, |
| 207 nor will it scale stems, beams, or horizontal spacing. To scale |
| 208 stems, beams, and horizontal spacing along with the notation size |
| 209 (without changing the staff size), use the @code{\magnifyMusic} |
| 210 command discussed above. To scale everything, including the staff |
| 211 size, see @ref{Setting the staff size}. |
| 212 |
| 213 Whenever the @code{fontSize} @i{context property} is set, its |
| 214 value is added to the value of the @code{font-size} @i{grob |
| 215 property} for individual layout objects, before any glyphs are |
| 216 printed. This can cause confusion when setting individual |
| 217 @code{font-size} properties while @code{fontSize} is already set: |
| 218 |
| 219 @lilypond[verbatim,quote,fragment] |
| 220 % the default font-size for NoteHead is 0 |
| 221 % the default font-size for Fingering is -5 |
| 222 c''4-3 |
| 223 |
| 224 \set fontSize = -3 |
| 225 % the effective font size for NoteHead is now -3 |
| 226 % the effective font size for Fingering is now -8 |
| 227 c''4-3 |
| 228 |
| 229 \override Fingering.font-size = 0 |
| 230 % the effective font size for Fingering is now -3 |
| 231 c''4-3 |
| 232 @end lilypond |
| 233 |
| 234 The following shorthand commands are also available: |
| 235 |
| 236 @multitable @columnfractions .2 .4 .4 |
| 237 @item @b{Command} @tab @b{Equivalent to} @tab @b{Relative size} |
| 238 @item @code{\teeny} @tab @code{\set fontSize = -3} @tab 71% |
| 239 @item @code{\tiny} @tab @code{\set fontSize = -2} @tab 79% |
| 240 @item @code{\small} @tab @code{\set fontSize = -1} @tab 89% |
| 241 @item @code{\normalsize} @tab @code{\set fontSize = 0} @tab 100% |
| 242 @item @code{\large} @tab @code{\set fontSize = 1} @tab 112% |
| 243 @item @code{\huge} @tab @code{\set fontSize = 2} @tab 126% |
| 244 @end multitable |
| 245 |
| 246 @lilypond[verbatim,quote] |
| 247 \relative c'' { |
| 248 \teeny |
| 249 c4.-> d8---3 |
| 250 \tiny |
| 251 c4.-> d8---3 |
| 252 \small |
| 253 c4.-> d8---3 |
| 254 \normalsize |
| 255 c4.-> d8---3 |
| 256 \large |
| 257 c4.-> d8---3 |
| 258 \huge |
| 259 c4.-> d8---3 |
| 260 } |
| 261 @end lilypond |
| 262 |
107 | 263 |
108 @cindex standard font size (notation) | 264 @cindex standard font size (notation) |
109 @cindex font size (notation), standard | 265 @cindex font size (notation), standard |
110 | 266 |
111 @funindex font-interface | 267 @funindex font-interface |
112 @funindex font-size | 268 @funindex font-size |
113 | 269 |
114 Font size changes are achieved by scaling the design size that is | 270 Font size changes are achieved by scaling the design size that is |
115 closest to the desired size. The standard font size (for | 271 closest to the desired size. The standard font size (for |
116 @w{@code{font-size = #0}}) depends on the standard staff height. | 272 @w{@code{font-size = 0}}) depends on the standard staff height. |
117 For a 20pt staff, a 10pt font is selected. | 273 For a 20pt staff, a 11pt font is selected. |
118 | |
119 The @code{font-size} property can only be set on layout objects | |
120 that use fonts. These are the ones supporting the | |
121 @code{font-interface} layout interface. | |
122 | 274 |
123 | 275 |
124 @predefined | 276 @predefined |
| 277 @code{\magnifyMusic}, |
125 @code{\teeny}, | 278 @code{\teeny}, |
126 @code{\tiny}, | 279 @code{\tiny}, |
127 @code{\small}, | 280 @code{\small}, |
128 @code{\normalsize}, | 281 @code{\normalsize}, |
129 @code{\large}, | 282 @code{\large}, |
130 @code{\huge}. | 283 @code{\huge}. |
131 @endpredefined | 284 @endpredefined |
132 | 285 |
133 @seealso | 286 @seealso |
| 287 Notation Reference: |
| 288 @ref{Selecting font and font size}, |
| 289 @ref{Setting the staff size}, |
| 290 @ref{Formatting cue notes}, |
| 291 @ref{Ossia staves}. |
| 292 |
| 293 Installed Files: |
| 294 @file{ly/music-functions-init.ly}, |
| 295 @file{ly/property-init.ly}. |
| 296 |
134 Snippets: | 297 Snippets: |
135 @rlsr{Editorial annotations}. | 298 @rlsr{Editorial annotations}. |
136 | 299 |
137 Internals Reference: | 300 Internals Reference: |
138 @rinternals{font-interface}. | 301 @rinternals{font-interface}. |
139 | 302 |
| 303 @c The two issues mentioned below: |
| 304 @c http://code.google.com/p/lilypond/issues/detail?id=3987 |
| 305 @c http://code.google.com/p/lilypond/issues/detail?id=3990 |
| 306 @knownissues |
| 307 There are currently two bugs that are preventing proper horizontal |
| 308 spacing when using @code{\magnifyMusic}. There is only one |
| 309 available workaround, and it is not guaranteed to work in every |
| 310 case. In the example below, replace the @var{mag} variable with |
| 311 your own value. You may also try removing one or both of the |
| 312 @code{\newSpacingSection} commands, and/or the @code{\override} |
| 313 and @code{\revert} commands: |
| 314 |
| 315 @example |
| 316 \magnifyMusic @var{mag} @{ |
| 317 \newSpacingSection |
| 318 \override Score.SpacingSpanner.spacing-increment = #(* 1.2 @var{mag}) |
| 319 [@var{music}] |
| 320 \newSpacingSection |
| 321 \revert Score.SpacingSpanner.spacing-increment |
| 322 @} |
| 323 @end example |
| 324 |
140 | 325 |
141 @node Fingering instructions | 326 @node Fingering instructions |
142 @unnumberedsubsubsec Fingering instructions | 327 @unnumberedsubsubsec Fingering instructions |
143 | 328 |
144 @cindex fingering | 329 @cindex fingering |
145 @cindex finger change | 330 @cindex finger change |
146 | 331 |
147 @funindex \finger | 332 @funindex \finger |
148 @funindex finger | 333 @funindex finger |
149 | 334 |
150 Fingering instructions can be entered using | 335 Fingering instructions can be entered using |
151 @samp{@var{note}-@var{digit}}: | 336 @samp{@var{note}-@var{digit}}: |
152 | 337 |
153 @lilypond[verbatim,quote,relative=2] | 338 @lilypond[verbatim,quote] |
154 c4-1 d-2 f-4 e-3 | 339 \relative { c''4-1 d-2 f-4 e-3 } |
155 @end lilypond | 340 @end lilypond |
156 | 341 |
157 Markup texts may be used for finger changes. | 342 Markup texts or strings may be used for finger changes. |
158 | 343 |
159 @lilypond[verbatim,quote,relative=2] | 344 @lilypond[verbatim,quote] |
160 c4-1 d-2 f-4 c^\markup { \finger "2 - 3" } | 345 \relative { |
| 346 c''4-1 d-2 f\finger \markup \tied-lyric #"4~3" c\finger "2 - 3" |
| 347 } |
161 @end lilypond | 348 @end lilypond |
162 | 349 |
163 @cindex thumb-script | 350 @cindex thumb-script |
164 | 351 |
165 @funindex \thumb | 352 @funindex \thumb |
166 @funindex thumb | 353 @funindex thumb |
167 | 354 |
168 A thumb-script can be added (e.g. cello music) to indicate | 355 A thumb-script can be added (e.g. cello music) to indicate |
169 that a note should be played with the thumb. | 356 that a note should be played with the thumb. |
170 | 357 |
171 @lilypond[verbatim,quote,relative=2] | 358 @lilypond[verbatim,quote] |
172 <a_\thumb a'-3>2 <b_\thumb b'-3> | 359 \relative { <a'_\thumb a'-3>2 <b_\thumb b'-3> } |
173 @end lilypond | 360 @end lilypond |
174 | 361 |
175 @cindex fingering chords | 362 @cindex fingering chords |
176 @cindex fingering instructions for chords | 363 @cindex fingering instructions for chords |
177 @cindex chords, fingering | 364 @cindex chords, fingering |
178 | 365 |
179 Fingerings for chords can also be added to individual notes by | 366 Fingerings for chords can also be added to individual notes by |
180 adding them after the pitches. | 367 adding them after the pitches. |
181 | 368 |
182 @lilypond[verbatim,quote,relative=2] | 369 @lilypond[verbatim,quote] |
183 <c-1 e-2 g-3 b-5>2 <d-1 f-2 a-3 c-5> | 370 \relative { |
| 371 <c''-1 e-2 g-3 b-5>2 <d-1 f-2 a-3 c-5> |
| 372 } |
184 @end lilypond | 373 @end lilypond |
185 | 374 |
186 Fingering instructions may be manually placed above or below the | 375 Fingering instructions may be manually placed above or below the |
187 staff, see @ref{Direction and placement}. | 376 staff, see @ref{Direction and placement}. |
188 | 377 |
189 @snippets | 378 @snippets |
190 | 379 |
191 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle] | 380 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle] |
192 {controlling-the-placement-of-chord-fingerings.ly} | 381 {controlling-the-placement-of-chord-fingerings.ly} |
193 | 382 |
(...skipping 10 matching lines...) Expand all Loading... |
204 Snippets: | 393 Snippets: |
205 @rlsr{Editorial annotations}. | 394 @rlsr{Editorial annotations}. |
206 | 395 |
207 Internals Reference: | 396 Internals Reference: |
208 @rinternals{FingeringEvent}, | 397 @rinternals{FingeringEvent}, |
209 @rinternals{fingering-event}, | 398 @rinternals{fingering-event}, |
210 @rinternals{Fingering_engraver}, | 399 @rinternals{Fingering_engraver}, |
211 @rinternals{New_fingering_engraver}, | 400 @rinternals{New_fingering_engraver}, |
212 @rinternals{Fingering}. | 401 @rinternals{Fingering}. |
213 | 402 |
214 @knownissues | |
215 By default, numbers greater than 9 are not supported using | |
216 @samp{@var{note}-@var{digit}}. | |
217 | |
218 | 403 |
219 @node Hidden notes | 404 @node Hidden notes |
220 @unnumberedsubsubsec Hidden notes | 405 @unnumberedsubsubsec Hidden notes |
221 | 406 |
222 @cindex hidden notes | 407 @cindex hidden notes |
223 @cindex invisible notes | 408 @cindex invisible notes |
224 @cindex transparent notes | 409 @cindex transparent notes |
225 @cindex notes, hidden | 410 @cindex notes, hidden |
226 @cindex notes, invisible | 411 @cindex notes, invisible |
227 @cindex notes, transparent | 412 @cindex notes, transparent |
228 | 413 |
229 @funindex \hideNotes | 414 @funindex \hideNotes |
230 @funindex hideNotes | 415 @funindex hideNotes |
231 @funindex \unHideNotes | 416 @funindex \unHideNotes |
232 @funindex unHideNotes | 417 @funindex unHideNotes |
233 | 418 |
234 Hidden (or invisible or transparent) notes can be useful in | 419 Hidden (or invisible or transparent) notes can be useful in |
235 preparing theory or composition exercises. | 420 preparing theory or composition exercises. |
236 | 421 |
237 @lilypond[verbatim,quote,relative=2] | 422 @lilypond[verbatim,quote] |
238 c4 d | 423 \relative { |
239 \hideNotes | 424 c''4 d |
240 e4 f | 425 \hideNotes |
241 \unHideNotes | 426 e4 f |
242 g a | 427 \unHideNotes |
243 \hideNotes | 428 g a |
244 b | 429 \hideNotes |
245 \unHideNotes | 430 b |
246 c | 431 \unHideNotes |
| 432 c |
| 433 } |
247 @end lilypond | 434 @end lilypond |
248 | 435 |
249 Note heads, stems, and flags, and rests are invisible. Beams | 436 Note heads, stems, and flags, and rests are invisible. Beams |
250 are invisible if they start on a hidden note. Objects that are | 437 are invisible if they start on a hidden note. Objects that are |
251 attached to invisible notes are still visible. | 438 attached to invisible notes are still visible. |
252 | 439 |
253 @lilypond[verbatim,quote,relative=2] | 440 @lilypond[verbatim,quote] |
254 e8(\p f g a)-- | 441 \relative c'' { |
255 \hideNotes | 442 e8(\p f g a)-- |
256 e8(\p f g a)-- | 443 \hideNotes |
| 444 e8(\p f g a)-- |
| 445 } |
257 @end lilypond | 446 @end lilypond |
258 | 447 |
259 | 448 |
260 @predefined | 449 @predefined |
261 @code{\hideNotes}, | 450 @code{\hideNotes}, |
262 @code{\unHideNotes}. | 451 @code{\unHideNotes}. |
263 @endpredefined | 452 @endpredefined |
264 | 453 |
265 @seealso | 454 @seealso |
266 Learning Manual: | 455 Learning Manual: |
(...skipping 27 matching lines...) Expand all Loading... |
294 @cindex with-color | 483 @cindex with-color |
295 | 484 |
296 @funindex color | 485 @funindex color |
297 @funindex \with-color | 486 @funindex \with-color |
298 @funindex with-color | 487 @funindex with-color |
299 @funindex x11-color | 488 @funindex x11-color |
300 | 489 |
301 Individual objects may be assigned colors. Valid color names | 490 Individual objects may be assigned colors. Valid color names |
302 are listed in the @ref{List of colors}. | 491 are listed in the @ref{List of colors}. |
303 | 492 |
304 @lilypond[verbatim,quote,relative=2] | 493 @lilypond[verbatim,quote,fragment] |
305 \override NoteHead.color = #red | 494 \override NoteHead.color = #red |
306 c4 c | 495 c''4 c'' |
307 \override NoteHead.color = #(x11-color 'LimeGreen) | 496 \override NoteHead.color = #(x11-color 'LimeGreen) |
308 d | 497 d'' |
309 \override Stem.color = #blue | 498 \override Stem.color = #blue |
310 e | 499 e'' |
311 @end lilypond | 500 @end lilypond |
312 | 501 |
313 | 502 |
314 The full range of colors defined for X11 can be accessed by using | 503 The full range of colors defined for X11 can be accessed by using |
315 the Scheme function @code{x11-color}. The function takes one | 504 the Scheme function @code{x11-color}. The function takes one |
316 argument; this can be a symbol in the form @code{'@var{FooBar}} or | 505 argument; this can be a symbol in the form @code{'@var{FooBar}} or |
317 a string in the form @code{"@var{FooBar}"}. The first form is | 506 a string in the form @code{"@var{FooBar}"}. The first form is |
318 quicker to write and is more efficient. However, using the second | 507 quicker to write and is more efficient. However, using the second |
319 form it is possible to access X11 colors by the multi-word form of | 508 form it is possible to access X11 colors by the multi-word form of |
320 its name. | 509 its name. |
321 | 510 |
322 If @code{x11-color} cannot make sense of the parameter then the | 511 If @code{x11-color} cannot make sense of the parameter then the |
323 color returned defaults to black. | 512 color returned defaults to black. |
324 | 513 |
325 @lilypond[verbatim,quote,relative=2] | 514 @lilypond[verbatim,quote] |
326 \override Staff.StaffSymbol.color = #(x11-color 'SlateBlue2) | 515 \relative c'' { |
327 \set Staff.instrumentName = \markup { | 516 \override Staff.StaffSymbol.color = #(x11-color 'SlateBlue2) |
328 \with-color #(x11-color 'navy) "Clarinet" | 517 \set Staff.instrumentName = \markup { |
329 } | 518 \with-color #(x11-color 'navy) "Clarinet" |
330 | 519 } |
331 gis8 a | 520 |
332 \override Beam.color = #(x11-color "medium turquoise") | 521 gis8 a |
333 gis a | 522 \override Beam.color = #(x11-color "medium turquoise") |
334 \override Accidental.color = #(x11-color 'DarkRed) | 523 gis a |
335 gis a | 524 \override Accidental.color = #(x11-color 'DarkRed) |
336 \override NoteHead.color = #(x11-color "LimeGreen") | 525 gis a |
337 gis a | 526 \override NoteHead.color = #(x11-color "LimeGreen") |
338 % this is deliberate nonsense; note that the stems remain black | 527 gis a |
339 \override Stem.color = #(x11-color 'Boggle) | 528 % this is deliberate nonsense; note that the stems remain black |
340 b2 cis | 529 \override Stem.color = #(x11-color 'Boggle) |
| 530 b2 cis |
| 531 } |
341 @end lilypond | 532 @end lilypond |
342 | 533 |
343 @cindex rgb-color | 534 @cindex rgb-color |
344 @cindex color, rgb | 535 @cindex color, rgb |
345 @cindex rgb color | 536 @cindex rgb color |
346 | 537 |
347 @funindex rgb-color | 538 @funindex rgb-color |
348 | 539 |
349 Exact RGB colors can be specified using the Scheme function | 540 Exact RGB colors can be specified using the Scheme function |
350 @code{rgb-color}. | 541 @code{rgb-color}. |
351 | 542 |
352 @lilypond[verbatim,quote,relative=2] | 543 @lilypond[verbatim,quote] |
353 \override Staff.StaffSymbol.color = #(x11-color 'SlateBlue2) | 544 \relative c'' { |
354 \set Staff.instrumentName = \markup { | 545 \override Staff.StaffSymbol.color = #(x11-color 'SlateBlue2) |
355 \with-color #(x11-color 'navy) "Clarinet" | 546 \set Staff.instrumentName = \markup { |
356 } | 547 \with-color #(x11-color 'navy) "Clarinet" |
357 | 548 } |
358 \override Stem.color = #(rgb-color 0 0 0) | 549 |
359 gis8 a | 550 \override Stem.color = #(rgb-color 0 0 0) |
360 \override Stem.color = #(rgb-color 1 1 1) | 551 gis8 a |
361 gis8 a | 552 \override Stem.color = #(rgb-color 1 1 1) |
362 \override Stem.color = #(rgb-color 0 0 0.5) | 553 gis8 a |
363 gis4 a | 554 \override Stem.color = #(rgb-color 0 0 0.5) |
| 555 gis4 a |
| 556 } |
364 @end lilypond | 557 @end lilypond |
365 | 558 |
366 @seealso | 559 @seealso |
367 Notation Reference: | 560 Notation Reference: |
368 @ref{List of colors}, | 561 @ref{List of colors}, @ref{The |
369 @ref{Tweak and single}. | 562 tweak command}. |
370 | 563 |
371 Snippets: | 564 Snippets: |
372 @rlsr{Editorial annotations}. | 565 @rlsr{Editorial annotations}. |
373 | 566 |
374 @cindex x11 color | 567 @cindex x11 color |
375 @cindex colored notes in chords | 568 @cindex colored notes in chords |
376 @cindex notes, colored in chords | 569 @cindex notes, colored in chords |
377 @cindex color in chords | 570 @cindex color in chords |
378 | 571 |
379 @funindex x11-color | 572 @funindex x11-color |
380 | 573 |
381 @knownissues | 574 @knownissues |
382 An X11 color is not necessarily exactly the same shade as a | 575 An X11 color is not necessarily exactly the same shade as a |
383 similarly named normal color. | 576 similarly named normal color. |
384 | 577 |
385 Not all X11 colors are distinguishable in a web browser, i.e., | 578 Not all X11 colors are distinguishable in a web browser, i.e., |
386 a web browser might not display a difference between @code{LimeGreen} | 579 a web browser might not display a difference between @code{LimeGreen} |
387 and @code{ForestGreen}. For web use normal colors are recommended | 580 and @code{ForestGreen}. For web use normal colors are recommended |
388 (i.e., @code{blue}, @code{green}, @code{red}). | 581 (i.e., @code{blue}, @code{green}, @code{red}). |
389 | 582 |
390 Notes in a chord cannot be colored with @code{\override}; use | 583 Notes in a chord cannot be separately colored with |
391 @code{\tweak} instead, see @ref{Tweak and single}. | 584 @code{\override}; use @code{\tweak} or the equivalent |
| 585 @code{\single\override} before the respective note instead, see |
| 586 @ref{Tweak and single}. |
392 | 587 |
393 | 588 |
394 @node Parentheses | 589 @node Parentheses |
395 @unnumberedsubsubsec Parentheses | 590 @unnumberedsubsubsec Parentheses |
396 | 591 |
397 @cindex ghost notes | 592 @cindex ghost notes |
398 @cindex notes, ghost | 593 @cindex notes, ghost |
399 @cindex notes, parenthesized | 594 @cindex notes, parenthesized |
400 @cindex parentheses | 595 @cindex parentheses |
401 @cindex brackets | 596 @cindex brackets |
402 | 597 |
403 @funindex \parenthesize | 598 @funindex \parenthesize |
404 @funindex parenthesize | 599 @funindex parenthesize |
405 | 600 |
406 Objects may be parenthesized by prefixing @code{\parenthesize} to | 601 Objects may be parenthesized by prefixing @code{\parenthesize} to |
407 the music event. When prefixed to a chord, it parenthesizes every | 602 the music event. When prefixed to a chord, it parenthesizes every |
408 note. Individual notes inside a chord may also be parenthesized. | 603 note. Individual notes inside a chord may also be parenthesized. |
409 | 604 |
410 @lilypond[verbatim,quote,relative=2] | 605 @lilypond[verbatim,quote] |
411 c2 \parenthesize d | 606 \relative { |
412 c2 \parenthesize <c e g> | 607 c''2 \parenthesize d |
413 c2 <c \parenthesize e g> | 608 c2 \parenthesize <c e g> |
| 609 c2 <c \parenthesize e g> |
| 610 } |
414 @end lilypond | 611 @end lilypond |
415 | 612 |
416 Non-note objects may be parenthesized as well. For articulations, | 613 Non-note objects may be parenthesized as well. For articulations, |
417 a hyphen is needed before the @code{\parenthesize} command. | 614 a hyphen is needed before the @code{\parenthesize} command. |
418 | 615 |
419 @lilypond[verbatim,quote,relative=2] | 616 @lilypond[verbatim,quote] |
420 c2-\parenthesize -. d | 617 \relative { |
421 c2 \parenthesize r | 618 c''2-\parenthesize -. d |
| 619 c2 \parenthesize r |
| 620 } |
422 @end lilypond | 621 @end lilypond |
423 | 622 |
424 @seealso | 623 @seealso |
425 Snippets: | 624 Snippets: |
426 @rlsr{Editorial annotations}. | 625 @rlsr{Editorial annotations}. |
427 | 626 |
428 Internals Reference: | 627 Internals Reference: |
429 @rinternals{Parenthesis_engraver}, | 628 @rinternals{Parenthesis_engraver}, |
430 @rinternals{ParenthesesItem}, | 629 @rinternals{ParenthesesItem}, |
431 @rinternals{parentheses-interface}. | 630 @rinternals{parentheses-interface}. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 @code{\stemDown}, | 666 @code{\stemDown}, |
468 @code{\stemNeutral}. | 667 @code{\stemNeutral}. |
469 @endpredefined | 668 @endpredefined |
470 | 669 |
471 | 670 |
472 @snippets | 671 @snippets |
473 | 672 |
474 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle] | 673 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle] |
475 {default-direction-of-stems-on-the-center-line-of-the-staff.ly} | 674 {default-direction-of-stems-on-the-center-line-of-the-staff.ly} |
476 | 675 |
| 676 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle] |
| 677 {automatically-changing-the-stem-direction-of-the-middle-note-based-on-the-melod
y.ly} |
| 678 |
477 @seealso | 679 @seealso |
478 Notation Reference: | 680 Notation Reference: |
479 @ref{Direction and placement}. | 681 @ref{Direction and placement}. |
480 | 682 |
481 Snippets: | 683 Snippets: |
482 @rlsr{Editorial annotations}. | 684 @rlsr{Editorial annotations}. |
483 | 685 |
484 Internals Reference: | 686 Internals Reference: |
485 @rinternals{Stem_engraver}, | 687 @rinternals{Stem_engraver}, |
486 @rinternals{Stem}, | 688 @rinternals{Stem}, |
(...skipping 27 matching lines...) Expand all Loading... |
514 @funindex balloonText | 716 @funindex balloonText |
515 @funindex \balloonLengthOn | 717 @funindex \balloonLengthOn |
516 @funindex balloonLengthOn | 718 @funindex balloonLengthOn |
517 @funindex \balloonLengthOff | 719 @funindex \balloonLengthOff |
518 @funindex balloonLengthOff | 720 @funindex balloonLengthOff |
519 | 721 |
520 Elements of notation can be marked and named with the help of a | 722 Elements of notation can be marked and named with the help of a |
521 square balloon. The primary purpose of this feature is to explain | 723 square balloon. The primary purpose of this feature is to explain |
522 notation. | 724 notation. |
523 | 725 |
524 @lilypond[verbatim,quote,relative=2] | 726 @lilypond[verbatim,quote] |
525 \new Voice \with { \consists "Balloon_engraver" } | 727 \new Voice \with { \consists "Balloon_engraver" } |
526 { | 728 \relative c'' { |
527 \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" } | 729 \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" } |
528 a8 | 730 a8 |
529 \balloonGrobText #'Rest #'(-4 . -4) \markup { "I'm a rest" } | 731 \balloonGrobText #'Rest #'(-4 . -4) \markup { "I'm a rest" } |
530 r | 732 r |
531 <c, g'-\balloonText #'(-2 . -2) \markup { "I'm a note head" } c>2. | 733 <c, g'-\balloonText #'(-2 . -2) \markup { "I'm a note head" } c>2. |
532 } | 734 } |
533 @end lilypond | 735 @end lilypond |
534 | 736 |
535 | 737 |
536 There are two music functions, @code{balloonGrobText} and | 738 There are two music functions, @code{balloonGrobText} and |
537 @code{balloonText}; the former is used like | 739 @code{balloonText}; the former is used like |
538 @w{@code{\once \override}} to attach text to any grob, and the | 740 @w{@code{\once \override}} to attach text to any grob, and the |
539 latter is used like @code{\tweak}, typically within chords, to | 741 latter is used like @code{\tweak}, typically within chords, to |
540 attach text to an individual note. | 742 attach text to an individual note. |
541 | 743 |
542 Balloon text normally influences note spacing, but this can be | 744 Balloon text does not influence note spacing, but this can be altered: |
543 altered: | 745 |
544 | 746 @lilypond[verbatim,quote] |
545 @lilypond[verbatim,quote,relative=2] | |
546 \new Voice \with { \consists "Balloon_engraver" } | 747 \new Voice \with { \consists "Balloon_engraver" } |
547 { | 748 \relative c'' { |
548 \balloonLengthOff | |
549 \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" } | 749 \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" } |
550 a8 | 750 a8 |
551 \balloonGrobText #'Rest #'(-4 . -4) \markup { "I'm a rest" } | 751 \balloonGrobText #'Rest #'(-4 . -4) \markup { "I'm a rest" } |
552 r | 752 r |
553 \balloonLengthOn | 753 \balloonLengthOn |
554 <c, g'-\balloonText #'(-2 . -2) \markup { "I'm a note head" } c>2. | 754 <c, g'-\balloonText #'(-2 . -2) \markup { "I'm a note head" } c>2. |
555 } | 755 } |
556 @end lilypond | 756 @end lilypond |
557 | 757 |
558 @predefined | 758 @predefined |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 lines horizontally below and to the left side of each note head. | 791 lines horizontally below and to the left side of each note head. |
592 Grid lines extend from the middle lines of each staff. The | 792 Grid lines extend from the middle lines of each staff. The |
593 @code{gridInterval} must specify the duration between the grid | 793 @code{gridInterval} must specify the duration between the grid |
594 lines. | 794 lines. |
595 | 795 |
596 @lilypond[verbatim,quote] | 796 @lilypond[verbatim,quote] |
597 \layout { | 797 \layout { |
598 \context { | 798 \context { |
599 \Staff | 799 \Staff |
600 \consists "Grid_point_engraver" | 800 \consists "Grid_point_engraver" |
601 gridInterval = #(ly:make-moment 1 4) | 801 gridInterval = #(ly:make-moment 1/4) |
602 } | 802 } |
603 \context { | 803 \context { |
604 \Score | 804 \Score |
605 \consists "Grid_line_span_engraver" | 805 \consists "Grid_line_span_engraver" |
606 } | 806 } |
607 } | 807 } |
608 | 808 |
609 \score { | 809 \score { |
610 \new ChoirStaff << | 810 \new ChoirStaff << |
611 \new Staff \relative c'' { | 811 \new Staff \relative { |
612 \stemUp | 812 \stemUp |
613 c4. d8 e8 f g4 | 813 c''4. d8 e8 f g4 |
614 } | 814 } |
615 \new Staff \relative c { | 815 \new Staff \relative { |
616 \clef bass | 816 \clef bass |
617 \stemDown | 817 \stemDown |
618 c4 g' f e | 818 c4 g' f e |
619 } | 819 } |
620 >> | 820 >> |
621 } | 821 } |
622 @end lilypond | 822 @end lilypond |
623 | 823 |
624 @snippets | 824 @snippets |
625 | 825 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 Brackets are used in musical analysis to indicate structure in musical | 860 Brackets are used in musical analysis to indicate structure in musical |
661 pieces. Simple horizontal brackets are supported. | 861 pieces. Simple horizontal brackets are supported. |
662 | 862 |
663 @lilypond[verbatim,quote] | 863 @lilypond[verbatim,quote] |
664 \layout { | 864 \layout { |
665 \context { | 865 \context { |
666 \Voice | 866 \Voice |
667 \consists "Horizontal_bracket_engraver" | 867 \consists "Horizontal_bracket_engraver" |
668 } | 868 } |
669 } | 869 } |
670 \relative c'' { | 870 \relative { |
671 c2\startGroup | 871 c''2\startGroup |
672 d\stopGroup | 872 d\stopGroup |
673 } | 873 } |
674 @end lilypond | 874 @end lilypond |
675 | 875 |
676 Analysis brackets may be nested. | 876 Analysis brackets may be nested. |
677 | 877 |
678 @lilypond[verbatim,quote] | 878 @lilypond[verbatim,quote] |
679 \layout { | 879 \layout { |
680 \context { | 880 \context { |
681 \Voice | 881 \Voice |
682 \consists "Horizontal_bracket_engraver" | 882 \consists "Horizontal_bracket_engraver" |
683 } | 883 } |
684 } | 884 } |
685 \relative c'' { | 885 \relative { |
686 c4\startGroup\startGroup | 886 c''4\startGroup\startGroup |
687 d4\stopGroup | 887 d4\stopGroup |
688 e4\startGroup | 888 e4\startGroup |
689 d4\stopGroup\stopGroup | 889 d4\stopGroup\stopGroup |
690 } | 890 } |
691 @end lilypond | 891 @end lilypond |
692 | 892 |
693 @seealso | 893 @seealso |
694 Snippets: | 894 Snippets: |
695 @rlsr{Editorial annotations}. | 895 @rlsr{Editorial annotations}. |
696 | 896 |
697 Internals Reference: | 897 Internals Reference: |
698 @rinternals{Horizontal_bracket_engraver}, | 898 @rinternals{Horizontal_bracket_engraver}, |
699 @rinternals{HorizontalBracket}, | 899 @rinternals{HorizontalBracket}, |
700 @rinternals{horizontal-bracket-interface}, | 900 @rinternals{horizontal-bracket-interface}, |
701 @rinternals{Staff}. | 901 @rinternals{Staff}. |
LEFT | RIGHT |