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{fontSize},
142 @rinternals{font-size},
143 @rinternals{font-interface}.
146 @node Fingering instructions
147 @unnumberedsubsubsec Fingering instructions
150 @cindex finger change
154 Fingering instructions can be entered using
155 @var{note}-@var{digit}:
157 @lilypond[verbatim,quote,relative=2]
161 Markup texts may be used for finger changes.
163 @lilypond[verbatim,quote,relative=2]
164 c4-1 d-2 f-4 c^\markup { \finger "2 - 3" }
171 A thumb-script can be added (e.g., in cello music) to indicate
172 that a note should be played with the thumb.
174 @lilypond[verbatim,quote,relative=2]
175 <a_\thumb a'-3>2 <b_\thumb b'-3>
178 @cindex fingering chords
179 @cindex fingering instructions for chords
180 @cindex chords, fingering
182 Fingerings for chords can also be added to individual notes of the
183 chord by adding them after the pitches.
185 @lilypond[verbatim,quote,relative=2]
186 <c-1 e-2 g-3 b-5>2 <d-1 f-2 a-3 c-5>
189 Fingering instructions may be manually placed above or below the
190 staff, see @ref{Direction and placement}.
194 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
195 {controlling-the-placement-of-chord-fingerings.ly}
197 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
198 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
204 @ref{Direction and placement}
207 @rlsr{Editorial annotations}.
210 @rinternals{FingeringEvent},
211 @rinternals{fingering-event},
212 @rinternals{Fingering_engraver},
213 @rinternals{New_fingering_engraver},
214 @rinternals{Fingering}.
218 @unnumberedsubsubsec Hidden notes
221 @cindex invisible notes
222 @cindex transparent notes
223 @cindex notes, hidden
224 @cindex notes, invisible
225 @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]
258 @code{\hideNotes}, @code{\unHideNotes}
263 @rlsr{Editorial annotations}.
266 @rinternals{Note_spacing_engraver},
267 @rinternals{NoteSpacing}.
270 @node Coloring objects
271 @unnumberedsubsubsec Coloring objects
273 @cindex colored objects
275 @cindex coloring objects
276 @cindex colored notes
277 @cindex coloring notes
278 @cindex notes, colored
283 @funindex \with-color
287 Individual objects may be assigned colors. Valid color names
288 are listed in the @ref{List of colors}.
290 @lilypond[verbatim,quote,relative=2]
291 \override NoteHead #'color = #red
293 \override NoteHead #'color = #(x11-color 'LimeGreen)
295 \override Stem #'color = #blue
300 The full range of colors defined for X11 can be accessed by using
301 the Scheme function @code{x11-color}. The function takes one
302 argument; this can be a symbol in the form @var{'FooBar} or a
303 string in the form @var{"FooBar"}. The first form is quicker to
304 write and is more efficient. However, using the second form it is
305 possible to access X11 colors by the multi-word form of its name.
307 If @code{x11-color} cannot make sense of the parameter then the
308 color returned defaults to black.
310 @lilypond[verbatim,quote,relative=2]
311 \override Staff.StaffSymbol #'color = #(x11-color 'SlateBlue2)
312 \set Staff.instrumentName = \markup {
313 \with-color #(x11-color 'navy) "Clarinet"
317 \override Beam #'color = #(x11-color "medium turquoise")
319 \override Accidental #'color = #(x11-color 'DarkRed)
321 \override NoteHead #'color = #(x11-color "LimeGreen")
323 % this is deliberate nonsense; note that the stems remain black
324 \override Stem #'color = #(x11-color 'Boggle)
333 Exact RGB colors can be specified using the Scheme function
336 @lilypond[verbatim,quote,relative=2]
337 \override Staff.StaffSymbol #'color = #(x11-color 'SlateBlue2)
338 \set Staff.instrumentName = \markup {
339 \with-color #(x11-color 'navy) "Clarinet"
342 \override Stem #'color = #(rgb-color 0 0 0)
344 \override Stem #'color = #(rgb-color 1 1 1)
346 \override Stem #'color = #(rgb-color 0 0 0.5)
353 @ref{List of colors}, @ref{The
357 @rlsr{Editorial annotations}.
360 @cindex colored notes in chords
361 @cindex notes, colored in chords
362 @cindex color in chords
366 An X11 color is not necessarily exactly the same shade as a
367 similarly named normal color.
369 Not all X11 colors are distinguishable in a web browser, i.e.,
370 a web browser might not display a difference between @code{'LimeGreen}
371 and @code{'ForestGreen}. For web use normal colors are recommended
372 (i.e., @code{#blue}, @code{#green}, @code{#red}).
375 Notes in a chord cannot be colored with @code{\override}; use
376 @code{\tweak} instead, see @ref{The tweak command}.
380 @unnumberedsubsubsec Parentheses
384 @cindex notes, parenthesized
386 @funindex \parenthesize
387 @funindex parenthesize
389 Objects may be parenthesized by prefixing @code{\parenthesize} to
390 the music event. When prefixed to a chord, it parenthesizes every
391 note. Individual notes inside a chord may also be parenthesized.
393 @lilypond[verbatim,quote,relative=2]
395 c2 \parenthesize <c e g>
396 c2 <c \parenthesize e g>
399 Non-note objects may be parenthesized as well.
401 @lilypond[verbatim,quote,relative=2]
402 c2-\parenthesize -. d
409 @rlsr{Editorial annotations}.
412 @rinternals{Parenthesis_engraver},
413 @rinternals{ParenthesesItem},
414 @rinternals{parentheses-interface}.
418 Parenthesizing a chord prints parentheses around each individual
419 note, instead of a single large parenthesis around the entire
424 @unnumberedsubsubsec Stems
427 @cindex stem, invisible
428 @cindex invisible stem
430 Whenever a note is found, a @code{Stem} object is created
431 automatically. For whole notes and rests, they are also created but
440 @funindex \stemNeutral
446 @cindex stem, direction
449 @cindex stem, neutral
451 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
452 {default-direction-of-stems-on-the-center-line-of-the-staff.ly}
456 @ref{Direction and placement}.
459 @rlsr{Editorial annotations}.
462 @rinternals{Stem_engraver},
464 @rinternals{stem-interface}.
467 @node Outside the staff
468 @subsection Outside the staff
470 This section discusses how to add emphasis to elements in the staff
471 from outside of the staff.
476 * Analysis brackets::
480 @unnumberedsubsubsec Balloon help
483 @cindex notation, explaining
485 @cindex help, balloon
486 @funindex \balloonGrobText
487 @funindex \balloonText
488 @funindex Balloon_engraver
489 @funindex balloonGrobText
490 @funindex balloonText
492 Elements of notation can be marked and named with the help of a
493 square balloon. The primary purpose of this feature is to explain
496 @lilypond[verbatim,quote,relative=2]
497 \new Voice \with { \consists "Balloon_engraver" }
499 \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" }
501 \balloonGrobText #'Rest #'(-4 . -4) \markup { "I'm a rest" }
503 <c, g'-\balloonText #'(-2 . -2) \markup { "I'm a note head" } c>2.
508 There are two music functions, @code{balloonGrobText} and
509 @code{balloonText}; the former is used like
510 @w{@code{\once \override}} to attach text to any grob, and the
511 latter is used like @code{\tweak}, typically within chords, to
512 attach text to an individual note.
514 Balloon text normally influences note spacing, but this can be
517 @lilypond[verbatim,quote,relative=2]
518 \new Voice \with { \consists "Balloon_engraver" }
521 \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" }
523 \balloonGrobText #'Rest #'(-4 . -4) \markup { "I'm a rest" }
526 <c, g'-\balloonText #'(-2 . -2) \markup { "I'm a note head" } c>2.
533 @funindex balloonLengthOn
534 @funindex balloonLengthOff
535 @funindex \balloonLengthOn
536 @funindex \balloonLengthOff
538 @code{\balloonLengthOn}, @code{\balloonLengthOff}
543 @rlsr{Editorial annotations}.
546 @rinternals{Balloon_engraver},
547 @rinternals{BalloonTextItem},
548 @rinternals{balloon-interface}.
552 @unnumberedsubsubsec Grid lines
556 @cindex vertical lines between staves
557 @cindex lines, vertical between staves
558 @funindex Grid_point_engraver
559 @funindex Grid_line_span_engraver
560 @funindex gridInterval
562 Vertical lines can be drawn between staves synchronized with the
565 The @code{Grid_point_engraver} must be used to create the end
566 points of the lines, while the @code{Grid_line_span_engraver} must
567 be used to actually draw the lines. By default this centers grid
568 lines horizontally below and to the left side of each note head.
569 Grid lines extend from the middle lines of each staff. The
570 @code{gridInterval} must specify the duration between the grid
573 @lilypond[verbatim,quote]
577 \consists "Grid_point_engraver"
578 gridInterval = #(ly:make-moment 1 4)
582 \consists "Grid_line_span_engraver"
588 \new Staff \relative c'' {
592 \new Staff \relative c {
603 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
604 {grid-lines--changing-their-appearance.ly}
610 @rlsr{Editorial annotations}.
613 @rinternals{Grid_line_span_engraver},
614 @rinternals{Grid_point_engraver},
615 @rinternals{GridLine},
616 @rinternals{GridPoint},
617 @rinternals{grid-line-interface},
618 @rinternals{grid-point-interface}.
621 @node Analysis brackets
622 @unnumberedsubsubsec Analysis brackets
625 @cindex bracket, phrasing
626 @cindex phrasing bracket
627 @cindex musicological analysis
628 @cindex note grouping bracket
629 @cindex horizontal bracket
630 @cindex bracket, horizontal
631 @funindex Horizontal_bracket_engraver
632 @funindex \startGroup
637 Brackets are used in musical analysis to indicate structure in musical
638 pieces. Simple horizontal brackets are supported.
640 @lilypond[verbatim,quote]
644 \consists "Horizontal_bracket_engraver"
653 Analysis brackets may be nested.
655 @lilypond[verbatim,quote]
659 \consists "Horizontal_bracket_engraver"
663 c4\startGroup\startGroup
666 d4\stopGroup\stopGroup
673 @rlsr{Editorial annotations}.
676 @rinternals{Horizontal_bracket_engraver},
677 @rinternals{HorizontalBracket},
678 @rinternals{horizontal-bracket-interface},