2 @c This file is part of lilypond.tely
4 @c A menu is needed before every deeper *section nesting of @node's; run
5 @c M-x texinfo-all-menus-update
6 @c to automatically fill in these menus before saving changes
9 @chapter Notation manual
11 This chapter describes all the different types of notation supported
12 by LilyPond. It is intended as a reference for users that are already
13 somewhat familiar with LilyPond.
17 * Easier music entry::
31 * Contemporary notation::
36 @c FIXME: Note entry vs Music entry at top level menu is confusing.
42 This section is about basic notation elements notes, rests and
43 related constructs, such as stems, tuplets and ties.
48 * Chromatic alterations::
63 A note is printed by specifying its pitch and then its duration
64 @footnote{Notes constitute the most basic elements of LilyPond input,
65 but they do not form valid input on their own without a @code{\score}
66 block. However, for the sake of brevity and simplicity we will
67 generally omit @code{\score} blocks and @code{\paper} declarations in
70 @lilypond[quote,fragment,verbatim]
79 @cindex Note specification
81 @cindex entering notes
83 The most common syntax for pitch entry is used in standard notes and
84 @code{\chords} mode. In these modes, pitches may be designated by
85 names. The notes are specified by the letters @code{a} through
86 @code{g}, while the octave is formed with notes ranging from @code{c}
87 to @code{b}. The pitch @code{c} is an octave below middle C and the
88 letters span the octave above that C
90 @lilypond[quote,fragment,verbatim]
92 a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
95 @cindex note names, Dutch
97 A sharp is formed by adding @code{-is} to the end of a pitch name and
98 a flat is formed by adding @code{-es}. Double sharps and double flats
99 are obtained by adding @code{-isis} or @code{-eses}. These
100 names are the Dutch note names. In Dutch, @code{aes} is contracted to
101 @code{as}, but both forms are accepted. Similarly, both
102 @code{es} and @code{ees} are accepted.
104 Half-flats and half-sharps are formed by adding @code{-eh} and
105 @code{-ih}; the following is a series of Cs with increasing pitches
107 @cindex quarter tones
108 @cindex semi-flats, semi-sharps
110 @lilypond[fragment,quote,verbatim,relative=3]
122 There are predefined sets of note names for various other languages.
123 To use them, include the language specific init file. For
124 example: @code{\include "english.ly"}. The available language files
125 and the note names they define are
130 Note Names sharp flat
131 nederlands.ly c d e f g a bes b -is -es
132 english.ly c d e f g a bf b -s/-sharp -f/-flat
134 deutsch.ly c d e f g a b h -is -es
135 norsk.ly c d e f g a b h -iss/-is -ess/-es
136 svenska.ly c d e f g a b h -iss -ess
137 italiano.ly do re mi fa sol la sib si -d -b
138 catalan.ly do re mi fa sol la sib si -d/-s -b
139 espanol.ly do re mi fa sol la sib si -s -b
148 The optional octave specification takes the form of a series of
149 single quote (`@code{'}') characters or a series of comma
150 (`@code{,}') characters. Each @code{'} raises the pitch by one
151 octave; each @code{,} lowers the pitch by an octave
153 @lilypond[quote,fragment,verbatim]
154 c' c'' es' g' as' gisis' ais'
160 Notes can be hidden and unhidden with the following commands
162 @cindex @code{\hideNotes}
164 @cindex @code{\unHideNotes}
170 Program reference: @internalsref{NoteEvent}, and @internalsref{NoteHead}.
172 @node Chromatic alterations
173 @subsection Chromatic alterations
175 Normally accidentals are printed automatically, but you may also
176 print them manually. A reminder accidental
177 @cindex reminder accidental
179 can be forced by adding an exclamation mark @code{!}
180 after the pitch. A cautionary accidental
181 @cindex cautionary accidental
182 @cindex parenthesized accidental
183 (i.e. an accidental within parentheses) can be obtained by adding the
184 question mark `@code{?}' after the pitch
186 @lilypond[quote,fragment,verbatim]
187 cis' cis' cis'! cis'?
193 The automatic production of accidentals can be tuned in many
194 ways. For more information, refer to @ref{Accidentals}.
199 There are no generally accepted standards for denoting three quarter
200 flats, so LilyPond's symbol does not conform to any standard.
205 A chord is formed by a enclosing a set of pitches in @code{<} and
206 @code{>}. A chord may be followed by a duration, and a set of
207 articulations, just like simple notes.
209 @lilypond[fragment,quote,relative=1]
220 Rests are entered like notes, with the note name @code{r}
222 @lilypond[fragment,quote,raggedright,verbatim]
226 Whole bar rests, centered in middle of the bar,
227 must be done with multi-measure rests. They are discussed in
228 @ref{Multi measure rests}.
231 A rest's vertical position may be explicitly specified by entering a
232 note with the @code{\rest} keyword appended. This makes manual
233 formatting in polyphonic music easier. Rest collision testing will
234 leave these rests alone
238 @lilypond[fragment,quote,raggedright,verbatim]
244 Program reference: @internalsref{RestEvent}, and @internalsref{Rest}.
251 @cindex Invisible rest
254 An invisible rest (also called a `skip') can be entered like a note
255 with note name `@code{s}' or with @code{\skip @var{duration}}
257 @lilypond[fragment,quote,raggedright,verbatim]
261 The @code{s} syntax is only available in note mode and chord mode. In
262 other situations, you should use the @code{\skip} command
264 @lilypond[quote,raggedright,verbatim]
266 { \time 4/8 \skip 2 \time 4/4 }
267 \relative c'' { a2 a1 }
271 The skip command is merely an empty musical placeholder. It does not
272 produce any output, not even transparent output.
274 The @code{s} skip command does create @internalsref{Staff} and
275 @internalsref{Voice} when necessary, similar to note and rest
276 commands. For example, the following results in an empty staff.
278 @lilypond[quote,raggedright,verbatim]
282 The same fragment using @code{\skip} results in an empty page.
286 Program reference: @internalsref{SkipEvent}, @internalsref{SkipMusic}.
291 @subsection Durations
295 @cindex @code{\longa}
296 @cindex @code{\breve}
297 @cindex @code{\maxima}
300 In Note, Chord, and Lyrics mode, durations are designated by numbers
301 and dots: durations are entered as their reciprocal values. For example,
302 a quarter note is entered using a @code{4} (since it is a 1/4 note), while
303 a half note is entered using a @code{2} (since it is a 1/2 note). For notes
304 longer than a whole you must use variables
308 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
310 r1 r2 r4 r8 r16 r32 r64 r64
316 a\breve*1/2 \autoBeamOff
317 a1 a2 a4 a8 a16 a32 a64 a64
318 r\longa*1/4 r\breve *1/2
319 r1 r2 r4 r8 r16 r32 r64 r64
325 \remove "Clef_engraver"
326 \override StaffSymbol #'transparent = ##t
327 \override TimeSignature #'transparent = ##t
328 \override BarLine #'transparent = ##t
329 \consists "Pitch_squash_engraver"
336 If the duration is omitted then it is set to the previously entered
337 duration. The default for the first note is a quarter note. The duration
338 can be followed by dots (`@code{.}') in order to obtain dotted note
342 @lilypond[quote,fragment,verbatim]
343 a' b' c''8 b' a'4 a'4. b'4.. c'8.
348 You can alter the length of duration by a fraction @var{N/M}
349 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
350 will not affect the appearance of the notes or rests produced.
352 In the following example, the first three notes take up exactly two
353 beats, but no triplet bracket is printed.
354 @lilypond[quote,fragment,relative=3,verbatim]
356 a4*2/3 gis4*2/3 a4*2/3
362 Dots are normally moved up to avoid staff lines, except in polyphonic
363 situations. The following commands may be used to force a particular
366 @cindex @code{\dotsUp}
368 @cindex @code{\dotsDown}
370 @cindex @code{\dotsBoth}
375 This manual: @ref{Tuplets}
377 Program reference: @internalsref{Dots}, and @internalsref{DotColumn}.
382 Whenever a note is found, a @internalsref{Stem} object is created
383 automatically. For whole notes and rests, they are also created but
388 @cindex @code{\stemUp}
390 @cindex @code{\stemDown}
392 @cindex @code{\stemBoth}
403 A tie connects two adjacent note heads of the same pitch. The tie in
404 effect extends the length of a note. Ties should not be confused with
405 slurs, which indicate articulation, or phrasing slurs, which indicate
406 musical phrasing. A tie is entered using the tilde symbol `@code{~}'
408 @lilypond[quote,fragment,verbatim]
409 e' ~ e' <c' e' g'> ~ <c' e' g'>
412 When a tie is applied to a chord, all note heads whose pitches match
413 are connected. When no note heads match, no ties will be created.
415 In its meaning a tie is just a way of extending a note duration, similar
416 to the augmentation dot; in the following example there are two ways of
417 notating exactly the same concept
419 @lilypond[quote,fragment,raggedright]
420 \time 3/4 c'2. c'2 ~ c'4
422 If you need to tie a lot of notes over bars, it may be easier to use automatic
423 note splitting (see @ref{Automatic note splitting}).
428 @cindex @code{\tieUp}
430 @cindex @code{\tieDown}
432 @cindex @code{\tieBoth}
434 @cindex @code{\tieDotted}
436 @cindex @code{\tieSolid}
441 In this manual: @ref{Automatic note splitting}.
443 Program reference: @internalsref{TieEvent}, @internalsref{Tie}.
445 For tying only a subset of the note heads of a pair of chords, see
446 @inputfileref{input/regression,tie-chord-partial.ly}.
451 Switching staves when a tie is active will not produce a slanted tie.
453 Formatting of ties is a difficult subject. The results are often not
463 @cindex @code{\times}
465 Tuplets are made out of a music expression by multiplying all durations
468 @cindex @code{\times}
470 \times @var{fraction} @var{musicexpr}
474 The duration of @var{musicexpr} will be multiplied by the fraction.
475 The fraction's denominator will be printed over the notes, optionally
476 with a bracket. The most common tuplet is the triplet in which 3
477 notes have the length of 2, so the notes are 2/3 of their written
480 @lilypond[quote,fragment,verbatim]
481 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
484 The property @code{tupletSpannerDuration} specifies how long each
485 bracket should last. With this, you can make lots of tuplets while
486 typing @code{\times} only once, saving lots of typing. In the next
487 example, there are two triplets shown, while @code{\times} was only
490 @lilypond[quote,fragment,relative=1,raggedright,verbatim]
491 \set tupletSpannerDuration = #(ly:make-moment 1 4)
492 \times 2/3 { c'8 c c c c c }
495 The format of the number is determined by the property
496 @code{tupletNumberFormatFunction}. The default prints only the
497 denominator, but if it is set to the Scheme function
498 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
502 @cindex @code{tupletNumberFormatFunction}
503 @cindex tuplet formatting
508 @cindex @code{\tupletUp}
510 @cindex @code{\tupletDown}
512 @cindex @code{\tupletBoth}
517 User manual: @ref{Changing context properties on the fly} for the
521 Program reference: @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
523 Examples: @inputfileref{input/regression,tuplet-nest.ly}.
527 Nested tuplets are not formatted automatically. In this case, outer
528 tuplet brackets should be moved manually, which is demonstrated in
529 @inputfileref{input/regression,tuplet-nest.ly}.
533 @node Easier music entry
534 @section Easier music entry
537 This section deals with tricks and features of the input language that
538 were added solely to help entering music, finding and correcting
539 mistakes. There are also external tools that make debugging easier.
540 See @ref{Point and click} for more information.
542 It is also possible to enter and edit music using other programs. For
543 example, GUI interfaces, or MIDI sequencers. Refer to the LilyPond
544 website for more information.
551 * Skipping corrected music::
552 * Automatic note splitting::
558 @node Relative octaves
559 @subsection Relative octaves
561 @cindex relative octave specification
563 Octaves are specified by adding @code{'} and @code{,} to pitch names.
564 When you copy existing music, it is easy to accidentally put a pitch
565 in the wrong octave and hard to find such an error. The relative
566 octave mode prevents these errors: a single error puts the rest of the
567 piece off by one octave
569 @cindex @code{\relative}
571 \relative @var{startpitch} @var{musicexpr}
574 The octave of notes that appear in @var{musicexpr} are calculated as
575 follows: If no octave changing marks are used, the basic interval
576 between this and the last note is always taken to be a fourth or
577 less. This distance is determined without regarding alterations; a
578 @code{fisis} following a @code{ceses} will be put above the
581 The octave changing marks @code{'} and @code{,} can be added to raise
582 or lower the pitch by an extra octave. Upon entering relative mode,
583 an absolute starting pitch must be specified that will act as the
584 predecessor of the first note of @var{musicexpr}.
586 Here is the relative mode shown in action
587 @lilypond[quote,fragment,raggedright,verbatim]
593 Octave changing marks are used for intervals greater than a fourth
594 @lilypond[quote,fragment,verbatim]
600 If the preceding item is a chord, the first note of the chord is used
601 to determine the first note of the next chord
603 @lilypond[quote,fragment,verbatim]
611 The pitch after the @code{\relative} contains a note name.
614 The relative conversion will not affect @code{\transpose},
615 @code{\chords} or @code{\relative} sections in its argument. If you
616 want to use relative within transposed music, you must place an
617 additional @code{\relative} inside the @code{\transpose}.
620 @subsection Octave check
623 Octave checks make octave errors easier to correct: a note may be
624 followed by @code{=}@var{quotes} which indicates what its absolute
625 octave should be. In the following example,
627 \relative c'' @{ c='' b=' d,='' @}
631 @c take care with @code, adds confusing quotes.
632 the d will generate a warning, because a d'' is expected, but a d' is
633 found. In the output, the octave is corrected for this and the
638 There is also a syntax that is separate from the notes. The syntax
644 This checks that @var{pitch} (without quotes) yields @var{pitch} (with
645 quotes) in \relative mode. If not, a warning is printed, and the
646 octave is corrected, for example, the first check is passed
647 successfully. The second check fails with an error message. The
648 octave is adjusted so the following notes are in the correct octave
659 The octave of a note following an octave check is determined with
660 respect to the note preceding it. In the next fragment, the last note
661 is a @code{a'}, above middle C. Hence, the @code{\octave} check may
662 be deleted without changing the meaning of the piece.
664 @lilypond[quote,verbatim,fragment]
673 @subsection Bar check
677 @cindex @code{barCheckSynchronize}
680 Bar checks help detect errors in the durations. A bar check is
681 entered using the bar symbol, `@code{|}'. Whenever it is encountered
682 during interpretation, it should fall on a measure boundary. If it
683 does not, a warning is printed. In the next example, the second bar
684 check will signal an error
686 \time 3/4 c2 e4 | g2 |
689 Bar checks can also be used in lyrics, for example
694 Twin -- kle | Twin -- kle
699 @cindex @code{skipTypesetting}
701 Failed bar checks are caused by entering incorrect
702 durations. Incorrect durations often completely garble up the score,
703 especially if it is polyphonic, so you should start correcting the
704 score by scanning for failed bar checks and incorrect durations. To
705 speed up this process, you can use @code{skipTypesetting}, described
708 It is also possible to redefine the meaning of @code{|}. This is done
709 by assigning a music expression to @code{pipeSymbol},
712 pipeSymbol = \bar "||"
714 { c'2 c'2 | c'2 c'2 | }
718 @node Skipping corrected music
719 @subsection Skipping corrected music
721 The property @code{Score.skipTypesetting} can be used to switch on and
722 off typesetting completely during the interpretation phase. When
723 typesetting is switched off, the music is processed much more quickly.
724 This can be used to skip over the parts of a score that have already
725 been checked for errors
727 @lilypond[quote,fragment,raggedright,verbatim]
730 \set Score.skipTypesetting = ##t
732 \set Score.skipTypesetting = ##f
736 @node Automatic note splitting
737 @subsection Automatic note splitting
739 Long notes can be converted automatically to tied notes. This is done
740 by replacing the @internalsref{Note_heads_engraver} by the
741 @internalsref{Completion_heads_engraver}.
742 In the following examples, notes crossing the bar line are split and tied.
745 @lilypond[quote,fragment,verbatim,relative=1,raggedright]
747 \remove "Note_heads_engraver"
748 \consists "Completion_heads_engraver"
750 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
754 This engraver splits all running notes at the bar line, and inserts
755 ties. One of its uses is to debug complex scores: if the measures are
756 not entirely filled, then the ties exactly show how much each measure
761 Not all durations (especially those containing tuplets) can be
762 represented exactly; the engraver will not insert tuplets.
766 Examples: @inputfileref{input/regression,completion-heads.ly}.
768 Program reference: @internalsref{Completion_heads_engraver}.
772 @section Staff notation
774 This section describes music notation that occurs on staff level,
775 such as keys, clefs and time signatures.
777 @cindex Staff notation
791 @subsection Staff symbol
793 @cindex adjusting staff symbol
795 Notes, dynamic signs, etc. are grouped
796 with a set of horizontal lines, into a staff (plural `staves'). In our
797 system, these lines are drawn using a separate layout object called
801 @cindex staff lines, setting number of
802 @cindex staff lines, setting thickness of
803 @cindex thickness of staff lines, setting
804 @cindex number of staff lines, setting
808 Program reference: @internalsref{StaffSymbol}.
810 Examples: @inputfileref{input/test,staff-lines.ly},
811 @inputfileref{input/test,staff-size.ly}.
815 If a staff is ended halfway a piece, the staff symbol may not end
816 exactly on the bar line.
820 @subsection Key signature
821 @cindex Key signature
825 The key signature indicates the scale in which a piece is played. It
826 is denoted by a set of alterations (flats or sharps) at the start of
830 Setting or changing the key signature is done with the @code{\key}
833 @code{\key} @var{pitch} @var{type}
836 @cindex @code{\minor}
837 @cindex @code{\major}
838 @cindex @code{\minor}
839 @cindex @code{\ionian}
840 @cindex @code{\locrian}
841 @cindex @code{\aeolian}
842 @cindex @code{\mixolydian}
843 @cindex @code{\lydian}
844 @cindex @code{\phrygian}
845 @cindex @code{\dorian}
847 Here, @var{type} should be @code{\major} or @code{\minor} to get
848 @var{pitch}-major or @var{pitch}-minor, respectively.
849 The standard mode names @code{\ionian},
850 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
851 @code{\phrygian}, and @code{\dorian} are also defined.
853 This command sets the context property
854 @internalsref{Staff}.@code{keySignature}. Non-standard key signatures
855 can be specified by setting this property directly.
857 Accidentals and key signatures often confuse new users, because
858 unaltered notes get natural signs depending on the key signature. For
859 more information, see @ref{More about pitches}.
863 The ordering of a key cancellation is wrong when it is combined with
864 repeat bar lines. The cancellation is also printed after a line break.
868 Program reference: @internalsref{KeyChangeEvent}, and @internalsref{KeySignature}.
870 @cindex @code{keySignature}
877 The clef indicates which lines of the staff correspond to which
881 The clef can be set or changed with the @code{\clef} command
882 @lilypond[quote,fragment,verbatim]
883 \key f\major c''2 \clef alto g'2
886 Supported clef-names include
887 @c Moved standard clefs to the top /MB
891 @item treble, violin, G, G2
904 G clef on 1st line, so-called French violin clef
909 @cindex mezzosoprano clef
912 @cindex baritone clef
915 @cindex varbaritone clef
926 By adding @code{_8} or @code{^8} to the clef name, the clef is
927 transposed one octave down or up, respectively, and @code{_15} and
928 @code{^15} transposes by two octaves. The argument @var{clefname}
929 must be enclosed in quotes when it contains underscores or digits. For
933 @cindex choral tenor clef
934 @lilypond[quote,verbatim,fragment,relative=1]
938 This command is equivalent to setting @code{clefGlyph},
939 @code{clefPosition} (which controls the Y position of the clef),
940 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
941 when any of these properties are changed.
945 Program reference: the object for this symbol is @internalsref{Clef}.
949 @node Ottava brackets
950 @subsection Ottava brackets
952 ``Ottava'' brackets introduce an extra transposition of an octave for
953 the staff. They are created by invoking the function
954 @code{set-octavation}
960 @lilypond[quote,verbatim,fragment]
970 The @code{set-octavation} function also takes -1 (for 8va bassa) and 2
971 (for 15ma) as arguments. Internally the function sets the properties
972 @code{ottavation} (e.g. to @code{"8va"}) and
973 @code{centralCPosition}. For overriding the text of the bracket, set
974 @code{ottavation} after invoking @code{set-octavation}, i.e.,
978 \set Staff.ottavation = #"8"
983 Program reference: @internalsref{OttavaBracket}.
985 Examples: @inputfileref{input/regression,ottava.ly},
986 @inputfileref{input/regression,ottava-broken.ly}.
990 @code{set-octavation} will get confused when clef changes happen
991 during an octavation bracket.
994 @subsection Time signature
995 @cindex Time signature
999 Time signature indicates the metrum of a piece: a regular pattern of
1000 strong and weak beats. It is denoted by a fraction at the start of the
1004 The time signature is set or changed by the @code{\time}
1006 @lilypond[quote,fragment,verbatim]
1007 \time 2/4 c'2 \time 3/4 c'2.
1010 The symbol that is printed can be customized with the @code{style}
1011 property. Setting it to @code{#'()} uses fraction style for 4/4 and
1012 2/2 time. There are many more options for its layout. See
1013 @inputfileref{input/test,time.ly} for more examples.
1016 This command sets the property @code{timeSignatureFraction},
1017 @code{beatLength} and @code{measureLength} in the @code{Timing}
1018 context, which is normally aliased to @internalsref{Score}. The
1019 property @code{measureLength} determines where bar lines should be
1020 inserted, and how automatic beams should be generated. Changing the
1021 value of @code{timeSignatureFraction} also causes the symbol to be
1024 More options are available through the Scheme function
1025 @code{set-time-signature}. In combination with the
1026 @internalsref{Measure_grouping_engraver}, it will create
1027 @internalsref{MeasureGrouping} signs. Such signs ease reading
1028 rhythmically complex modern music. In the following example, the 9/8
1029 measure is subdivided in 2, 2, 2 and 3. This is passed to
1030 @code{set-time-signature} as the third argument @code{(2 2 2 3)}
1032 @lilypond[quote,raggedright,verbatim]
1035 #(set-time-signature 9 8 '(2 2 2 3))
1036 g8[ g] d[ d] g[ g] a8[( bes g]) |
1037 #(set-time-signature 5 8 '(3 2))
1043 \consists "Measure_grouping_engraver"
1051 Program reference: @internalsref{TimeSignature}, and @internalsref{Timing_engraver}.
1056 Automatic beaming does not use the measure grouping specified with
1057 @code{set-time-signature}.
1059 @node Partial measures
1060 @subsection Partial measures
1063 @cindex partial measure
1064 @cindex measure, partial
1065 @cindex shorten measures
1066 @cindex @code{\partial}
1068 Partial measures, for example in upsteps, are entered using the
1069 @code{\partial} command
1070 @lilypond[quote,fragment,verbatim,relative=2]
1071 \partial 16*5 c16 cis d dis e | a2. c,4 | b2
1074 The syntax for this command is
1076 \partial @var{duration}
1078 This is internally translated into
1080 \set Timing.measurePosition = -@var{length of duration}
1083 The property @code{measurePosition} contains a rational number
1084 indicating how much of the measure has passed at this point.
1086 @node Unmetered music
1087 @subsection Unmetered music
1091 Bar lines and bar numbers are calculated automatically. For unmetered
1092 music (e.g. cadenzas), this is not desirable. By setting
1093 @code{Score.timing} to false, this automatic timing can be switched
1094 off. Empty bar lines,
1101 indicate where line breaks can occur.
1105 @cindex @code{\cadenzaOn}
1107 @cindex @code{\cadenzaOff}
1114 @subsection Bar lines
1118 @cindex measure lines
1122 Bar lines delimit measures, but are also used to indicate repeats.
1123 Normally, they are inserted automatically. Line breaks may only
1124 happen on bar lines.
1126 Special types of bar lines can be forced with the @code{\bar} command
1128 @lilypond[quote,relative=2,fragment,verbatim]
1132 The following bar types are available
1133 @lilypond[quote,fragment,relative=1,raggedright,verbatim]
1146 For allowing line breaks, there is a special command,
1150 This will insert an invisible bar line, and allow line breaks at this
1153 In scores with many staves, a @code{\bar} command in one staff is
1154 automatically applied to all staves. The resulting bar lines are
1155 connected between different staves of a @internalsref{StaffGroup}
1157 @lilypond[quote,fragment,verbatim]
1159 \context StaffGroup <<
1165 \new Staff { \clef bass c4 g e g }
1167 \new Staff { \clef bass c2 c2 }
1171 A bar line is created whenever the @code{whichBar} property is set.
1172 At the start of a measure it is set to the contents of
1173 @code{defaultBarType}. The contents of @code{repeatCommands} are used
1174 to override default measure bars.
1176 The command @code{\bar }@var{bartype} is a short cut for doing
1177 @code{\set Timing.whichBar = }@var{bartype}. Whenever @code{whichBar}
1178 is set to a string, a bar line of that type is created.
1180 @cindex @code{whichBar}
1181 @cindex @code{repeatCommands}
1182 @cindex @code{defaultBarType}
1184 You are encouraged to use @code{\repeat} for repetitions. See
1191 In this manual: @ref{Repeats}.
1194 Program reference: the bar line objects that are created at
1195 @internalsref{Staff} level are called @internalsref{BarLine}, the bar
1196 lines that span staves are @internalsref{SpanBar} objects.
1198 @cindex bar lines at start of system
1199 @cindex start of system
1201 The bar lines at the start of each system are
1202 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
1203 @internalsref{SystemStartBracket}. Only one of these types is created
1204 in every context, and that type is determined by the property
1205 @code{systemStartDelimiter}.
1207 Examples: @inputfileref{input/test,bar-lines.ly},
1213 The easiest way to enter fragments with more than one voice on a staff
1214 is to split chords using the separator @code{\\}. You can use it for
1215 small, short-lived voices or for single chords
1219 @lilypond[quote,verbatim,fragment]
1220 \context Staff \relative c'' {
1221 c4 << { f d e } \\ { b c2 } >>
1222 c4 << g' \\ b, \\ f' \\ d >>
1226 The separator causes @internalsref{Voice} contexts@footnote{Polyphonic
1227 voices are sometimes called "layers" other notation packages}
1229 to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
1230 each of these contexts, vertical direction of slurs, stems, etc. is set
1233 @cindex @code{\voiceOne}
1234 @cindex @code{\voiceFour}
1236 This can also be done by instantiating @internalsref{Voice} contexts
1237 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1238 a stem directions and horizontal shift for each part
1241 @lilypond[quote,raggedright,verbatim]
1244 \new Voice { \voiceOne cis2 b }
1245 \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
1246 \new Voice { \voiceTwo fis4~ fis4 f ~ f } >>
1250 The command @code{\oneVoice} will revert back to the normal setting.
1251 @cindex @code{\oneVoice}
1254 Normally, note heads with a different number of dots are not merged, but
1255 when the object property @code{merge-differently-dotted} is set in
1256 the @internalsref{NoteCollision} object, they are merged
1257 @lilypond[quote,verbatim,fragment,raggedright,relative=2]
1260 \override Staff.NoteCollision
1261 #'merge-differently-dotted = ##t
1263 } \\ { g8.[ f16] g8.[ f16] } >>
1266 Similarly, you can merge half note heads with eighth notes, by setting
1267 @code{merge-differently-headed}
1268 @lilypond[quote,fragment,relative=2,verbatim]
1271 \override Staff.NoteCollision
1272 #'merge-differently-headed = ##t
1273 c8 c4. } \\ { c2 c2 } >>
1276 LilyPond also vertically shifts rests that are opposite of a stem,
1279 @lilypond[quote,raggedright,fragment,verbatim]
1280 \context Voice << c''4 \\ r4 >>
1288 @cindex @code{\oneVoice}
1290 @cindex @code{\voiceOne}
1292 @cindex @code{\voiceTwo}
1294 @cindex @code{\voiceThree}
1296 @cindex @code{\voiceFour}
1300 The following commands specify in what chords of the current voice
1301 should be shifted: the outer voice has @code{\shiftOff}, and the inner
1302 voices have @code{\shiftOn}, @code{\shiftOnn}, etc.
1305 @cindex @code{\shiftOn}
1307 @cindex @code{\shiftOnn}
1309 @cindex @code{\shiftOnnn}
1311 @cindex @code{\shiftOff}
1318 Program reference: the objects responsible for resolving collisions are
1319 @internalsref{NoteCollision} and @internalsref{RestCollision}.
1321 Examples: See also example files
1322 @inputfileref{input/regression,collision-dots.ly},
1323 @inputfileref{input/regression,collision-head-chords.ly},
1324 @inputfileref{input/regression,collision-heads.ly},
1325 @inputfileref{input/regression,collision-mesh.ly}, and
1326 @inputfileref{input/regression,collisions.ly}.
1331 Resolving collisions is a intricate subject, and only a few situations
1332 are handled. When LilyPond cannot cope, the @code{force-hshift}
1333 property of the @internalsref{NoteColumn} object and pitched rests can
1334 be used to override typesetting decisions.
1336 When using @code{merge-differently-headed} with an upstem eighth or a
1337 shorter note, and a downstem half note, the eighth note gets the wrong
1340 There is no support for clusters where the same note occurs with
1341 different accidentals in the same chord. In this case, it is
1342 recommended to use enharmonic transcription, or to use special cluster
1343 notation (see @ref{Clusters}).
1348 Beams are used to group short notes into chunks that are aligned with
1349 the metrum. They are inserted automatically
1351 @lilypond[quote,fragment,verbatim,relative=2]
1352 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1355 When these automatic decisions are not good enough, beaming can be
1356 entered explicitly. It is also possible to define beaming patterns
1357 that differ from the defaults.
1359 Individual notes may be marked with @code{\noBeam}, to prevent them
1362 @lilypond[quote,fragment,verbatim,relative=2]
1363 \time 2/4 c8 c\noBeam c c
1369 Program reference: @internalsref{Beam}.
1372 @cindex Automatic beams
1375 * Setting automatic beam behavior::
1380 @subsection Manual beams
1381 @cindex beams, manual
1385 In some cases it may be necessary to override the automatic beaming
1386 algorithm. For example, the autobeamer will not put beams over rests
1387 or bar lines. Such beams are specified by manually: the begin and end
1388 point are marked with @code{[} and @code{]}
1390 @lilypond[quote,fragment,relative=1,verbatim]
1392 r4 r8[ g' a r8] r8 g[ | a] r8
1396 @cindex @code{stemLeftBeamCount}
1398 Normally, beaming patterns within a beam are determined automatically.
1399 If necessary, the properties @code{stemLeftBeamCount} and
1400 @code{stemRightBeamCount} can be used to override the defaults. If
1401 either property is set, its value will be used only once, and then it
1404 @lilypond[quote,fragment,relative=1,verbatim]
1407 f8[ r16 \set stemLeftBeamCount = #1 f g a]
1410 @cindex @code{stemRightBeamCount}
1413 The property @code{subdivideBeams} can be set in order to subdivide
1414 all 16th or shorter beams at beat positions, as defined by the
1415 @code{beatLength} property.
1418 @lilypond[fragment,quote,relative=2,verbatim,noindent]
1420 \set subdivideBeams = ##t
1422 \set Score.beatLength = #(ly:make-moment 1 8)
1425 @cindex @code{subdivideBeams}
1427 Kneed beams are inserted automatically, when a large gap is detected
1428 between the note heads. This behavior can be tuned through the object
1429 property @code{auto-knee-gap}.
1431 Normally, line breaks are forbidden when beams cross bar lines. This
1432 behavior can be changed by setting @code{allowBeamBreak}.
1434 @cindex @code{allowBeamBreak}
1435 @cindex beams and line breaks
1437 @cindex beams, kneed
1439 @cindex auto-knee-gap
1444 User manual: @ref{Changing context properties on the fly} for the
1450 @cindex Frenched staves
1452 Automatically kneed cross-staff beams cannot be used together with
1455 Beams do not avoid collisions with symbols around the notes, such as
1456 texts and accidentals.
1460 @node Setting automatic beam behavior
1461 @subsection Setting automatic beam behavior
1463 @cindex @code{autoBeamSettings}
1464 @cindex @code{(end * * * *)}
1465 @cindex @code{(begin * * * *)}
1466 @cindex automatic beams, tuning
1467 @cindex tuning automatic beaming
1469 @c [TODO: use \applycontext]
1471 In normal time signatures, automatic beams can start on any note but can
1472 only end in a few positions within the measure: beams can end on a beat,
1473 or at durations specified by the properties in
1474 @code{autoBeamSettings}. The defaults for @code{autoBeamSettings}
1475 are defined in @file{scm/auto-beam.scm}.
1477 The value of @code{autoBeamSettings} is changed with two functions,
1479 #(override-auto-beam-setting
1480 '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b}
1482 #(revert-auto-beam-setting '(@var{be} @var{p} @var{q} @var{n} @var{m}))
1484 Here, @var{be} is the symbol @code{begin} or @code{end}, and
1485 @var{context} is an optional context (default: @code{'Voice}). It
1486 determines whether the rule applies to begin or end-points. The
1487 quantity @var{p}/@var{q} refers to the length of the beamed notes (and
1488 `@code{* *}' designates notes of any length), @var{n}/@var{M} refers
1489 to a time signature (wildcards `@code{* *}' may be entered to
1490 designate all time signatures), @var{a}/@var{b} is a duration. By
1491 default, this command changes settings for the current voice. It is
1492 also possible to adjust settings at higher contexts, by adding a
1493 @var{context} argument.
1495 For example, if automatic beams should end on every quarter note, use
1498 #(override-auto-beam-setting '(end * * * *) 1 4 'Staff)
1500 Since the duration of a quarter note is 1/4 of a whole note, it is
1501 entered as @code{(ly:make-moment 1 4)}.
1503 The same syntax can be used to specify beam starting points. In this
1504 example, automatic beams can only end on a dotted quarter note
1506 #(override-auto-beam-setting '(end * * * *) 3 8)
1508 In 4/4 time signature, this means that automatic beams could end only on
1509 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1510 3/8, has passed within the measure).
1512 Rules can also be restricted to specific time signatures. A rule that
1513 should only be applied in @var{N}/@var{M} time signature is formed by
1514 replacing the second asterisks by @var{N} and @var{M}. For example, a
1515 rule for 6/8 time exclusively looks like
1517 #(override-auto-beam-setting '(begin * * 6 8) @dots{})
1520 If a rule should be to applied only to certain types of beams, use the
1521 first pair of asterisks. Beams are classified according to the
1522 shortest note they contain. For a beam ending rule that only applies
1523 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1526 @cindex automatic beam generation
1528 @cindex @code{autoBeaming}
1531 If beams are used to indicate melismata in songs, then automatic
1532 beaming should be switched off. This is done by setting
1533 @code{autoBeaming} to @code{#f}.
1537 @cindex @code{\autoBeamOff}
1538 @code{\autoBeamOff},
1539 @cindex @code{\autoBeamOn}
1545 If a score ends while an automatic beam has not been ended and is
1546 still accepting notes, this last beam will not be typeset at all. The
1547 same holds polyphonic voices, entered with @code{<< @dots{} \\ @dots{}
1548 >>}. If a polyphonic voice ends while an automatic beam is still
1549 accepting notes, it is not typeset.
1551 The rules for ending a beam depend on the shortest note in a beam.
1552 So, while it is possible to have different ending rules for eight
1553 beams and sixteenth beams, a beam that contains both eight and
1554 sixteenth notes will use the rules for the sixteenth beam.
1556 In the example below, the autobeamer makes eight beams and sixteenth
1557 end at 3 eights; the third beam can only be corrected by specifying
1560 @lilypond[quote,raggedright,fragment,relative=1]
1561 #(override-auto-beam-setting '(end * * * *) 3 8)
1562 % rather show case where it goes wrong
1563 %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
1564 \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
1566 It is not possible to specify beaming parameters that act differently in
1567 different parts of a measure. This means that it is not possible to use
1568 automatic beaming in irregular meters such as @code{5/8}.
1570 @node Beam formatting
1571 @subsection Beam formatting
1574 When a beam falls in the middle of the staff, the beams point normally
1575 down. However, this behaviour can be altered with the
1576 @code{neutral-direction} property.
1582 \override Beam #'neutral-direction = #-1
1584 \override Beam #'neutral-direction = #1
1590 @section Accidentals
1593 This section describes how to change the way that accidentals are
1594 inserted automatically before the running notes.
1596 Common rules for typesetting accidentals have been canned in a
1597 function. This function is called as follows
1599 @cindex @code{set-accidental-style}
1601 #(set-accidental-style 'modern 'Voice)
1604 The function takes two arguments: a symbol that denotes the style (in
1605 the example, @code{modern}), and another symbol that denotes the
1606 context name (in this example, @code{Voice}). If no context name is
1607 supplied, @code{Staff} is the default.
1609 The following styles are supported
1612 This is the default typesetting behavior. It should correspond
1613 to 18th century common practice: Accidentals are
1614 remembered to the end of the measure in which they occur and
1615 only on their own octave.
1619 The normal behavior is to remember the accidentals on
1620 Staff-level. This variable, however, typesets accidentals
1621 individually for each voice. Apart from that, the rule is similar to
1624 This leads to some weird and often unwanted results
1625 because accidentals from one voice do not get canceled in other
1627 @lilypond[quote,raggedright,relative=1,fragment,verbatim]
1629 #(set-accidental-style 'voice)
1635 Hence you should only use @code{voice} if the voices
1636 are to be read solely by individual musicians. If the staff is to be
1637 used by one musician (e.g. a conductor) then you use
1638 @code{modern} or @code{modern-cautionary}
1642 @cindex @code{modern} style accidentals
1643 This rule corresponds to the common practice in the 20th
1645 This rule prints the same accidentals as @code{default}, but temporary
1646 accidentals also are canceled in other octaves. Furthermore,
1647 in the same octave, they also get canceled in the following
1650 @lilypond[quote,raggedright,fragment,verbatim]
1651 #(set-accidental-style 'modern)
1652 cis' c'' cis'2 | c'' c'
1655 @item @code{modern-cautionary}
1656 @cindex @code{modern-cautionary}
1657 This rule is similar to @code{modern}, but the
1658 ``extra'' accidentals (the ones not typeset by
1659 @code{default}) are typeset as cautionary accidentals.
1660 They are printed in reduced size or with parentheses
1661 @lilypond[quote,raggedright,fragment,verbatim]
1662 #(set-accidental-style 'modern-cautionary)
1663 cis' c'' cis'2 | c'' c'
1666 @cindex @code{modern-voice}
1668 This rule is used for multivoice accidentals to be read both by musicians
1669 playing one voice and musicians playing all voices. Accidentals are
1670 typeset for each voice, but they @emph{are} canceled across voices in
1671 the same @internalsref{Staff}.
1673 @cindex @code{modern-voice-cautionary}
1674 @item modern-voice-cautionary
1675 This rule is the same as @code{modern-voice}, but with the extra
1676 accidentals (the ones not typeset by @code{voice}) typeset
1677 as cautionaries. Even though all accidentals typeset by
1678 @code{default} @emph{are} typeset by this variable then
1679 some of them are typeset as cautionaries.
1682 @cindex @code{piano} accidentals
1683 This rule reflects 20th century practice for piano notation. Very similar to
1684 @code{modern} but accidentals also get canceled
1685 across the staves in the same @internalsref{GrandStaff} or
1686 @internalsref{PianoStaff}.
1688 @item piano-cautionary
1689 @cindex @code{#(set-accidental-style 'piano-cautionary)}
1690 As @code{#(set-accidental-style 'piano)' , str)} but with the extra accidentals
1691 typeset as cautionaries.
1694 @cindex @code{no-reset} accidental style
1696 This is the same as @code{default} but with accidentals lasting
1697 ``forever'' and not only until the next measure
1698 @lilypond[quote,raggedright,fragment,verbatim,relative=1]
1699 #(set-accidental-style 'no-reset)
1704 This is sort of the opposite of @code{no-reset}: Accidentals
1705 are not remembered at all---and hence all accidentals are
1706 typeset relative to the key signature, regardless of what was
1709 @lilypond[quote,raggedright,fragment,verbatim,relative=1]
1710 #(set-accidental-style 'forget)
1711 \key d\major c4 c cis cis d d dis dis
1718 Program reference: @internalsref{Accidental_engraver},
1719 @internalsref{Accidental}, and @internalsref{AccidentalPlacement}.
1724 Simultaneous notes are considered to be entered in sequential
1725 mode. This means that in a chord the accidentals are typeset as if the
1726 notes in the chord happened once at a time - in the order in which
1727 they appear in the input file.
1729 This is only a problem when accidentals in a chord depend on each
1730 other. This problem can be solved by manually inserting @code{!} and
1731 @code{?} for the problematic notes.
1733 In the default scheme, accidentals only depend on other
1734 accidentals with the same pitch on the same staff, so no conflicts are
1737 @node Expressive marks
1738 @section Expressive marks
1741 @c todo: should change ordering
1742 @c where to put text spanners, metronome marks,
1751 * Analysis brackets::
1753 * Fingering instructions::
1764 A slur indicates that notes are to be played bound or @emph{legato}.
1767 They are entered using parentheses
1768 @lilypond[quote,relative=2,fragment,verbatim]
1769 f( g)( a) a8 b( a4 g2 f4)
1773 The direction of a slur can be set with the
1777 \override Slur #'direction = #UP
1778 \slurUp % shortcut for the previous line
1782 However, there is a convenient shorthand for forcing slur
1783 directions. By adding @code{_} or @code{^} before the opening
1784 parentheses, the direction is also set. For example,
1786 @lilypond[relative=2,fragment]
1793 @cindex @code{\slurUp}
1795 @cindex @code{\slurDown}
1797 @cindex @code{\slurBoth}
1799 @cindex @code{\slurDotted}
1801 @cindex @code{\slurSolid}
1806 Program reference: @seeinternals{Slur}, and @internalsref{SlurEvent}.
1810 @cindex Adjusting slurs
1812 @node Phrasing slurs
1813 @subsection Phrasing slurs
1815 @cindex phrasing slurs
1816 @cindex phrasing marks
1818 A phrasing slur (or phrasing mark) connects chords and is used to
1819 indicate a musical sentence. It is started using @code{\(} and @code{\)}
1822 @lilypond[quote,fragment,verbatim,relative=1]
1823 \time 6/4 c'\( d( e) f( e) d\)
1826 Typographically, the phrasing slur behaves almost exactly like a
1827 normal slur. However, they are treated as different objects. A
1828 @code{\slurUp} will have no effect on a phrasing slur; instead, you
1829 should use @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
1830 @code{\phrasingSlurBoth}.
1832 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth}
1833 will only affect normal slurs and not phrasing slurs.
1837 @cindex @code{\phrasingSlurUp}
1838 @code{\phrasingSlurUp},
1839 @cindex @code{\phrasingSlurDown}
1840 @code{\phrasingSlurDown},
1841 @cindex @code{\phrasingSlurBoth}
1842 @code{\phrasingSlurBoth}.
1846 Program reference: see also @internalsref{PhrasingSlur}, and
1847 @internalsref{PhrasingSlurEvent}.
1851 Putting phrasing slurs over rests leads to spurious warnings.
1854 @subsection Breath marks
1856 Breath marks are entered using @code{\breathe}
1859 @lilypond[quote,fragment,relative=1,verbatim]
1863 The glyph of the breath mark can be tuned by overriding the
1864 @code{text} property of the @code{BreathingSign} layout object with
1865 any markup text. For example,
1866 @lilypond[quote,fragment,verbatim,relative=1]
1868 \override BreathingSign #'text
1869 = #(make-musicglyph-markup "scripts-rvarcomma")
1876 Program reference: @internalsref{BreathingSign},
1877 @internalsref{BreathingSignEvent}.
1879 Examples: @inputfileref{input/regression,breathing-sign.ly}.
1882 @node Metronome marks
1883 @subsection Metronome marks
1886 @cindex beats per minute
1887 @cindex metronome marking
1889 Metronome settings can be entered as follows
1891 \tempo @var{duration} = @var{per-minute}
1894 In the MIDI output, they are interpreted as a tempo change, and in the
1895 paper output, a metronome marking is printed
1896 @cindex @code{\tempo}
1897 @lilypond[quote,fragment,verbatim]
1903 Program reference: @internalsref{MetronomeChangeEvent}.
1908 @subsection Text spanners
1909 @cindex Text spanners
1911 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
1912 are written as texts, and extended over many measures with dotted
1913 lines. You can create such texts using text spanners: attach
1914 @code{\startTextSpan} and @code{\stopTextSpan} to the
1915 start and ending note of the spanner.
1917 The string to be printed, as well as the style, is set through object
1920 @lilypond[quote,fragment,relative=1,verbatim]
1923 \override TextSpanner #'direction = #-1
1924 \override TextSpanner #'edge-text = #'("rall " . "")
1925 c2\startTextSpan b c\stopTextSpan a
1932 Internals @internalsref{TextSpanEvent},
1933 @internalsref{TextSpanner}.
1935 Examples: @inputfileref{input/regression,text-spanner.ly}.
1938 @node Analysis brackets
1939 @subsection Analysis brackets
1941 @cindex phrasing brackets
1942 @cindex musicological analysis
1943 @cindex note grouping bracket
1945 Brackets are used in musical analysis to indicate structure in musical
1946 pieces. LilyPond supports a simple form of nested horizontal brackets.
1947 To use this, add the @internalsref{Horizontal_bracket_engraver} to
1948 @internalsref{Staff} context. A bracket is started with
1949 @code{\startGroup} and closed with @code{\stopGroup}
1951 @lilypond[quote,raggedright,verbatim]
1954 c4\startGroup\startGroup
1957 c4\stopGroup\stopGroup
1961 \Staff \consists "Horizontal_bracket_engraver"
1967 Program reference: @internalsref{HorizontalBracket},
1968 @internalsref{NoteGroupingEvent}.
1970 Examples: @inputfileref{input/regression,note-group-bracket.ly}.
1974 @subsection Articulations
1975 @cindex Articulations
1977 @cindex articulations
1981 A variety of symbols can appear above and below notes to indicate
1982 different characteristics of the performance. They are added to a note
1983 by adding a dash and the character signifying the
1984 articulation. They are demonstrated here
1986 @lilypondfile[quote,raggedright]{script-abbreviations.ly}
1988 The meanings of these shorthands can be changed. See
1989 @file{ly/script-init.ly} for examples.
1992 The script is automatically placed, but if you need to force
1993 directions, you can use @code{_} to force them down, or @code{^} to
1995 @lilypond[quote,fragment,verbatim]
1999 Other symbols can be added using the syntax
2000 @var{note}@code{\}@var{name}, e.g. @code{c4\fermata}. Again, they
2001 can be forced up or down using @code{^} and @code{_},
2004 @lilypond[quote,verbatim,fragment,relative=3]
2005 c\fermata c^\fermata c_\fermata
2012 @cindex staccatissimo
2021 @cindex organ pedal marks
2030 @cindex prallmordent
2034 @cindex thumb marking
2039 @lilypondfile[quote,raggedright]{script-chart.ly}
2043 @cindex @code{\scriptUp}
2045 @cindex @code{\scriptDown}
2047 @cindex @code{\scriptBoth}
2052 Program reference: @internalsref{ScriptEvent}, and @internalsref{Script}.
2056 These note ornaments appear in the printed output but have no
2057 effect on the MIDI rendering of the music.
2060 @node Fingering instructions
2061 @subsection Fingering instructions
2065 Fingering instructions can be entered using
2067 @var{note}-@var{digit}
2069 For finger changes, use markup texts
2071 @lilypond[quote,verbatim,raggedright,fragment]
2072 c'4-1 c'4-2 c'4-3 c'4-4
2073 c'^\markup { \finger "2-3" }
2076 @cindex finger change
2081 You can use the thumb-script to indicate that a note should be
2082 played with the thumb (e.g. in cello music)
2084 @lilypond[quote,verbatim,raggedright,fragment]
2085 <a' a''-3>8_\thumb <b' b''-3>_\thumb
2088 Fingerings for chords can also be added to individual notes
2089 of the chord by adding them after the pitches
2090 @lilypond[quote,verbatim,raggedright,fragment,relative=2]
2091 < c-1 e-2 g-3 b-5 >4
2095 iIn this case, setting @code{fingeringOrientations} will put fingerings next
2098 @lilypond[quote,verbatim,raggedright,fragment,relative=1]
2099 \set fingeringOrientations = #'(left down)
2100 <c-1 es-2 g-4 bes-5 > 4
2101 \set fingeringOrientations = #'(up right down)
2102 <c-1 es-2 g-4 bes-5 > 4
2103 \set fingeringOrientations = #'(right)
2107 The last note demonstrates how fingering instructions can be put close
2108 to note heads in monophonic music, using this feature.
2112 Program reference: @internalsref{FingerEvent}, and @internalsref{Fingering}.
2114 Examples: @inputfileref{input/regression,finger-chords.ly}.
2117 @subsection Text scripts
2118 @cindex Text scripts
2120 @cindex text items, non-empty
2121 @cindex non-empty texts
2123 It is possible to place arbitrary strings of text or markup text (see
2124 @ref{Text markup}) above or below notes by using a string
2125 @code{c^"text"}. By default, these indications do not influence the
2126 note spacing, but by using the command @code{\fatText}, the widths
2127 will be taken into account
2129 @lilypond[quote,fragment,raggedright,verbatim]
2131 c4^"longtext" \fatText c4_"longlongtext" c4
2135 It is possible to use @TeX{} commands in the strings, but this should
2136 be avoided because the exact dimensions of the string can then no
2141 @cindex @code{\fatText}
2143 @cindex @code{\emptyText}
2148 In this manual: @ref{Text markup}.
2150 Program reference: @internalsref{TextScriptEvent}, @internalsref{TextScript}.
2156 @subsection Grace notes
2159 @c should have blurb about accaciatura / appogiatura
2161 @cindex @code{\grace}
2165 Grace notes are ornaments that are written out. The most common ones
2166 are acciaccatura, which should be played as very short. It is denoted
2167 by a slurred small note with a slashed stem. The appoggiatura is a
2168 grace note that takes a fixed fraction of the main note, is and
2169 denoted as a slurred note in small print without a slash.
2170 They are entered with the commands @code{\acciaccatura} and
2171 @code{\appoggiatura}, as demonstrated in the following example
2174 @cindex appoggiatura
2175 @cindex acciaccatura
2177 @lilypond[quote,relative=2,verbatim,fragment]
2178 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
2179 \acciaccatura { g16[ f] } e4
2182 Both are special forms of the @code{\grace} command. By prefixing this
2183 keyword to a music expression, a new one is formed, which will be
2184 printed in a smaller font and takes up no logical time in a measure.
2186 @lilypond[quote,relative=2,verbatim,fragment]
2188 \grace { c16[ d16] } c2 c4
2192 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
2193 @code{\grace} command does not start a slur.
2195 Internally, timing for grace notes is done using a second, `grace'
2196 time. Every point in time consists of two rational numbers: one
2197 denotes the logical time, one denotes the grace timing. The above
2198 example is shown here with timing tuples
2200 @lilypond[quote,raggedright]
2203 c4 \grace c16 c4 \grace {
2206 \new Lyrics \lyrics {
2209 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
2210 \markup { (\fraction 1 4 , 0 ) } 4
2212 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2213 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2215 \markup { ( \fraction 2 4 , 0 ) }
2221 The placement of grace notes is synchronized between different staves.
2222 In the following example, there are two sixteenth graces notes for
2223 every eighth grace note
2225 @lilypond[quote,relative=2,verbatim,fragment]
2226 << \new Staff { e4 \grace { c16[ d e f] } e4 }
2227 \new Staff { c'4 \grace { g8[ b] } c4 } >>
2232 If you want to end a note with a grace, the standard trick is to put
2233 the grace notes after a ``space note''
2235 @lilypond[quote,fragment,verbatim,relative=2]
2238 { s2 \grace { c16[ d] } } >>
2244 By adjusting the duration of the skip note (here it is a half-note),
2245 the space between the main-note and the grace is adjusted.
2248 A @code{\grace} section will introduce special typesetting settings,
2249 for example, to produce smaller type, and set directions. Hence, when
2250 introducing layout tweaks, they should be inside the grace section,
2252 @lilypond[quote,fragment,verbatim,relative=2]
2255 \override Stem #'direction = #-1
2257 \revert Stem #'direction
2264 The overrides should also be reverted inside the grace section.
2266 If the layout of grace sections must be changed throughout the music,
2267 then this can be accomplished through the function
2268 @code{add-grace-property}. The following example undefines the Stem
2269 direction for this grace, so stems do not always point up.
2273 #(add-grace-property 'Voice 'Stem 'direction '())
2279 Another option is to change the variables @code{startGraceMusic},
2280 @code{stopGraceMusic}, @code{startAcciaccaturaMusic},
2281 @code{stopAcciaccaturaMusic}, @code{startAppoggiaturaMusic},
2282 @code{stopAppoggiaturaMusic}. More information is in the file
2283 @file{ly/grace-init.ly}.
2288 Program reference: @internalsref{GraceMusic}.
2292 A score that starts with an @code{\grace} section needs an explicit
2293 @code{\context Voice} declaration, otherwise the main note and grace
2294 note end up on different staves.
2296 Grace note synchronization can also lead to surprises. Staff notation,
2297 such as key signatures, bar lines, etc. are also synchronized. Take
2298 care when you mix staves with grace notes and staves without, for example,
2300 @lilypond[quote,relative=2,verbatim,fragment]
2301 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2302 \new Staff { c4 \bar "|:" d4 } >>
2306 This can be remedied by inserting grace skips, for the above example
2309 \new Staff @{ c4 \bar "|:" \grace s16 d4 @} >>
2312 Grace sections should only be used within sequential music
2313 expressions. Nesting or juxtaposing grace sections is not supported,
2314 and might produce crashes or other errors.
2318 @subsection Glissando
2321 @cindex @code{\glissando}
2323 A glissando is a smooth change in pitch. It is denoted by a line or a
2324 wavy line between two notes.
2327 A glissando line can be requested by attaching a @code{\glissando} to
2330 @lilypond[quote,fragment,relative=1,verbatim]
2336 Program reference: @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2338 Example files: @file{input/regression,glissando.ly}
2344 Printing text over the line (such as @emph{gliss.}) is not supported.
2348 @subsection Dynamics
2361 @cindex @code{\ffff}
2371 Absolute dynamic marks are specified using a command after a note
2372 @code{c4\ff}. The available dynamic marks are @code{\ppp},
2373 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2374 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2375 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}
2377 @lilypond[quote,verbatim,raggedright,fragment,relative=1]
2378 c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2388 A crescendo mark is started with @code{\<} and terminated with
2389 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2390 with @code{\!}. Because these marks are bound to notes, if you must
2391 use spacer notes if multiple marks during one note are needed
2393 @lilypond[quote,fragment,verbatim]
2394 c''\< c''\! d''\> e''\!
2395 << f''1 { s4 s4\< s4\! \> s4\! } >>
2397 This may give rise to very short hairpins. Use @code{minimum-length}
2398 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2402 \override Staff.Hairpin #'minimum-length = #5
2405 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2406 is an example how to do it
2408 @lilypond[quote,fragment,relative=2,verbatim]
2418 You can also supply your own texts
2419 @lilypond[quote,fragment,relative=1,verbatim]
2421 \set crescendoText = \markup { \italic "cresc. poco" }
2422 \set crescendoSpanner = #'dashed-line
2432 @cindex @code{\dynamicUp}
2434 @cindex @code{\dynamicDown}
2435 @code{\dynamicDown},
2436 @cindex @code{\dynamicBoth}
2437 @code{\dynamicBoth}.
2439 @cindex direction, of dynamics
2443 Program reference: @internalsref{CrescendoEvent},
2444 @internalsref{DecrescendoEvent}, and
2445 @internalsref{AbsoluteDynamicEvent}.
2447 Dynamics @internalsref{DynamicText} and @internalsref{Hairpin}
2448 objects. Vertical positioning of these symbols is handled by the
2449 @internalsref{DynamicLineSpanner} object.
2457 @cindex @code{\repeat}
2460 Repetition is a central concept in music, and multiple notations exist
2461 for repetitions. In LilyPond, most of these notations can be captured
2462 in a uniform syntax. One of the advantages is that they can be
2463 rendered in MIDI accurately.
2465 The following types of repetition are supported
2469 Repeated music is fully written (played) out. Useful for MIDI
2470 output, and entering repetitive music.
2473 This is the normal notation: Repeats are not written out, but
2474 alternative endings (volte) are printed, left to right.
2478 Alternative endings are written stacked. This has limited use but may be
2479 used to typeset two lines of lyrics in songs with repeats, see
2480 @inputfileref{input,star-spangled-banner.ly}.
2488 Make beat or measure repeats. These look like percent signs.
2494 * Repeats and MIDI::
2495 * Manual repeat commands::
2497 * Tremolo subdivisions::
2502 @subsection Repeat syntax
2505 LilyPond has one syntactic construct for specifying different types of
2506 repeats. The syntax is
2509 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2512 If you have alternative endings, you may add
2513 @cindex @code{\alternative}
2515 \alternative @code{@{} @var{alternative1}
2517 @var{alternative3} @dots{} @code{@}}
2519 where each @var{alternative} is a music expression. If you do not
2520 give enough alternatives for all of the repeats, the first alternative
2521 is assumed to be played more than once.
2523 Normal notation repeats are used like this
2524 @lilypond[quote,fragment,verbatim,relative=2]
2526 \repeat volta 2 { c4 d e f }
2527 \repeat volta 2 { f e d c }
2530 With alternative endings
2531 @lilypond[quote,fragment,verbatim,relative=2]
2533 \repeat volta 2 {c4 d e f}
2534 \alternative { {d2 d} {f f,} }
2538 @lilypond[quote,fragment,verbatim,relative=2]
2541 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2542 \alternative { { g4 g g } { a | a a a a | b2. } }
2548 Brackets for the repeat are normally only printed over the topmost
2549 staff. This can be adjusted by setting the @code{voltaOnThisStaff}
2550 property @inputfileref{input/regression,volta-multi-staff.ly},
2551 @inputfileref{input/regression,volta-chord-names.ly}
2555 A nested repeat like
2564 is ambiguous, since it is is not clear to which @code{\repeat} the
2565 @code{\alternative} belongs. This ambiguity is resolved by always
2566 having the @code{\alternative} belong to the inner @code{\repeat}.
2567 For clarity, it is advisable to use braces in such situations.
2572 Timing information is not remembered at the start of an alternative,
2573 so after a repeat timing information must be reset by hand, for
2574 example by setting @code{Score.measurePosition} or entering
2575 @code{\partial}. Similarly, slurs or ties are also not repeated.
2580 @node Repeats and MIDI
2581 @subsection Repeats and MIDI
2583 @cindex expanding repeats
2585 For instructions on how to expand repeats for MIDI output, see the
2586 example file @inputfileref{input/test,unfold-all-repeats.ly}.
2590 @node Manual repeat commands
2591 @subsection Manual repeat commands
2593 @cindex @code{repeatCommands}
2595 The property @code{repeatCommands} can be used to control the layout of
2596 repeats. Its value is a Scheme list of repeat commands, where each repeat
2600 @item the symbol @code{start-repeat},
2601 which prints a @code{|:} bar line,
2602 @item the symbol @code{end-repeat},
2603 which prints a @code{:|} bar line,
2604 @item the list @code{(volta @var{text})},
2605 which prints a volta bracket saying @var{text}: The text can be specified as
2606 a text string or as a markup text, see @ref{Text markup}. Do not
2607 forget to change the font, as the default number font does not contain
2608 alphabetic characters. Or,
2609 @item the list @code{(volta #f)}, which
2610 stops a running volta bracket
2613 @lilypond[quote,verbatim,fragment,relative=2]
2615 \set Score.repeatCommands = #'((volta "93") end-repeat)
2617 \set Score.repeatCommands = #'((volta #f))
2624 Program reference: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2625 @internalsref{VoltaRepeatedMusic},
2626 @internalsref{UnfoldedRepeatedMusic}, and
2627 @internalsref{FoldedRepeatedMusic}.
2629 @node Tremolo repeats
2630 @subsection Tremolo repeats
2631 @cindex tremolo beams
2633 To place tremolo marks between notes, use @code{\repeat} with tremolo
2635 @lilypond[quote,verbatim,raggedright]
2636 \context Voice \relative c' {
2637 \repeat "tremolo" 8 { c16 d16 }
2638 \repeat "tremolo" 4 { c16 d16 }
2639 \repeat "tremolo" 2 { c16 d16 }
2643 Tremolo marks can also be put on a single note. In this case, the
2644 note should not be surrounded by braces.
2645 @lilypond[quote,verbatim,raggedright]
2646 \repeat "tremolo" 4 c'16
2649 A similar mechanism is the tremolo subdivision, described in
2650 @ref{Tremolo subdivisions}.
2654 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
2656 Program reference: tremolo beams are @internalsref{Beam} objects. Single stem
2657 tremolos are @internalsref{StemTremolo} objects. The music expression is
2658 @internalsref{TremoloEvent}.
2660 Example files: @inputfileref{input/regression,chord-tremolo.ly},
2661 @inputfileref{input/regression,stem-tremolo.ly}.
2663 @node Tremolo subdivisions
2664 @subsection Tremolo subdivisions
2665 @cindex tremolo marks
2666 @cindex @code{tremoloFlags}
2668 Tremolo marks can be printed on a single note by adding
2669 `@code{:}[@var{length}]' after the note. The length must be at least
2670 8. A @var{length} value of 8 gives one line across the note stem. If
2671 the length is omitted, the last value (stored in @code{tremoloFlags})
2674 @lilypond[quote,verbatim,fragment]
2675 c'2:8 c':32 | c': c': |
2678 @c [TODO : stok is te kort bij 32en]
2682 Tremolos entered in this way do not carry over into the MIDI output.
2686 In this manual: @ref{Tremolo repeats}.
2688 Elsewhere: @internalsref{StemTremolo}, @internalsref{TremoloEvent}.
2690 @node Measure repeats
2691 @subsection Measure repeats
2693 @cindex percent repeats
2694 @cindex measure repeats
2696 In the @code{percent} style, a note pattern can be repeated. It is
2697 printed once, and then the pattern is replaced with a special sign.
2698 Patterns of a one and two measures are replaced by percent-like signs,
2699 patterns that divide the measure length are replaced by slashes
2701 @lilypond[quote,verbatim,raggedright]
2702 \repeat "percent" 4 { c'4 }
2703 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
2708 Program reference: @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
2709 @internalsref{PercentRepeatedMusic}, and
2710 @internalsref{DoublePercentRepeat}.
2714 @node Rhythmic music
2715 @section Rhythmic music
2719 * Showing melody rhythms::
2720 * Entering percussion::
2721 * Percussion staves::
2725 @node Showing melody rhythms
2726 @subsection Showing melody rhythms
2728 Sometimes you might want to show only the rhythm of a melody. This
2729 can be done with the rhythmic staff. All pitches of notes on such a
2730 staff are squashed, and the staff itself has a single line
2732 @lilypond[quote,fragment,relative=1,verbatim]
2733 \context RhythmicStaff {
2735 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
2741 Program reference: @internalsref{RhythmicStaff}.
2743 Examples: @inputfileref{input/regression,rhythmic-staff.ly}.
2746 @node Entering percussion
2747 @subsection Entering percussion
2753 Percussion notes may be entered in @code{\drums} mode, which is
2754 similar to @code{notes}. Each piece of percussion has a full name and
2755 an abbreviated name, and both be used in input files
2758 hihat hh bassdrum bd
2760 @lilypond[quote,raggedright]
2761 \new DrumStaff \drums { hihat hh bassdrum bd }
2764 The complete list of drum names is in the init file
2765 @file{ly/drumpitch-init.ly}.
2766 @c TODO: properly document this.
2770 Program reference: @internalsref{DrumNoteEvent}.
2772 @node Percussion staves
2773 @subsection Percussion staves
2777 A percussion part for more than one instrument typically uses a
2778 multiline staff where each position in the staff refers to one piece
2782 To typeset the music, the notes must be interpreted in a
2783 @internalsref{DrumStaff} and @internalsref{DrumVoice} contexts
2786 @lilypond[quote,raggedright,verbatim]
2787 up = \drums { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2788 down = \drums { bassdrum4 snare8 bd r bd sn4 }
2790 \new DrumVoice { \voiceOne \up }
2791 \new DrumVoice { \voiceTwo \down }
2795 The above example shows verbose polyphonic notation. The short
2796 polyphonic notation, described in @ref{Polyphony}, can also be used if
2797 the @internalsref{DrumVoices} are instantiated by hand first. For example,
2799 @lilypond[quote,fragment,verbatim]
2801 \context DrumVoice = "1" { s1 *2 }
2802 \context DrumVoice = "2" { s1 *2 }
2806 { \repeat unfold 16 hh16 }
2815 There are also other layout possibilities. To use these, set the
2816 property @code{drumStyleTable} in context @internalsref{DrumVoice}.
2817 The following variables have been predefined
2821 is the default. It typesets a typical drum kit on a five-line staff
2823 @lilypond[quote,noindent]
2824 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
2825 bd sn ss tomh tommh tomml toml tomfh tomfl }
2826 mus = \drums { cymc cyms cymr hh | hhc hho hhho hhp | \break cb hc
2827 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
2829 << \new DrumStaff\with {
2830 \remove Bar_engraver
2831 \remove Time_signature_engraver
2832 \override Stem #'transparent = ##t
2833 \override Stem #'Y-extent-callback = ##f
2834 minimumVerticalExtent = #'(-4.0 . 5.0)
2836 \context Lyrics \nam
2839 %% need to do this, because of indented @itemize
2842 \override LyricText #'font-family = #'typewriter
2843 \override BarNumber #'transparent =##T
2847 The drum scheme supports six different toms. When there fewer toms, simply
2848 select the toms that produce the desired result, i.e. to get toms on
2849 the three middle lines you use @code{tommh}, @code{tomml} and
2852 @item timbales-style
2853 to typeset timbales on a two line staff
2855 @lilypond[quote,raggedright]
2856 nam = \lyrics { timh ssh timl ssl cb }
2857 mus = \drums { timh ssh timl ssl cb s16 }
2860 \context DrumStaff \with {
2861 \remove Bar_engraver
2862 \remove Time_signature_engraver
2863 \override Stem #'transparent = ##t
2864 \override Stem #'Y-extent-callback = ##f
2865 \override StaffSymbol #'line-count = #2
2866 \override StaffSymbol #'staff-space = #2
2867 minimumVerticalExtent = #'(-3.0 . 4.0)
2868 drumStyleTable = #timbales-style
2871 \override LyricText #'font-family = #'typewriter
2877 to typeset congas on a two line staff
2879 @lilypond[quote,raggedright]
2880 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
2881 mus = \drums { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
2883 \context DrumStaff\with {
2884 \remove Bar_engraver
2885 \remove Time_signature_engraver
2886 drumStyleTable = #congas-style
2887 \override StaffSymbol #'line-count = #2
2889 %% this sucks; it will lengthen stems.
2890 \override StaffSymbol #'staff-space = #2
2891 \override Stem #'transparent = ##t
2892 \override Stem #'Y-extent-callback = ##f
2895 \override LyricText #'font-family = #'typewriter
2900 to typeset bongos on a two line staff
2902 @lilypond[quote,raggedright]
2903 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
2904 mus = \drums { boh boho bohm ssh bol bolo bolm ssl s16 }
2906 \context DrumStaff\with {
2907 \remove Bar_engraver
2908 \remove Time_signature_engraver
2909 \override StaffSymbol #'line-count = #2
2910 drumStyleTable = #bongos-style
2912 %% this sucks; it will lengthen stems.
2913 \override StaffSymbol #'staff-space = #2
2914 \override Stem #'transparent = ##t
2915 \override Stem #'Y-extent-callback = ##f
2918 \override LyricText #'font-family = #'typewriter
2923 @item percussion-style
2924 to typeset all kinds of simple percussion on one line staves
2925 @lilypond[quote,raggedright]
2926 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
2927 mus = \drums { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
2929 \context DrumStaff\with{
2930 \remove Bar_engraver
2931 drumStyleTable = #percussion-style
2932 \override StaffSymbol #'line-count = #1
2933 \remove Time_signature_engraver
2934 \override Stem #'transparent = ##t
2935 \override Stem #'Y-extent-callback = ##f
2939 \override LyricText #'font-family = #'typewriter
2945 If you do not like any of the predefined lists you can define your own
2946 list at the top of your file
2948 @lilypond[quote,raggedright,verbatim]
2950 (bassdrum default #f -1)
2951 (snare default #f 0)
2953 (pedalhihat xcircle "stopped" 2)
2954 (lowtom diamond #f 3)))
2955 up = \drums { hh8 hh hh hh hhp4 hhp }
2956 down = \drums { bd4 sn bd toml8 toml }
2959 \set DrumStaff.drumStyleTable
2960 = #(alist->hash-table mydrums)
2961 \new DrumVoice { \voiceOne \up }
2962 \new DrumVoice { \voiceTwo \down }
2969 Init files: @file{ly/drumpitch-init.ly}.
2971 Program reference: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
2975 Because general MIDI does not contain rim shots, the sidestick is used
2976 for this purpose instead.
2979 @section Piano music
2981 Piano staves are two normal staves coupled with a brace. The staves
2982 are largely independent, but sometimes voices can cross between the
2983 two staves. The same notation is also used for harps and other key
2984 instruments. The @internalsref{PianoStaff} is especially built to
2985 handle this cross-staffing behavior. In this section we discuss the
2986 @internalsref{PianoStaff} and some other pianistic peculiarities.
2990 * Automatic staff changes::
2991 * Manual staff switches::
2994 * Staff switch lines::
2999 There is no support for putting chords across staves. You can get
3000 this result by increasing the length of the stem in the lower stave so
3001 it reaches the stem in the upper stave, or vice versa. An example is
3002 included with the distribution as
3003 @inputfileref{input/test,stem-cross-staff.ly}.
3005 Dynamics are not centered, but kludges do exist. See
3006 @inputfileref{input/template,piano-dynamics.ly}.
3008 @cindex cross staff stem
3009 @cindex stem, cross staff
3010 @cindex distance between staves in piano music
3012 The distance between the two staves is normally fixed across the
3013 entire score. It is possible to tune this per system, but it does
3014 require arcane command incantations. See
3015 @inputfileref{input/test,piano-staff-distance.ly}.
3018 @node Automatic staff changes
3019 @subsection Automatic staff changes
3020 @cindex Automatic staff changes
3022 Voices can switch automatically between the top and the bottom
3023 staff. The syntax for this is
3027 \autochange \context Voice @{ @dots{}@var{music}@dots{} @}
3032 The two staves of the piano staff must be named @code{up} and
3035 A @code{\relative} section that is outside of @code{\autochange} has
3036 no effect on the pitches of @var{music}, so, if necessary, put
3037 @code{\relative} inside @code{\autochange} like
3041 \autochange \relative @dots{} \new Voice @dots{}
3046 The autochanger switches on basis of pitch (middle C is the turning
3047 point), and it looks ahead skipping over rests to switch in
3048 advance. Here is a practical example
3050 @lilypond[quote,verbatim,raggedright]
3051 \context PianoStaff <<
3052 \context Staff = "up" {
3053 \autochange \new Voice \relative c' {
3054 g4 a b c d r4 a g } }
3055 \context Staff = "down" {
3062 In this example, spacer rests are used to prevent the bottom staff from
3063 terminating too soon.
3068 In this manual: @ref{Manual staff switches}.
3070 Program reference: @internalsref{AutoChangeMusic}.
3076 The staff switches often do not end up in optimal places. For high
3077 quality output, staff switches should be specified manually.
3080 @code{\autochange} cannot be inside @code{\times}.
3082 Internally, the @code{\partcombine} interprets both arguments as
3083 @code{Voice}s named @code{one} and @code{two}, and then decides when
3084 the parts can be combined. Consequently, if the arguments switch to
3085 differently named @internalsref{Voice} contexts, the events in those
3089 @node Manual staff switches
3090 @subsection Manual staff switches
3092 @cindex manual staff switches
3093 @cindex staff switch, manual
3095 Voices can be switched between staves manually, using the following command
3097 \change Staff = @var{staffname} @var{music}
3101 The string @var{staffname} is the name of the staff. It switches the
3102 current voice from its current staff to the Staff called
3103 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3104 @code{"down"}. The @context{Staff} referred to must already exist, so
3105 usually the setup for a score will start with a setup of the staves,
3109 \context Staff = up @{
3110 \skip 1 * 10 %@emph{ keep staff alive}
3112 \context Staff = down @{
3113 \skip 1 * 10 %@emph{idem}
3119 and the @context{Voice} is inserted afterwards
3122 \context Staff = down
3123 \new Voice @{ @dots{} \change Staff = up @dots{} @}
3131 Pianos have pedals that alter the way sound are produced. Generally, a
3132 piano has three pedals, sustain, una corda, and sostenuto.
3135 Piano pedal instruction can be expressed by attaching
3136 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3137 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3140 @lilypond[quote,fragment,verbatim]
3141 c'4\sustainDown c'4\sustainUp
3144 What is printed can be modified by setting @code{pedal@var{X}Strings},
3145 where @var{X} is one of the pedal types: @code{Sustain},
3146 @code{Sostenuto} or @code{UnaCorda}. Refer to
3147 @internalsref{SustainPedal} in the program reference for more
3150 Pedals can also be indicated by a sequence of brackets, by setting the
3151 @code{pedalSustainStyle} property to @code{bracket} objects
3153 @lilypond[quote,fragment,verbatim,relative=2]
3154 \set Staff.pedalSustainStyle = #'bracket
3156 b\sustainUp\sustainDown
3157 b g \sustainUp a \sustainDown \bar "|."
3160 A third style of pedal notation is a mixture of text and brackets,
3161 obtained by setting the @code{pedalSustainStyle} style property to
3164 @lilypond[quote,fragment,verbatim,relative=2]
3165 \set Staff.pedalSustainStyle = #'mixed
3167 b\sustainUp\sustainDown
3168 b g \sustainUp a \sustainDown \bar "|."
3171 The default `*Ped.' style for sustain and damper pedals corresponds to
3172 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
3175 @lilypond[quote,fragment,verbatim,relative=2]
3176 c\sostenutoDown d e c, f g a\sostenutoUp
3179 For fine-tuning of the appearance of a pedal bracket, the properties
3180 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3181 @code{PianoPedalBracket} objects (see
3182 @internalsref{PianoPedalBracket} in the Program reference) can be modified. For example, the
3183 bracket may be extended to the end of the note head
3185 @lilypond[quote,fragment,verbatim,relative=2]
3186 \override Staff.PianoPedalBracket
3187 #'shorten-pair = #'(0 . -1.0)
3188 c\sostenutoDown d e c, f g a\sostenutoUp
3192 @subsection Arpeggio
3195 @cindex broken arpeggio
3196 @cindex @code{\arpeggio}
3198 You can specify an arpeggio sign on a chord by attaching an
3199 @code{\arpeggio} to a chord
3202 @lilypond[quote,fragment,relative=1,verbatim]
3206 When an arpeggio crosses staves, you attach an arpeggio to the chords
3207 in both staves, and set
3208 @internalsref{PianoStaff}.@code{connectArpeggios}
3210 @lilypond[quote,fragment,relative=1,verbatim]
3211 \context PianoStaff <<
3212 \set PianoStaff.connectArpeggios = ##t
3213 \new Staff { <c' e g c>\arpeggio }
3214 \new Staff { \clef bass <c,, e g>\arpeggio }
3218 The direction of the arpeggio is sometimes denoted by adding an
3219 arrowhead to the wiggly line
3221 @lilypond[quote,fragment,relative=1,verbatim]
3230 A square bracket on the left indicates that the player should not
3231 arpeggiate the chord
3233 @lilypond[quote,fragment,relative=1,verbatim]
3240 @cindex @code{\arpeggio}
3242 @cindex @code{\arpeggioUp}
3244 @cindex @code{\arpeggioDown}
3245 @code{\arpeggioDown},
3246 @cindex @code{\arpeggioBoth}
3247 @code{\arpeggioBoth},
3248 @cindex @code{\arpeggioBracket}
3249 @code{\arpeggioBracket}.
3253 Program reference: @internalsref{ArpeggioEvent} music expressions lead to
3254 @internalsref{Arpeggio} objects. Cross staff arpeggios are
3255 @internalsref{PianoStaff}.@internalsref{Arpeggio}.
3259 It is not possible to mix connected arpeggios and unconnected
3260 arpeggios in one @internalsref{PianoStaff} at the same time.
3262 @node Staff switch lines
3263 @subsection Staff switch lines
3266 @cindex follow voice
3267 @cindex staff switching
3270 @cindex @code{followVoice}
3272 Whenever a voice switches to another staff a line connecting the notes
3273 can be printed automatically. This is enabled if the property
3274 @code{PianoStaff.followVoice} is set to true
3276 @lilypond[quote,fragment,relative=1,verbatim]
3277 \context PianoStaff <<
3278 \set PianoStaff.followVoice = ##t
3279 \context Staff \context Voice {
3284 \context Staff=two { \clef bass \skip 1*2 }
3290 The associated object is @internalsref{VoiceFollower}.
3294 @cindex @code{\showStaffSwitch}
3295 @code{\showStaffSwitch},
3296 @cindex @code{\hideStaffSwitch}
3297 @code{\hideStaffSwitch}.
3301 @section Vocal music
3304 The easiest way to add lyrics to a melody, is by appending
3309 \newlyrics @{ @var{the lyrics} @}
3312 to a melody. Here is an example,
3314 @lilypond[raggedright,verbatim]
3315 \relative { \time 3/4 c2 e4 g2. }
3316 \newlyrics { play the game }
3319 More stanzas can be added by adding more
3320 @code{\newlyrics} sections
3322 @lilypond[raggedright,verbatim]
3323 \relative { \time 3/4 c2 e4 g2. }
3324 \newlyrics { play the game }
3325 \newlyrics { speel het spel }
3326 \newlyrics { joue le jeu }
3329 The @code{\newlyrics} keyword has three functions: it interprets the
3330 following words as texts instead of notes, it sets up a context for
3331 printing texts (the @code{Lyrics} context), and it couples the melody
3332 with the lyrics, so the durations of both are aligned.
3334 These three functions can be controlled separately, and that is what
3335 the following sections are about.
3339 * The Lyrics context::
3344 @node Entering lyrics
3345 @subsection Entering lyrics
3349 @cindex @code{\lyrics}
3352 Lyrics are entered in a special input mode. This mode is is introduced
3353 by the keyword @code{\lyrics}. In this mode you can enter lyrics,
3354 with punctuation and accents without any hassle. Syllables are
3355 entered like notes, but with pitches replaced by text. For example,
3357 \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
3360 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3361 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3362 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3363 any 8-bit character with ASCII code over 127, or a two-character
3364 combination of a backslash followed by one of @code{`}, @code{'},
3365 @code{"}, or @code{^}.
3367 Subsequent characters of a word can be any character that is not a digit
3368 and not white space. One important consequence of this is that a word
3369 can end with @code{@}}. The following example is usually a bug. The
3370 syllable includes a @code{@}}, and hence the opening brace is not balanced
3372 \lyrics @{ twinkle@}
3375 @cindex @code{\property}, in @code{\lyrics}
3376 Similarly, a period following a alphabetic sequence, is included in
3377 the resulting string. As a consequence, spaces must be inserted around
3380 \override Score . LyricText #'font-shape = #'italic
3384 @cindex spaces, in lyrics
3385 @cindex quotes, in lyrics
3387 Any @code{_} character which appears in an unquoted word is converted
3388 to a space. This provides a mechanism for introducing spaces into words
3389 without using quotes. Quoted words can also be used in Lyrics mode to
3390 specify words that cannot be written with the above rules. The
3391 following example incorporates double quotes
3394 \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3397 This example is slightly academic, since it gives better looking
3398 results to use matched single quotes, @code{``} and @code{''}
3400 \lyrics @{ He said: ``Let my peo ple go'' @}
3405 Centered hyphens are entered as `@code{-}@code{-}' between syllables.
3406 The hyphen will have variable length depending on the space between
3407 the syllables and it will be centered between the syllables.
3412 When a lyric is sung over many notes (this is called a melisma), this is
3413 indicated with a horizontal line centered between a syllable and the
3414 next one. Such a line is called an extender line, and it is entered as
3419 Program reference: events @internalsref{LyricEvent},
3420 @internalsref{HyphenEvent}, and @internalsref{ExtenderEvent}. Objects
3421 @internalsref{LyricHyphen}, @internalsref{LyricExtender} and
3422 @internalsref{LyricText}.
3424 Examples: @inputfileref{input/test,lyric-hyphen-retain.ly}.
3428 The definition of lyrics mode is too complex.
3432 @node The Lyrics context
3433 @subsection The Lyrics context
3436 Lyrics are printed by interpreting them in a @internalsref{Lyrics} context
3438 \context Lyrics \lyrics @dots{}
3441 @cindex automatic syllable durations
3442 @cindex @code{\lyricsto}
3443 @cindex lyrics and melodies
3445 This will place the lyrics according to the durations that were
3446 entered. The lyrics can also be aligned under a given melody
3447 automatically. In this case, it is no longer necessary to enter the
3448 correct duration for each syllable. This is achieved by combining the
3449 melody and the lyrics with the @code{\lyricsto} expression
3451 \lyricsto @var{name} \new Lyrics @dots{}
3454 This aligns the lyrics to the
3456 notes of the @internalsref{Voice} context called @var{name}, which has
3457 to exist. Therefore, normally the @code{Voice} is specified first, and
3458 then the lyrics are specified with @code{\lyricsto}. The command
3459 @code{\lyricsto} switches to @code{\lyrics} mode automatically, so the
3460 @code{\lyrics} keyword may be omitted.
3462 For different or more complex orderings, the best way is to setup the
3463 hierarchy of staves and lyrics first, e.g.
3465 \context ChoirStaff <<
3466 \context Lyrics = sopranoLyrics @{ s1 @}
3467 \context Voice = soprano @{ @emph{music} @}
3468 \context Lyrics = tenorLyrics @{ s1 @}
3469 \context Voice = tenor @{ @emph{music} @}
3472 and then combine the appropriate melodies and lyric lines
3474 \lyricsto "soprano" \context Lyrics = sopranoLyrics
3479 The final input would resemble
3482 << \context ChoirStaff << @emph{setup the music} >>
3483 \lyricsto "soprano" @emph{etc}
3484 \lyricsto "alto" @emph{etc}
3490 The @code{\lyricsto} command detects melismata: it only puts one
3491 syllable under a tied or slurred group of notes. If you want to force
3492 an unslurred group of notes to be a melisma, insert @code{\melisma}
3493 after the first note of the group, and @code{\melismaEnd} after the
3496 @lilypond[quote,relative=2,raggedright,fragment,verbatim]
3498 \context Voice = "lala" {
3506 \lyricsto "lala" \new Lyrics {
3512 In addition, notes are considered a melisma if they are manually
3513 beamed, and automatic beaming (see @ref{Setting automatic beam
3514 behavior}) is switched off. The criteria for deciding melismata can
3515 be tuned with the property @code{melismaBusyProperties}. See
3516 @internalsref{Melisma_translator} in the program reference for more
3519 Lyrics can also be entered without @code{\lyricsto}. In this case the
3520 durations of each syllable must be entered explicitly, for example,
3527 Alignment to a melody can be specified with the @code{associatedVoice}
3531 \set associatedVoice = #"melody"
3534 Here is an example demonstrating manual lyric durations,
3536 @lilypond[relative=1,verbatim,fragment]
3537 << \context Voice = melody {
3541 \new Lyrics \lyrics {
3542 \set associatedVoice = #"melody"
3550 When multiple stanzas are put on the same melody, it can happen that
3551 two stanzas have melismata in different locations. This can be
3552 remedied by switching off melismata for one
3553 @internalsref{Lyrics}. This is achieved by setting
3554 the @code{ignoreMelismata} property to @code{#t}. An example is shown
3555 in @inputfileref{input/regression,lyric-combine-new.ly}.
3558 @cindex choral score
3560 A complete example of a SATB score setup is in the file
3561 @inputfileref{input/template,satb.ly}.
3566 @code{\melisma}, @code{\melismaEnd}
3567 @cindex @code{\melismaEnd}
3568 @cindex @code{\melisma}
3572 Program reference: Music expressions: @internalsref{LyricCombineMusic},
3573 Contexts: @internalsref{Lyrics}, @internalsref{Melisma_translator}.
3575 Examples: @inputfileref{input/template,satb.ly},
3576 @inputfileref{input/regression,lyric-combine-new.ly},
3577 @c TODO: make separate section for melismata
3578 @inputfileref{input/test,lyrics-melisma-variants.ly}.
3579 @inputfileref{input/test,lyrics-melisma-faster.ly}.
3583 Melismata are not detected automatically, and extender lines must be
3587 For proper processing of extender lines, the
3588 @internalsref{Lyrics} and @internalsref{Voice} should be
3589 linked. This can be achieved either by using @code{\lyricsto} or by
3590 setting corresponding names for both contexts. The latter is explained
3591 in @ref{More stanzas}.
3593 @c TODO: document \new Staff << Voice \lyricsto >> bug
3596 @subsection More stanzas
3598 @cindex phrasing, in lyrics
3601 The lyrics should be aligned with the note heads of the melody. To
3602 achieve this, each line of lyrics should be marked to correspond with
3603 the melodic line. This is done automatically when @code{\lyricsto},
3604 but it can also be done manually.
3606 To this end, give the @internalsref{Voice} context an identity
3608 \context Voice = duet @{
3613 Then set the @internalsref{Lyrics} contexts to names starting with
3614 that identity followed by a dash. In the preceding example, the
3615 @internalsref{Voice} identity is @code{duet}, so the identities of the
3616 @internalsref{Lyrics}s are marked @code{duet-1} and @code{duet-2}
3618 \context Lyrics = "duet-1" @{
3619 Hi, my name is Bert. @}
3620 \context Lyrics = "duet-2" @{
3621 Ooooo, ch\'e -- ri, je t'aime. @}
3624 @c \lyricsto in the example below is pointless, given subject of the
3628 The complete example is shown here
3629 @lilypond[quote,raggedright,verbatim]
3631 \relative c'' \context Voice = duet {
3635 \lyricsto "duet" \new Lyrics {
3636 \set vocalName = "Bert"
3637 Hi, my name is Bert. }
3638 \lyricsto "duet" \new Lyrics {
3639 \set vocalName = "Ernie"
3640 Ooooo, ch\'e -- ri, je t'aime. }
3645 @cindex stanza number
3646 @cindex singer's names
3647 @cindex name of singer
3649 Stanza numbers can be added by setting @code{stanza}, e.g.
3651 @lilypond[quote,verbatim,relative=2]
3653 \context Voice = duet {
3654 \time 3/4 g2 e4 a2 f4 g2. }
3655 \lyricsto "duet" \new Lyrics {
3657 Hi, my name is Bert. }
3661 This example also demonstrates how names of the singers can be added
3662 using @code{vocalName} analogous to instrument annotations for staves.
3663 A short version may be entered as @code{vocNam}.
3665 To make empty spaces in lyrics, use @code{\skip}.
3670 Program reference: Layout objects @internalsref{LyricText} and
3671 @internalsref{VocalName}. Music expressions
3672 @internalsref{LyricEvent}.
3680 The term @emph{ambitus} denotes a range of pitches for a given voice
3681 in a part of music. It also may denote the pitch range that a musical
3682 instrument is capable of playing. Ambituses are printed on vocal
3683 parts, so singers can easily determine if it meets his or her
3686 It denoted at the beginning of a piece near the initial clef. The
3687 range is graphically specified by two note heads, that represent the
3688 minimum and maximum pitch. To print such ambituses, add the
3689 @internalsref{Ambitus_engraver} to the @internalsref{Voice} context,
3696 \consists Ambitus_engraver
3701 This results in the following output
3703 @lilypond[quote,raggedright]
3707 \consists Ambitus_engraver
3722 If you have multiple voices in a single staff, and you want a single
3723 ambitus per staff rather than per each voice, add the
3724 @internalsref{Ambitus_engraver} to the @internalsref{Staff} context
3725 rather than to the @internalsref{Voice} context.
3727 It is possible to tune individual ambituses for multiple voices on a
3728 single staff, for example by erasing or shifting them horizontally. An
3729 example is in @inputfileref{input/test,ambitus-mixed.ly}.
3733 Program reference: @internalsref{Ambitus},
3734 @internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
3735 @internalsref{AmbitusAccidental}.
3737 Examples: @inputfileref{input/regression,ambitus.ly},
3738 @inputfileref{input/test,ambitus-mixed.ly}.
3742 There is no collision handling in the case of multiple per-voice
3749 @cindex guitar tablature
3751 Tablature notation is used for notating music for plucked string
3752 instruments. It notates pitches not by using note heads, but by
3753 indicating on which string and fret a note must be played. LilyPond
3754 offers limited support for tablature.
3757 * Tablatures basic::
3758 * Non-guitar tablatures::
3761 @node Tablatures basic
3762 @subsection Tablatures basic
3763 @cindex Tablatures basic
3765 The string number associated to a note is given as a backslash
3766 followed by a number, e.g. @code{c4\3} for a C quarter on the third
3767 string. By default, string 1 is the highest one, and the tuning
3768 defaults to the standard guitar tuning (with 6 strings). The notes
3769 are printed as tablature, by using @internalsref{TabStaff} and
3770 @internalsref{TabVoice} contexts
3772 @lilypond[quote,fragment,verbatim]
3779 @cindex @code{minimumFret}
3782 When no string is specified, the first string that does not give a
3783 fret number less than @code{minimumFret} is selected. The default
3784 value for @code{minimumFret} is 0
3789 \set TabStaff.minimumFret = #8
3792 @lilypond[quote,noindent,raggedright]
3796 \set TabStaff.minimumFret = #8
3799 \context StaffGroup <<
3800 \context Staff { \clef "G_8" \frag }
3801 \context TabStaff { \frag }
3807 Program reference: @internalsref{TabStaff}, @internalsref{TabVoice}, and
3808 @internalsref{StringNumberEvent}.
3812 Chords are not handled in a special way, and hence the automatic
3813 string selector may easily select the same string to two notes in a
3817 @node Non-guitar tablatures
3818 @subsection Non-guitar tablatures
3819 @cindex Non-guitar tablatures
3821 You can change the number of strings, by setting the number of lines
3822 in the @internalsref{TabStaff}.
3824 You can change the tuning of the strings. A string tuning is given as
3825 a Scheme list with one integer number for each string, the number
3826 being the pitch (measured in semitones relative to middle C) of an
3827 open string. The numbers specified for @code{stringTuning} are the
3828 numbers of semitones to subtract or add, starting the specified pitch
3829 by default middle C, in string order. Thus, the notes are e, a, d, and
3832 @lilypond[quote,fragment,verbatim]
3833 \context TabStaff <<
3834 \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
3837 a,4 c' a e' e c' a e'
3844 No guitar special effects have been implemented.
3848 Program reference: @internalsref{Tab_note_heads_engraver}.
3852 @section Chord names
3855 LilyPond has support for both printing chord names. Chords may be
3856 entered in musical chord notation, i.e. @code{< .. >}, but they can
3857 also be entered by name. Internally, the chords are represented as a
3858 set of pitches, so they can be transposed
3861 @lilypond[quote,verbatim,raggedright]
3862 twoWays = \transpose c c' {
3871 << \context ChordNames \twoWays
3872 \context Voice \twoWays >>
3875 This example also shows that the chord printing routines do not try to
3876 be intelligent. The last chord (@code{f bes d}) is not interpreted as
3882 * Printing chord names::
3887 @subsection Chords mode
3890 Chord mode is a mode where you can input sets of pitches using common
3891 names. It is introduced by the keyword @code{\chords}.
3892 In chords mode, a chord is entered by the root, which is entered
3894 @lilypond[quote,fragment,verbatim,relative=2]
3895 \chords { es4. d8 c2 }
3900 Other chords may be entered by suffixing a colon, and introducing a
3901 modifier, and optionally, a number
3903 @lilypond[quote,fragment,verbatim]
3904 \chords { e1:m e1:7 e1:m7 }
3906 The first number following the root is taken to be the `type' of the
3907 chord, thirds are added to the root until it reaches the specified
3909 @lilypond[quote,fragment,verbatim]
3910 \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
3913 @cindex root of chord
3914 @cindex additions, in chords
3915 @cindex removals, in chords
3917 More complex chords may also be constructed adding separate steps
3918 to a chord. Additions are added after the number following
3919 the colon, and are separated by dots
3921 @lilypond[quote,verbatim,fragment]
3922 \chords { c:5.6 c:3.7.8 c:3.6.13 }
3924 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
3926 @lilypond[quote,verbatim,fragment]
3927 \chords { c:7+ c:5+.3- c:3-.5-.7- }
3929 Removals are specified similarly, and are introduced by a caret. They
3930 must come after the additions
3931 @lilypond[quote,verbatim,fragment]
3932 \chords { c^3 c:7^5 c:9^3.5 }
3935 Modifiers can be used to change pitches. The following modifiers are
3939 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
3941 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
3944 is the augmented chord. This modifier raises the 5th step.
3946 is the major 7th chord. This modifier raises the 7th step if present.
3948 is the suspended 4th or 2nd. This modifier removes the 3rd
3949 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
3952 Modifiers can be mixed with additions
3953 @lilypond[quote,verbatim,fragment]
3954 \chords { c:sus4 c:7sus4 c:dim7 c:m6 }
3957 @cindex modifiers, in chords.
3964 Since an unaltered 11 does not sound good when combined with an
3965 unaltered 3, the 11 is removed in this case (unless it is added
3968 @lilypond[quote,fragment,verbatim]
3969 \chords { c:13 c:13.11 c:m13 }
3974 An inversion (putting one pitch of the chord on the bottom), as well
3975 as bass notes, can be specified by appending
3976 @code{/}@var{pitch} to the chord
3977 @lilypond[quote,fragment,verbatim]
3978 \chords { c1 c/g c/f }
3982 A bass note can be added instead of transposed out of the chord,
3983 by using @code{/+}@var{pitch}.
3985 @lilypond[quote,fragment,verbatim]
3986 \chords { c1 c/+g c/+f }
3989 Chords is a mode similar to @code{\lyrics} etc. Most
3990 of the commands continue to work, for example, @code{r} and
3991 @code{\skip} can be used to insert rests and spaces, and property
3992 commands may be used to change various settings.
3998 Each step can only be present in a chord once. The following
3999 simply produces the augmented chord, since @code{5+} is interpreted
4002 @lilypond[quote,verbatim,fragment]
4003 \chords { c:5.5-.5+ }
4007 @node Printing chord names
4008 @subsection Printing chord names
4010 @cindex printing chord names
4014 For displaying printed chord names, use the @internalsref{ChordNames} context.
4015 The chords may be entered either using the notation
4016 described above, or directly using @code{<} and @code{>}
4018 @lilypond[quote,verbatim,raggedright]
4020 \chords {a1 b c} <d' f' a'> <e' g' b'>
4024 \context ChordNames \scheme
4025 \context Staff \scheme
4029 You can make the chord changes stand out by setting
4030 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
4031 display chord names when there is a change in the chords scheme and at
4032 the start of a new line
4034 @lilypond[quote,verbatim,linewidth=9\cm]
4036 c1:m c:m \break c:m c:m d
4039 \context ChordNames {
4040 \set chordChanges = ##t
4042 \context Staff \transpose c c' \scheme
4046 The previous examples all show chords over a staff. This is not
4047 necessary. Chords may also be printed separately. It may be necessary
4048 to add @internalsref{Volta_engraver} and @internalsref{Bar_engraver}
4049 for showing repeats.
4051 @lilypond[raggedright,verbatim]
4052 \new ChordNames \with {
4053 \override BarLine #'bar-size = #4
4054 \consists Bar_engraver
4055 \consists "Volta_engraver"
4057 \repeat volta 2 \chords {
4064 The default chord name layout is a system for Jazz music, proposed by
4065 Klaus Ignatzek (see @ref{Literature list}). It can be tuned through the
4066 following properties
4069 @cindex @code{chordNameExceptions}
4070 @item chordNameExceptions
4071 This is a list that contains the chords that have special formatting.
4073 @inputfileref{input/regression,chord-name-exceptions.ly}.
4074 @cindex exceptions, chord names.
4077 @cindex @code{majorSevenSymbol}
4078 @item majorSevenSymbol
4079 This property contains the markup object used for the 7th step, when
4080 it is major. Predefined options are @code{whiteTriangleMarkup} and
4081 @code{blackTriangleMarkup}. See
4082 @inputfileref{input/regression,chord-name-major7.ly} for an example.
4084 @cindex @code{chordNameSeparator}
4085 @item chordNameSeparator
4086 Different parts of a chord name are normally separated by a
4087 slash. By setting @code{chordNameSeparator}, you can specify other
4089 @lilypond[quote,fragment,verbatim]
4090 \context ChordNames \chords {
4092 \set chordNameSeparator
4093 = \markup { \typewriter "|" }
4098 @cindex @code{chordRootNamer}
4099 @item chordRootNamer
4100 The root of a chord is usually printed as a letter with an optional
4101 alteration. The transformation from pitch to letter is done by this
4102 function. Special note names (for example, the German ``H'' for a
4103 B-chord) can be produced by storing a new function in this property.
4105 @cindex @code{chordNoteNamer}
4106 @item chordNoteNamer
4107 The default is to print single pitch, e.g. the bass note, using the
4108 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
4109 to a specialized function to change this behavior. For example, the
4110 base can be printed in lower case.
4114 The predefined variables @code{\germanChords},
4115 @code{\semiGermanChords} set these variables. The effect is
4118 @lilypondfile[notexidoc]{chord-names-german.ly}
4120 There are also two other chord name schemes implemented: an alternate
4121 Jazz chord notation, and a systematic scheme called Banter chords. The
4122 alternate jazz notation is also shown on the chart in @ref{Chord name
4123 chart}. Turning on these styles is described in the input file
4124 @inputfileref{input/test,chord-names-jazz.ly}.
4128 @cindex chords, jazz
4133 @cindex @code{\germanChords}
4134 @code{\germanChords},
4135 @cindex @code{\semiGermanChords}
4136 @code{\semiGermanChords}.
4143 Examples: @inputfileref{input/regression,chord-name-major7.ly},
4144 @inputfileref{input/regression,chord-name-exceptions.ly},
4145 @inputfileref{input/test,chord-names-jazz.ly},
4146 @inputfileref{input/test,chords-without-melody.ly}.
4149 Init files: @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
4154 Chord names are determined solely from the list of pitches. Chord
4155 inversions are not identified, and neither are added bass notes. This
4156 may result in strange chord names when chords are entered with the
4157 @code{< .. >} syntax.
4162 @node Orchestral music
4163 @section Orchestral music
4165 @cindex Writing parts
4167 Orchestral music involves some special notation, both in the full
4168 score and the individual parts. This section explains how to tackle
4169 some common problems in orchestral music.
4174 * Multiple staff contexts::
4177 * Instrument names::
4179 * Instrument transpositions::
4180 * Multi measure rests::
4181 * Automatic part combining::
4183 * Different editions from one source::
4184 * Quoting other voices::
4187 @node Multiple staff contexts
4188 @subsection Multiple staff contexts
4190 Polyphonic scores consist of many staves. These staves can be
4191 constructed in three different ways
4193 @item The group is started with a brace at the left, and bar lines are
4194 connected. This is done with the @internalsref{GrandStaff} context.
4196 @item The group is started with a bracket, and bar lines are connected. This is done with the
4197 @internalsref{StaffGroup} context
4200 @item The group is started with a vertical line. Bar lines are not
4201 connected. This is the default for the score.
4205 @cindex Staff, multiple
4206 @cindex bracket, vertical
4207 @cindex brace, vertical
4212 @node Aligning to cadenzas
4213 @subsection Aligning to cadenzas
4216 In an orchestral context, cadenzas bring cause a special probelem:
4217 when constructing a score that includes a cadenza, all other
4218 instruments should skip just as many notes as the length of the
4219 cadenza, otherwise they will start too soon or too late.
4221 A solution to this problem are the functions @code{mmrest-of-length}
4222 and @code{skip-of-length}. These Scheme functions take a piece music
4223 as argument, and generate a @code{\skip} or multi rest, exactly as
4224 long as the piece. The use of @code{mmrest-of-length} is demonstrated
4225 in the following example.
4227 @lilypond[raggedright]
4228 cadenza = \relative c' {
4229 c4 d8 << { e f g } \\ { d4. } >>
4234 \new Staff { \cadenza c'4 }
4236 #(ly:export (mmrest-of-length cadenza))
4246 @node Rehearsal marks
4247 @subsection Rehearsal marks
4248 @cindex Rehearsal marks
4250 @cindex @code{\mark}
4252 To print a rehearsal mark, use the @code{\mark} command
4253 @lilypond[quote,fragment,verbatim]
4264 (The letter I is skipped in accordance with engraving traditions.)
4266 The mark is incremented automatically if you use @code{\mark
4267 \default}, but you can also use an integer argument to set the mark
4268 manually. The value to use is stored in the property
4269 @code{rehearsalMark}.
4271 The style is defined by the property @code{markFormatter}. It is a
4272 function taking the current mark (an integer) and the current context
4273 as argument. It should return a markup object. In the following
4274 example, @code{markFormatter} is set to a canned procedure. After a
4275 few measures, it is set to function that produces a boxed number.
4277 @lilypond[quote,verbatim,fragment,relative=2]
4278 \set Score.markFormatter = #format-mark-numbers
4281 \set Score.markFormatter
4282 = #(lambda (mark context)
4283 (make-bold-markup (make-box-markup (number->string mark))))
4288 The file @file{scm/translation-functions.scm} contains the definitions
4289 of @code{format-mark-numbers} (the default format) and
4290 @code{format-mark-letters}. They can be used as inspiration for other
4291 formatting functions.
4294 @cindex coda on bar line
4295 @cindex segno on bar line
4296 @cindex fermata on bar line
4297 @cindex bar lines, symbols on
4299 The @code{\mark} command can also be used to put signs like coda,
4300 segno and fermatas on a bar line. Use @code{\markup} to
4301 to access the appropriate symbol
4303 @lilypond[quote,fragment,verbatim,relative=2]
4304 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4308 In the case of a line break, marks must also be printed at the end of
4309 the line, and not at the beginning. Use the following to force that
4312 \override Score.RehearsalMark
4313 #'break-visibility = #begin-of-line-invisible
4319 @cindex bar lines, putting symbols on
4323 Program reference: @internalsref{MarkEvent}, @internalsref{RehearsalMark}.
4325 Init files: @file{scm/translation-functions.scm} contains the
4326 definition of @code{format-mark-numbers} and
4327 @code{format-mark-letters}. They can be used as inspiration for other
4328 formatting functions.
4330 Examples: @inputfileref{input/regression,rehearsal-mark-letter.ly},
4331 @inputfileref{input/regression,rehearsal-mark-number.ly}.
4335 @subsection Bar numbers
4339 @cindex measure numbers
4340 @cindex @code{currentBarNumber}
4342 Bar numbers are printed by default at the start of the line. The
4343 number itself is stored in the @code{currentBarNumber} property, which
4344 is normally updated automatically for every measure.
4346 Bar numbers can be typeset at regular intervals instead of at the
4347 beginning of each line. This is illustrated in the following example,
4348 whose source is available as
4349 @inputfileref{input/test,bar-number-regular-interval.ly}
4351 @lilypondfile[quote]{bar-number-regular-interval.ly}
4355 Program reference: @internalsref{BarNumber}.
4357 Examples: @inputfileref{input/test,bar-number-every-five-reset.ly},
4358 and @inputfileref{input/test,bar-number-regular-interval.ly}.
4362 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4363 there is one at the top. To solve this, the
4364 @code{padding} property of @internalsref{BarNumber} can be
4365 used to position the number correctly.
4367 @node Instrument names
4368 @subsection Instrument names
4370 In an orchestral score, instrument names are printed left side of the
4373 This can be achieved by setting @internalsref{Staff}.@code{instrument}
4374 and @internalsref{Staff}.@code{instr}. This will print a string before
4375 the start of the staff. For the first start, @code{instrument} is
4376 used, for the next ones @code{instr} is used.
4378 @lilypond[quote,verbatim,raggedright,relative=1,fragment]
4379 \set Staff.instrument = "Ploink "
4380 \set Staff.instr = "Plk "
4386 You can also use markup texts to construct more complicated instrument
4389 @lilypond[quote,fragment,verbatim,raggedright]
4391 \set Staff.instrument = \markup {
4392 \column < "Clarinetti" { "in B"
4393 \smaller \flat } > }
4398 For longer instrument names, it may be useful to increase the
4399 @code{indent} setting in the @code{\paper} block.
4403 Program reference: @internalsref{InstrumentName}.
4407 When you put a name on a grand staff or piano staff the width of the
4408 brace is not taken into account. You must add extra spaces to the end of
4409 the name to avoid a collision.
4412 @subsection Transpose
4414 @cindex transposition of pitches
4415 @cindex @code{\transpose}
4417 A music expression can be transposed with @code{\transpose}. The
4420 \transpose @var{from} @var{to} @var{musicexpr}
4423 This means that @var{musicexpr} is transposed by the interval between
4424 the pitches @var{from} and @var{to}: any note with pitch @code{from}
4425 is changed to @code{to}.
4428 For example, consider a piece written in the key of D major. If
4429 this piece is a little too low for its performer, it can be
4430 transposed up to E major with
4432 \transpose d e @dots{}
4435 Consider a part written for violin (a C instrument). If
4436 this part is to be played on the A clarinet, the following
4437 transposition will produce the appropriate part
4440 \transpose a c @dots{}
4443 @code{\transpose} distinguishes between enharmonic pitches: both
4444 @code{\transpose c cis} or @code{\transpose c des} will transpose up
4445 half a tone. The first version will print sharps and the second
4446 version will print flats
4448 @lilypond[quote,raggedright,verbatim]
4449 mus = { \key d \major cis d fis g }
4453 \transpose c g' \mus
4454 \transpose c f' \mus
4461 Program reference: @internalsref{TransposedMusic}, and
4462 @internalsref{UntransposableMusic}.
4466 If you want to use both @code{\transpose} and @code{\relative},
4467 you must put @code{\transpose} outside of @code{\relative}, since
4468 @code{\relative} will have no effect music that appears inside a
4471 @node Instrument transpositions
4472 @subsection Instrument transpositions
4474 The key of a transposing instrument can also be specified. This
4475 applies to many wind instruments, for example, clarinets (B-flat, A and
4476 E-flat), horn (F) and trumpet (B-flat, C, D and E-flat).
4479 The transposition is entered after the keyword @code{\transposition}
4482 \transposition bes %% B-flat clarinet
4485 This command sets the property @code{instrumentTransposition}. The value of
4486 this property is used for MIDI output and quotations. It does not
4487 affect how notes are printed in the current staff.
4489 @cindex transposition, MIDI
4490 @cindex transposition, instrument
4493 @node Multi measure rests
4494 @subsection Multi measure rests
4495 @cindex multi measure rests
4496 @cindex Rests, multi measure
4500 Multi measure rests are entered using `@code{R}'. It is specifically
4501 meant for full bar rests and for entering parts: the rest can expand
4502 to fill a score with rests, or it can be printed as a single
4503 multimeasure rest. This expansion is controlled by the property
4504 @code{Score.skipBars}. If this is set to true, empty measures will not
4505 be expanded, and the appropriate number is added automatically
4507 @lilypond[quote,fragment,verbatim]
4508 \time 4/4 r1 | R1 | R1*2
4509 \set Score.skipBars = ##t R1*17 R1*4
4512 The @code{1} in @code{R1} is similar to the duration notation used for
4513 notes. Hence, for time signatures other than 4/4, you must enter other
4514 durations. This can be done with augmentation dots or fractions
4516 @lilypond[quote,fragment,verbatim]
4517 \set Score.skipBars = ##t
4525 An @code{R} spanning a single measure is printed as either a whole rest
4526 or a breve, centered in the measure regardless of the time signature.
4528 @cindex text on multi-measure rest
4529 @cindex script on multi-measure rest
4530 @cindex fermata on multi-measure rest
4532 Texts can be added to multi-measure rests by using the
4533 @var{note}-@code{markup} syntax (see @ref{Text markup}). In this case, the number is
4534 replaced. If you need both texts and the number, you must add the
4535 number by hand. A variable (@code{\fermataMarkup}) is provided for
4539 @lilypond[quote,verbatim,fragment]
4541 R2._\markup { "Ad lib" }
4545 If you want to have a text on the left end of a multi-measure rest,
4546 attach the text to a zero-length skip note, i.e.
4554 @cindex whole rests for a full measure
4558 Program reference: @internalsref{MultiMeasureRestEvent},
4559 @internalsref{MultiMeasureTextEvent},
4560 @internalsref{MultiMeasureRestMusicGroup}, and
4561 @internalsref{MultiMeasureRest}.
4563 The layout object @internalsref{MultiMeasureRestNumber} is for the
4564 default number, and @internalsref{MultiMeasureRestText} for user
4569 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
4570 over multi-measure rests.
4572 @cindex condensing rests
4574 There is no way to automatically condense multiple rests into a single
4575 multimeasure rest. Multi measure rests do not take part in rest
4578 Be careful when entering multimeasure rests followed by whole
4579 notes. The following will enter two notes lasting four measures each
4583 When @code{skipBars} is set, the result will look OK, but the bar
4584 numbering will be off.
4586 @node Automatic part combining
4587 @subsection Automatic part combining
4588 @cindex automatic part combining
4589 @cindex part combiner
4592 Automatic part combining is used to merge two parts of music onto a
4593 staff. It is aimed at typesetting orchestral scores. When the two
4594 parts are identical for a period of time, only one is shown. In
4595 places where the two parts differ, they are typeset as separate
4596 voices, and stem directions are set automatically. Also, solo and
4597 @emph{a due} parts are identified and can be marked.
4599 The syntax for part combining is
4602 \partcombine @var{musicexpr1} @var{musicexpr2}
4605 The music expressions will be interpreted as @internalsref{Voice}
4606 contexts. If using relative octaves, @code{\relative} should be
4607 specified for both music expressions, i.e.
4610 \partcombine \relative @dots{} @var{musicexpr1}
4611 \relative @dots{} @var{musicexpr2}
4615 A @code{\relative} section that is outside of @code{\partcombine} has
4616 no effect on the pitches of @var{musicexpr1} and @var{musicexpr2}.
4619 The following example demonstrates the basic functionality of the part
4620 combiner: putting parts on one staff, and setting stem directions and
4623 @lilypond[quote,verbatim,raggedright,fragment]
4624 \new Staff \partcombine
4625 \relative g' { g g a( b) c c r r }
4626 \relative g' { g g r4 r e e g g }
4629 The first @code{g} appears only once, although it was
4630 specified twice (once in each part). Stem, slur and tie directions are
4631 set automatically, depending whether there is a solo or unisono. The
4632 first part (with context called @code{one}) always gets up stems, and
4633 `solo', while the second (called @code{two}) always gets down stems and
4636 If you just want the merging parts, and not the textual markings, you
4637 may set the property @code{soloADue} to false
4639 @lilypond[quote,verbatim,raggedright,fragment,relative=2]
4641 \set Staff.soloADue = ##f
4643 \relative g' { g a( b) r }
4644 \relative g' { g r4 r f }
4650 Program reference: @internalsref{PartCombineMusic},
4651 @internalsref{SoloOneEvent}, and
4652 @internalsref{SoloTwoEvent}, and
4653 @internalsref{UnisonoEvent}.
4657 In @code{soloADue} mode, when the two voices play the same notes on and
4658 off, the part combiner may typeset @code{a2} more than once in a
4661 @code{\partcombine} cannot be inside @code{\times}.
4663 @code{\partcombine} cannot be inside @code{\relative}.
4665 Internally, the @code{\partcombine} interprets both arguments as
4666 @code{Voice}s named @code{one} and @code{two}, and then decides when
4667 the parts can be combined. Consequently, if the arguments switch to
4668 differently named @internalsref{Voice} contexts, the events in those
4672 @subsection Hiding staves
4674 @cindex Frenched scores
4675 @cindex Hiding staves
4677 In orchestral scores, staff lines that only have rests are usually
4678 removed. This saves some space. This style is called `French Score'.
4679 For @internalsref{Lyrics},
4680 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
4681 switched on by default. When these line of these contexts turn out
4682 empty after the line-breaking process, they are removed.
4684 For normal staves, a specialized @internalsref{Staff} context is
4685 available, which does the same: staves containing nothing (or only
4686 multi measure rests) are removed. The context definition is stored in
4687 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
4688 in this example disappears in the second line
4691 @lilypond[quote,verbatim]
4694 \context { \RemoveEmptyStaffContext }
4699 \new Staff { e4 f g a \break c1 }
4700 \new Staff { c4 d e f \break R1 }
4705 The first page shows all staves in full. If empty staves should be
4706 removed from the first page too, set @code{remove-first} to false in
4707 @internalsref{RemoveEmptyVerticalGroup}.
4709 Another application is making ossia sections, i.e. alternative
4710 melodies on a separate piece of staff, with help of a Frenched
4711 staff. See @inputfileref{input/test,ossia.ly} for an example.
4714 @node Different editions from one source
4715 @subsection Different editions from one source
4717 The @code{\tag} command marks music expressions with a name. These
4718 tagged expressions can be filtered out later. With this mechanism it
4719 is possible to make different versions of the same music source.
4721 In the following example, we see two versions of a piece of music, one
4722 for the full score, and one with cue notes for the instrumental part
4738 The same can be applied to articulations, texts, etc.: they are
4741 -\tag #@var{your-tag}
4743 to an articulation, for example,
4748 This defines a note with a conditional fingering indication.
4750 By applying the @code{remove-tag} function, tagged expressions can be
4751 filtered. For example,
4755 \applymusic #(remove-tag 'score) @var{the music}
4756 \applymusic #(remove-tag 'part) @var{the music}
4761 @lilypondfile[quote]{tag-filter.ly}
4763 The argument of the @code{\tag} command should be a symbol, or a list
4764 of symbols, for example,
4766 \tag #'(original-part transposed-part) @dots{}
4771 Examples: @inputfileref{input/regression,tag-filter.ly}.
4774 @node Quoting other voices
4775 @subsection Quoting other voices
4777 With quotations, fragments of other parts can be inserted into a part
4778 directly. Before a part can be quoted, it must be marked especially as
4779 quotable. This is done with code @code{\addquote} command. The
4780 quotation may then be done with @code{\quote}
4783 \addquote @var{name} @var{music}
4784 \quote @var{name} @var{duration}
4789 Here, @var{name} is an identifying string. The @var{music} is any kind
4790 of music. This is an example of @code{\addquote}
4793 \addquote clarinet \relative c' {
4798 During a part, a piece of music can be quoted with the @code{\quote}
4805 This would cite 3 quarter notes (a dotted half note) of the previously
4806 added clarinet voice.
4808 Quotations take into account the transposition both source and target
4809 instruments, if they are specified using the @code{\transposition} command.
4811 @lilypond[quote,raggedright,verbatim]
4812 \addquote clarinet \relative c' {
4818 e'8 f'8 \quote clarinet 2
4824 Only the contents of the first @internalsref{Voice} occurring in an
4825 @code{\addquote} command will be considered for quotation, so
4826 @var{music} can not contain @code{\new} and @code{\context Voice}
4827 statements that would switch to a different Voice.
4832 In this manual: @ref{Instrument transpositions}.
4834 Examples: @inputfileref{input/regression,quote.ly}
4835 @inputfileref{input/regression,quote-transposition.ly}
4837 Program reference: @internalsref{QuoteMusic}.
4839 @node Ancient notation
4840 @section Ancient notation
4842 @cindex Vaticana, Editio
4843 @cindex Medicaea, Editio
4848 Support for ancient notation includes features for mensural notation
4849 and Gregorian Chant notation. There is also limited support for
4850 figured bass notation.
4852 Many graphical objects provide a @code{style} property, see
4853 @ref{Ancient note heads}, @ref{Ancient accidentals}, @ref{Ancient
4854 rests}, @ref{Ancient clefs}, @ref{Ancient flags} and @ref{Ancient time
4855 signatures}. By manipulating such a grob property, the typographical
4856 appearance of the affected graphical objects can be accommodated for a
4857 specific notation flavor without need for introducing any new
4860 Other aspects of ancient notation can not that easily be expressed as
4861 in terms of just changing a style property of a graphical object.
4862 Therefore, some notational concepts are introduced specifically for
4863 ancient notation, see @ref{Custodes}, @ref{Divisiones},
4864 @ref{Ligatures}, and @ref{Figured bass}.
4868 * Ancient note heads::
4869 * Ancient accidentals::
4873 * Ancient time signatures::
4877 * Vaticana style contexts::
4881 If this all is way too much of documentation for you, and you just
4882 want to dive into typesetting without worrying too much about the
4883 details on how to customize a context, you may have a look at the
4884 predefined contexts (see @ref{Vaticana style contexts}). Use them to
4885 set up predefined style-specific voice and staff contexts, and
4886 directly go ahead with the note entry.
4890 Ligatures need special spacing that has not yet been implemented. As
4891 a result, there is too much space between ligatures most of the time,
4892 and line breaking often is unsatisfactory. Also, lyrics do not
4893 correctly align with ligatures.
4895 Accidentals must not be printed within a ligature, but instead need to
4896 be collected and printed in front of it.
4898 Augmentum dots within ligatures are not handled correctly.
4901 @node Ancient note heads
4902 @subsection Ancient note heads
4907 For ancient notation, a note head style other than the @code{default}
4908 style may be chosen. This is accomplished by setting the @code{style}
4909 property of the NoteHead object to the desired value (@code{baroque},
4910 @code{neomensural} or @code{mensural}). The @code{baroque} style
4911 differs from the @code{default} style only in using a square shape for
4912 @code{\breve} note heads. The @code{neomensural} style differs from
4913 the @code{baroque} style in that it uses rhomboidal heads for whole
4914 notes and all smaller durations. Stems are centered on the note
4915 heads. This style is in particular useful when transcribing mensural
4916 music, e.g. for the incipit. The @code{mensural} style finally
4917 produces note heads that mimic the look of note heads in historic
4918 printings of the 16th century.
4920 The following example demonstrates the @code{neomensural} style
4922 @lilypond[quote,fragment,raggedright,verbatim]
4923 \override NoteHead #'style = #'neomensural
4924 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
4927 When typesetting a piece in Gregorian Chant notation, a Gregorian
4928 ligature engraver will automatically select the proper note heads,
4929 such there is no need to explicitly set the note head style. Still,
4930 the note head style can be set e.g. to @code{vaticana_punctum} to
4931 produce punctum neumes. Similarly, a mensural ligature engraver is
4932 used to automatically assemble mensural ligatures. See
4933 @ref{Ligatures} for how ligature engravers work.
4938 @ref{Percussion staves} use note head styles of their own that are
4939 frequently used in contemporary music notation.
4941 Examples: @inputfileref{input/regression,note-head-style.ly} gives an
4942 overview over all available note head styles.
4945 @node Ancient accidentals
4946 @subsection Ancient accidentals
4951 Use the @code{style} property of grob @internalsref{Accidental} to
4952 select ancient accidentals. Supported styles are
4953 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
4955 @lilypond[quote,raggedright,staffsize=26]
4963 { " " \musicglyph #"accidentals-vaticana-1"
4964 " " \musicglyph #"accidentals-vaticana0" }
4968 { " " \musicglyph #"accidentals-medicaea-1" }
4972 { " " \musicglyph #"accidentals-hufnagel-1" }
4976 { " " \musicglyph #"accidentals-mensural-1"
4977 " " \musicglyph #"accidentals-mensural1" }
4986 \remove "Bar_number_engraver"
4990 \remove "Clef_engraver"
4991 \remove "Key_engraver"
4992 \remove "Time_signature_engraver"
4993 \remove "Staff_symbol_engraver"
4994 minimumVerticalExtent = ##f
5000 As shown, not all accidentals are supported by each style. When
5001 trying to access an unsupported accidental, LilyPond will switch to a
5002 different style, as demonstrated in
5003 @inputfileref{input/test,ancient-accidentals.ly}.
5005 Similarly to local accidentals, the style of the key signature can be
5006 controlled by the @code{style} property of the
5007 @internalsref{KeySignature} grob.
5011 In this manual: @ref{Pitches}, @ref{Chromatic alterations} and
5012 @ref{Accidentals} give a general introduction into the use of
5013 accidentals. @ref{Key signature} gives a general introduction into
5014 the use of key signatures.
5016 Program reference: @internalsref{KeySignature}.
5018 Examples: @inputfileref{input/test,ancient-accidentals.ly}.
5021 @subsection Ancient rests
5026 Use the @code{style} property of grob @internalsref{Rest} to select
5027 ancient accidentals. Supported styles are @code{classical},
5028 @code{neomensural} and @code{mensural}. @code{classical} differs
5029 from the @code{default} style only in that the quarter rest looks like
5030 a horizontally mirrored 8th rest. The @code{neomensural} style suits
5031 well for e.g. the incipit of a transcribed mensural piece of music.
5032 The @code{mensural} style finally mimics the appearance of rests as
5033 in historic prints of the 16th century.
5035 The following example demonstrates the @code{neomensural} style
5037 @lilypond[quote,fragment,raggedright,verbatim]
5038 \override Rest #'style = #'neomensural
5039 r\longa r\breve r1 r2 r4 r8 r16
5042 There are no 32th and 64th rests specifically for the mensural or
5043 neo-mensural style. Instead, the rests from the default style will be
5044 taken. See @inputfileref{input/test,rests.ly} for a chart of all
5047 There are no rests in Gregorian Chant notation; instead, it uses
5052 In this manual: @ref{Rests} gives a general introduction into the use of rests.
5056 @subsection Ancient clefs
5061 LilyPond supports a variety of clefs, many of them ancient.
5063 The following table shows all ancient clefs that are supported via the
5064 @code{\clef} command. Some of the clefs use the same glyph, but
5065 differ only with respect to the line they are printed on. In such
5066 cases, a trailing number in the name is used to enumerate these clefs.
5067 Still, you can manually force a clef glyph to be typeset on an
5068 arbitrary line, as described in @ref{Clef}. The note printed to the
5069 right side of each clef in the example column denotes the @code{c'}
5070 with respect to that clef.
5072 @multitable @columnfractions .4 .4 .2
5075 @b{Description} @tab
5076 @b{Supported Clefs} @tab
5080 modern style mensural C clef @tab
5081 @code{neomensural_c1}, @code{neomensural_c2},
5082 @code{neomensural_c3}, @code{neomensural_c4} @tab
5083 @lilypond[fragment,quote,relative=1,notime]
5084 \override Staff.TimeSignature #'transparent = ##t
5085 \clef "neomensural_c2" c
5089 petrucci style mensural C clefs, for use on different staff lines
5090 (the examples shows the 2nd staff line C clef).
5100 @lilypond[fragment,quote,relative=1,notime]
5101 \override Staff.TimeSignature #'transparent = ##t
5102 \clef "petrucci_c2" c
5106 petrucci style mensural F clef @tab
5107 @code{petrucci_f} @tab
5108 @lilypond[fragment,quote,relative=1,notime]
5109 \override Staff.TimeSignature #'transparent = ##t
5110 \clef "petrucci_f" c
5114 petrucci style mensural G clef @tab
5115 @code{petrucci_g} @tab
5116 @lilypond[fragment,quote,relative=1,notime]
5117 \override Staff.TimeSignature #'transparent = ##t
5118 \clef "petrucci_g" c
5122 historic style mensural C clef @tab
5123 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
5124 @code{mensural_c4} @tab
5125 @lilypond[fragment,quote,relative=1,notime]
5126 \override Staff.TimeSignature #'transparent = ##t
5127 \clef "mensural_c2" c
5131 historic style mensural F clef @tab
5132 @code{mensural_f} @tab
5133 @lilypond[fragment,quote,relative=1,notime]
5134 \override Staff.TimeSignature #'transparent = ##t
5135 \clef "mensural_f" c
5139 historic style mensural G clef @tab
5140 @code{mensural_g} @tab
5141 @lilypond[fragment,quote,relative=1,notime]
5142 \override Staff.TimeSignature #'transparent = ##t
5143 \clef "mensural_g" c
5147 Editio Vaticana style do clef @tab
5148 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
5149 @lilypond[fragment,quote,relative=1,notime]
5150 \override Staff.StaffSymbol #'line-count = #4
5151 \override Staff.TimeSignature #'transparent = ##t
5152 \clef "vaticana_do2" c
5156 Editio Vaticana style fa clef @tab
5157 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
5158 @lilypond[quote,relative=1,notime,fragment]
5159 \override Staff.StaffSymbol #'line-count = #4
5160 \override Staff.TimeSignature #'transparent = ##t
5161 \clef "vaticana_fa2" c
5165 Editio Medicaea style do clef @tab
5166 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
5167 @lilypond[fragment,quote,relative=1,notime]
5168 \override Staff.StaffSymbol #'line-count = #4
5169 \override Staff.TimeSignature #'transparent = ##t
5170 \clef "medicaea_do2" c
5174 Editio Medicaea style fa clef @tab
5175 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
5176 @lilypond[fragment,quote,relative=1,notime]
5177 \override Staff.StaffSymbol #'line-count = #4
5178 \override Staff.TimeSignature #'transparent = ##t
5179 \clef "medicaea_fa2" c
5183 historic style hufnagel do clef @tab
5184 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
5185 @lilypond[fragment,quote,relative=1,notime]
5186 \override Staff.StaffSymbol #'line-count = #4
5187 \override Staff.TimeSignature #'transparent = ##t
5188 \clef "hufnagel_do2" c
5192 historic style hufnagel fa clef @tab
5193 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
5194 @lilypond[fragment,quote,relative=1,notime]
5195 \override Staff.StaffSymbol #'line-count = #4
5196 \override Staff.TimeSignature #'transparent = ##t
5197 \clef "hufnagel_fa2" c
5201 historic style hufnagel combined do/fa clef @tab
5202 @code{hufnagel_do_fa} @tab
5203 @lilypond[fragment,quote,relative=1,notime]
5204 \override Staff.TimeSignature #'transparent = ##t
5205 \clef "hufnagel_do_fa" c
5212 @emph{Modern style} means ``as is typeset in contemporary editions of
5213 transcribed mensural music''.
5215 @emph{Petrucci style} means ``inspired by printings published by the
5216 famous engraver Petrucci (1466-1539)''.
5218 @emph{Historic style} means ``as was typeset or written in historic
5219 editions (other than those of Petrucci)''.
5221 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
5223 Petrucci used C clefs with differently balanced left-side vertical
5224 beams, depending on which staff line it is printed.
5228 In this manual: see @ref{Clef}.
5232 The mensural g clef is mapped to the Petrucci g clef, until a new
5233 mensural g clef is implemented.
5238 @subsection Ancient flags
5243 Use the @code{flag-style} property of grob @internalsref{Stem} to
5244 select ancient flags. Besides the @code{default} flag style,
5245 only @code{mensural} style is supported
5247 @lilypond[quote,fragment,raggedright,verbatim]
5248 \override Stem #'flag-style = #'mensural
5249 \override Stem #'thickness = #1.0
5250 \override NoteHead #'style = #'mensural
5252 c'8 d'8 e'8 f'8 c'16 d'16 e'16 f'16 c'32 d'32 e'32 f'32 s8
5253 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5256 Note that the innermost flare of each mensural flag always is
5257 vertically aligned with a staff line. If you do not like this
5258 behavior, you can set the @code{adjust-if-on-staffline} property of
5259 grob @internalsref{Stem} to @code{##f}. Then, the vertical position
5260 of the end of each flare is different between notes on staff lines and
5261 notes between staff lines
5263 @lilypond[quote,fragment,raggedright]
5264 \override Stem #'flag-style = #'mensural
5265 \override Stem #'thickness = #1.0
5266 \override Stem #'adjust-if-on-staffline = ##f
5267 \override NoteHead #'style = #'mensural
5269 c'8 d'8 e'8 f'8 c'16 d'16 e'16 f'16 c'32 d'32 e'32 f'32 s8
5270 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5273 There is no particular flag style for neo-mensural notation. Hence,
5274 when typesetting e.g. the incipit of a transcribed piece of mensural
5275 music, the default flag style should be used. There are no flags in
5276 Gregorian Chant notation.
5279 @node Ancient time signatures
5280 @subsection Ancient time signatures
5282 @cindex time signatures
5285 There is limited support for mensural time signatures. The
5286 glyphs are hard-wired to particular time fractions. In other words,
5287 to get a particular mensural signature glyph with the @code{\time n/m}
5288 command, @code{n} and @code{m} have to be chosen according to the
5294 \set Score.timing = ##f
5295 \set Score.barAlways = ##t
5296 s_\markup { "$\\backslash$time 4/4" }
5297 ^\markup { " " \musicglyph #"timesig-neomensural4/4" }
5299 s_\markup { "$\\backslash$time 2/2" }
5300 ^\markup { " " \musicglyph #"timesig-neomensural2/2" }
5302 s_\markup { "$\\backslash$time 6/4" }
5303 ^\markup { " " \musicglyph #"timesig-neomensural6/4" }
5305 s_\markup { "$\\backslash$time 6/8" }
5306 ^\markup { " " \musicglyph #"timesig-neomensural6/8" }
5308 s_\markup { "$\\backslash$time 3/2" }
5309 ^\markup { " " \musicglyph #"timesig-neomensural3/2" }
5311 s_\markup { "$\\backslash$time 3/4" }
5312 ^\markup { " " \musicglyph #"timesig-neomensural3/4" }
5314 s_\markup { "$\\backslash$time 9/4" }
5315 ^\markup { " " \musicglyph #"timesig-neomensural9/4" }
5317 s_\markup { "$\\backslash$time 9/8" }
5318 ^\markup { " " \musicglyph #"timesig-neomensural9/8" }
5320 s_\markup { "$\\backslash$time 4/8" }
5321 ^\markup { " " \musicglyph #"timesig-neomensural4/8" }
5323 s_\markup { "$\\backslash$time 2/4" }
5324 ^\markup { " " \musicglyph #"timesig-neomensural2/4" }
5332 \remove Staff_symbol_engraver
5333 \remove Clef_engraver
5334 \remove Time_signature_engraver
5340 Use the @code{style} property of grob @internalsref{TimeSignature} to
5341 select ancient time signatures. Supported styles are
5342 @code{neomensural} and @code{mensural}. The above table uses the
5343 @code{neomensural} style. This style is appropriate e.g. for the
5344 incipit of transcriptions of mensural pieces. The @code{mensural}
5345 style mimics the look of historical printings of the 16th century.
5347 @inputfileref{input/test,time.ly} gives an overview over all available
5348 ancient and modern styles.
5352 Program reference: @ref{Time signature} gives a general introduction into the use of time
5357 Mensural signature glyphs are mapped to time fractions in a hard-wired
5358 way. This mapping is sensible, but still arbitrary: given a mensural
5359 time signature, the time fraction represents a modern meter that
5360 usually will be a good choice when transcribing a mensural piece of
5361 music. For a particular piece of mensural music, however, the mapping
5362 may be unsatisfactory. In particular, the mapping assumes a fixed
5363 transcription of durations (e.g. brevis = half note in 2/2, i.e. 4:1).
5364 Some glyphs (such as the alternate glyph for 6/8 meter) are not at all
5365 accessible through the @code{\time} command.
5367 Mensural time signatures are supported typographically, but not yet
5368 musically. The internal representation of durations is
5369 based on a purely binary system; a ternary division such as 1 brevis =
5370 3 semibrevis (tempus perfectum) or 1 semibrevis = 3 minima (cum
5371 prolatione maiori) is not correctly handled: event times in ternary
5372 modes will be badly computed, resulting e.g. in horizontally
5373 misaligned note heads, and bar checks are likely to erroneously fail.
5375 The syntax and semantics of the @code{\time} command for mensural
5376 music is subject to change.
5379 @subsection Custodes
5384 A @emph{custos} (plural: @emph{custodes}; Latin word for `guard') is a
5385 symbol that appears at the end of a staff. It anticipates the pitch
5386 of the first note(s) of the following line and thus helps the player
5387 or singer to manage line breaks during performance, thus enhancing
5388 readability of a score.
5390 Custodes were frequently used in music notation until the 17th
5391 century. Nowadays, they have survived only in a few particular forms
5392 of musical notation such as contemporary editions of Gregorian chant
5393 like the @emph{editio vaticana}. There are different custos glyphs
5394 used in different flavors of notational style.
5396 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
5397 @internalsref{Staff} context when declaring the @code{\paper} block,
5398 as shown in the following example
5404 \consists Custos_engraver
5405 Custos \override #'style = #'mensural
5410 The result looks like this
5412 @lilypond[quote,raggedright]
5416 \override Staff.Custos #'style = #'mensural
5423 \consists Custos_engraver
5429 The custos glyph is selected by the @code{style} property. The styles
5430 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
5431 @code{mensural}. They are demonstrated in the following fragment
5435 \new Lyrics \lyrics {
5439 { " " \musicglyph #"custodes-vaticana-u0" }
5443 { " " \musicglyph #"custodes-medicaea-u0" }
5448 { " " \musicglyph #"custodes-hufnagel-u0" }
5453 { " " \musicglyph #"custodes-mensural-u0" }
5465 Program reference: @internalsref{Custos}.
5467 Examples: @inputfileref{input/regression,custos.ly}.
5471 @subsection Divisiones
5477 A @emph{divisio} (plural: @emph{divisiones}; Latin word for
5478 `division') is a staff context symbol that is used to structure
5479 Gregorian music into phrases and sections. The musical meaning of
5480 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
5481 can be characterized as short, medium and long pause, somewhat like
5482 @ref{Breath marks}. The @emph{finalis} sign not only marks the end of
5483 a chant, but is also frequently used within a single
5484 antiphonal/responsorial chant to mark the end of each section.
5487 To use divisiones, include the file @code{gregorian-init.ly}. It
5488 contains definitions that you can apply by just inserting
5489 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
5490 and @code{\finalis} at proper places in the input. Some editions use
5491 @emph{virgula} or @emph{caesura} instead of divisio minima.
5492 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
5495 @lilypondfile[quote,raggedright]{divisiones.ly}
5499 @cindex @code{\virgula}
5501 @cindex @code{\caesura}
5503 @cindex @code{\divisioMinima}
5504 @code{\divisioMinima},
5505 @cindex @code{\divisioMaior}
5506 @code{\divisioMaior},
5507 @cindex @code{\divisioMaxima}
5508 @code{\divisioMaxima},
5509 @cindex @code{\finalis}
5514 In this manual: @ref{Breath marks}.
5516 Program reference: @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}.
5518 Examples: @inputfileref{input/test,divisiones.ly}.
5521 @subsection Ligatures
5525 @c TODO: Should double check if I recalled things correctly when I wrote
5526 @c down the following paragraph by heart.
5528 A ligature is a coherent graphical symbol that represents at least two
5529 distinct notes. Ligatures originally appeared in the manuscripts of
5530 Gregorian chant notation roughly since the 9th century to denote
5531 ascending or descending sequences of notes.
5533 Ligatures are entered by enclosing them in @code{\[} and @code{\]}.
5534 Some ligature styles may need additional input syntax specific for
5535 this particular type of ligature. By default, the
5536 @internalsref{LigatureBracket} engraver just puts a square bracket
5539 @lilypond[quote,raggedright,verbatim]
5547 To select a specific style of ligatures, a proper ligature engraver
5548 has to be added to the @internalsref{Voice} context, as explained in
5549 the following subsections. Only white mensural ligatures
5550 are supported with certain limitations.
5553 * White mensural ligatures::
5554 * Gregorian square neumes ligatures::
5557 @node White mensural ligatures
5558 @subsubsection White mensural ligatures
5560 @cindex Mensural ligatures
5561 @cindex White mensural ligatures
5563 There is limited support for white mensural ligatures.
5565 To engrave white mensural ligatures, in the paper block the
5566 @internalsref{Mensural_ligature_engraver} has to be put into the
5567 @internalsref{Voice} context, and remove the
5568 @internalsref{Ligature_bracket_engraver}
5574 \remove Ligature_bracket_engraver
5575 \consists Mensural_ligature_engraver
5580 There is no additional input language to describe the shape of a
5581 white mensural ligature. The shape is rather determined solely from
5582 the pitch and duration of the enclosed notes. While this approach may
5583 take a new user a while to get accustomed, it has the great advantage
5584 that the full musical information of the ligature is known internally.
5585 This is not only required for correct MIDI output, but also allows for
5586 automatic transcription of the ligatures.
5591 \set Score.timing = ##f
5592 \set Score.defaultBarType = "empty"
5593 \override NoteHead #'style = #'neomensural
5594 \override Staff.TimeSignature #'style = #'neomensural
5596 \[ g\longa c\breve a\breve f\breve d'\longa \]
5598 \[ e1 f1 a\breve g\longa \]
5600 @lilypond[quote,raggedright]
5603 \set Score.timing = ##f
5604 \set Score.defaultBarType = "empty"
5605 \override NoteHead #'style = #'neomensural
5606 \override Staff.TimeSignature #'style = #'neomensural
5608 \[ g\longa c\breve a\breve f\breve d'\longa \]
5610 \[ e1 f1 a\breve g\longa \]
5615 \remove Ligature_bracket_engraver
5616 \consists Mensural_ligature_engraver
5622 Without replacing @internalsref{Ligature_bracket_engraver} with
5623 @internalsref{Mensural_ligature_engraver}, the same music transcribes
5626 @lilypond[quote,raggedright]
5628 \set Score.timing = ##f
5629 \set Score.defaultBarType = "empty"
5630 \override NoteHead #'style = #'neomensural
5631 \override Staff.TimeSignature #'style = #'neomensural
5633 \[ g\longa c\breve a\breve f\breve d'\longa \]
5635 \[ e1 f1 a\breve g\longa \]
5641 The implementation is experimental; it may output strange warnings or
5642 even crash in some cases or produce weird results on more complex
5645 @node Gregorian square neumes ligatures
5646 @subsubsection Gregorian square neumes ligatures
5648 @cindex Square neumes ligatures
5649 @cindex Gregorian square neumes ligatures
5651 Gregorian square neumes notation (following the style of the Editio
5652 Vaticana) is under heavy development, but not yet really usable for
5653 production purposes. Core ligatures can already be typeset, but
5654 essential issues for serious typesetting are still under development,
5655 such as (among others) horizontal alignment of multiple ligatures,
5656 lyrics alignment and proper accidentals handling. Still, this section
5657 gives a sneak preview of what Gregorian chant may look like once it
5660 The following table contains the extended neumes table of the 2nd
5661 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
5662 1983 by the monks of Solesmes.
5664 @multitable @columnfractions .4 .2 .2 .2
5667 @b{Neuma aut@*Neumarum Elementa} @tab
5668 @b{Figurae@*Rectae} @tab
5669 @b{Figurae@*Liquescentes Auctae} @tab
5670 @b{Figurae@*Liquescentes Deminutae}
5672 @c TODO: \paper block is identical in all of the below examples.
5673 @c Therefore, it should somehow be included rather than duplicated all
5676 @c why not make identifiers in ly/engraver-init.ly? --hwn
5678 @c Because it's just used to typeset plain notes without
5679 @c a staff for demonstration purposes rather than something
5680 @c special of Gregorian chant notation. --jr
5685 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.5\cm]
5686 \include "gregorian-init.ly"
5691 \noBreak s^\markup {"a"} \noBreak
5693 % Punctum Inclinatum
5695 \noBreak s^\markup {"b"}
5697 \paper { \neumeDemoPaper }}
5700 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.5\cm]
5701 \include "gregorian-init.ly"
5704 % Punctum Auctum Ascendens
5705 \[ \auctum \ascendens b \]
5706 \noBreak s^\markup {"c"} \noBreak
5708 % Punctum Auctum Descendens
5709 \[ \auctum \descendens b \]
5710 \noBreak s^\markup {"d"} \noBreak
5712 % Punctum Inclinatum Auctum
5713 \[ \inclinatum \auctum b \]
5714 \noBreak s^\markup {"e"}
5716 \paper { \neumeDemoPaper }}
5719 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5720 \include "gregorian-init.ly"
5723 % Punctum Inclinatum Parvum
5724 \[ \inclinatum \deminutum b \]
5725 \noBreak s^\markup {"f"}
5727 \paper { \neumeDemoPaper }}
5733 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5734 \include "gregorian-init.ly"
5739 \noBreak s^\markup {"g"}
5741 \paper { \neumeDemoPaper }}
5747 @code{3. Apostropha vel Stropha}
5749 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5750 \include "gregorian-init.ly"
5755 \noBreak s^\markup {"h"}
5757 \paper { \neumeDemoPaper }}
5760 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5761 \include "gregorian-init.ly"
5765 \[ \stropha \auctum b \]
5766 \noBreak s^\markup {"i"}
5768 \paper { \neumeDemoPaper }}
5775 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5776 \include "gregorian-init.ly"
5781 \noBreak s^\markup {"j"}
5783 \paper { \neumeDemoPaper }}
5789 @code{5. Clivis vel Flexa}
5791 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5792 \include "gregorian-init.ly"
5799 \paper { \neumeDemoPaper }}
5802 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
5803 \include "gregorian-init.ly"
5806 % Clivis Aucta Descendens
5807 \[ b \flexa \auctum \descendens g \]
5808 \noBreak s^\markup {"l"} \noBreak
5810 % Clivis Aucta Ascendens
5811 \[ b \flexa \auctum \ascendens g \]
5812 \noBreak s^\markup {"m"}
5814 \paper { \neumeDemoPaper }}
5817 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5818 \include "gregorian-init.ly"
5822 \[ b \flexa \deminutum g \]
5825 \paper { \neumeDemoPaper }}
5829 @code{6. Podatus vel Pes}
5831 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5832 \include "gregorian-init.ly"
5839 \paper { \neumeDemoPaper }}
5842 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
5843 \include "gregorian-init.ly"
5846 % Pes Auctus Descendens
5847 \[ g \pes \auctum \descendens b \]
5848 \noBreak s^\markup {"p"} \noBreak
5850 % Pes Auctus Ascendens
5851 \[ g \pes \auctum \ascendens b \]
5852 \noBreak s^\markup {"q"}
5854 \paper { \neumeDemoPaper }}
5857 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5858 \include "gregorian-init.ly"
5862 \[ g \pes \deminutum b \]
5865 \paper { \neumeDemoPaper }}
5869 @code{7. Pes Quassus}
5871 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5872 \include "gregorian-init.ly"
5876 \[ \oriscus g \pes \virga b \]
5879 \paper { \neumeDemoPaper }}
5882 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5883 \include "gregorian-init.ly"
5886 % Pes Quassus Auctus Descendens
5887 \[ \oriscus g \pes \auctum \descendens b \]
5890 \paper { \neumeDemoPaper }}
5895 @code{8. Quilisma Pes}
5897 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5898 \include "gregorian-init.ly"
5902 \[ \quilisma g \pes b \]
5905 \paper { \neumeDemoPaper }}
5908 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5909 \include "gregorian-init.ly"
5912 % Quilisma Pes Auctus Descendens
5913 \[ \quilisma g \pes \auctum \descendens b \]
5916 \paper { \neumeDemoPaper }}
5921 @code{9. Podatus Initio Debilis}
5923 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5924 \include "gregorian-init.ly"
5927 % Pes Initio Debilis
5928 \[ \deminutum g \pes b \]
5931 \paper { \neumeDemoPaper }}
5934 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5935 \include "gregorian-init.ly"
5938 % Pes Auctus Descendens Initio Debilis
5939 \[ \deminutum g \pes \auctum \descendens b \]
5942 \paper { \neumeDemoPaper }}
5949 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5950 \include "gregorian-init.ly"
5954 \[ a \pes b \flexa g \]
5957 \paper { \neumeDemoPaper }}
5960 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5961 \include "gregorian-init.ly"
5964 % Torculus Auctus Descendens
5965 \[ a \pes b \flexa \auctum \descendens g \]
5968 \paper { \neumeDemoPaper }}
5971 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5972 \include "gregorian-init.ly"
5975 % Torculus Deminutus
5976 \[ a \pes b \flexa \deminutum g \]
5979 \paper { \neumeDemoPaper }}
5983 @code{11. Torculus Initio Debilis}
5985 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5986 \include "gregorian-init.ly"
5989 % Torculus Initio Debilis
5990 \[ \deminutum a \pes b \flexa g \]
5993 \paper { \neumeDemoPaper }}
5996 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5997 \include "gregorian-init.ly"
6000 % Torculus Auctus Descendens Initio Debilis
6001 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6004 \paper { \neumeDemoPaper }}
6007 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6008 \include "gregorian-init.ly"
6011 % Torculus Deminutus Initio Debilis
6012 \[ \deminutum a \pes b \flexa \deminutum g \]
6015 \paper { \neumeDemoPaper }}
6019 @code{12. Porrectus}
6021 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6022 \include "gregorian-init.ly"
6026 \[ a \flexa g \pes b \]
6029 \paper { \neumeDemoPaper }}
6032 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6033 \include "gregorian-init.ly"
6036 % Porrectus Auctus Descendens
6037 \[ a \flexa g \pes \auctum \descendens b \]
6040 \paper { \neumeDemoPaper }}
6043 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6044 \include "gregorian-init.ly"
6047 % Porrectus Deminutus
6048 \[ a \flexa g \pes \deminutum b \]
6051 \paper { \neumeDemoPaper }}
6057 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6058 \include "gregorian-init.ly"
6062 \[ \virga b \inclinatum a \inclinatum g \]
6065 \paper { \neumeDemoPaper }
6069 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6070 \include "gregorian-init.ly"
6074 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6077 \paper { \neumeDemoPaper }}
6080 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6081 \include "gregorian-init.ly"
6084 % Climacus Deminutus
6085 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6088 \paper { \neumeDemoPaper }}
6092 @code{14. Scandicus}
6094 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6095 \include "gregorian-init.ly"
6099 \[ g \pes a \virga b \]
6102 \paper { \neumeDemoPaper }}
6105 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6106 \include "gregorian-init.ly"
6109 % Scandicus Auctus Descendens
6110 \[ g \pes a \pes \auctum \descendens b \]
6113 \paper { \neumeDemoPaper }}
6116 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6117 \include "gregorian-init.ly"
6120 % Scandicus Deminutus
6121 \[ g \pes a \pes \deminutum b \]
6124 \paper { \neumeDemoPaper }}
6130 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6131 \include "gregorian-init.ly"
6135 \[ g \oriscus a \pes \virga b \]
6138 \paper { \neumeDemoPaper }}
6141 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6142 \include "gregorian-init.ly"
6145 % Salicus Auctus Descendens
6146 \[ g \oriscus a \pes \auctum \descendens b \]
6149 \paper { \neumeDemoPaper }}
6156 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6157 \include "gregorian-init.ly"
6161 \[ \stropha b \stropha b \stropha a \]
6164 \paper { \neumeDemoPaper }
6173 Unlike most other neumes notation systems, the input language for
6174 neumes does not necessarily reflect directly the typographical
6175 appearance, but is designed to solely focuse on musical meaning. For
6176 example, @code{\[ a \pes b \flexa g \]} produces a Torculus consisting
6177 of three Punctum heads, while @code{\[ a \flexa g \pes b \]} produces
6178 a Porrectus with a curved flexa shape and only a single Punctum head.
6179 There is no command to explicitly typeset the curved flexa shape; the
6180 decision of when to typeset a curved flexa shape is purely taken from
6181 the musical input. The idea of this approach is to separate the
6182 musical aspects of the input from the notation style of the output.
6183 This way, the same input can be reused to typeset the same music in a
6184 different style of Gregorian chant notation.
6186 The following table shows the code fragments that produce the
6187 ligatures in the above neumes table. The letter in the first column
6188 in each line of the below table indicates to which ligature in the
6189 above table it refers. The second column gives the name of the
6190 ligature. The third column shows the code fragment that produces this
6191 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
6193 @multitable @columnfractions .1 .4 .5
6207 Punctum Inclinatum @tab
6208 @code{\[ \inclinatum b \]}
6212 Punctum Auctum Ascendens @tab
6213 @code{\[ \auctum \ascendens b \]}
6217 Punctum Auctum Descendens @tab
6218 @code{\[ \auctum \descendens b \]}
6222 Punctum Inclinatum Auctum @tab
6223 @code{\[ \inclinatum \auctum b \]}
6227 Punctum Inclinatum Parvum @tab
6228 @code{\[ \inclinatum \deminutum b \]}
6233 @code{\[ \virga b \]}
6238 @code{\[ \stropha b \]}
6243 @code{\[ \stropha \auctum b \]}
6248 @code{\[ \oriscus b \]}
6252 Clivis vel Flexa @tab
6253 @code{\[ b \flexa g \]}
6257 Clivis Aucta Descendens @tab
6258 @code{\[ b \flexa \auctum \descendens g \]}
6262 Clivis Aucta Ascendens @tab
6263 @code{\[ b \flexa \auctum \ascendens g \]}
6268 @code{\[ b \flexa \deminutum g \]}
6272 Podatus vel Pes @tab
6273 @code{\[ g \pes b \]}
6277 Pes Auctus Descendens @tab
6278 @code{\[ g \pes \auctum \descendens b \]}
6282 Pes Auctus Ascendens @tab
6283 @code{\[ g \pes \auctum \ascendens b \]}
6288 @code{\[ g \pes \deminutum b \]}
6293 @code{\[ \oriscus g \pes \virga b \]}
6297 Pes Quassus Auctus Descendens @tab
6298 @code{\[ \oriscus g \pes \auctum \descendens b \]}
6303 @code{\[ \quilisma g \pes b \]}
6307 Quilisma Pes Auctus Descendens @tab
6308 @code{\[ \quilisma g \pes \auctum \descendens b \]}
6312 Pes Initio Debilis @tab
6313 @code{\[ \deminutum g \pes b \]}
6317 Pes Auctus Descendens Initio Debilis @tab
6318 @code{\[ \deminutum g \pes \auctum \descendens b \]}
6323 @code{\[ a \pes b \flexa g \]}
6327 Torculus Auctus Descendens @tab
6328 @code{\[ a \pes b \flexa \auctum \descendens g \]}
6332 Torculus Deminutus @tab
6333 @code{\[ a \pes b \flexa \deminutum g \]}
6337 Torculus Initio Debilis @tab
6338 @code{\[ \deminutum a \pes b \flexa g \]}
6342 Torculus Auctus Descendens Initio Debilis @tab
6343 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
6347 Torculus Deminutus Initio Debilis @tab
6348 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
6353 @code{\[ a \flexa g \pes b \]}
6357 Porrectus Auctus Descendens @tab
6358 @code{\[ a \flexa g \pes \auctum \descendens b \]}
6362 Porrectus Deminutus @tab
6363 @code{\[ a \flexa g \pes \deminutum b \]}
6368 @code{\[ \virga b \inclinatum a \inclinatum g \]}
6372 Climacus Auctus @tab
6373 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
6377 Climacus Deminutus @tab
6378 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
6383 @code{\[ g \pes a \virga b \]}
6387 Scandicus Auctus Descendens @tab
6388 @code{\[ g \pes a \pes \auctum \descendens b \]}
6392 Scandicus Deminutus @tab
6393 @code{\[ g \pes a \pes \deminutum b \]}
6398 @code{\[ g \oriscus a \pes \virga b \]}
6402 Salicus Auctus Descendens @tab
6403 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
6408 @code{\[ \stropha b \stropha b \stropha a \]}
6414 The following head prefixes are supported
6416 @cindex @code{\virga}
6418 @cindex @code{\stropha}
6420 @cindex @code{\inclinatum}
6422 @cindex @code{\auctum}
6424 @cindex @code{\descendens}
6426 @cindex @code{\ascendens}
6428 @cindex @code{\oriscus}
6430 @cindex @code{\quilisma}
6432 @cindex @code{\deminutum}
6435 Head prefixes can be accumulated, though restrictions apply. For
6436 example, either @code{\descendens} or @code{\ascendens} can be applied
6437 to a head, but not both to the same head.
6440 @cindex @code{\flexa}
6441 Two adjacent heads can be tied together with the @code{\pes} and
6442 @code{\flexa} infix commands for a rising and falling line of melody,
6447 @node Vaticana style contexts
6448 @subsection Vaticana style contexts
6450 @cindex VaticanaVoiceContext
6451 @cindex VaticanaStaffContext
6453 The predefined @code{VaticanaVoiceContext} and
6454 @code{VaticanaStaffContext} can be used to easily engrave a piece of
6455 Gregorian Chant in the style of the Editio Vaticana. These contexts
6456 initialize all relevant context properties and grob properties to
6457 proper values. With these contexts, you can immediately go ahead
6458 entering the chant, as the following short excerpt demonstrates
6460 @lilypond[quote,raggedright,verbatim,noindent]
6461 \include "gregorian-init.ly"
6464 \context VaticanaVoice = "cantus" {
6465 \override Score.BarNumber #'transparent = ##t
6467 \[ c'\melisma c' \flexa a \]
6468 \[ a \flexa \deminutum g\melismaEnd \]
6470 \[ f\melisma \pes a c' c' \pes d'\melismaEnd \]
6471 c' \divisioMinima \break
6472 \[ c'\melisma c' \flexa a \]
6473 \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
6476 \lyricsto "cantus" \new Lyrics {
6477 San- ctus, San- ctus, San- ctus
6484 @subsection Figured bass
6486 @cindex Basso continuo
6488 @c TODO: musicological blurb about FB
6491 LilyPond has limited support for figured bass
6493 @lilypond[quote,verbatim,fragment]
6495 \context Voice { \clef bass dis4 c d ais }
6496 \context FiguredBass \figures {
6497 < 6 >4 < 7 >8 < 6+ [_!] >
6503 The support for figured bass consists of two parts: there is an input
6504 mode, introduced by @code{\figures}, where you can enter bass figures
6505 as numbers, and there is a context called @internalsref{FiguredBass} that
6506 takes care of making @internalsref{BassFigure} objects.
6508 In figures input mode, a group of bass figures is delimited by
6509 @code{<} and @code{>}. The duration is entered after the @code{>>}
6513 @lilypond[quote,fragment]
6514 \context FiguredBass
6518 Accidentals are added when you append @code{-}, @code{!} and @code{+}
6524 @lilypond[quote,fragment]
6525 \context FiguredBass
6526 \figures { <4- 6+ 7!> }
6529 Spaces or dashes may be inserted by using @code{_}. Brackets are
6530 introduced with @code{[} and @code{]}
6535 @lilypond[quote,fragment]
6536 \context FiguredBass
6537 \figures { < [4 6] 8 [_! 12]> }
6540 Although the support for figured bass may superficially resemble chord
6541 support, it works much simpler. The @code{\figures} mode simply
6542 stores the numbers , and @internalsref{FiguredBass} context prints
6543 them as entered. There is no conversion to pitches, and no
6544 realizations of the bass are played in the MIDI file.
6546 Internally, the code produces markup texts. You can use any of the
6547 markup text properties to override formatting. For example, the
6548 vertical spacing of the figures may be set with @code{baseline-skip}.
6552 Program reference: @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
6553 and @internalsref{FiguredBass} context.
6557 Slash notation for alterations is not supported.
6559 @node Contemporary notation
6560 @section Contemporary notation
6562 In the 20th century, composers have greatly expanded the musical
6563 vocabulary. With this expansion, many innovations in musical notation
6564 have been tried. The book by Stone (1980) gives a comprehensive
6565 overview (see @ref{Literature list}). In general, the use of new,
6566 innovative notation makes a piece harder to understand and perform and
6567 its use should therefore be avoided if possible. For this reason,
6568 support for contemporary notation in LilyPond is limited.
6577 @subsection Clusters
6581 A cluster indicates a continuous range of pitches to be played. They
6582 can be denoted as the envelope of a set of notes. They are entered by
6583 applying the function @code{notes-to-clusters} to a sequence of
6586 @lilypond[quote,relative=2,verbatim]
6587 \applymusic #notes-to-clusters { <c e > <b f'> }
6590 The following example (from
6591 @inputfileref{input/regression,cluster.ly}) shows what the result
6594 @lilypondfile[quote]{cluster.ly}
6596 Ordinary notes and clusters can be put together in the same staff,
6597 even simultaneously. In such a case no attempt is made to
6598 automatically avoid collisions between ordinary notes and clusters.
6602 Program reference: @internalsref{ClusterSpanner},
6603 @internalsref{ClusterSpannerBeacon},
6604 @internalsref{Cluster_spanner_engraver}, and
6605 @internalsref{ClusterNoteEvent}.
6607 Examples: @inputfileref{input/regression,cluster.ly}.
6611 Music expressions like @code{<< @{ g8 e8 @} a4 >>} are not printed
6612 accurately. Use @code{<g a>8 <e a>8} instead.
6617 @subsection Fermatas
6623 Contemporary music notation frequently uses special fermata symbols to
6624 indicate fermatas of differing lengths. The following fermatas are
6627 @lilypond[quote,raggedright]
6649 \context Lyrics \lyrics {
6650 \override LyricText #'font-family = #'typewriter
6651 "shortfermata" "fermata" "longfermata" "verylongfermata"
6656 See @ref{Articulations} for general instructions how to apply scripts
6657 such as fermatas to notes.
6660 @node Educational use
6661 @section Educational use
6665 * Blank music paper::
6666 * Notation for excercises::
6667 * Easy Notation note heads::
6671 @subsection Balloon help
6673 Elements of notation can be marked and named with the help of a square
6674 balloon. The primary purpose of this feature is to explain notation.
6676 The following example demonstrates its use.
6678 @lilypond[quote,verbatim,fragment,raggedright,relative=2]
6681 #(add-balloon-text 'NoteHead "heads, or tails?"
6687 The function @code{add-balloon-text} takes the name of a grob, the
6688 label to print and where to put the label relative to the object. In
6689 the above example, the text ``heads or tails?'' ends 3 spaces below
6693 @cindex notation, explaining
6697 Program reference: @internalsref{text-balloon-interface}.
6699 Examples: @inputfileref{input/regression,balloon.ly}.
6704 @node Blank music paper
6705 @subsection Blank music paper
6707 A blank music paper can be produced also by using invisible notes, and
6708 removing @code{Bar_number_engraver}.
6713 \repeat unfold 2 % Change this for more lines.
6718 \override TimeSignature #'transparent = ##t
6719 defaultBarType = #""
6720 \remove Bar_number_engraver
6722 \context Staff \emptymusic
6723 \context TabStaff \emptymusic
6728 @node Notation for excercises
6729 @subsection Notation for excercises
6733 Invisible (or transparent) notes can be useful, when weird tricks are
6734 needed; especially, a slur cannot be attach to a rest or spacer rest.
6738 blanknotes = { \override NoteHead #'transparent = ##t
6739 \override Stem #'transparent = ##t }
6740 unblanknotes = { \revert NoteHead #'transparent
6741 \revert Stem #'transparent }
6746 \blanknotes e4 f4 \unblanknotes
6752 @node Easy Notation note heads
6753 @subsection Easy Notation note heads
6755 @cindex easy notation
6758 The `easy play' note head includes a name inside the head. It is
6759 used in music for beginners
6761 @lilypond[quote,raggedright,verbatim,fragment,staffsize=26]
6766 The command @code{\setEasyHeads} overrides settings for the
6767 @internalsref{NoteHead} object. To make the letters readable, it has
6768 to be printed in a large font size. To print with a larger font, see
6769 @ref{Setting global staff size}.
6774 If you view the result with Xdvi, staff lines may show through the
6775 letters. Printing the PostScript file obtained does produce the
6780 @cindex @code{\setEasyHeads}
6781 @code{\setEasyHeads}
6787 Entered music can also be converted to MIDI output. The performance
6788 is intended for proof-hearing the music for errors.
6790 Ties, dynamics and tempo changes are interpreted. Dynamic marks,
6791 crescendi and decrescendi translate into MIDI volume levels. Dynamic
6792 marks translate to a fixed fraction of the available MIDI volume
6793 range, crescendi and decrescendi make the volume vary linearly between
6794 their two extremities. The fractions can be adjusted by
6795 @code{dynamicAbsoluteVolumeFunction} in @internalsref{Voice} context.
6796 For each type of MIDI instrument, a volume range can be defined. This
6797 gives a basic equalizer control, which can enhance the quality of
6798 the MIDI output remarkably. The equalizer can be controlled by
6799 setting @code{instrumentEqualizer}.
6803 Many musically interesting effects, such as swing, articulation,
6804 slurring, etc., are not translated to MIDI.
6806 The MIDI output allocates a channel for each Staff, and one for global
6807 settings. Hence, the MIDI file should not have more than 15 staves
6808 (or 14 if you do not use drums). Other staves will remain silent.
6810 Not all MIDI players correctly handle tempo change in the MIDI
6811 output. Players that are known to work include
6812 @uref{http://timidity.sourceforge.net/,timidity}
6817 * MIDI instrument names::
6822 @subsection MIDI block
6826 The MIDI block is analogous to the paper block, but it is somewhat
6827 simpler. The @code{\midi} block can contain
6831 @item a @code{\tempo} definition, and
6832 @item context definitions.
6835 A number followed by a period is interpreted as a real number, so
6836 for setting the tempo for dotted notes, an extra space should be
6837 inserted, for example
6840 \midi @{ \tempo 4 . = 120 @}
6844 @cindex context definition
6846 Context definitions follow precisely the same syntax as within the
6847 \paper block. Translation modules for sound are called performers.
6848 The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
6851 @node MIDI instrument names
6852 @subsection MIDI instrument names
6854 @cindex instrument names
6855 @cindex @code{Staff.midiInstrument}
6857 The MIDI instrument name is set by the @code{Staff.midiInstrument}
6858 property. The instrument name should be chosen from the list in
6859 @ref{MIDI instruments}.
6863 If the selected string does not exactly match, the default is used,
6864 which is the Grand Piano.