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.
11 @node Editorial annotations
12 @section Editorial annotations
14 @lilypondfile[quote]{editorial-headword.ly}
16 This section discusses the various ways to change the appearance of
17 notes and add analysis or educational emphasis.
25 @node Inside the staff
26 @subsection Inside the staff
28 This section discusses how to add emphasis to elements that are
32 * Selecting notation font size::
33 * Fingering instructions::
40 @node Selecting notation font size
41 @unnumberedsubsubsec Selecting notation font size
43 @cindex font size (notation) scaling
44 @cindex font size (notation)
45 @cindex selecting font size (notation)
46 @cindex notation font size
65 The font size of notation elements may be altered. It does not
66 change the size of variable symbols, such as beams or slurs.
68 @warning{For font sizes of text, see
69 @ref{Selecting font and font size}.}
71 @lilypond[verbatim,quote,relative=2]
86 Internally, this sets the @code{fontSize} property. This in turn
87 causes the @code{font-size} property to be set in all layout
88 objects. The value of @code{font-size} is a number indicating the
89 size relative to the standard size for the current staff height.
90 Each step up is an increase of approximately 12% of the font size.
91 Six steps is exactly a factor of two. The Scheme function
92 @code{magstep} converts a @code{font-size} number to a scaling
93 factor. The @code{font-size} property can also be set directly,
94 so that only certain layout objects are affected.
96 @lilypond[verbatim,quote,relative=2]
99 \override NoteHead #'font-size = #-4
101 \override Script #'font-size = #2
103 \override Stem #'font-size = #-5
107 @cindex standard font size (notation)
108 @cindex font size (notation), standard
110 @funindex font-interface
113 Font size changes are achieved by scaling the design size that is
114 closest to the desired size. The standard font size (for
115 @w{@code{font-size = #0}}) depends on the standard staff height.
116 For a 20pt staff, a 10pt font is selected.
118 The @code{font-size} property can only be set on layout objects
119 that use fonts. These are the ones supporting the
120 @code{font-interface} layout interface.
135 @rlsr{Editorial annotations}.
138 @rinternals{font-interface}.
141 @node Fingering instructions
142 @unnumberedsubsubsec Fingering instructions
145 @cindex finger change
150 Fingering instructions can be entered using
151 @var{note}-@var{digit}:
153 @lilypond[verbatim,quote,relative=2]
157 Markup texts may be used for finger changes.
159 @lilypond[verbatim,quote,relative=2]
160 c4-1 d-2 f-4 c^\markup { \finger "2 - 3" }
168 A thumb-script can be added (e.g., in cello music) to indicate
169 that a note should be played with the thumb.
171 @lilypond[verbatim,quote,relative=2]
172 <a_\thumb a'-3>2 <b_\thumb b'-3>
175 @cindex fingering chords
176 @cindex fingering instructions for chords
177 @cindex chords, fingering
179 Fingerings for chords can also be added to individual notes of the
180 chord by adding them after the pitches.
182 @lilypond[verbatim,quote,relative=2]
183 <c-1 e-2 g-3 b-5>2 <d-1 f-2 a-3 c-5>
186 Fingering instructions may be manually placed above or below the
187 staff, see @ref{Direction and placement}.
191 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
192 {controlling-the-placement-of-chord-fingerings.ly}
194 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
195 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
197 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
198 {avoiding-collisions-with-chord-fingerings.ly}
203 @ref{Direction and placement}
206 @rlsr{Editorial annotations}.
209 @rinternals{FingeringEvent},
210 @rinternals{fingering-event},
211 @rinternals{Fingering_engraver},
212 @rinternals{New_fingering_engraver},
213 @rinternals{Fingering}.
217 @unnumberedsubsubsec Hidden notes
220 @cindex invisible notes
221 @cindex transparent notes
222 @cindex notes, hidden
223 @cindex notes, invisible
224 @cindex notes, transparent
228 @funindex \unHideNotes
229 @funindex unHideNotes
231 Hidden (or invisible or transparent) notes can be useful in
232 preparing theory or composition exercises.
234 @lilypond[verbatim,quote,relative=2]
246 Notation objects which are attached to invisible notes are still
249 @lilypond[verbatim,quote,relative=2]
264 @rlsr{Editorial annotations}.
267 @rinternals{Note_spacing_engraver},
268 @rinternals{NoteSpacing}.
271 @node Coloring objects
272 @unnumberedsubsubsec Coloring objects
274 @cindex colored objects
275 @cindex objects, colored
277 @cindex coloring objects
278 @cindex colored notes
279 @cindex coloring notes
280 @cindex notes, colored
286 @funindex \with-color
290 Individual objects may be assigned colors. Valid color names
291 are listed in the @ref{List of colors}.
293 @lilypond[verbatim,quote,relative=2]
294 \override NoteHead #'color = #red
296 \override NoteHead #'color = #(x11-color 'LimeGreen)
298 \override Stem #'color = #blue
303 The full range of colors defined for X11 can be accessed by using
304 the Scheme function @code{x11-color}. The function takes one
305 argument; this can be a symbol in the form @var{'FooBar} or a
306 string in the form @var{"FooBar"}. The first form is quicker to
307 write and is more efficient. However, using the second form it is
308 possible to access X11 colors by the multi-word form of its name.
310 If @code{x11-color} cannot make sense of the parameter then the
311 color returned defaults to black.
313 @lilypond[verbatim,quote,relative=2]
314 \override Staff.StaffSymbol #'color = #(x11-color 'SlateBlue2)
315 \set Staff.instrumentName = \markup {
316 \with-color #(x11-color 'navy) "Clarinet"
320 \override Beam #'color = #(x11-color "medium turquoise")
322 \override Accidental #'color = #(x11-color 'DarkRed)
324 \override NoteHead #'color = #(x11-color "LimeGreen")
326 % this is deliberate nonsense; note that the stems remain black
327 \override Stem #'color = #(x11-color 'Boggle)
337 Exact RGB colors can be specified using the Scheme function
340 @lilypond[verbatim,quote,relative=2]
341 \override Staff.StaffSymbol #'color = #(x11-color 'SlateBlue2)
342 \set Staff.instrumentName = \markup {
343 \with-color #(x11-color 'navy) "Clarinet"
346 \override Stem #'color = #(rgb-color 0 0 0)
348 \override Stem #'color = #(rgb-color 1 1 1)
350 \override Stem #'color = #(rgb-color 0 0 0.5)
357 @ref{List of colors}, @ref{The
361 @rlsr{Editorial annotations}.
365 @cindex colored notes in chords
366 @cindex notes, colored in chords
367 @cindex color in chords
372 An X11 color is not necessarily exactly the same shade as a
373 similarly named normal color.
375 Not all X11 colors are distinguishable in a web browser, i.e.,
376 a web browser might not display a difference between @code{'LimeGreen}
377 and @code{'ForestGreen}. For web use normal colors are recommended
378 (i.e., @code{#blue}, @code{#green}, @code{#red}).
381 Notes in a chord cannot be colored with @code{\override}; use
382 @code{\tweak} instead, see @ref{The tweak command}.
386 @unnumberedsubsubsec Parentheses
390 @cindex notes, parenthesized
393 @funindex \parenthesize
394 @funindex parenthesize
396 Objects may be parenthesized by prefixing @code{\parenthesize} to
397 the music event. When prefixed to a chord, it parenthesizes every
398 note. Individual notes inside a chord may also be parenthesized.
400 @lilypond[verbatim,quote,relative=2]
402 c2 \parenthesize <c e g>
403 c2 <c \parenthesize e g>
406 Non-note objects may be parenthesized as well. For articulations,
407 a hyphen is needed before the @code{\parenthesize} command.
409 @lilypond[verbatim,quote,relative=2]
410 c2-\parenthesize -. d
417 @rlsr{Editorial annotations}.
420 @rinternals{Parenthesis_engraver},
421 @rinternals{ParenthesesItem},
422 @rinternals{parentheses-interface}.
427 Parenthesizing a chord prints parentheses around each individual
428 note, instead of a single large parenthesis around the entire
433 @unnumberedsubsubsec Stems
436 @cindex stem, invisible
437 @cindex invisible stem
443 @funindex \stemNeutral
444 @funindex stemNeutral
445 @cindex stem, direction
448 @cindex stem, neutral
450 Whenever a note is found, a @code{Stem} object is created
451 automatically. For whole notes and rests, they are also created but
464 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
465 {default-direction-of-stems-on-the-center-line-of-the-staff.ly}
470 @ref{Direction and placement}.
473 @rlsr{Editorial annotations}.
476 @rinternals{Stem_engraver},
478 @rinternals{stem-interface}.
481 @node Outside the staff
482 @subsection Outside the staff
484 This section discusses how to add emphasis to elements in the staff
485 from outside of the staff.
490 * Analysis brackets::
494 @unnumberedsubsubsec Balloon help
497 @cindex notation, explaining
499 @cindex help, balloon
501 @funindex \balloonGrobText
502 @funindex \balloonText
503 @funindex Balloon_engraver
504 @funindex balloonGrobText
505 @funindex balloonText
506 @funindex \balloonLengthOn
507 @funindex balloonLengthOn
508 @funindex \balloonLengthOff
509 @funindex balloonLengthOff
511 Elements of notation can be marked and named with the help of a
512 square balloon. The primary purpose of this feature is to explain
515 @lilypond[verbatim,quote,relative=2]
516 \new Voice \with { \consists "Balloon_engraver" }
518 \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" }
520 \balloonGrobText #'Rest #'(-4 . -4) \markup { "I'm a rest" }
522 <c, g'-\balloonText #'(-2 . -2) \markup { "I'm a note head" } c>2.
527 There are two music functions, @code{balloonGrobText} and
528 @code{balloonText}; the former is used like
529 @w{@code{\once \override}} to attach text to any grob, and the
530 latter is used like @code{\tweak}, typically within chords, to
531 attach text to an individual note.
533 Balloon text normally influences note spacing, but this can be
536 @lilypond[verbatim,quote,relative=2]
537 \new Voice \with { \consists "Balloon_engraver" }
540 \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" }
542 \balloonGrobText #'Rest #'(-4 . -4) \markup { "I'm a rest" }
545 <c, g'-\balloonText #'(-2 . -2) \markup { "I'm a note head" } c>2.
551 @code{\balloonLengthOn},
552 @code{\balloonLengthOff}.
558 @rlsr{Editorial annotations}.
561 @rinternals{Balloon_engraver},
562 @rinternals{BalloonTextItem},
563 @rinternals{balloon-interface}.
567 @unnumberedsubsubsec Grid lines
571 @cindex vertical lines between staves
572 @cindex lines, vertical between staves
574 @funindex Grid_point_engraver
575 @funindex Grid_line_span_engraver
576 @funindex gridInterval
578 Vertical lines can be drawn between staves synchronized with the
581 The @code{Grid_point_engraver} must be used to create the end
582 points of the lines, while the @code{Grid_line_span_engraver} must
583 be used to actually draw the lines. By default this centers grid
584 lines horizontally below and to the left side of each note head.
585 Grid lines extend from the middle lines of each staff. The
586 @code{gridInterval} must specify the duration between the grid
589 @lilypond[verbatim,quote]
593 \consists "Grid_point_engraver"
594 gridInterval = #(ly:make-moment 1 4)
598 \consists "Grid_line_span_engraver"
604 \new Staff \relative c'' {
608 \new Staff \relative c {
619 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
620 {grid-lines--changing-their-appearance.ly}
625 @rlsr{Editorial annotations}.
628 @rinternals{Grid_line_span_engraver},
629 @rinternals{Grid_point_engraver},
630 @rinternals{GridLine},
631 @rinternals{GridPoint},
632 @rinternals{grid-line-interface},
633 @rinternals{grid-point-interface}.
636 @node Analysis brackets
637 @unnumberedsubsubsec Analysis brackets
640 @cindex bracket, phrasing
641 @cindex phrasing bracket
642 @cindex musicological analysis
643 @cindex analysis, musicological
644 @cindex note grouping bracket
645 @cindex horizontal bracket
646 @cindex bracket, horizontal
648 @funindex Horizontal_bracket_engraver
649 @funindex \startGroup
654 Brackets are used in musical analysis to indicate structure in musical
655 pieces. Simple horizontal brackets are supported.
657 @lilypond[verbatim,quote]
661 \consists "Horizontal_bracket_engraver"
670 Analysis brackets may be nested.
672 @lilypond[verbatim,quote]
676 \consists "Horizontal_bracket_engraver"
680 c4\startGroup\startGroup
683 d4\stopGroup\stopGroup
690 @rlsr{Editorial annotations}.
693 @rinternals{Horizontal_bracket_engraver},
694 @rinternals{HorizontalBracket},
695 @rinternals{horizontal-bracket-interface},