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]
247 \override Staff.StaffSymbol #'color = #(x11-color 'SlateBlue2)
248 \set Staff.instrumentName = \markup {
249 \with-color #(x11-color 'navy) "Clarinet"
253 \override Beam #'color = #(x11-color "medium turquoise")
255 \override Accidental #'color = #(x11-color 'DarkRed)
257 \override NoteHead #'color = #(x11-color "LimeGreen")
259 % this is deliberate nonsense; note that the stems remain black
260 \override Stem #'color = #(x11-color 'Boggle)
264 You can get exact RGB colors by specifying the rgb-color number.
266 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
267 \override Staff.StaffSymbol #'color = #(x11-color 'SlateBlue2)
268 \set Staff.instrumentName = \markup {
269 \with-color #(x11-color 'navy) "Clarinet"
273 \override Stem #'color = #(rgb-color 0 0 0)
276 \override Stem #'color = #(rgb-color 1 1 1)
279 \override Stem #'color = #(rgb-color 0 0 0.5)
285 Notation Reference: @ref{List of colors}, @ref{Objects connected to
288 Snippets: @lsrdir{Editorial,Editorial-annotations}.
291 An x11 color is not necessarily exactly the same shade as a
292 similarly named normal color.
294 Not all x11 colors are distinguishable in a web browser i.e. a web browser
295 might not display a difference between 'LimeGreen and 'ForestGreen. For
296 web use normal colors are recommended (i.e. #blue, #green, #red).
299 Notes in a chord cannot be colored with @code{\override}; use
300 @code{\tweak} instead, see @ref{Objects connected to the input}.
304 @subsubsection Parentheses
308 @cindex notes, parenthesized
311 Objects may be parenthesized by prefixing @code{\parenthesize} to
312 the music event. This only functions inside chords; to
313 parenthesize a single note it must be enclosed with @code{<>} as
316 @lilypond[quote,relative=2,fragment,verbatim,ragged-right]
317 c2 < \parenthesize d>
320 Non-note objects may be parenthesized as well.
322 @lilypond[quote,relative=2,fragment,verbatim,ragged-right]
323 < c d g >2-\parenthesize -. d
328 Snippets: @lsrdir{Editorial,Editorial-annotations}.
336 Whenever a note is found, a @code{Stem} object is created
337 automatically. For whole notes and rests, they are also created but
346 @funindex \stemNeutral
352 @cindex stem, direction
355 @cindex stem, neutral
357 To change the direction of stems on the center line of the staff, use
359 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
361 \override Stem #'neutral-direction = #up
363 \override Stem #'neutral-direction = #down
369 Snippets: @lsrdir{Editorial,Editorial-annotations}.
372 @node Outside the staff
373 @subsection Outside the staff
375 This section discusses how to add emphasis to elements in the staff
376 from outside of the staff.
381 * Analysis brackets::
385 @subsubsection Balloon help
387 Elements of notation can be marked and named with the help of a
388 square balloon. The primary purpose of this feature is to explain
391 The following example demonstrates its use.
393 @lilypond[quote,verbatim,fragment,ragged-right,relative=2]
394 \new Voice \with { \consists "Balloon_engraver" }
397 \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" }
399 <c, g'-\balloonText #'(-2 . -2) \markup { "I'm a note head" } c>4.
403 There are two music functions, @code{balloonGrobText} and
404 @code{balloonText}; The former is used like \once \override to
405 attach text to any grob, and the latter is used like \tweak,
406 typically within chords, to attach text to an individual note.
409 @cindex notation, explaining
413 Snippets: @lsrdir{Editorial,Editorial-annotations}.
415 Internals Reference: @internalsref{text-balloon-interface}.
419 @subsubsection Grid lines
421 Vertical lines can be drawn between staves synchronized with the
424 @lilypond[quote,verbatim,ragged-right]
428 \consists "Grid_point_engraver"
430 gridInterval = #(ly:make-moment 1 4)
431 % this sets the grid interval to 1 quarternote (crotchet)
436 \consists "Grid_line_span_engraver"
437 %% by default this centers grid lines horizontally below and to the
438 % left side of the notehead, the grid lines extend from
439 % the middle lines of each staff
459 To change the grid lines use \override.
462 @lilypond[quote,verbatim,ragged-right]
466 \consists "Grid_point_engraver"
468 gridInterval = #(ly:make-moment 1 4)
469 % this sets the grid interval to 1 quarternote (crotchet)
474 \consists "Grid_line_span_engraver"
475 \override NoteColumn #'X-offset = #-0.5
476 % this moves them to the right half a staff space
487 \override Score.GridLine #'extra-offset = #'( 0.0 . 1.0 )
488 % this moves them up one staff space from the default position
500 Snippets: @lsrdir{Editorial,Editorial-annotations}.
505 @node Analysis brackets
506 @subsubsection Analysis brackets
509 @cindex phrasing brackets
510 @cindex musicological analysis
511 @cindex note grouping bracket
513 Brackets are used in musical analysis to indicate structure in musical
514 pieces. LilyPond supports a simple form of nested horizontal
515 brackets. To use this, add the @code{Horizontal_bracket_engraver} to
516 the @code{Staff} context. A bracket is started with
517 @code{\startGroup} and closed with @code{\stopGroup}.
519 @lilypond[quote,verbatim,ragged-right]
522 \Staff \consists "Horizontal_bracket_engraver"
526 c4\startGroup\startGroup
529 c4\stopGroup\stopGroup
535 Snippets: @lsrdir{Editorial,Editorial-annotations}.
537 Internals Reference: @internalsref{HorizontalBracket},
538 @internalsref{Horizontal_bracket_engraver}, @internalsref{Staff}.