1 @c -*- coding: utf-8; mode: texinfo; -*-
3 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5 When revising a translation, copy the HEAD committish of the
6 version that you are working on. See TRANSLATION for details.
9 @node Editorial annotations
10 @section Editorial annotations
12 @lilypondfile[quote]{editorial-headword.ly}
14 This section discusses the various ways to change the appearance of
15 notes and add analysis or educational emphasis.
23 @node Inside the staff
24 @subsection Inside the staff
26 This section discusses how to add emphasis to elements that are
30 * Selecting notation font size::
31 * Fingering instructions::
38 @node Selecting notation font size
39 @subsubsection Selecting notation font size
42 @cindex font size, selecting
43 @cindex selecting font size
45 The easiest method of setting the font size of any context is by
46 setting the @code{fontSize} property.
48 @lilypond[quote,fragment,relative=2,verbatim,ragged-right]
57 It does not change the size of variable symbols, such as beams or
60 @cindex font size scaling
62 Internally, the @code{fontSize} context property will cause the
63 @code{font-size} property to be set in all layout objects. The
64 value of @code{font-size} is a number indicating the size relative
65 to the standard size for the current staff height. Each step up
66 is an increase of approximately 12% of the font size. Six steps
67 is exactly a factor two. The Scheme function @code{magstep}
68 converts a @code{font-size} number to a scaling factor. The
69 @code{font-size} property can also be set directly, so that only
70 certain layout objects are affected.
72 @lilypond[quote,fragment,relative=2,verbatim,ragged-right]
74 \override NoteHead #'font-size = #-4
76 \override NoteHead #'font-size = #3
80 @cindex standard font size
81 @cindex font size, standard
83 Font size changes are achieved by scaling the design size that is
84 closest to the desired size. The standard font size (for
85 @code{font-size} equals 0), depends on the standard staff height.
86 For a 20pt staff, a 10pt font is selected.
88 The @code{font-size} property can only be set on layout objects that
89 use fonts. These are the ones supporting the @code{font-interface}
94 The following commands set @code{fontSize} for the current voice:
100 @funindex \normalsize
105 Snippets: @lsrdir{Editorial,Editorial-annotations}.
107 Internals Reference: @internalsref{font-interface}.
110 @node Fingering instructions
111 @subsubsection Fingering instructions
114 @cindex finger change
116 Fingering instructions can be entered using
117 @var{note}-@var{digit}:
119 Fingering instructions may be manually placed above or below the
120 staff, see @ref{Controlling direction and placement}.
122 @lilypond[quote,verbatim,ragged-right,fragment,relative=2]
126 Use markup texts for finger changes.
128 @lilypond[quote,verbatim,ragged-right,fragment,relative=2]
129 c4-1 d-2 f-4 c^\markup { \finger "2 - 3" }
134 You can use the thumb-script (e.g., in cello music)to indicate that a
135 note should be played with the thumb.
137 @lilypond[quote,verbatim,ragged-right,fragment,relative=2]
138 <a_\thumb a'-3>2 <b_\thumb b'-3>
141 @cindex fingering chords
142 @cindex chords, fingering
144 Fingerings for chords can also be added to individual notes of the
145 chord by adding them after the pitches.
147 @lilypond[quote,verbatim,ragged-right,fragment,relative=2]
148 < c-1 e-2 g-3 b-5 >2 < d-1 f-2 a-3 c-5 >
154 @code{fingeringOrientations} are used to control where the fingering
157 @lilypond[quote,verbatim,ragged-right,fragment,relative=2]
158 \set fingeringOrientations = #'(left)
160 \set fingeringOrientations = #'(down)
162 \set fingeringOrientations = #'(right)
164 \set fingeringOrientations = #'(up)
166 \set fingeringOrientations = #'(left down)
168 \set fingeringOrientations = #'(up right down)
174 Snippets: @lsrdir{Editorial,Editorial-annotations}.
176 Internals Reference: @internalsref{Fingering}.
180 @subsubsection Hidden notes
183 @cindex Invisible notes
184 @cindex Transparent notes
186 @funindex \unHideNotes
188 Hidden (or invisible or transparent) notes can be useful in
189 preparing theory or composition exercises.
191 @lilypond[quote,ragged-right,verbatim,relative=2,fragment]
205 @code{\hideNotes}, @code{\unHideNotes}
209 Snippets: @lsrdir{Editorial,Editorial-annotations}.
212 @node Coloring objects
213 @subsubsection Coloring objects
215 @cindex colored objects
217 @cindex coloring objects
218 @cindex colored notes
219 @cindex coloring notes
220 @cindex notes, colored
222 Individual objects may be assigned colors. You may use the color
223 names listed in the @ref{List of colors}.
225 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
226 \override NoteHead #'color = #red
228 \override NoteHead #'color = #(x11-color 'LimeGreen)
230 \override Stem #'color = #blue
236 The full range of colors defined for X11 can be accessed by using
237 the Scheme function @code{x11-color}. The function takes one
238 argument; this can be a symbol in the form @var{'FooBar} or a
239 string in the form @var{"FooBar"}. The first form is quicker to
240 write and is more efficient. However, using the second form it is
241 possible to access X11 colors by the multi-word form of its name.
243 If @code{x11-color} cannot make sense of the parameter then the
244 color returned defaults to black.
246 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
248 \override Staff.StaffSymbol #'color = #(x11-color 'SlateBlue2)
249 \set Staff.instrumentName = \markup {
250 \with-color #(x11-color 'navy) "Clarinet"
254 \override Beam #'color = #(x11-color "medium turquoise")
256 \override Accidental #'color = #(x11-color 'DarkRed)
258 \override NoteHead #'color = #(x11-color "LimeGreen")
260 % this is deliberate nonsense; note that the stems remain black
261 \override Stem #'color = #(x11-color 'Boggle)
266 You can get exact RGB colors by specifying the rgb-color number.
268 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
270 \override Staff.StaffSymbol #'color = #(x11-color 'SlateBlue2)
271 \set Staff.instrumentName = \markup {
272 \with-color #(x11-color 'navy) "Clarinet"
276 \override Stem #'color = #(rgb-color 0 0 0)
279 \override Stem #'color = #(rgb-color 1 1 1)
282 \override Stem #'color = #(rgb-color 0 0 0.5)
289 Notation Reference: @ref{List of colors}, @ref{Objects connected to
292 Snippets: @lsrdir{Editorial,Editorial-annotations}.
295 An x11 color is not necessarily exactly the same shade as a
296 similarly named normal color.
298 Not all x11 colors are distinguishable in a web browser i.e. a web browser
299 might not display a difference between 'LimeGreen and 'ForestGreen. For
300 web use normal colors are recommended (i.e. #blue, #green, #red).
303 Notes in a chord cannot be colored with @code{\override}; use
304 @code{\tweak} instead, see @ref{Objects connected to the input}.
308 @subsubsection Parentheses
312 @cindex notes, parenthesized
315 Objects may be parenthesized by prefixing @code{\parenthesize} to
316 the music event. This only functions inside chords; to
317 parenthesize a single note it must be enclosed with @code{<>} as
320 @lilypond[relative=2,fragment,verbatim,ragged-right]
321 c2 < \parenthesize d>
324 Non-note objects may be parenthesized as well.
326 @lilypond[relative=2,fragment,verbatim,ragged-right]
327 < c d g >2-\parenthesize -. d
332 Snippets: @lsrdir{Editorial,Editorial-annotations}.
340 Whenever a note is found, a @code{Stem} object is created
341 automatically. For whole notes and rests, they are also created but
350 @funindex \stemNeutral
356 @cindex stem, direction
359 @cindex stem, neutral
361 To change the direction of stems on the center line of the staff, use
363 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
365 \override Stem #'neutral-direction = #up
367 \override Stem #'neutral-direction = #down
373 Snippets: @lsrdir{Editorial,Editorial-annotations}.
376 @node Outside the staff
377 @subsection Outside the staff
379 This section discusses how to add emphasis to elements in the staff
380 from outside of the staff.
385 * Analysis brackets::
389 @subsubsection Balloon help
391 Elements of notation can be marked and named with the help of a
392 square balloon. The primary purpose of this feature is to explain
395 The following example demonstrates its use.
397 @lilypond[quote,verbatim,fragment,ragged-right,relative=2]
398 \new Voice \with { \consists "Balloon_engraver" }
401 \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" }
403 <c, g'-\balloonText #'(-2 . -2) \markup { "I'm a note head" }
409 There are two music functions, @code{balloonGrobText} and
410 @code{balloonText}; The former is used like \once \override to
411 attach text to any grob, and the latter is used like \tweak,
412 typically within chords, to attach text to an individual note.
415 @cindex notation, explaining
419 Snippets: @lsrdir{Editorial,Editorial-annotations}.
421 Internals Reference: @internalsref{text-balloon-interface}.
425 @subsubsection Grid lines
427 Vertical lines can be drawn between staves synchronized with the
430 @lilypond[ragged-right,quote,verbatim]
434 \consists "Grid_point_engraver"
436 gridInterval = #(ly:make-moment 1 4)
437 % this sets the grid interval to 1 quarternote (crotchet)
442 \consists "Grid_line_span_engraver"
443 %% by default this centers grid lines horizontally below and to the
444 % left side of the notehead, the grid lines extend from
445 % the middle lines of each staff
465 To change the grid lines use \override.
468 @lilypond[ragged-right,quote,verbatim]
472 \consists "Grid_point_engraver"
474 gridInterval = #(ly:make-moment 1 4)
475 % this sets the grid interval to 1 quarternote (crotchet)
480 \consists "Grid_line_span_engraver"
481 \override NoteColumn #'X-offset = #-0.5
482 % this moves them to the right half a staff space
493 \override Score.GridLine #'extra-offset = #'( 0.0 . 1.0 )
494 % this moves them up one staff space from the default position
506 Snippets: @lsrdir{Editorial,Editorial-annotations}.
511 @node Analysis brackets
512 @subsubsection Analysis brackets
515 @cindex phrasing brackets
516 @cindex musicological analysis
517 @cindex note grouping bracket
519 Brackets are used in musical analysis to indicate structure in musical
520 pieces. LilyPond supports a simple form of nested horizontal
521 brackets. To use this, add the @code{Horizontal_bracket_engraver} to
522 the @code{Staff} context. A bracket is started with
523 @code{\startGroup} and closed with @code{\stopGroup}.
525 @lilypond[quote,ragged-right,verbatim]
528 c4\startGroup\startGroup
531 c4\stopGroup\stopGroup
535 \Staff \consists "Horizontal_bracket_engraver"
543 Snippets: @lsrdir{Editorial,Editorial-annotations}.
545 Internals Reference: @internalsref{HorizontalBracket},
546 @internalsref{Horizontal_bracket_engraver}, @internalsref{Staff}.