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
64 The font size of notation elements may be altered. It does not
65 change the size of variable symbols, such as beams or slurs.
67 @warning{For font sizes of text, see
68 @ref{Selecting font and font size}.}
70 @lilypond[verbatim,quote,relative=2]
85 Internally, this sets the @code{fontSize} property. This in turn
86 causes the @code{font-size} property to be set in all layout
87 objects. The value of @code{font-size} is a number indicating the
88 size relative to the standard size for the current staff height.
89 Each step up is an increase of approximately 12% of the font size.
90 Six steps is exactly a factor of two. The Scheme function
91 @code{magstep} converts a @code{font-size} number to a scaling
92 factor. The @code{font-size} property can also be set directly,
93 so that only certain layout objects are affected.
95 @lilypond[verbatim,quote,relative=2]
98 \override NoteHead #'font-size = #-4
100 \override Script #'font-size = #2
102 \override Stem #'font-size = #-5
106 @cindex standard font size (notation)
107 @cindex font size (notation), standard
108 @funindex font-interface
111 Font size changes are achieved by scaling the design size that is
112 closest to the desired size. The standard font size (for
113 @w{@code{font-size = #0}}) depends on the standard staff height.
114 For a 20pt staff, a 10pt font is selected.
116 The @code{font-size} property can only be set on layout objects
117 that use fonts. These are the ones supporting the
118 @code{font-interface} layout interface.
128 @funindex \normalsize
138 @rlsr{Editorial annotations}.
141 @rinternals{font-interface}.
144 @node Fingering instructions
145 @unnumberedsubsubsec Fingering instructions
148 @cindex finger change
152 Fingering instructions can be entered using
153 @var{note}-@var{digit}:
155 @lilypond[verbatim,quote,relative=2]
159 Markup texts may be used for finger changes.
161 @lilypond[verbatim,quote,relative=2]
162 c4-1 d-2 f-4 c^\markup { \finger "2 - 3" }
169 A thumb-script can be added (e.g., in cello music) to indicate
170 that a note should be played with the thumb.
172 @lilypond[verbatim,quote,relative=2]
173 <a_\thumb a'-3>2 <b_\thumb b'-3>
176 @cindex fingering chords
177 @cindex fingering instructions for chords
178 @cindex chords, fingering
180 Fingerings for chords can also be added to individual notes of the
181 chord by adding them after the pitches.
183 @lilypond[verbatim,quote,relative=2]
184 <c-1 e-2 g-3 b-5>2 <d-1 f-2 a-3 c-5>
187 Fingering instructions may be manually placed above or below the
188 staff, see @ref{Direction and placement}.
192 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
193 {controlling-the-placement-of-chord-fingerings.ly}
195 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
196 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
202 @ref{Direction and placement}
205 @rlsr{Editorial annotations}.
208 @rinternals{FingeringEvent},
209 @rinternals{fingering-event},
210 @rinternals{Fingering_engraver},
211 @rinternals{New_fingering_engraver},
212 @rinternals{Fingering}.
216 @unnumberedsubsubsec Hidden notes
219 @cindex invisible notes
220 @cindex transparent notes
221 @cindex notes, hidden
222 @cindex notes, invisible
223 @cindex notes, transparent
226 @funindex \unHideNotes
227 @funindex unHideNotes
229 Hidden (or invisible or transparent) notes can be useful in
230 preparing theory or composition exercises.
232 @lilypond[verbatim,quote,relative=2]
244 Notation objects which are attached to invisible notes are still
247 @lilypond[verbatim,quote,relative=2]
256 @code{\hideNotes}, @code{\unHideNotes}
261 @rlsr{Editorial annotations}.
264 @rinternals{Note_spacing_engraver},
265 @rinternals{NoteSpacing}.
268 @node Coloring objects
269 @unnumberedsubsubsec Coloring objects
271 @cindex colored objects
273 @cindex coloring objects
274 @cindex colored notes
275 @cindex coloring notes
276 @cindex notes, colored
281 @funindex \with-color
285 Individual objects may be assigned colors. Valid color names
286 are listed in the @ref{List of colors}.
288 @lilypond[verbatim,quote,relative=2]
289 \override NoteHead #'color = #red
291 \override NoteHead #'color = #(x11-color 'LimeGreen)
293 \override Stem #'color = #blue
298 The full range of colors defined for X11 can be accessed by using
299 the Scheme function @code{x11-color}. The function takes one
300 argument; this can be a symbol in the form @var{'FooBar} or a
301 string in the form @var{"FooBar"}. The first form is quicker to
302 write and is more efficient. However, using the second form it is
303 possible to access X11 colors by the multi-word form of its name.
305 If @code{x11-color} cannot make sense of the parameter then the
306 color returned defaults to black.
308 @lilypond[verbatim,quote,relative=2]
309 \override Staff.StaffSymbol #'color = #(x11-color 'SlateBlue2)
310 \set Staff.instrumentName = \markup {
311 \with-color #(x11-color 'navy) "Clarinet"
315 \override Beam #'color = #(x11-color "medium turquoise")
317 \override Accidental #'color = #(x11-color 'DarkRed)
319 \override NoteHead #'color = #(x11-color "LimeGreen")
321 % this is deliberate nonsense; note that the stems remain black
322 \override Stem #'color = #(x11-color 'Boggle)
331 Exact RGB colors can be specified using the Scheme function
334 @lilypond[verbatim,quote,relative=2]
335 \override Staff.StaffSymbol #'color = #(x11-color 'SlateBlue2)
336 \set Staff.instrumentName = \markup {
337 \with-color #(x11-color 'navy) "Clarinet"
340 \override Stem #'color = #(rgb-color 0 0 0)
342 \override Stem #'color = #(rgb-color 1 1 1)
344 \override Stem #'color = #(rgb-color 0 0 0.5)
351 @ref{List of colors}, @ref{The
355 @rlsr{Editorial annotations}.
358 @cindex colored notes in chords
359 @cindex notes, colored in chords
360 @cindex color in chords
364 An X11 color is not necessarily exactly the same shade as a
365 similarly named normal color.
367 Not all X11 colors are distinguishable in a web browser, i.e.,
368 a web browser might not display a difference between @code{'LimeGreen}
369 and @code{'ForestGreen}. For web use normal colors are recommended
370 (i.e., @code{#blue}, @code{#green}, @code{#red}).
373 Notes in a chord cannot be colored with @code{\override}; use
374 @code{\tweak} instead, see @ref{The tweak command}.
378 @unnumberedsubsubsec Parentheses
382 @cindex notes, parenthesized
384 @funindex \parenthesize
385 @funindex parenthesize
387 Objects may be parenthesized by prefixing @code{\parenthesize} to
388 the music event. When prefixed to a chord, it parenthesizes every
389 note. Individual notes inside a chord may also be parenthesized.
391 @lilypond[verbatim,quote,relative=2]
393 c2 \parenthesize <c e g>
394 c2 <c \parenthesize e g>
397 Non-note objects may be parenthesized as well.
399 @lilypond[verbatim,quote,relative=2]
400 c2-\parenthesize -. d
407 @rlsr{Editorial annotations}.
410 @rinternals{Parenthesis_engraver},
411 @rinternals{ParenthesesItem},
412 @rinternals{parentheses-interface}.
416 Parenthesizing a chord prints parentheses around each individual
417 note, instead of a single large parenthesis around the entire
422 @unnumberedsubsubsec Stems
425 @cindex stem, invisible
426 @cindex invisible stem
428 Whenever a note is found, a @code{Stem} object is created
429 automatically. For whole notes and rests, they are also created but
438 @funindex \stemNeutral
444 @cindex stem, direction
447 @cindex stem, neutral
449 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
450 {default-direction-of-stems-on-the-center-line-of-the-staff.ly}
454 @ref{Direction and placement}.
457 @rlsr{Editorial annotations}.
460 @rinternals{Stem_engraver},
462 @rinternals{stem-interface}.
465 @node Outside the staff
466 @subsection Outside the staff
468 This section discusses how to add emphasis to elements in the staff
469 from outside of the staff.
474 * Analysis brackets::
478 @unnumberedsubsubsec Balloon help
481 @cindex notation, explaining
483 @cindex help, balloon
484 @funindex \balloonGrobText
485 @funindex \balloonText
486 @funindex Balloon_engraver
487 @funindex balloonGrobText
488 @funindex balloonText
490 Elements of notation can be marked and named with the help of a
491 square balloon. The primary purpose of this feature is to explain
494 @lilypond[verbatim,quote,relative=2]
495 \new Voice \with { \consists "Balloon_engraver" }
497 \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" }
499 \balloonGrobText #'Rest #'(-4 . -4) \markup { "I'm a rest" }
501 <c, g'-\balloonText #'(-2 . -2) \markup { "I'm a note head" } c>2.
506 There are two music functions, @code{balloonGrobText} and
507 @code{balloonText}; the former is used like
508 @w{@code{\once \override}} to attach text to any grob, and the
509 latter is used like @code{\tweak}, typically within chords, to
510 attach text to an individual note.
512 Balloon text normally influences note spacing, but this can be
515 @lilypond[verbatim,quote,relative=2]
516 \new Voice \with { \consists "Balloon_engraver" }
519 \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" }
521 \balloonGrobText #'Rest #'(-4 . -4) \markup { "I'm a rest" }
524 <c, g'-\balloonText #'(-2 . -2) \markup { "I'm a note head" } c>2.
531 @funindex balloonLengthOn
532 @funindex balloonLengthOff
533 @funindex \balloonLengthOn
534 @funindex \balloonLengthOff
536 @code{\balloonLengthOn}, @code{\balloonLengthOff}
541 @rlsr{Editorial annotations}.
544 @rinternals{Balloon_engraver},
545 @rinternals{BalloonTextItem},
546 @rinternals{balloon-interface}.
550 @unnumberedsubsubsec Grid lines
554 @cindex vertical lines between staves
555 @cindex lines, vertical between staves
556 @funindex Grid_point_engraver
557 @funindex Grid_line_span_engraver
558 @funindex gridInterval
560 Vertical lines can be drawn between staves synchronized with the
563 The @code{Grid_point_engraver} must be used to create the end
564 points of the lines, while the @code{Grid_line_span_engraver} must
565 be used to actually draw the lines. By default this centers grid
566 lines horizontally below and to the left side of each note head.
567 Grid lines extend from the middle lines of each staff. The
568 @code{gridInterval} must specify the duration between the grid
571 @lilypond[verbatim,quote]
575 \consists "Grid_point_engraver"
576 gridInterval = #(ly:make-moment 1 4)
580 \consists "Grid_line_span_engraver"
586 \new Staff \relative c'' {
590 \new Staff \relative c {
601 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
602 {grid-lines--changing-their-appearance.ly}
608 @rlsr{Editorial annotations}.
611 @rinternals{Grid_line_span_engraver},
612 @rinternals{Grid_point_engraver},
613 @rinternals{GridLine},
614 @rinternals{GridPoint},
615 @rinternals{grid-line-interface},
616 @rinternals{grid-point-interface}.
619 @node Analysis brackets
620 @unnumberedsubsubsec Analysis brackets
623 @cindex bracket, phrasing
624 @cindex phrasing bracket
625 @cindex musicological analysis
626 @cindex note grouping bracket
627 @cindex horizontal bracket
628 @cindex bracket, horizontal
629 @funindex Horizontal_bracket_engraver
630 @funindex \startGroup
635 Brackets are used in musical analysis to indicate structure in musical
636 pieces. Simple horizontal brackets are supported.
638 @lilypond[verbatim,quote]
642 \consists "Horizontal_bracket_engraver"
651 Analysis brackets may be nested.
653 @lilypond[verbatim,quote]
657 \consists "Horizontal_bracket_engraver"
661 c4\startGroup\startGroup
664 d4\stopGroup\stopGroup
671 @rlsr{Editorial annotations}.
674 @rinternals{Horizontal_bracket_engraver},
675 @rinternals{HorizontalBracket},
676 @rinternals{horizontal-bracket-interface},