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.
408 @lilypond[verbatim,quote,relative=2]
409 c2-\parenthesize -. d
416 @rlsr{Editorial annotations}.
419 @rinternals{Parenthesis_engraver},
420 @rinternals{ParenthesesItem},
421 @rinternals{parentheses-interface}.
426 Parenthesizing a chord prints parentheses around each individual
427 note, instead of a single large parenthesis around the entire
432 @unnumberedsubsubsec Stems
435 @cindex stem, invisible
436 @cindex invisible stem
442 @funindex \stemNeutral
443 @funindex stemNeutral
444 @cindex stem, direction
447 @cindex stem, neutral
449 Whenever a note is found, a @code{Stem} object is created
450 automatically. For whole notes and rests, they are also created but
463 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
464 {default-direction-of-stems-on-the-center-line-of-the-staff.ly}
469 @ref{Direction and placement}.
472 @rlsr{Editorial annotations}.
475 @rinternals{Stem_engraver},
477 @rinternals{stem-interface}.
480 @node Outside the staff
481 @subsection Outside the staff
483 This section discusses how to add emphasis to elements in the staff
484 from outside of the staff.
489 * Analysis brackets::
493 @unnumberedsubsubsec Balloon help
496 @cindex notation, explaining
498 @cindex help, balloon
500 @funindex \balloonGrobText
501 @funindex \balloonText
502 @funindex Balloon_engraver
503 @funindex balloonGrobText
504 @funindex balloonText
505 @funindex \balloonLengthOn
506 @funindex balloonLengthOn
507 @funindex \balloonLengthOff
508 @funindex balloonLengthOff
510 Elements of notation can be marked and named with the help of a
511 square balloon. The primary purpose of this feature is to explain
514 @lilypond[verbatim,quote,relative=2]
515 \new Voice \with { \consists "Balloon_engraver" }
517 \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" }
519 \balloonGrobText #'Rest #'(-4 . -4) \markup { "I'm a rest" }
521 <c, g'-\balloonText #'(-2 . -2) \markup { "I'm a note head" } c>2.
526 There are two music functions, @code{balloonGrobText} and
527 @code{balloonText}; the former is used like
528 @w{@code{\once \override}} to attach text to any grob, and the
529 latter is used like @code{\tweak}, typically within chords, to
530 attach text to an individual note.
532 Balloon text normally influences note spacing, but this can be
535 @lilypond[verbatim,quote,relative=2]
536 \new Voice \with { \consists "Balloon_engraver" }
539 \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" }
541 \balloonGrobText #'Rest #'(-4 . -4) \markup { "I'm a rest" }
544 <c, g'-\balloonText #'(-2 . -2) \markup { "I'm a note head" } c>2.
550 @code{\balloonLengthOn},
551 @code{\balloonLengthOff}.
557 @rlsr{Editorial annotations}.
560 @rinternals{Balloon_engraver},
561 @rinternals{BalloonTextItem},
562 @rinternals{balloon-interface}.
566 @unnumberedsubsubsec Grid lines
570 @cindex vertical lines between staves
571 @cindex lines, vertical between staves
573 @funindex Grid_point_engraver
574 @funindex Grid_line_span_engraver
575 @funindex gridInterval
577 Vertical lines can be drawn between staves synchronized with the
580 The @code{Grid_point_engraver} must be used to create the end
581 points of the lines, while the @code{Grid_line_span_engraver} must
582 be used to actually draw the lines. By default this centers grid
583 lines horizontally below and to the left side of each note head.
584 Grid lines extend from the middle lines of each staff. The
585 @code{gridInterval} must specify the duration between the grid
588 @lilypond[verbatim,quote]
592 \consists "Grid_point_engraver"
593 gridInterval = #(ly:make-moment 1 4)
597 \consists "Grid_line_span_engraver"
603 \new Staff \relative c'' {
607 \new Staff \relative c {
618 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
619 {grid-lines--changing-their-appearance.ly}
624 @rlsr{Editorial annotations}.
627 @rinternals{Grid_line_span_engraver},
628 @rinternals{Grid_point_engraver},
629 @rinternals{GridLine},
630 @rinternals{GridPoint},
631 @rinternals{grid-line-interface},
632 @rinternals{grid-point-interface}.
635 @node Analysis brackets
636 @unnumberedsubsubsec Analysis brackets
639 @cindex bracket, phrasing
640 @cindex phrasing bracket
641 @cindex musicological analysis
642 @cindex analysis, musicological
643 @cindex note grouping bracket
644 @cindex horizontal bracket
645 @cindex bracket, horizontal
647 @funindex Horizontal_bracket_engraver
648 @funindex \startGroup
653 Brackets are used in musical analysis to indicate structure in musical
654 pieces. Simple horizontal brackets are supported.
656 @lilypond[verbatim,quote]
660 \consists "Horizontal_bracket_engraver"
669 Analysis brackets may be nested.
671 @lilypond[verbatim,quote]
675 \consists "Horizontal_bracket_engraver"
679 c4\startGroup\startGroup
682 d4\stopGroup\stopGroup
689 @rlsr{Editorial annotations}.
692 @rinternals{Horizontal_bracket_engraver},
693 @rinternals{HorizontalBracket},
694 @rinternals{horizontal-bracket-interface},