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::
27 * Other instrument specific notation::
31 * Formatting cue notes::
33 * Contemporary notation::
37 @c FIXME: Note entry vs Music entry at top level menu is confusing.
43 This section is about basic notation elements notes, rests and
44 related constructs, such as stems, tuplets and ties.
49 * Chromatic alterations::
67 A note is printed by specifying its pitch and then its duration,
69 @lilypond[quote,verbatim]
70 { cis'4 d'8 e'16 c'16 }
78 @cindex Note specification
80 @cindex entering notes
82 The most common syntax for pitch entry is used in standard notes and
83 @code{\chords} mode. In these modes, pitches may be designated by
84 names. The notes are specified by the letters @code{a} through
85 @code{g}, while the octave is formed with notes ranging from @code{c}
86 to @code{b}. The pitch @code{c} is an octave below middle C and the
87 letters span the octave above that C
89 @lilypond[fragment,verbatim,noindent]
91 a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
94 @cindex note names, Dutch
96 A sharp is formed by adding @code{-is} to the end of a pitch name and
97 a flat is formed by adding @code{-es}. Double sharps and double flats
98 are obtained by adding @code{-isis} or @code{-eses}. These
99 names are the Dutch note names. In Dutch, @code{aes} is contracted to
100 @code{as}, but both forms are accepted. Similarly, both
101 @code{es} and @code{ees} are accepted.
103 @lilypond[fragment,quote,verbatim,relative=2]
111 There are predefined sets of note names for various other languages.
112 To use them, include the language specific init file. For
113 example: @code{\include "english.ly"}. The available language files
114 and the note names they define are
119 Note Names sharp flat
120 nederlands.ly c d e f g a bes b -is -es
121 english.ly c d e f g a bf b -s/-sharp -f/-flat
123 deutsch.ly c d e f g a b h -is -es
124 norsk.ly c d e f g a b h -iss/-is -ess/-es
125 svenska.ly c d e f g a b h -iss -ess
126 italiano.ly do re mi fa sol la sib si -d -b
127 catalan.ly do re mi fa sol la sib si -d/-s -b
128 espanol.ly do re mi fa sol la sib si -s -b
137 The optional octave specification takes the form of a series of
138 single quote (`@code{'}') characters or a series of comma
139 (`@code{,}') characters. Each @code{'} raises the pitch by one
140 octave; each @code{,} lowers the pitch by an octave
142 @lilypond[quote,fragment,verbatim]
143 c' c'' es' g' as' gisis' ais'
149 Notes can be hidden and unhidden with the following commands
151 @cindex @code{\hideNotes}
153 @cindex @code{\unHideNotes}
159 Program reference: @internalsref{NoteEvent}, and @internalsref{NoteHead}.
163 @node Chromatic alterations
164 @subsection Chromatic alterations
166 Normally accidentals are printed automatically, but you may also
167 print them manually. A reminder accidental
168 @cindex reminder accidental
170 can be forced by adding an exclamation mark @code{!}
171 after the pitch. A cautionary accidental
172 @cindex cautionary accidental
173 @cindex parenthesized accidental
174 (i.e. an accidental within parentheses) can be obtained by adding the
175 question mark `@code{?}' after the pitch
177 @lilypond[quote,fragment,verbatim]
178 cis' cis' cis'! cis'?
184 The automatic production of accidentals can be tuned in many
185 ways. For more information, refer to @ref{Accidentals}.
190 @subsection Micro tones
192 Half-flats and half-sharps are formed by adding @code{-eh} and
193 @code{-ih}; the following is a series of Cs with increasing pitches
195 @cindex quarter tones
196 @cindex semi-flats, semi-sharps
198 @lilypond[verbatim,quote,relative=2,fragment]
199 { ceseh ceh cih cisih }
202 Micro tones are also exported to the MIDI file
207 There are no generally accepted standards for denoting three quarter
208 flats, so LilyPond's symbol does not conform to any standard.
213 A chord is formed by a enclosing a set of pitches in @code{<} and
214 @code{>}. A chord may be followed by a duration, and a set of
215 articulations, just like simple notes.
217 @lilypond[verbatim,fragment,quote,relative=1]
228 Rests are entered like notes, with the note name @code{r}
230 @lilypond[fragment,quote,raggedright,verbatim]
234 Whole bar rests, centered in middle of the bar,
235 must be done with multi-measure rests. They are discussed in
236 @ref{Multi measure rests}.
239 A rest's vertical position may be explicitly specified by entering a
240 note with the @code{\rest} keyword appended. This makes manual
241 formatting in polyphonic music easier. Automatic rest collision
242 formatting will leave these rests alone
246 @lilypond[fragment,quote,raggedright,verbatim]
252 Program reference: @internalsref{RestEvent}, and @internalsref{Rest}.
259 @cindex Invisible rest
262 An invisible rest (also called a `skip') can be entered like a note
263 with note name `@code{s}' or with @code{\skip @var{duration}}
265 @lilypond[fragment,quote,raggedright,verbatim,relative=2]
269 The @code{s} syntax is only available in note mode and chord mode. In
270 other situations, for example, when entering lyrics, you should use
271 the @code{\skip} command
273 @lilypond[quote,raggedright,verbatim]
276 \new Lyrics \lyrics { \skip 2 bla1 }
280 The skip command is merely an empty musical placeholder. It does not
281 produce any output, not even transparent output.
283 The @code{s} skip command does create @internalsref{Staff} and
284 @internalsref{Voice} when necessary, similar to note and rest
285 commands. For example, the following results in an empty staff.
287 @lilypond[quote,raggedright,verbatim]
291 The fragment @code{@{ \skip 4 @} } would produce an empty page.
295 Program reference: @internalsref{SkipEvent}, @internalsref{SkipMusic}.
300 @subsection Durations
304 @cindex @code{\longa}
305 @cindex @code{\breve}
306 @cindex @code{\maxima}
309 In Note, Chord, and Lyrics mode, durations are designated by numbers
310 and dots: durations are entered as their reciprocal values. For example,
311 a quarter note is entered using a @code{4} (since it is a 1/4 note), while
312 a half note is entered using a @code{2} (since it is a 1/2 note). For notes
313 longer than a whole you must use variables
317 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
319 r1 r2 r4 r8 r16 r32 r64 r64
322 @lilypond[quote,noindent]
325 a\breve*1/2 \autoBeamOff
326 a1 a2 a4 a8 a16 a32 a64 a64
329 r\longa*1/4 r\breve *1/2
330 r1 r2 r4 r8 r16 r32 r64 r64
336 \remove "Clef_engraver"
337 \override StaffSymbol #'transparent = ##t
338 \override TimeSignature #'transparent = ##t
339 \override BarLine #'transparent = ##t
340 \consists "Pitch_squash_engraver"
347 @node Augmentation dots
348 @subsection Augmentation dots
350 If the duration is omitted then it is set to the previously entered
351 duration. The default for the first note is a quarter note. The duration
352 can be followed by dots (`@code{.}') to obtain dotted note
356 @lilypond[quote,fragment,verbatim]
357 a' b' c''8 b' a'4 a'4. b'4.. c'8.
364 Dots are normally moved up to avoid staff lines, except in polyphonic
365 situations. The following commands may be used to force a particular
368 @cindex @code{\dotsUp}
370 @cindex @code{\dotsDown}
372 @cindex @code{\dotsBoth}
377 Program reference: @internalsref{Dots}, and @internalsref{DotColumn}.
379 @node Scaling durations
380 @subsection Scaling durations
382 You can alter the length of duration by a fraction @var{N/M}
383 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
384 will not affect the appearance of the notes or rests produced.
386 In the following example, the first three notes take up exactly two
387 beats, but no triplet bracket is printed.
388 @lilypond[quote,fragment,relative=2,verbatim]
390 a4*2/3 gis4*2/3 a4*2/3
397 This manual: @ref{Tuplets}
403 Whenever a note is found, a @internalsref{Stem} object is created
404 automatically. For whole notes and rests, they are also created but
409 @cindex @code{\stemUp}
411 @cindex @code{\stemDown}
413 @cindex @code{\stemBoth}
424 A tie connects two adjacent note heads of the same pitch. The tie in
425 effect extends the length of a note. Ties should not be confused with
426 slurs, which indicate articulation, or phrasing slurs, which indicate
427 musical phrasing. A tie is entered using the tilde symbol `@code{~}'
429 @lilypond[quote,fragment,verbatim]
430 e' ~ e' <c' e' g'> ~ <c' e' g'>
433 When a tie is applied to a chord, all note heads whose pitches match
434 are connected. When no note heads match, no ties will be created.
436 A tie is just a way of extending a note duration, similar to the
437 augmentation dot. The following example shows two ways of notating
438 exactly the same concept
440 @lilypond[quote,fragment,raggedright]
441 \time 3/4 c'2. c'2 ~ c'4
445 Ties are used either when the note crosses a bar line, or when dots
446 cannot be used to denote the rhythm. When using ties, larger note
447 values should be aligned to subdivisions of the measure, eg.
451 r8 c8 ~ c2 r4 | r8^"not" c2 ~ c8 r4
455 If you need to tie a lot of notes over bars, it may be easier to use
456 automatic note splitting (see @ref{Automatic note splitting}). This
457 mechanism automatically splits long notes, and ties them across bar
463 @cindex @code{\tieUp}
465 @cindex @code{\tieDown}
467 @cindex @code{\tieBoth}
469 @cindex @code{\tieDotted}
471 @cindex @code{\tieSolid}
476 In this manual: @ref{Automatic note splitting}.
478 Program reference: @internalsref{TieEvent}, @internalsref{Tie}.
483 Switching staves when a tie is active will not produce a slanted tie.
485 Formatting of ties is a difficult subject. The results are often not
493 @cindex @code{\times}
495 Tuplets are made out of a music expression by multiplying all durations
498 @cindex @code{\times}
500 \times @var{fraction} @var{musicexpr}
504 The duration of @var{musicexpr} will be multiplied by the fraction.
505 The fraction's denominator will be printed over the notes, optionally
506 with a bracket. The most common tuplet is the triplet in which 3
507 notes have the length of 2, so the notes are 2/3 of their written
510 @lilypond[quote,fragment,verbatim]
511 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
514 The property @code{tupletSpannerDuration} specifies how long each
515 bracket should last. With this, you can make lots of tuplets while
516 typing @code{\times} only once, thus saving lots of typing. In the next
517 example, there are two triplets shown, while @code{\times} was only
520 @lilypond[quote,fragment,relative=1,raggedright,verbatim]
521 \set tupletSpannerDuration = #(ly:make-moment 1 4)
522 \times 2/3 { c'8 c c c c c }
525 The format of the number is determined by the property
526 @code{tupletNumberFormatFunction}. The default prints only the
527 denominator, but if it is set to the Scheme function
528 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
532 @cindex @code{tupletNumberFormatFunction}
533 @cindex tuplet formatting
538 @cindex @code{\tupletUp}
540 @cindex @code{\tupletDown}
542 @cindex @code{\tupletBoth}
547 User manual: @ref{Changing context properties on the fly} for the
551 Program reference: @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
553 Examples: @inputfileref{input/regression,tuplet-nest.ly}.
557 Nested tuplets are not formatted automatically. In this case, outer
558 tuplet brackets should be moved manually, which is demonstrated in
559 @inputfileref{input/regression,tuplet-nest.ly}.
563 @node Easier music entry
564 @section Easier music entry
567 This section deals with tricks and features of the input language that
568 were added solely to help entering music and finding and correcting
569 mistakes. There are also external tools that make debugging easier.
570 See @ref{Point and click} for more information.
572 It is also possible to enter and edit music using other programs. For
573 example, GUI interfaces, or MIDI sequencers. Refer to the LilyPond
574 website for more information.
581 * Skipping corrected music::
582 * Automatic note splitting::
588 @node Relative octaves
589 @subsection Relative octaves
591 @cindex relative octave specification
593 Octaves are specified by adding @code{'} and @code{,} to pitch names.
594 When you copy existing music, it is easy to accidentally put a pitch
595 in the wrong octave and hard to find such an error. The relative
596 octave mode prevents these errors: a single error puts the rest of the
597 piece off by one octave
599 @cindex @code{\relative}
601 \relative @var{startpitch} @var{musicexpr}
605 \relative @var{musicexpr}
608 The octave of notes that appear in @var{musicexpr} are calculated as
609 follows: If no octave changing marks are used, the basic interval
610 between this and the last note is always taken to be a fourth or
611 less. This distance is determined without regarding alterations; a
612 @code{fisis} following a @code{ceses} will be put above the
615 The octave changing marks @code{'} and @code{,} can be added to raise
616 or lower the pitch by an extra octave. Upon entering relative mode,
617 an absolute starting pitch can be specified that will act as the
618 predecessor of the first note of @var{musicexpr}. If no starting pitch
619 is specified, then middle C is used as a start.
621 Here is the relative mode shown in action
622 @lilypond[quote,fragment,raggedright,verbatim]
628 Octave changing marks are used for intervals greater than a fourth
629 @lilypond[quote,fragment,verbatim]
635 If the preceding item is a chord, the first note of the chord is used
636 to determine the first note of the next chord
638 @lilypond[quote,fragment,verbatim]
646 The pitch after the @code{\relative} contains a note name.
649 The relative conversion will not affect @code{\transpose},
650 @code{\chords} or @code{\relative} sections in its argument. To use
651 relative within transposed music, an additional @code{\relative} must
652 be placed inside @code{\transpose}.
655 @subsection Octave check
658 Octave checks make octave errors easier to correct: a note may be
659 followed by @code{=}@var{quotes} which indicates what its absolute
660 octave should be. In the following example,
662 \relative c'' @{ c='' b=' d,='' @}
666 @c take care with @code, adds confusing quotes.
667 the d will generate a warning, because a d'' is expected, but a d' is
668 found. In the output, the octave is corrected for this and the
673 There is also a syntax that is separate from the notes. The syntax
679 This checks that @var{pitch} (without quotes) yields @var{pitch} (with
680 quotes) in \relative mode. If not, a warning is printed, and the
681 octave is corrected, for example, the first check is passed
682 successfully. The second check fails with an error message. The
683 octave is adjusted so the following notes are in the correct octave
694 The octave of a note following an octave check is determined with
695 respect to the note preceding it. In the next fragment, the last note
696 is a @code{a'}, above middle C. Hence, the @code{\octave} check may
697 be deleted without changing the meaning of the piece.
699 @lilypond[quote,verbatim,fragment]
708 @subsection Bar check
712 @cindex @code{barCheckSynchronize}
715 Bar checks help detect errors in the durations. A bar check is
716 entered using the bar symbol, `@code{|}'. Whenever it is encountered
717 during interpretation, it should fall on a measure boundary. If it
718 does not, a warning is printed. In the next example, the second bar
719 check will signal an error
721 \time 3/4 c2 e4 | g2 |
724 Bar checks can also be used in lyrics, for example
729 Twin -- kle | Twin -- kle
734 @cindex @code{skipTypesetting}
736 Failed bar checks are caused by entering incorrect
737 durations. Incorrect durations often completely garble up the score,
738 especially if it is polyphonic, so a good place to correcting input is
739 by scanning for failed bar checks and incorrect durations. To speed
740 up this process, the @code{skipTypesetting} feature may be used. It is
741 described in the next section.
744 @cindex @code{pipeSymbol}
746 It is also possible to redefine the meaning of @code{|}. This is done
747 by assigning a music expression to @code{pipeSymbol},
750 pipeSymbol = \bar "||"
752 { c'2 c'2 | c'2 c'2 | }
756 @node Skipping corrected music
757 @subsection Skipping corrected music
759 The property @code{Score.skipTypesetting} can be used to switch on and
760 off typesetting completely during the interpretation phase. When
761 typesetting is switched off, the music is processed much more quickly.
762 This can be used to skip over the parts of a score that have already
763 been checked for errors
765 @lilypond[quote,fragment,raggedright,verbatim]
768 \set Score.skipTypesetting = ##t
770 \set Score.skipTypesetting = ##f
774 @node Automatic note splitting
775 @subsection Automatic note splitting
777 Long notes can be converted automatically to tied notes. This is done
778 by replacing the @internalsref{Note_heads_engraver} by the
779 @internalsref{Completion_heads_engraver}.
780 In the following examples, notes crossing the bar line are split and tied.
783 @lilypond[quote,fragment,verbatim,relative=1,raggedright]
785 \remove "Note_heads_engraver"
786 \consists "Completion_heads_engraver"
788 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
792 This engraver splits all running notes at the bar line, and inserts
793 ties. One of its uses is to debug complex scores: if the measures are
794 not entirely filled, then the ties exactly show how much each measure
799 Not all durations (especially those containing tuplets) can be
800 represented exactly with normal notes and dots, but the engraver will
805 Examples: @inputfileref{input/regression,completion-heads.ly}.
809 Program reference: @internalsref{Completion_heads_engraver}.
813 @section Staff notation
815 This section describes music notation that occurs on staff level,
816 such as key signatures, clefs and time signatures.
818 @cindex Staff notation
829 * Time administration::
830 * Controlling formatting of prefatory matter::
834 @subsection Staff symbol
836 @cindex adjusting staff symbol
838 Notes, dynamic signs, etc. are grouped
839 with a set of horizontal lines, into a staff (plural `staves'). In our
840 system, these lines are drawn using a separate layout object called
844 @cindex staff lines, setting number of
845 @cindex staff lines, setting thickness of
846 @cindex thickness of staff lines, setting
847 @cindex number of staff lines, setting
851 Program reference: @internalsref{StaffSymbol}.
853 Examples: @inputfileref{input/test,staff-lines.ly},
854 @inputfileref{input/test,staff-size.ly}.
858 If a staff is ended halfway a piece, the staff symbol may not end
859 exactly on the bar line.
863 @subsection Key signature
864 @cindex Key signature
868 The key signature indicates the scale in which a piece is played. It
869 is denoted by a set of alterations (flats or sharps) at the start of
873 Setting or changing the key signature is done with the @code{\key}
876 @code{\key} @var{pitch} @var{type}
879 @cindex @code{\minor}
880 @cindex @code{\major}
881 @cindex @code{\minor}
882 @cindex @code{\ionian}
883 @cindex @code{\locrian}
884 @cindex @code{\aeolian}
885 @cindex @code{\mixolydian}
886 @cindex @code{\lydian}
887 @cindex @code{\phrygian}
888 @cindex @code{\dorian}
890 Here, @var{type} should be @code{\major} or @code{\minor} to get
891 @var{pitch}-major or @var{pitch}-minor, respectively.
892 The standard mode names @code{\ionian},
893 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
894 @code{\phrygian}, and @code{\dorian} are also defined.
896 This command sets the context property
897 @internalsref{Staff}.@code{keySignature}. Non-standard key signatures
898 can be specified by setting this property directly.
900 Accidentals and key signatures often confuse new users, because
901 unaltered notes get natural signs depending on the key signature. For
902 more information, see @ref{More about pitches}.
906 The ordering of a key cancellation is wrong when it is combined with
907 repeat bar lines. The cancellation is also printed after a line break.
911 Program reference: @internalsref{KeyChangeEvent}, and @internalsref{KeySignature}.
913 @cindex @code{keySignature}
920 The clef indicates which lines of the staff correspond to which
924 The clef can be set with the @code{\clef} command
925 @lilypond[quote,fragment,verbatim]
926 { c''2 \clef alto g'2 }
929 Supported clef-names include
930 @c Moved standard clefs to the top /MB
934 @item treble, violin, G, G2
947 G clef on 1st line, so-called French violin clef
952 @cindex mezzosoprano clef
955 @cindex baritone clef
958 @cindex varbaritone clef
969 By adding @code{_8} or @code{^8} to the clef name, the clef is
970 transposed one octave down or up, respectively, and @code{_15} and
971 @code{^15} transposes by two octaves. The argument @var{clefname}
972 must be enclosed in quotes when it contains underscores or digits. For
976 @cindex choral tenor clef
977 @lilypond[quote,verbatim,fragment,relative=1]
981 This command is equivalent to setting @code{clefGlyph},
982 @code{clefPosition} (which controls the Y position of the clef),
983 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
984 when any of these properties are changed. The following example shows
985 possibilities when setting properties manually.
989 \set Staff.clefGlyph = #"clefs-F"
990 \set Staff.clefPosition = #2
992 \set Staff.clefGlyph = #"clefs-G"
994 \set Staff.clefGlyph = #"clefs-C"
996 \set Staff.clefOctavation = #7
998 \set Staff.clefOctavation = #0
999 \set Staff.clefPosition = #0
1009 Program reference: @internalsref{Clef}.
1013 @node Ottava brackets
1014 @subsection Ottava brackets
1016 ``Ottava'' brackets introduce an extra transposition of an octave for
1017 the staff. They are created by invoking the function
1018 @code{set-octavation}
1024 @lilypond[quote,verbatim,fragment]
1034 The @code{set-octavation} function also takes -1 (for 8va bassa) and 2
1035 (for 15ma) as arguments. Internally the function sets the properties
1036 @code{ottavation} (e.g. to @code{"8va"}) and
1037 @code{centralCPosition}. For overriding the text of the bracket, set
1038 @code{ottavation} after invoking @code{set-octavation}, i.e.,
1043 \set Staff.ottavation = #"8"
1050 Program reference: @internalsref{OttavaBracket}.
1052 Examples: @inputfileref{input/regression,ottava.ly},
1053 @inputfileref{input/regression,ottava-broken.ly}.
1057 @code{set-octavation} will get confused when clef changes happen
1058 during an octavation bracket.
1063 @node Time signature
1064 @subsection Time signature
1065 @cindex Time signature
1067 @cindex @code{\time}
1069 Time signature indicates the metrum of a piece: a regular pattern of
1070 strong and weak beats. It is denoted by a fraction at the start of the
1074 The time signature is set or changed by the @code{\time}
1076 @lilypond[quote,fragment,verbatim]
1077 \time 2/4 c'2 \time 3/4 c'2.
1080 The symbol that is printed can be customized with the @code{style}
1081 property. Setting it to @code{#'()} uses fraction style for 4/4 and
1084 @lilypond[fragment,verbatim]
1087 \override TimeSignature #'style = #'()
1094 There are many more options for its layout. See @ref{Ancient time
1095 signatures} for more examples.
1098 This command sets the property @code{timeSignatureFraction},
1099 @code{beatLength} and @code{measureLength} in the @code{Timing}
1100 context, which is normally aliased to @internalsref{Score}. The
1101 property @code{measureLength} determines where bar lines should be
1102 inserted, and how automatic beams should be generated. Changing the
1103 value of @code{timeSignatureFraction} also causes the symbol to be
1106 More options are available through the Scheme function
1107 @code{set-time-signature}. In combination with the
1108 @internalsref{Measure_grouping_engraver}, it will create
1109 @internalsref{MeasureGrouping} signs. Such signs ease reading
1110 rhythmically complex modern music. In the following example, the 9/8
1111 measure is subdivided in 2, 2, 2 and 3. This is passed to
1112 @code{set-time-signature} as the third argument @code{(2 2 2 3)}
1114 @lilypond[quote,raggedright,verbatim]
1117 #(set-time-signature 9 8 '(2 2 2 3))
1118 g8[ g] d[ d] g[ g] a8[( bes g]) |
1119 #(set-time-signature 5 8 '(3 2))
1125 \consists "Measure_grouping_engraver"
1133 Program reference: @internalsref{TimeSignature}, and @internalsref{Timing_engraver}.
1138 Automatic beaming does not use the measure grouping specified with
1139 @code{set-time-signature}.
1141 @node Partial measures
1142 @subsection Partial measures
1145 @cindex partial measure
1146 @cindex measure, partial
1147 @cindex shorten measures
1148 @cindex @code{\partial}
1150 Partial measures, for example in upsteps, are entered using the
1151 @code{\partial} command
1152 @lilypond[quote,fragment,verbatim,relative=2]
1153 \partial 16*5 c16 cis d dis e | a2. c,4 | b2
1156 The syntax for this command is
1158 \partial @var{duration}
1160 This is internally translated into
1162 \set Timing.measurePosition = -@var{length of duration}
1165 The property @code{measurePosition} contains a rational number
1166 indicating how much of the measure has passed at this point.
1170 This command does not take into account grace notes at the start of
1171 the music. When a piece starts with graces notes in the pickup, then
1172 the @code{\partial} should follow the grace notes
1174 @lilypond[verbatim,relative,fragment]
1184 @node Unmetered music
1185 @subsection Unmetered music
1189 Bar lines and bar numbers are calculated automatically. For unmetered
1190 music (e.g. cadenzas), this is not desirable. By setting
1191 @code{Score.timing} to false, this automatic timing can be switched
1192 off. Empty bar lines,
1199 indicate where line breaks can occur.
1203 @cindex @code{\cadenzaOn}
1205 @cindex @code{\cadenzaOff}
1212 @subsection Bar lines
1216 @cindex measure lines
1220 Bar lines delimit measures, but are also used to indicate repeats.
1221 Normally, they are inserted automatically. Line breaks may only
1222 happen on bar lines.
1224 Special types of bar lines can be forced with the @code{\bar} command
1226 @lilypond[quote,relative=2,fragment,verbatim]
1230 The following bar types are available
1231 @lilypondfile[notexidoc]{bar-lines.ly}
1233 For allowing line breaks, there is a special command,
1237 This will insert an invisible bar line, and allow line breaks at this
1240 In scores with many staves, a @code{\bar} command in one staff is
1241 automatically applied to all staves. The resulting bar lines are
1242 connected between different staves of a @internalsref{StaffGroup}
1244 @lilypond[quote,fragment,verbatim]
1246 \context StaffGroup <<
1252 \new Staff { \clef bass c4 g e g }
1254 \new Staff { \clef bass c2 c2 }
1259 The command @code{\bar }@var{bartype} is a short cut for doing
1260 @code{\set Timing.whichBar = }@var{bartype}. Whenever @code{whichBar}
1261 is set to a string, a bar line of that type is created.
1263 A bar line is created whenever the @code{whichBar} property is set.
1264 At the start of a measure it is set to the contents of
1265 @code{defaultBarType}. The contents of @code{repeatCommands} are used
1266 to override default measure bars.
1268 @cindex @code{whichBar}
1269 @cindex @code{repeatCommands}
1270 @cindex @code{defaultBarType}
1272 You are encouraged to use @code{\repeat} for repetitions. See
1279 In this manual: @ref{Repeats}, @ref{System start delimiters}
1282 Program reference: @internalsref{BarLine} (created at
1283 @internalsref{Staff} level), @internalsref{SpanBar} (across staves).
1285 @cindex bar lines at start of system
1286 @cindex start of system
1290 Examples: @inputfileref{input/test,bar-lines.ly},
1293 @node Time administration
1294 @subsection Time administration
1296 Time is administered by the @internalsref{Time_signature_engraver},
1297 which usually lives in the @internalsref{Score} context.
1298 The bookkeeping deals with the following variables
1301 @item currentBarNumber
1304 the length of the measures in the current time signature. For a 4/4
1305 time this is 1, and for 6/8 it is 3/4.
1306 @item measurePosition
1307 the point within the measure where we currently are. This quantity
1308 is reset to 0 whenever it exceeds @code{measureLength}. When that happens,
1309 @code{currentBarNumber} is incremented.
1311 if set to true, the above variables are updated for every time
1312 step. When set to false, the engraver stays in the current measure
1316 Timing can be changed by setting any of these variables explicitly.
1317 In the next example, the 4/4 time signature is printed, but
1318 @code{measureLength} is set to 5/4. After a while, the measure is
1319 shortened by 1/8, by setting @code{measurePosition} to -3/8 at 2/4 in
1320 the measure, so the next bar line will fall at 2/4 + 3/8.
1324 \set Score.measureLength = #(ly:make-moment 5 4)
1328 \set Score.measurePosition = #(ly:make-moment -3 8)
1335 @node Controlling formatting of prefatory matter
1336 @subsection Controlling formatting of prefatory matter
1342 \override Staff.Clef #'break-visibility = #end-of-line-visible
1343 \override Staff.KeySignature #'break-visibility = #end-of-line-visible
1344 \set Staff.explicitClefVisibility = #end-of-line-visible
1345 \set Staff.explicitKeySignatureVisibility = #end-of-line-visible
1347 % We want the time sig to take space, otherwise there is not
1348 % enough white at the start of the line.
1351 \override Staff.TimeSignature #'transparent = ##t
1352 \set Score.defaultBarType = #"empty"
1373 The easiest way to enter fragments with more than one voice on a staff
1374 is to split chords using the separator @code{\\}. You can use it for
1375 small, short-lived voices or for single chords
1379 @lilypond[quote,verbatim,fragment]
1380 \context Staff \relative c'' {
1381 c4 << { f d e } \\ { b c2 } >>
1382 c4 << g' \\ b, \\ f' \\ d >>
1386 The separator causes @internalsref{Voice} contexts@footnote{Polyphonic
1387 voices are sometimes called "layers" in other notation packages}
1389 to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
1390 each of these contexts, vertical direction of slurs, stems, etc. is set
1393 @cindex @code{\voiceOne}
1394 @cindex @code{\voiceFour}
1396 This can also be done by instantiating @internalsref{Voice} contexts
1397 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1398 a stem directions and horizontal shift for each part
1401 @lilypond[quote,raggedright,verbatim]
1404 \new Voice { \voiceOne cis2 b }
1405 \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
1406 \new Voice { \voiceTwo fis4~ fis4 f ~ f } >>
1410 The command @code{\oneVoice} will revert back to the normal setting.
1411 @cindex @code{\oneVoice}
1414 Normally, note heads with a different number of dots are not merged, but
1415 when the object property @code{merge-differently-dotted} is set in
1416 the @internalsref{NoteCollision} object, they are merged
1417 @lilypond[quote,verbatim,fragment,raggedright,relative=2]
1420 \override Staff.NoteCollision
1421 #'merge-differently-dotted = ##t
1423 } \\ { g8.[ f16] g8.[ f16] } >>
1426 Similarly, you can merge half note heads with eighth notes, by setting
1427 @code{merge-differently-headed}
1428 @lilypond[quote,fragment,relative=2,verbatim]
1431 \override Staff.NoteCollision
1432 #'merge-differently-headed = ##t
1433 c8 c4. } \\ { c2 c2 } >>
1436 LilyPond also vertically shifts rests that are opposite of a stem,
1439 @lilypond[quote,raggedright,fragment,verbatim]
1440 \context Voice << c''4 \\ r4 >>
1448 @cindex @code{\oneVoice}
1450 @cindex @code{\voiceOne}
1452 @cindex @code{\voiceTwo}
1454 @cindex @code{\voiceThree}
1456 @cindex @code{\voiceFour}
1461 @cindex @code{\shiftOn}
1463 @cindex @code{\shiftOnn}
1465 @cindex @code{\shiftOnnn}
1467 @cindex @code{\shiftOff}
1468 @code{\shiftOff}: these commands specify in what chords of the current
1469 voice should be shifted. The outer voices (normally: voice one and
1470 two) have @code{\shiftOff}, while the inner voices (three and four)
1471 have @code{\shiftOn}. @code{\shiftOnn} and @code{\shiftOnnn} define
1472 further shift levels.
1475 When LilyPond cannot cope, the @code{force-hshift}
1476 property of the @internalsref{NoteColumn} object and pitched rests can
1477 be used to override typesetting decisions.
1479 @lilypond[verbatim,raggedright]
1486 \once \override NoteColumn #'force-hshift = #1.7
1495 Program reference: the objects responsible for resolving collisions are
1496 @internalsref{NoteCollision} and @internalsref{RestCollision}.
1499 @inputfileref{input/regression,collision-dots.ly},
1500 @inputfileref{input/regression,collision-head-chords.ly},
1501 @inputfileref{input/regression,collision-heads.ly},
1502 @inputfileref{input/regression,collision-mesh.ly}, and
1503 @inputfileref{input/regression,collisions.ly}.
1509 When using @code{merge-differently-headed} with an upstem eighth or a
1510 shorter note, and a downstem half note, the eighth note gets the wrong
1513 There is no support for clusters where the same note occurs with
1514 different accidentals in the same chord. In this case, it is
1515 recommended to use enharmonic transcription, or to use special cluster
1516 notation (see @ref{Clusters}).
1521 Beams are used to group short notes into chunks that are aligned with
1522 the metrum. They are inserted automatically
1524 @lilypond[quote,fragment,verbatim,relative=2]
1525 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1528 When these automatic decisions are not good enough, beaming can be
1529 entered explicitly. It is also possible to define beaming patterns
1530 that differ from the defaults.
1532 Individual notes may be marked with @code{\noBeam}, to prevent them
1535 @lilypond[quote,fragment,verbatim,relative=2]
1536 \time 2/4 c8 c\noBeam c c
1542 Program reference: @internalsref{Beam}.
1545 @cindex Automatic beams
1548 * Setting automatic beam behavior::
1553 @subsection Manual beams
1554 @cindex beams, manual
1558 In some cases it may be necessary to override the automatic beaming
1559 algorithm. For example, the autobeamer will not put beams over rests
1560 or bar lines. Such beams are specified manually by marking the begin
1561 and end point with @code{[} and @code{]}
1563 @lilypond[quote,fragment,relative=1,verbatim]
1565 r4 r8[ g' a r8] r8 g[ | a] r8
1569 @cindex @code{stemLeftBeamCount}
1571 Normally, beaming patterns within a beam are determined automatically.
1572 If necessary, the properties @code{stemLeftBeamCount} and
1573 @code{stemRightBeamCount} can be used to override the defaults. If
1574 either property is set, its value will be used only once, and then it
1577 @lilypond[quote,fragment,relative=1,verbatim]
1580 f8[ r16 \set stemLeftBeamCount = #1 f g a]
1583 @cindex @code{stemRightBeamCount}
1586 The property @code{subdivideBeams} can be set in order to subdivide
1587 all 16th or shorter beams at beat positions, as defined by the
1588 @code{beatLength} property.
1591 @lilypond[fragment,quote,relative=2,verbatim,noindent]
1593 \set subdivideBeams = ##t
1595 \set Score.beatLength = #(ly:make-moment 1 8)
1598 @cindex @code{subdivideBeams}
1600 Normally, line breaks are forbidden when beams cross bar lines. This
1601 behavior can be changed by setting @code{allowBeamBreak}.
1603 @cindex @code{allowBeamBreak}
1604 @cindex beams and line breaks
1606 @cindex beams, kneed
1608 @cindex auto-knee-gap
1613 User manual: @ref{Changing context properties on the fly} for the
1619 @cindex Frenched staves
1620 Kneed beams are inserted automatically, when a large gap is detected
1621 between the note heads. This behavior can be tuned through the object
1624 Automatically kneed cross-staff beams cannot be used together with
1625 hidden staves. See @ref{Hiding staves}.
1627 Beams do not avoid collisions with symbols around the notes, such as
1628 texts and accidentals.
1633 @node Setting automatic beam behavior
1634 @subsection Setting automatic beam behavior
1636 @cindex @code{autoBeamSettings}
1637 @cindex @code{(end * * * *)}
1638 @cindex @code{(begin * * * *)}
1639 @cindex automatic beams, tuning
1640 @cindex tuning automatic beaming
1642 @c [TODO: use \applycontext]
1644 In normal time signatures, automatic beams can start on any note but can
1645 only end in a few positions within the measure: beams can end on a beat,
1646 or at durations specified by the properties in
1647 @code{autoBeamSettings}. The defaults for @code{autoBeamSettings}
1648 are defined in @file{scm/auto-beam.scm}.
1650 The value of @code{autoBeamSettings} is changed with two functions,
1652 #(override-auto-beam-setting
1653 '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b}
1655 #(revert-auto-beam-setting '(@var{be} @var{p} @var{q} @var{n} @var{m}))
1657 Here, @var{be} is the symbol @code{begin} or @code{end}, and
1658 @var{context} is an optional context (default: @code{'Voice}). It
1659 determines whether the rule applies to begin or end-points. The
1660 quantity @var{p}/@var{q} refers to the length of the beamed notes (and
1661 `@code{* *}' designates notes of any length), @var{n}/@var{M} refers
1662 to a time signature (wildcards `@code{* *}' may be entered to
1663 designate all time signatures), @var{a}/@var{b} is a duration. By
1664 default, this command changes settings for the current voice. It is
1665 also possible to adjust settings at higher contexts, by adding a
1666 @var{context} argument.
1668 For example, if automatic beams should end on every quarter note, use
1671 #(override-auto-beam-setting '(end * * * *) 1 4 'Staff)
1673 Since the duration of a quarter note is 1/4 of a whole note, it is
1674 entered as @code{(ly:make-moment 1 4)}.
1676 The same syntax can be used to specify beam starting points. In this
1677 example, automatic beams can only end on a dotted quarter note
1679 #(override-auto-beam-setting '(end * * * *) 3 8)
1681 In 4/4 time signature, this means that automatic beams could end only on
1682 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1683 3/8, has passed within the measure).
1685 Rules can also be restricted to specific time signatures. A rule that
1686 should only be applied in @var{N}/@var{M} time signature is formed by
1687 replacing the second asterisks by @var{N} and @var{M}. For example, a
1688 rule for 6/8 time exclusively looks like
1690 #(override-auto-beam-setting '(begin * * 6 8) @dots{})
1693 If a rule should be to applied only to certain types of beams, use the
1694 first pair of asterisks. Beams are classified according to the
1695 shortest note they contain. For a beam ending rule that only applies
1696 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1699 @cindex automatic beam generation
1701 @cindex @code{autoBeaming}
1704 If beams are used to indicate melismata in songs, then automatic
1705 beaming should be switched off. This is done by setting
1706 @code{autoBeaming} to @code{#f}.
1710 @cindex @code{\autoBeamOff}
1711 @code{\autoBeamOff},
1712 @cindex @code{\autoBeamOn}
1718 If a score ends while an automatic beam has not been ended and is
1719 still accepting notes, this last beam will not be typeset at all. The
1720 same holds polyphonic voices, entered with @code{<< @dots{} \\ @dots{}
1721 >>}. If a polyphonic voice ends while an automatic beam is still
1722 accepting notes, it is not typeset.
1724 The rules for ending a beam depend on the shortest note in a beam.
1725 So, while it is possible to have different ending rules for eight
1726 beams and sixteenth beams, a beam that contains both eight and
1727 sixteenth notes will use the rules for the sixteenth beam.
1729 In the example below, the autobeamer makes eighth beams and sixteenth
1730 end at three eighths. The third beam can only be corrected by
1731 specifying manual beaming.
1733 @lilypond[quote,raggedright,fragment,relative=1]
1734 #(override-auto-beam-setting '(end * * * *) 3 8)
1735 % rather show case where it goes wrong
1736 %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
1737 \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
1739 It is not possible to specify beaming parameters that act differently in
1740 different parts of a measure. This means that it is not possible to use
1741 automatic beaming in irregular meters such as @code{5/8}.
1743 @node Beam formatting
1744 @subsection Beam formatting
1747 When a beam falls in the middle of the staff, the beams point normally
1748 down. However, this behaviour can be altered with the
1749 @code{neutral-direction} property.
1755 \override Beam #'neutral-direction = #-1
1757 \override Beam #'neutral-direction = #1
1763 @section Accidentals
1766 This section describes how to change the way that accidentals are
1767 inserted automatically before the running notes.
1769 Common rules for typesetting accidentals have been canned in a
1770 function. This function is called as follows
1772 @cindex @code{set-accidental-style}
1774 #(set-accidental-style 'modern 'Voice)
1777 The function takes two arguments: a symbol that denotes the style (in
1778 the example, @code{modern}), and another symbol that denotes the
1779 context name (in this example, @code{Voice}). If no context name is
1780 supplied, @code{Staff} is the default.
1782 The following styles are supported
1785 This is the default typesetting behavior. It should correspond
1786 to 18th century common practice: Accidentals are
1787 remembered to the end of the measure in which they occur and
1788 only on their own octave.
1792 The normal behavior is to remember the accidentals on
1793 Staff-level. This variable, however, typesets accidentals
1794 individually for each voice. Apart from that, the rule is similar to
1798 accidentals from one voice do not get canceled in other
1799 voices, which is often unwanted result
1801 @lilypond[quote,raggedright,relative=1,fragment,verbatim]
1803 #(set-accidental-style 'voice)
1810 The @code{voice} option should be used if the voices
1811 are to be read solely by individual musicians. If the staff is to be
1812 used by one musician (e.g. a conductor) then
1813 @code{modern} or @code{modern-cautionary}
1814 should be used instead.
1817 @cindex @code{modern} style accidentals
1818 This rule corresponds to the common practice in the 20th
1820 This rule prints the same accidentals as @code{default}, but temporary
1821 accidentals also are canceled in other octaves. Furthermore,
1822 in the same octave, they also get canceled in the following
1825 @lilypond[quote,raggedright,fragment,verbatim]
1826 #(set-accidental-style 'modern)
1827 cis' c'' cis'2 | c'' c'
1830 @item @code{modern-cautionary}
1831 @cindex @code{modern-cautionary}
1832 This rule is similar to @code{modern}, but the
1833 ``extra'' accidentals (the ones not typeset by
1834 @code{default}) are typeset as cautionary accidentals.
1835 They are printed in reduced size or with parentheses
1836 @lilypond[quote,raggedright,fragment,verbatim]
1837 #(set-accidental-style 'modern-cautionary)
1838 cis' c'' cis'2 | c'' c'
1841 @cindex @code{modern-voice}
1843 This rule is used for multivoice accidentals to be read both by musicians
1844 playing one voice and musicians playing all voices. Accidentals are
1845 typeset for each voice, but they @emph{are} canceled across voices in
1846 the same @internalsref{Staff}.
1848 @cindex @code{modern-voice-cautionary}
1849 @item modern-voice-cautionary
1850 This rule is the same as @code{modern-voice}, but with the extra
1851 accidentals (the ones not typeset by @code{voice}) typeset
1852 as cautionaries. Even though all accidentals typeset by
1853 @code{default} @emph{are} typeset by this variable then
1854 some of them are typeset as cautionaries.
1857 @cindex @code{piano} accidentals
1858 This rule reflects 20th century practice for piano notation. Very similar to
1859 @code{modern} but accidentals also get canceled
1860 across the staves in the same @internalsref{GrandStaff} or
1861 @internalsref{PianoStaff}.
1863 @item piano-cautionary
1864 @cindex @code{#(set-accidental-style 'piano-cautionary)}
1865 As @code{#(set-accidental-style 'piano)} but with the extra accidentals
1866 typeset as cautionaries.
1869 @cindex @code{no-reset} accidental style
1871 This is the same as @code{default} but with accidentals lasting
1872 ``forever'' and not only until the next measure
1873 @lilypond[quote,raggedright,fragment,verbatim,relative=1]
1874 #(set-accidental-style 'no-reset)
1879 This is sort of the opposite of @code{no-reset}: Accidentals
1880 are not remembered at all---and hence all accidentals are
1881 typeset relative to the key signature, regardless of what was
1884 @lilypond[quote,raggedright,fragment,verbatim,relative=1]
1885 #(set-accidental-style 'forget)
1886 \key d\major c4 c cis cis d d dis dis
1893 Program reference: @internalsref{Accidental_engraver},
1894 @internalsref{Accidental}, and @internalsref{AccidentalPlacement}.
1899 Simultaneous notes are considered to be entered in sequential
1900 mode. This means that in a chord the accidentals are typeset as if the
1901 notes in the chord happened once at a time - in the order in which
1902 they appear in the input file.
1904 This is a problem when accidentals in a chord depend on each other,
1905 which does not happen for the default accidental style. The problem
1906 can be solved by manually inserting @code{!} and @code{?} for the
1910 @node Expressive marks
1911 @section Expressive marks
1914 @c todo: should change ordering
1915 @c where to put text spanners, metronome marks,
1924 * Analysis brackets::
1927 * Fingering instructions::
1938 A slur indicates that notes are to be played bound or @emph{legato}.
1940 They are entered using parentheses
1941 @lilypond[quote,relative=2,fragment,verbatim]
1942 f( g a) a8 b( a4 g2 f4)
1946 The direction of a slur can be set with the
1950 \override Slur #'direction = #UP
1951 \slurUp % shortcut for the previous line
1955 However, there is a convenient shorthand for forcing slur
1956 directions. By adding @code{_} or @code{^} before the opening
1957 parentheses, the direction is also set. For example,
1959 @lilypond[relative=2,verbatim,fragment]
1966 @cindex @code{\slurUp}
1968 @cindex @code{\slurDown}
1970 @cindex @code{\slurBoth}
1972 @cindex @code{\slurDotted}
1974 @cindex @code{\slurSolid}
1979 Program reference: @seeinternals{Slur}, and @internalsref{SlurEvent}.
1983 @cindex Adjusting slurs
1985 @node Phrasing slurs
1986 @subsection Phrasing slurs
1988 @cindex phrasing slurs
1989 @cindex phrasing marks
1991 A phrasing slur (or phrasing mark) connects chords and is used to
1992 indicate a musical sentence. It is started using @code{\(} and @code{\)}
1995 @lilypond[quote,fragment,verbatim,relative=1]
1996 \time 6/4 c'\( d( e) f( e) d\)
1999 Typographically, the phrasing slur behaves almost exactly like a
2000 normal slur. However, they are treated as different objects. A
2001 @code{\slurUp} will have no effect on a phrasing slur; instead, use
2002 @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
2003 @code{\phrasingSlurBoth}.
2005 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth}
2006 will only affect normal slurs and not phrasing slurs.
2010 @cindex @code{\phrasingSlurUp}
2011 @code{\phrasingSlurUp},
2012 @cindex @code{\phrasingSlurDown}
2013 @code{\phrasingSlurDown},
2014 @cindex @code{\phrasingSlurBoth}
2015 @code{\phrasingSlurBoth}.
2019 Program reference: see also @internalsref{PhrasingSlur}, and
2020 @internalsref{PhrasingSlurEvent}.
2024 Putting phrasing slurs over rests leads to spurious warnings.
2027 @subsection Breath marks
2029 Breath marks are entered using @code{\breathe}
2032 @lilypond[quote,fragment,relative=1,verbatim]
2036 The glyph of the breath mark can be tuned by overriding the
2037 @code{text} property of the @code{BreathingSign} layout object with
2038 any markup text. For example,
2039 @lilypond[quote,fragment,verbatim,relative=1]
2041 \override BreathingSign #'text
2042 = #(make-musicglyph-markup "scripts-rvarcomma")
2049 Program reference: @internalsref{BreathingSign},
2050 @internalsref{BreathingSignEvent}.
2052 Examples: @inputfileref{input/regression,breathing-sign.ly}.
2055 @node Metronome marks
2056 @subsection Metronome marks
2059 @cindex beats per minute
2060 @cindex metronome marking
2062 Metronome settings can be entered as follows
2064 \tempo @var{duration} = @var{per-minute}
2067 In the MIDI output, they are interpreted as a tempo change, and in the
2068 paper output, a metronome marking is printed
2069 @cindex @code{\tempo}
2070 @lilypond[quote,fragment,verbatim]
2076 Program reference: @internalsref{MetronomeChangeEvent}.
2081 @subsection Text spanners
2082 @cindex Text spanners
2084 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
2085 are written as texts, and extended over many measures with dotted
2086 lines. Such texts are created using text spanners: attach
2087 @code{\startTextSpan} and @code{\stopTextSpan} to the start and ending
2088 note of the spanner.
2090 The string to be printed, as well as the style, is set through object
2093 @lilypond[quote,fragment,relative=1,verbatim]
2096 \override TextSpanner #'direction = #-1
2097 \override TextSpanner #'edge-text = #'("rall " . "")
2098 c2\startTextSpan b c\stopTextSpan a
2105 Internals @internalsref{TextSpanEvent},
2106 @internalsref{TextSpanner}.
2108 Examples: @inputfileref{input/regression,text-spanner.ly}.
2111 @node Analysis brackets
2112 @subsection Analysis brackets
2114 @cindex phrasing brackets
2115 @cindex musicological analysis
2116 @cindex note grouping bracket
2118 Brackets are used in musical analysis to indicate structure in musical
2119 pieces. LilyPond supports a simple form of nested horizontal brackets.
2120 To use this, add the @internalsref{Horizontal_bracket_engraver} to
2121 @internalsref{Staff} context. A bracket is started with
2122 @code{\startGroup} and closed with @code{\stopGroup}
2124 @lilypond[quote,raggedright,verbatim]
2127 c4\startGroup\startGroup
2130 c4\stopGroup\stopGroup
2134 \Staff \consists "Horizontal_bracket_engraver"
2140 Program reference: @internalsref{HorizontalBracket},
2141 @internalsref{NoteGroupingEvent}.
2143 Examples: @inputfileref{input/regression,note-group-bracket.ly}.
2147 @subsection Articulations
2148 @cindex Articulations
2150 @cindex articulations
2154 A variety of symbols can appear above and below notes to indicate
2155 different characteristics of the performance. They are added to a note
2156 by adding a dash and the character signifying the
2157 articulation. They are demonstrated here
2159 @lilypondfile[quote,raggedright]{script-abbreviations.ly}
2161 The meanings of these shorthands can be changed. See
2162 @file{ly/script-init.ly} for examples.
2165 The script is automatically placed, but the direction can be forced as
2166 well. @code{_} will put them down, and @code{^} will put them up,
2169 @lilypond[quote,fragment,verbatim]
2173 Other symbols can be added using the syntax
2174 @var{note}@code{\}@var{name}, e.g. @code{c4\fermata}. Again, they
2175 can be forced up or down using @code{^} and @code{_},
2178 @lilypond[quote,verbatim,fragment,relative=2]
2179 c\fermata c^\fermata c_\fermata
2186 @cindex staccatissimo
2195 @cindex organ pedal marks
2204 @cindex prallmordent
2208 @cindex thumb marking
2213 Here is a chart showing all scripts available,
2215 @lilypondfile[quote]{script-chart.ly}
2218 The vertical ordering of scripts is controlled with the
2219 @code{script-priority} property. The lower this number, the closer it
2220 will be put to the note. In this example, the
2221 @internalsref{TextScript} (the sharp symbol) first has the lowest
2222 priority, so it is put lowest in the first example. In the second, the
2223 prall trill (the @internalsref{Script}) has the lowest, so it on the
2224 inside. When two objects have the same priority, the order in which
2225 they are entered decides which one comes first.
2228 @lilypond[verbatim,raggedright]
2230 \once \override TextScript #'script-priority = #-100
2231 a4^\prall^\markup { \sharp }
2233 \once \override Script #'script-priority = #-100
2234 a4^\prall^\markup { \sharp }
2243 Program reference: @internalsref{ScriptEvent}, and @internalsref{Script}.
2247 These signs appear in the printed output but have no effect on the
2248 MIDI rendering of the music.
2252 @node Running trills
2253 @subsection Running trills
2255 Long running trills are made with @code{\startTrillSpan} and
2256 @code{\stopTrillSpan},
2259 @lilypond[verbatim,raggedright]
2260 \relative \new Voice {
2261 << { c1 \startTrillSpan }
2262 { s2. \grace { d16[\stopTrillSpan e] } } >>
2268 @code{\startTrillSpan},
2269 @cindex @code{\startTrillSpan}
2270 @code{\stopTrillSpan}.
2271 @cindex @code{\stopTrillSpan}
2275 Program reference: @internalsref{TrillSpanner},
2276 @internalsref{TrillSpanEvent}.
2278 @node Fingering instructions
2279 @subsection Fingering instructions
2283 Fingering instructions can be entered using
2285 @var{note}-@var{digit}
2287 For finger changes, use markup texts
2289 @lilypond[quote,verbatim,raggedright,fragment]
2290 c'4-1 c'4-2 c'4-3 c'4-4
2291 c'^\markup { \finger "2-3" }
2294 @cindex finger change
2299 You can use the thumb-script to indicate that a note should be
2300 played with the thumb (e.g. in cello music)
2302 @lilypond[quote,verbatim,raggedright,fragment]
2303 <a'_\thumb a''-3>8 <b'_\thumb b''-3>
2306 Fingerings for chords can also be added to individual notes
2307 of the chord by adding them after the pitches
2308 @lilypond[quote,verbatim,raggedright,fragment,relative=2]
2309 < c-1 e-2 g-3 b-5 >4
2313 In this case, setting @code{fingeringOrientations} will put fingerings next
2316 @lilypond[quote,verbatim,raggedright,fragment,relative=1]
2317 \set fingeringOrientations = #'(left down)
2318 <c-1 es-2 g-4 bes-5 > 4
2319 \set fingeringOrientations = #'(up right down)
2320 <c-1 es-2 g-4 bes-5 > 4
2323 Using this feature, it is also possible to put fingering instructions
2324 very close to note heads in monophonic music,
2326 @lilypond[verbatim,raggedright]
2328 \set fingeringOrientations = #'(right)
2336 Program reference: @internalsref{FingerEvent}, and @internalsref{Fingering}.
2338 Examples: @inputfileref{input/regression,finger-chords.ly}.
2341 @subsection Text scripts
2342 @cindex Text scripts
2344 @cindex text items, non-empty
2345 @cindex non-empty texts
2347 It is possible to place arbitrary strings of text or markup text (see
2348 @ref{Text markup}) above or below notes by using a string
2349 @code{c^"text"}. By default, these indications do not influence the
2350 note spacing, but by using the command @code{\fatText}, the widths
2351 will be taken into account
2353 @lilypond[quote,fragment,raggedright,verbatim]
2355 c4^"longtext" \fatText c4_"longlongtext" c4
2359 More complex formatting may also be added to a note by using the
2361 @lilypond[fragment,raggedright,verbatim]
2363 c'4^\markup { bla \bold bla }
2367 The @code{\markup} is described in more detail in
2373 @cindex @code{\fatText}
2375 @cindex @code{\emptyText}
2380 In this manual: @ref{Text markup}.
2382 Program reference: @internalsref{TextScriptEvent}, @internalsref{TextScript}.
2388 @subsection Grace notes
2391 @c should have blurb about accaciatura / appogiatura
2393 @cindex @code{\grace}
2397 Grace notes are ornaments that are written out. The most common ones
2398 are acciaccatura, which should be played as very short. It is denoted
2399 by a slurred small note with a slashed stem. The appoggiatura is a
2400 grace note that takes a fixed fraction of the main note, is and
2401 denoted as a slurred note in small print without a slash.
2402 They are entered with the commands @code{\acciaccatura} and
2403 @code{\appoggiatura}, as demonstrated in the following example
2406 @cindex appoggiatura
2407 @cindex acciaccatura
2409 @lilypond[quote,relative=2,verbatim,fragment]
2410 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
2411 \acciaccatura { g16[ f] } e4
2414 Both are special forms of the @code{\grace} command. By prefixing this
2415 keyword to a music expression, a new one is formed, which will be
2416 printed in a smaller font and takes up no logical time in a measure.
2418 @lilypond[quote,relative=2,verbatim,fragment]
2420 \grace { c16[ d16] } c2 c4
2424 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
2425 @code{\grace} command does not start a slur.
2427 Internally, timing for grace notes is done using a second, `grace'
2428 time. Every point in time consists of two rational numbers: one
2429 denotes the logical time, one denotes the grace timing. The above
2430 example is shown here with timing tuples
2432 @lilypond[quote,raggedright]
2435 c4 \grace c16 c4 \grace {
2438 \new Lyrics \lyrics {
2439 \override LyricText #'font-family = #'typewriter
2443 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
2444 \markup { (\fraction 1 4 , 0 ) } 4
2446 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2447 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2449 \markup { ( \fraction 2 4 , 0 ) }
2455 The placement of grace notes is synchronized between different staves.
2456 In the following example, there are two sixteenth graces notes for
2457 every eighth grace note
2459 @lilypond[quote,relative=2,verbatim,fragment]
2460 << \new Staff { e4 \grace { c16[ d e f] } e4 }
2461 \new Staff { c4 \grace { g8[ b] } c4 } >>
2466 If you want to end a note with a grace, the standard trick is to put
2467 the grace notes after a ``space note''
2469 @lilypond[quote,fragment,verbatim,relative=2]
2472 { s2 \grace { c16[ d] } } >>
2478 By adjusting the duration of the skip note (here it is a half-note),
2479 the space between the main-note and the grace is adjusted.
2482 A @code{\grace} section will introduce special typesetting settings,
2483 for example, to produce smaller type, and set directions. Hence, when
2484 introducing layout tweaks, they should be inside the grace section,
2486 @lilypond[quote,fragment,verbatim,relative=2]
2489 \override Stem #'direction = #-1
2491 \revert Stem #'direction
2498 The overrides should also be reverted inside the grace section.
2500 The layout of grace sections can be changed throughout the music using
2501 the function @code{add-grace-property}. The following example
2502 undefines the Stem direction for this grace, so stems do not always
2507 #(add-grace-property 'Voice 'Stem 'direction '())
2513 Another option is to change the variables @code{startGraceMusic},
2514 @code{stopGraceMusic}, @code{startAcciaccaturaMusic},
2515 @code{stopAcciaccaturaMusic}, @code{startAppoggiaturaMusic},
2516 @code{stopAppoggiaturaMusic}. More information is in the file
2517 @file{ly/grace-init.ly}.
2522 Program reference: @internalsref{GraceMusic}.
2526 A score that starts with a @code{\grace} section needs an explicit
2527 @code{\context Voice} declaration, otherwise the main note and grace
2528 note end up on different staves.
2530 Grace note synchronization can also lead to surprises. Staff notation,
2531 such as key signatures, bar lines, etc. are also synchronized. Take
2532 care when you mix staves with grace notes and staves without, for example,
2534 @lilypond[quote,relative=2,verbatim,fragment]
2535 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2536 \new Staff { c4 \bar "|:" d4 } >>
2540 This can be remedied by inserting grace skips, for the above example
2543 \new Staff @{ c4 \bar "|:" \grace s16 d4 @}
2546 Grace sections should only be used within sequential music
2547 expressions. Nesting or juxtaposing grace sections is not supported,
2548 and might produce crashes or other errors.
2552 @subsection Glissando
2555 @cindex @code{\glissando}
2557 A glissando is a smooth change in pitch. It is denoted by a line or a
2558 wavy line between two notes. It is requested by attaching
2559 @code{\glissando} to a note
2561 @lilypond[quote,fragment,relative=1,verbatim]
2567 Program reference: @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2569 Example files: @file{input/regression,glissando.ly}
2575 Printing text over the line (such as @emph{gliss.}) is not supported.
2579 @subsection Dynamics
2592 @cindex @code{\ffff}
2602 Absolute dynamic marks are specified using a command after a note
2603 @code{c4\ff}. The available dynamic marks are @code{\ppp},
2604 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2605 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2606 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}
2608 @lilypond[quote,verbatim,raggedright,fragment,relative=1]
2609 c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2619 A crescendo mark is started with @code{\<} and terminated with
2620 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2621 with @code{\!}. Because these marks are bound to notes, if you must
2622 use spacer notes if multiple marks are needed during one note
2624 @lilypond[quote,fragment,verbatim]
2625 c''\< c''\! d''\> e''\!
2626 << f''1 { s4 s4\< s4\! \> s4\! } >>
2628 This may give rise to very short hairpins. Use @code{minimum-length}
2629 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2633 \override Staff.Hairpin #'minimum-length = #5
2636 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2637 is an example how to do it
2639 @lilypond[quote,fragment,relative=2,verbatim]
2649 You can also supply your own texts
2650 @lilypond[quote,fragment,relative=1,verbatim]
2652 \set crescendoText = \markup { \italic "cresc. poco" }
2653 \set crescendoSpanner = #'dashed-line
2663 @cindex @code{\dynamicUp}
2665 @cindex @code{\dynamicDown}
2666 @code{\dynamicDown},
2667 @cindex @code{\dynamicBoth}
2668 @code{\dynamicBoth}.
2670 @cindex direction, of dynamics
2674 Program reference: @internalsref{CrescendoEvent},
2675 @internalsref{DecrescendoEvent}, and
2676 @internalsref{AbsoluteDynamicEvent}.
2678 Dynamics are @internalsref{DynamicText} and @internalsref{Hairpin}
2679 objects. Vertical positioning of these symbols is handled by the
2680 @internalsref{DynamicLineSpanner} object.
2688 @cindex @code{\repeat}
2691 Repetition is a central concept in music, and multiple notations exist
2692 for repetitions. In LilyPond, most of these notations can be captured
2693 in a uniform syntax. One of the advantages is that repeats entered in
2694 this way can be rendered in MIDI accurately.
2696 The following types of repetition are supported
2700 Repeated music is fully written (played) out. Useful for MIDI
2701 output, and entering repetitive music.
2704 Repeats are not written out, but alternative endings (volte) are
2705 printed, left to right with brackets. This is the standard notation
2706 for repeats with alternatives.
2710 Alternative endings are written stacked. This has limited use but may be
2711 used to typeset two lines of lyrics in songs with repeats, see
2712 @inputfileref{input,star-spangled-banner.ly}.
2720 Make beat or measure repeats. These look like percent signs.
2726 * Repeats and MIDI::
2727 * Manual repeat commands::
2729 * Tremolo subdivisions::
2734 @subsection Repeat syntax
2737 LilyPond has one syntactic construct for specifying different types of
2738 repeats. The syntax is
2741 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2744 If you have alternative endings, you may add
2745 @cindex @code{\alternative}
2747 \alternative @code{@{} @var{alternative1}
2749 @var{alternative3} @dots{} @code{@}}
2751 where each @var{alternative} is a music expression. If you do not
2752 give enough alternatives for all of the repeats, the first alternative
2753 is assumed to be played more than once.
2755 Standard repeats are used like this
2756 @lilypond[quote,fragment,verbatim,relative=2]
2758 \repeat volta 2 { c4 d e f }
2759 \repeat volta 2 { f e d c }
2762 With alternative endings
2763 @lilypond[quote,fragment,verbatim,relative=2]
2765 \repeat volta 2 {c4 d e f}
2766 \alternative { {d2 d} {f f,} }
2770 @lilypond[quote,fragment,verbatim,relative=2]
2773 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2774 \alternative { { g4 g g } { a | a a a a | b2. } }
2778 It is possible to shorten volta brackets
2779 by setting @code{voltaSpannerDuration}. In the next example, the
2780 bracket only lasts one measure, which is a duration of 3/4.
2784 @lilypond[verbatim,raggedright]
2788 \set Staff.voltaSpannerDuration = #(ly:make-moment 3 4)
2789 \repeat "volta" 5 { d d d }
2790 \alternative { { e e e f f f }
2800 Brackets for the repeat are normally only printed over the topmost
2801 staff. This can be adjusted by setting the @code{voltaOnThisStaff}
2802 property @inputfileref{input/regression,volta-multi-staff.ly},
2803 @inputfileref{input/regression,volta-chord-names.ly}
2808 A nested repeat like
2817 is ambiguous, since it is is not clear to which @code{\repeat} the
2818 @code{\alternative} belongs. This ambiguity is resolved by always
2819 having the @code{\alternative} belong to the inner @code{\repeat}.
2820 For clarity, it is advisable to use braces in such situations.
2825 Timing information is not remembered at the start of an alternative,
2826 so after a repeat timing information must be reset by hand, for
2827 example by setting @code{Score.measurePosition} or entering
2828 @code{\partial}. Similarly, slurs or ties are also not repeated.
2833 @node Repeats and MIDI
2834 @subsection Repeats and MIDI
2836 @cindex expanding repeats
2838 An advantage of the unified syntax for repeats, is that all repeats
2839 may be played out for the MIDI output. This is achieved by
2840 applying the @code{\unfoldrepeats} music function.
2842 @lilypond[verbatim,raggedright]
2845 \repeat tremolo 8 {c'32 e' }
2846 \repeat percent 2 { c''8 d'' }
2847 \repeat volta 2 {c'4 d' e' f'}
2856 When creating a score file using @code{\unfoldrepeats} for midi, then
2857 it is necessary to make two @code{\score} blocks. One for MIDI, with
2858 unfolded repeats, and one for notation, eg.
2866 \unfoldrepeats @var{..music..}
2871 @node Manual repeat commands
2872 @subsection Manual repeat commands
2874 @cindex @code{repeatCommands}
2876 The property @code{repeatCommands} can be used to control the layout of
2877 repeats. Its value is a Scheme list of repeat commands, where each repeat
2881 @item @code{start-repeat},
2882 which prints a @code{|:} bar line;
2883 @item @code{end-repeat},
2884 which prints a @code{:|} bar line;
2885 @item @code{(volta @var{text})},
2886 which prints a volta bracket saying @var{text}: The text can be specified as
2887 a text string or as a markup text, see @ref{Text markup}. Do not
2888 forget to change the font, as the default number font does not contain
2889 alphabetic characters;
2890 @item @code{(volta #f)}, which
2891 stops a running volta bracket.
2894 @lilypond[quote,verbatim,fragment,relative=2]
2896 \set Score.repeatCommands = #'((volta "93") end-repeat)
2898 \set Score.repeatCommands = #'((volta #f))
2906 Program reference: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2907 @internalsref{VoltaRepeatedMusic},
2908 @internalsref{UnfoldedRepeatedMusic}, and
2909 @internalsref{FoldedRepeatedMusic}.
2911 @node Tremolo repeats
2912 @subsection Tremolo repeats
2913 @cindex tremolo beams
2915 To place tremolo marks between notes, use @code{\repeat} with tremolo
2917 @lilypond[quote,verbatim,raggedright]
2918 \context Voice \relative c' {
2919 \repeat "tremolo" 8 { c16 d16 }
2920 \repeat "tremolo" 4 { c16 d16 }
2921 \repeat "tremolo" 2 { c16 d16 }
2925 Tremolo marks can also be put on a single note. In this case, the
2926 note should not be surrounded by braces.
2927 @lilypond[quote,verbatim,raggedright]
2928 \repeat "tremolo" 4 c'16
2931 Similar output is obtained using the tremolo subdivision, described in
2932 @ref{Tremolo subdivisions}.
2936 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
2938 Program reference: tremolo beams are @internalsref{Beam} objects. Single stem
2939 tremolos are @internalsref{StemTremolo} objects. The music expression is
2940 @internalsref{TremoloEvent}.
2942 Example files: @inputfileref{input/regression,chord-tremolo.ly},
2943 @inputfileref{input/regression,stem-tremolo.ly}.
2945 @node Tremolo subdivisions
2946 @subsection Tremolo subdivisions
2947 @cindex tremolo marks
2948 @cindex @code{tremoloFlags}
2950 Tremolo marks can be printed on a single note by adding
2951 `@code{:}[@var{number}]' after the note. The number indicates the
2952 duration of the subdivision, and it must be at least 8. A
2953 @var{length} value of 8 gives one line across the note stem. If the
2954 length is omitted, the last value (stored in @code{tremoloFlags}) is
2957 @lilypond[quote,verbatim,fragment]
2958 c'2:8 c':32 | c': c': |
2961 @c [TODO : stok is te kort bij 32en]
2965 Tremolos entered in this way do not carry over into the MIDI output.
2969 In this manual: @ref{Tremolo repeats}.
2971 Elsewhere: @internalsref{StemTremolo}, @internalsref{TremoloEvent}.
2973 @node Measure repeats
2974 @subsection Measure repeats
2976 @cindex percent repeats
2977 @cindex measure repeats
2979 In the @code{percent} style, a note pattern can be repeated. It is
2980 printed once, and then the pattern is replaced with a special sign.
2981 Patterns of one and two measures are replaced by percent-like signs,
2982 patterns that divide the measure length are replaced by slashes
2984 @lilypond[quote,verbatim,raggedright]
2986 \repeat "percent" 4 { c'4 }
2987 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
2993 Program reference: @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
2994 @internalsref{PercentRepeatedMusic}, and
2995 @internalsref{DoublePercentRepeat}.
2999 @node Rhythmic music
3000 @section Rhythmic music
3004 * Showing melody rhythms::
3005 * Entering percussion::
3006 * Percussion staves::
3010 @node Showing melody rhythms
3011 @subsection Showing melody rhythms
3013 Sometimes you might want to show only the rhythm of a melody. This
3014 can be done with the rhythmic staff. All pitches of notes on such a
3015 staff are squashed, and the staff itself has a single line
3017 @lilypond[quote,fragment,relative=1,verbatim]
3018 \context RhythmicStaff {
3020 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
3026 Program reference: @internalsref{RhythmicStaff}.
3028 Examples: @inputfileref{input/regression,rhythmic-staff.ly}.
3031 @node Entering percussion
3032 @subsection Entering percussion
3038 Percussion notes may be entered in @code{\drums} mode, which is
3039 similar to the standard mode for entering notes. Each piece of
3040 percussion has a full name and an abbreviated name, and both can be used
3043 @lilypond[quote,raggedright,verbatim]
3044 \new DrumStaff \drums {
3045 hihat hh bassdrum bd
3049 The complete list of drum names is in the init file
3050 @file{ly/drumpitch-init.ly}.
3051 @c TODO: properly document this.
3055 Program reference: @internalsref{DrumNoteEvent}.
3057 @node Percussion staves
3058 @subsection Percussion staves
3062 A percussion part for more than one instrument typically uses a
3063 multi line staff where each position in the staff refers to one piece
3067 To typeset the music, the notes must be interpreted in a
3068 @internalsref{DrumStaff} and @internalsref{DrumVoice} contexts
3071 @lilypond[quote,raggedright,verbatim]
3072 up = \drums { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
3073 down = \drums { bassdrum4 snare8 bd r bd sn4 }
3075 \new DrumVoice { \voiceOne \up }
3076 \new DrumVoice { \voiceTwo \down }
3080 The above example shows verbose polyphonic notation. The short
3081 polyphonic notation, described in @ref{Polyphony}, can also be used if
3082 the @internalsref{DrumVoices} are instantiated by hand first. For example,
3084 @lilypond[quote,fragment,verbatim]
3086 \context DrumVoice = "1" { s1 *2 }
3087 \context DrumVoice = "2" { s1 *2 }
3091 { \repeat unfold 16 hh16 }
3100 There are also other layout possibilities. To use these, set the
3101 property @code{drumStyleTable} in context @internalsref{DrumVoice}.
3102 The following variables have been predefined
3106 This is the default. It typesets a typical drum kit on a five-line staff
3108 @lilypond[quote,noindent]
3109 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
3110 bd sn ss tomh tommh tomml toml tomfh tomfl }
3111 mus = \drums { cymc cyms cymr hh | hhc hho hhho hhp | \break cb hc
3112 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
3114 << \new DrumStaff\with {
3115 \remove Bar_engraver
3116 \remove Time_signature_engraver
3117 \override Stem #'transparent = ##t
3118 \override Stem #'Y-extent-callback = ##f
3119 minimumVerticalExtent = #'(-4.0 . 5.0)
3121 \context Lyrics \nam
3124 %% need to do this, because of indented @itemize
3127 \override LyricText #'font-family = #'typewriter
3128 \override BarNumber #'transparent =##T
3132 The drum scheme supports six different toms. When there fewer toms, simply
3133 select the toms that produce the desired result, i.e. to get toms on
3134 the three middle lines you use @code{tommh}, @code{tomml} and
3137 @item timbales-style
3138 This typesets timbales on a two line staff
3140 @lilypond[quote,raggedright]
3141 nam = \lyrics { timh ssh timl ssl cb }
3142 mus = \drums { timh ssh timl ssl cb s16 }
3145 \context DrumStaff \with {
3146 \remove Bar_engraver
3147 \remove Time_signature_engraver
3148 \override Stem #'transparent = ##t
3149 \override Stem #'Y-extent-callback = ##f
3150 \override StaffSymbol #'line-count = #2
3151 \override StaffSymbol #'staff-space = #2
3152 minimumVerticalExtent = #'(-3.0 . 4.0)
3153 drumStyleTable = #timbales-style
3156 \override LyricText #'font-family = #'typewriter
3162 This typesets congas on a two line staff
3164 @lilypond[quote,raggedright]
3165 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
3166 mus = \drums { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
3168 \context DrumStaff\with {
3169 \remove Bar_engraver
3170 \remove Time_signature_engraver
3171 drumStyleTable = #congas-style
3172 \override StaffSymbol #'line-count = #2
3174 %% this sucks; it will lengthen stems.
3175 \override StaffSymbol #'staff-space = #2
3176 \override Stem #'transparent = ##t
3177 \override Stem #'Y-extent-callback = ##f
3180 \override LyricText #'font-family = #'typewriter
3185 This typesets bongos on a two line staff
3187 @lilypond[quote,raggedright]
3188 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
3189 mus = \drums { boh boho bohm ssh bol bolo bolm ssl s16 }
3191 \context DrumStaff\with {
3192 \remove Bar_engraver
3193 \remove Time_signature_engraver
3194 \override StaffSymbol #'line-count = #2
3195 drumStyleTable = #bongos-style
3197 %% this sucks; it will lengthen stems.
3198 \override StaffSymbol #'staff-space = #2
3199 \override Stem #'transparent = ##t
3200 \override Stem #'Y-extent-callback = ##f
3203 \override LyricText #'font-family = #'typewriter
3208 @item percussion-style
3209 to typeset all kinds of simple percussion on one line staves
3210 @lilypond[quote,raggedright]
3211 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
3212 mus = \drums { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
3214 \context DrumStaff\with{
3215 \remove Bar_engraver
3216 drumStyleTable = #percussion-style
3217 \override StaffSymbol #'line-count = #1
3218 \remove Time_signature_engraver
3219 \override Stem #'transparent = ##t
3220 \override Stem #'Y-extent-callback = ##f
3223 \override LyricText #'font-family = #'typewriter
3230 If you do not like any of the predefined lists you can define your own
3231 list at the top of your file
3233 @lilypond[quote,raggedright,verbatim]
3235 (bassdrum default #f -1)
3236 (snare default #f 0)
3238 (pedalhihat xcircle "stopped" 2)
3239 (lowtom diamond #f 3)))
3240 up = \drums { hh8 hh hh hh hhp4 hhp }
3241 down = \drums { bd4 sn bd toml8 toml }
3244 \set DrumStaff.drumStyleTable
3245 = #(alist->hash-table mydrums)
3246 \new DrumVoice { \voiceOne \up }
3247 \new DrumVoice { \voiceTwo \down }
3254 Init files: @file{ly/drumpitch-init.ly}.
3256 Program reference: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
3260 Because general MIDI does not contain rim shots, the sidestick is used
3261 for this purpose instead.
3264 @section Piano music
3266 Piano staves are two normal staves coupled with a brace. The staves
3267 are largely independent, but sometimes voices can cross between the
3268 two staves. The same notation is also used for harps and other key
3269 instruments. The @internalsref{PianoStaff} is especially built to
3270 handle this cross-staffing behavior. In this section we discuss the
3271 @internalsref{PianoStaff} and some other pianistic peculiarities.
3275 * Automatic staff changes::
3276 * Manual staff switches::
3279 * Staff switch lines::
3280 * Cross staff stems::
3285 Dynamics are not centered, but workarounds do exist. See
3286 @inputfileref{input/template,piano-dynamics.ly}.
3288 @cindex cross staff stem
3289 @cindex stem, cross staff
3290 @cindex distance between staves in piano music
3292 The distance between the two staves is the same for all systems in the
3293 score. It is possible to override this per system, but it does require
3294 an arcane command incantation. See
3295 @inputfileref{input/test,piano-staff-distance.ly}.
3298 @node Automatic staff changes
3299 @subsection Automatic staff changes
3300 @cindex Automatic staff changes
3302 Voices can be made to switch automatically between the top and the bottom
3303 staff. The syntax for this is
3307 \autochange \context Voice @dots{}@var{music}@dots{}
3312 The two staves of the piano staff must be named @code{up} and
3315 A @code{\relative} section that is outside of @code{\autochange} has
3316 no effect on the pitches of @var{music}, so, if necessary, put
3317 @code{\relative} inside @code{\autochange} like
3321 \autochange \relative @dots{} \new Voice @dots{}
3326 The autochanger switches on basis of pitch (middle C is the turning
3327 point), and it looks ahead skipping over rests to switch in
3328 advance. Here is a practical example
3330 @lilypond[quote,verbatim,raggedright]
3331 \context PianoStaff <<
3332 \context Staff = "up" {
3333 \autochange \new Voice \relative c' {
3334 g4 a b c d r4 a g } }
3335 \context Staff = "down" {
3342 In this example, spacer rests are used to prevent empty staves from
3343 being terminated too soon.
3348 In this manual: @ref{Manual staff switches}.
3350 Program reference: @internalsref{AutoChangeMusic}.
3356 The staff switches may not end up in optimal places. For high
3357 quality output, staff switches should be specified manually.
3360 @code{\autochange} cannot be inside @code{\times}.
3362 Internally, the @code{\partcombine} interprets both arguments as
3363 @code{Voice}s named @code{one} and @code{two}, and then decides when
3364 the parts can be combined. Consequently, if the arguments switch to
3365 differently named @internalsref{Voice} contexts, the events in those
3369 @node Manual staff switches
3370 @subsection Manual staff switches
3372 @cindex manual staff switches
3373 @cindex staff switch, manual
3375 Voices can be switched between staves manually, using the command
3377 \change Staff = @var{staffname} @var{music}
3381 The string @var{staffname} is the name of the staff. It switches the
3382 current voice from its current staff to the Staff called
3383 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3384 @code{"down"}. The @context{Staff} referred to must already exist, so
3385 usually the setup for a score will start with a setup of the staves,
3389 \context Staff = up @{
3390 \skip 1 * 10 %@emph{ keep staff alive}
3392 \context Staff = down @{
3393 \skip 1 * 10 %@emph{idem}
3399 and the @context{Voice} is inserted afterwards
3402 \context Staff = down
3403 \new Voice @{ @dots{} \change Staff = up @dots{} @}
3411 Pianos have pedals that alter the way sound is produced. Generally, a
3412 piano has three pedals, sustain, una corda, and sostenuto.
3415 Piano pedal instruction can be expressed by attaching
3416 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3417 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3420 @lilypond[quote,fragment,verbatim]
3421 c'4\sustainDown c'4\sustainUp
3424 What is printed can be modified by setting @code{pedal@var{X}Strings},
3425 where @var{X} is one of the pedal types: @code{Sustain},
3426 @code{Sostenuto} or @code{UnaCorda}. Refer to
3427 @internalsref{SustainPedal} in the program reference for more
3430 Pedals can also be indicated by a sequence of brackets, by setting the
3431 @code{pedalSustainStyle} property to bracket objects
3433 @lilypond[quote,fragment,verbatim,relative=2]
3434 \set Staff.pedalSustainStyle = #'bracket
3436 b\sustainUp\sustainDown
3437 b g \sustainUp a \sustainDown \bar "|."
3440 A third style of pedal notation is a mixture of text and brackets,
3441 obtained by setting the @code{pedalSustainStyle} style property to
3444 @lilypond[quote,fragment,verbatim,relative=2]
3445 \set Staff.pedalSustainStyle = #'mixed
3447 b\sustainUp\sustainDown
3448 b g \sustainUp a \sustainDown \bar "|."
3451 The default `*Ped.' style for sustain and damper pedals corresponds to
3452 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
3455 @lilypond[quote,fragment,verbatim,relative=2]
3456 c\sostenutoDown d e c, f g a\sostenutoUp
3459 For fine-tuning of the appearance of a pedal bracket, the properties
3460 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3461 @code{PianoPedalBracket} objects (see
3462 @internalsref{PianoPedalBracket} in the Program reference) can be modified. For example, the
3463 bracket may be extended to the end of the note head
3465 @lilypond[quote,fragment,verbatim,relative=2]
3466 \override Staff.PianoPedalBracket
3467 #'shorten-pair = #'(0 . -1.0)
3468 c\sostenutoDown d e c, f g a\sostenutoUp
3472 @subsection Arpeggio
3475 @cindex broken arpeggio
3476 @cindex @code{\arpeggio}
3478 You can specify an arpeggio sign on a chord by attaching an
3479 @code{\arpeggio} to a chord
3482 @lilypond[quote,fragment,relative=1,verbatim]
3486 When an arpeggio crosses staves, you attach an arpeggio to the chords
3487 in both staves, and set
3488 @internalsref{PianoStaff}.@code{connectArpeggios}
3490 @lilypond[quote,fragment,relative=1,verbatim]
3491 \context PianoStaff <<
3492 \set PianoStaff.connectArpeggios = ##t
3493 \new Staff { <c' e g c>\arpeggio }
3494 \new Staff { \clef bass <c,, e g>\arpeggio }
3498 The direction of the arpeggio is sometimes denoted by adding an
3499 arrowhead to the wiggly line
3501 @lilypond[quote,fragment,relative=1,verbatim]
3510 A square bracket on the left indicates that the player should not
3511 arpeggiate the chord
3513 @lilypond[quote,fragment,relative=1,verbatim]
3520 @cindex @code{\arpeggio}
3522 @cindex @code{\arpeggioUp}
3524 @cindex @code{\arpeggioDown}
3525 @code{\arpeggioDown},
3526 @cindex @code{\arpeggioBoth}
3527 @code{\arpeggioBoth},
3528 @cindex @code{\arpeggioBracket}
3529 @code{\arpeggioBracket}.
3533 Program reference: @internalsref{ArpeggioEvent} music expressions lead to
3534 @internalsref{Arpeggio} objects. Cross staff arpeggios are
3535 @internalsref{PianoStaff}.@internalsref{Arpeggio}.
3539 It is not possible to mix connected arpeggios and unconnected
3540 arpeggios in one @internalsref{PianoStaff} at the same time.
3542 @node Staff switch lines
3543 @subsection Staff switch lines
3546 @cindex follow voice
3547 @cindex staff switching
3550 @cindex @code{followVoice}
3552 Whenever a voice switches to another staff a line connecting the notes
3553 can be printed automatically. This is enabled if the property
3554 @code{PianoStaff.followVoice} is set to true
3556 @lilypond[quote,fragment,relative=1,verbatim]
3557 \context PianoStaff <<
3558 \set PianoStaff.followVoice = ##t
3559 \context Staff \context Voice {
3564 \context Staff=two { \clef bass \skip 1*2 }
3570 The associated object is @internalsref{VoiceFollower}.
3574 @cindex @code{\showStaffSwitch}
3575 @code{\showStaffSwitch},
3576 @cindex @code{\hideStaffSwitch}
3577 @code{\hideStaffSwitch}.
3580 @node Cross staff stems
3581 @subsection Cross staff stems
3583 The chords which cross staves may be produced by increasing the length
3584 of the stem in the lower stave, so it reaches the stem in the upper
3585 stave, or vice versa.
3587 @lilypond[raggedright,verbatim]
3588 stemExtend = \once \override Stem #'length = #22
3589 noFlag = \once \override Stem #'flag-style = #'no-flag
3590 \context PianoStaff <<
3592 \stemDown \stemExtend
3606 @section Vocal music
3609 The easiest way to add lyrics to a melody, is by appending
3614 \addlyrics @{ @var{the lyrics} @}
3617 to a melody. Here is an example,
3619 @lilypond[raggedright,verbatim]
3620 \relative { \time 3/4 c2 e4 g2. }
3621 \addlyrics { play the game }
3624 More stanzas can be added by adding more
3625 @code{\addlyrics} sections
3627 @lilypond[raggedright,verbatim]
3628 \relative { \time 3/4 c2 e4 g2. }
3629 \addlyrics { play the game }
3630 \addlyrics { speel het spel }
3631 \addlyrics { joue le jeu }
3634 The @code{\addlyrics} keyword has three functions: it interprets the
3635 following words as texts instead of notes, it sets up a context for
3636 printing texts (the @code{Lyrics} context), and it couples the melody
3637 with the lyrics, so the durations of both are aligned.
3639 These three functions can be controlled separately, and that is what
3640 the following sections are about.
3644 * The Lyrics context::
3645 * Flexibility in alignment::
3650 @node Entering lyrics
3651 @subsection Entering lyrics
3655 @cindex @code{\lyrics}
3658 Lyrics are entered in a special input mode. This mode is is introduced
3659 by the keyword @code{\lyrics}. In this mode you can enter lyrics,
3660 with punctuation and accents without any hassle. Syllables are
3661 entered like notes, but with pitches replaced by text. For example,
3663 \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
3666 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3667 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3668 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3669 any 8-bit character with ASCII code over 127, or a two-character
3670 combination of a backslash followed by one of @code{`}, @code{'},
3671 @code{"}, or @code{^}.
3673 Subsequent characters of a word can be any character that is not a digit
3674 and not white space. One important consequence of this is that a word
3675 can end with @code{@}}. The following example is usually a bug. The
3676 syllable includes a @code{@}}, and hence the opening brace is not balanced
3678 \lyrics @{ twinkle@}
3681 @cindex @code{\property}, in @code{\lyrics}
3682 Similarly, a period following a alphabetic sequence, is included in
3683 the resulting string. As a consequence, spaces must be inserted around
3686 \override Score . LyricText #'font-shape = #'italic
3690 @cindex spaces, in lyrics
3691 @cindex quotes, in lyrics
3693 Any @code{_} character which appears in an unquoted word is converted
3694 to a space. This provides a mechanism for introducing spaces into words
3695 without using quotes. Quoted words can also be used in Lyrics mode to
3696 specify words that cannot be written with the above rules. The
3697 following example incorporates double quotes
3700 \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3703 This example is slightly academic, since it gives better looking
3704 results to use matched single quotes, @code{``} and @code{''}
3706 \lyrics @{ He said: ``Let my peo ple go'' @}
3711 Centered hyphens are entered as `@code{-}@code{-}' between syllables.
3712 The hyphen will have variable length depending on the space between
3713 the syllables and it will be centered between the syllables.
3718 When a lyric is sung over many notes (this is called a melisma), this is
3719 indicated with a horizontal line centered between a syllable and the
3720 next one. Such a line is called an extender line, and it is entered as
3725 Program reference: events @internalsref{LyricEvent},
3726 @internalsref{HyphenEvent}, and @internalsref{ExtenderEvent}. Objects
3727 @internalsref{LyricHyphen}, @internalsref{LyricExtender} and
3728 @internalsref{LyricText}.
3730 Examples: @inputfileref{input/test,lyric-hyphen-retain.ly}.
3734 The definition of lyrics mode is too complex.
3738 @node The Lyrics context
3739 @subsection The Lyrics context
3742 Lyrics are printed by interpreting them in a @internalsref{Lyrics} context
3744 \context Lyrics \lyrics @dots{}
3747 @cindex automatic syllable durations
3748 @cindex @code{\lyricsto}
3749 @cindex lyrics and melodies
3751 This will place the lyrics according to the durations that were
3752 entered. The lyrics can also be aligned under a given melody
3753 automatically. In this case, it is no longer necessary to enter the
3754 correct duration for each syllable. This is achieved by combining the
3755 melody and the lyrics with the @code{\lyricsto} expression
3757 \lyricsto @var{name} \new Lyrics @dots{}
3760 This aligns the lyrics to the
3762 notes of the @internalsref{Voice} context called @var{name}, which has
3763 to exist. Therefore, normally the @code{Voice} is specified first, and
3764 then the lyrics are specified with @code{\lyricsto}. The command
3765 @code{\lyricsto} switches to @code{\lyrics} mode automatically, so the
3766 @code{\lyrics} keyword may be omitted.
3768 For different or more complex orderings, the best way is to setup the
3769 hierarchy of staves and lyrics first, e.g.
3771 \context ChoirStaff <<
3772 \context Lyrics = sopranoLyrics @{ s1 @}
3773 \context Voice = soprano @{ @emph{music} @}
3774 \context Lyrics = tenorLyrics @{ s1 @}
3775 \context Voice = tenor @{ @emph{music} @}
3778 and then combine the appropriate melodies and lyric lines
3780 \lyricsto "soprano" \context Lyrics = sopranoLyrics
3785 The final input would resemble
3788 << \context ChoirStaff << @emph{setup the music} >>
3789 \lyricsto "soprano" @emph{etc}
3790 \lyricsto "alto" @emph{etc}
3796 The @code{\lyricsto} command detects melismata: it only puts one
3797 syllable under a tied or slurred group of notes. If you want to force
3798 an unslurred group of notes to be a melisma, insert @code{\melisma}
3799 after the first note of the group, and @code{\melismaEnd} after the
3802 @lilypond[quote,relative=2,raggedright,fragment,verbatim]
3804 \context Voice = "lala" {
3812 \lyricsto "lala" \new Lyrics {
3818 In addition, notes are considered a melisma if they are manually
3819 beamed, and automatic beaming (see @ref{Setting automatic beam
3820 behavior}) is switched off. The criteria for deciding melismata can
3821 be tuned with the property @code{melismaBusyProperties}. See
3822 @internalsref{Melisma_translator} in the program reference for more
3825 Lyrics can also be entered without @code{\lyricsto}. In this case the
3826 durations of each syllable must be entered explicitly, for example,
3833 Alignment to a melody can be specified with the @code{associatedVoice}
3837 \set associatedVoice = #"melody"
3840 Here is an example demonstrating manual lyric durations,
3842 @lilypond[relative=1,verbatim,fragment]
3843 << \context Voice = melody {
3847 \new Lyrics \lyrics {
3848 \set associatedVoice = #"melody"
3854 @cindex choral score
3856 A complete example of a SATB score setup is in the file
3857 @inputfileref{input/template,satb.ly}.
3862 @code{\melisma}, @code{\melismaEnd}
3863 @cindex @code{\melismaEnd}
3864 @cindex @code{\melisma}
3868 Program reference: Music expressions: @internalsref{LyricCombineMusic},
3869 Contexts: @internalsref{Lyrics}, @internalsref{Melisma_translator}.
3871 Examples: @inputfileref{input/template,satb.ly},
3872 @inputfileref{input/regression,lyric-combine-new.ly},
3873 @c TODO: make separate section for melismata
3874 @inputfileref{input/test,lyrics-melisma-variants.ly}.
3875 @inputfileref{input/test,lyrics-melisma-faster.ly}.
3879 Melismata are not detected automatically, and extender lines must be
3883 For proper processing of extender lines, the
3884 @internalsref{Lyrics} and @internalsref{Voice} should be
3885 linked. This can be achieved either by using @code{\lyricsto} or by
3886 setting corresponding names for both contexts. The latter is explained
3887 in @ref{More stanzas}.
3889 @c TODO: document \new Staff << Voice \lyricsto >> bug
3891 @node Flexibility in alignment
3892 @subsection Flexibility in alignment
3895 Often, different stanzas of one song are put to one melody in slightly
3896 differing ways. Such variations can still be captured with
3899 One possibility is that the text has a melisma in one stanza, but
3900 multiple syllables in another one. One solution is to make the faster
3901 voice ignore the melisma. This is done by setting
3902 @code{ignoreMelismata} in the Lyrics context.
3904 There has one tricky aspect. The setting for @code{ignoreMelismata}
3905 must be set one syllable @emph{before} the non-melismatic syllable
3906 in the text, as shown here,
3908 @lilypond[verbatim,raggedright]
3910 \relative \context Voice = "lahlah" {
3911 \set Staff.autoBeaming = ##f
3917 \new Lyrics \lyricsto "lahlah" {
3920 \new Lyrics \lyricsto "lahlah" {
3921 \set ignoreMelismata = ##t % applies to "fas"
3923 \unset ignoreMelismata
3930 The @code{ignoreMelismata} applies to the syllable ``fas'', so it
3931 should bev entered before ``go''.
3933 The reverse is also possible: making a lyric line slower than the
3934 standard. This can be achieved by insert @code{\skip}s into the
3935 lyrics. For every @code{\skip}, the text will be delayed another note.
3938 @lilypond[verbatim,raggedright]
3939 \relative { c c g' }
3946 More complex variations in text underlay are possible. It is possible
3947 to switch the melody for a line of lyrics during the text. This is
3948 done by setting the @code{associatedVoice} property. In the example
3950 @lilypond[raggedright]
3952 \relative \context Voice = "lahlah" {
3953 \set Staff.autoBeaming = ##f
3956 \context Voice = alternative {
3960 % show associations clearly.
3961 \override NoteColumn #'force-hshift = #-3
3973 \new Lyrics \lyricsto "lahlah" {
3974 Ju -- ras -- sic Park
3976 \new Lyrics \lyricsto "lahlah" {
3978 % Tricky: need to set associatedVoice
3979 % one syllable too soon!
3980 \set associatedVoice = alternative % applies to "ran"
3984 \set associatedVoice = lahlah % applies to "rus"
3990 the text for the first stanza is set to a melody called ``lahlah'',
3993 \new Lyrics \lyricsto "lahlah" {
3994 Ju -- ras -- sic Park
3999 The second stanza initially is set to the @code{lahlah} context, but
4000 for the syllable ``ran'', it switches to a different melody.
4001 This is achieved with
4003 \set associatedVoice = alternative
4007 Here, @code{alternative} is the name of the @code{Voice} context
4008 containing the triplet.
4010 Again, the command must be one syllable too early, before ``Ty'' in
4014 \new Lyrics \lyricsto "lahlah" {
4015 \set associatedVoice = alternative % applies to "ran"
4019 \set associatedVoice = lahlah % applies to "rus"
4025 The underlay is switched back to the starting situation by assigning
4026 @code{lahlah} to @code{associatedVoice}.
4032 @subsection More stanzas
4034 @cindex phrasing, in lyrics
4037 @cindex stanza number
4038 @cindex singer's names
4039 @cindex name of singer
4041 Stanza numbers can be added by setting @code{stanza}, e.g.
4043 @lilypond[quote,verbatim,relative=2,fragment]
4045 \time 3/4 g2 e4 a2 f4 g2.
4048 Hi, my name is Bert.
4051 Oh, che -- ri, je t'aime
4055 These numbers are put just before the start of first syllable.
4057 Names of singers can also be added. They are printed at the start of
4058 the line, just like instrument names. They are created by setting
4059 @code{vocalName}. A short version may be entered as @code{vocNam}.
4062 @lilypond[fragment,quote,verbatim,relative=2]
4064 \time 3/4 g2 e4 a2 f4 g2.
4066 \set vocalName = "Bert "
4067 Hi, my name is Bert.
4069 \set vocalName = "Ernie "
4070 Oh, che -- ri, je t'aime
4076 Program reference: Layout objects @internalsref{LyricText} and
4077 @internalsref{VocalName}. Music expressions
4078 @internalsref{LyricEvent}.
4086 The term @emph{ambitus} denotes a range of pitches for a given voice
4087 in a part of music. It also may denote the pitch range that a musical
4088 instrument is capable of playing. Ambits are printed on vocal
4089 parts, so singers can easily determine if it meets his or her
4092 It denoted at the beginning of a piece near the initial clef. The
4093 range is graphically specified by two note heads, that represent the
4094 minimum and maximum pitch. To print such ambits, add the
4095 @internalsref{Ambitus_engraver} to the @internalsref{Voice} context,
4102 \consists Ambitus_engraver
4107 This results in the following output
4109 @lilypond[quote,raggedright]
4113 \consists Ambitus_engraver
4128 If you have multiple voices in a single staff, and you want a single
4129 ambitus per staff rather than per each voice, add the
4130 @internalsref{Ambitus_engraver} to the @internalsref{Staff} context
4131 rather than to the @internalsref{Voice} context. Here is an example,
4133 @lilypond[verbatim,raggedright]
4136 \consists "Ambitus_engraver"
4138 \override Ambitus #'X-offset-callbacks
4139 = #(list (lambda (grob axis) -1.0))
4144 \consists "Ambitus_engraver"
4153 This example uses one advanced feature,
4156 \override Ambitus #'X-offset-callbacks
4157 = #(list (lambda (grob axis) -1.0))
4161 This code moves the ambitus to the left. The same effect could have
4162 been achieved with @code{extra-offset}, but then the formatting system
4163 would not reserve space for the moved object.
4167 Program reference: @internalsref{Ambitus},
4168 @internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
4169 @internalsref{AmbitusAccidental}.
4171 Examples: @inputfileref{input/regression,ambitus.ly}.
4175 There is no collision handling in the case of multiple per-voice
4178 @node Other instrument specific notation, Tablatures, Vocal music, Notation manual
4179 @section Other instrument specific notation
4185 @node Harmonic notes, , Other instrument specific notation, Other instrument specific notation
4186 @subsection Harmonic notes
4188 @cindex artificial harmonics
4191 Artificial harmonics are notated with a different notehead style. They
4193 marking the harmonic pitch with @code{\harmonic}.
4195 @lilypond[raggedright,verbatim]
4202 @node Tablatures, Popular music, Other instrument specific notation, Notation manual
4206 @cindex guitar tablature
4208 Tablature notation is used for notating music for plucked string
4209 instruments. It notates pitches not by using note heads, but by
4210 indicating on which string and fret a note must be played. LilyPond
4211 offers limited support for tablature.
4214 * Tablatures basic::
4215 * Non-guitar tablatures::
4218 @node Tablatures basic, Non-guitar tablatures, Tablatures, Tablatures
4219 @subsection Tablatures basic
4220 @cindex Tablatures basic
4222 The string number associated to a note is given as a backslash
4223 followed by a number, e.g. @code{c4\3} for a C quarter on the third
4224 string. By default, string 1 is the highest one, and the tuning
4225 defaults to the standard guitar tuning (with 6 strings). The notes
4226 are printed as tablature, by using @internalsref{TabStaff} and
4227 @internalsref{TabVoice} contexts
4229 @lilypond[quote,fragment,verbatim]
4236 @cindex @code{minimumFret}
4239 When no string is specified, the first string that does not give a
4240 fret number less than @code{minimumFret} is selected. The default
4241 value for @code{minimumFret} is 0
4246 \set TabStaff.minimumFret = #8
4249 @lilypond[quote,noindent,raggedright]
4253 \set TabStaff.minimumFret = #8
4256 \context StaffGroup <<
4257 \context Staff { \clef "G_8" \frag }
4258 \context TabStaff { \frag }
4264 Program reference: @internalsref{TabStaff}, @internalsref{TabVoice}, and
4265 @internalsref{StringNumberEvent}.
4269 Chords are not handled in a special way, and hence the automatic
4270 string selector may easily select the same string to two notes in a
4274 @node Non-guitar tablatures, , Tablatures basic, Tablatures
4275 @subsection Non-guitar tablatures
4276 @cindex Non-guitar tablatures
4278 You can change the number of strings, by setting the number of lines
4279 in the @internalsref{TabStaff}.
4281 You can change the tuning of the strings. A string tuning is given as
4282 a Scheme list with one integer number for each string, the number
4283 being the pitch (measured in semitones relative to middle C) of an
4284 open string. The numbers specified for @code{stringTuning} are the
4285 numbers of semitones to subtract or add, starting the specified pitch
4286 by default middle C, in string order. Thus, the notes are e, a, d, and
4289 @lilypond[quote,fragment,verbatim]
4290 \context TabStaff <<
4291 \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
4294 a,4 c' a e' e c' a e'
4301 No guitar special effects have been implemented.
4305 Program reference: @internalsref{Tab_note_heads_engraver}.
4308 @node Popular music, Orchestral music, Tablatures, Notation manual
4309 @section Popular music
4316 * Printing chord names::
4320 @node Chord names, Chords mode, Popular music, Popular music
4321 @subsection Chord names
4324 LilyPond has support for both printing chord names. Chords may be
4325 entered in musical chord notation, i.e. @code{< .. >}, but they can
4326 also be entered by name. Internally, the chords are represented as a
4327 set of pitches, so they can be transposed
4330 @lilypond[quote,verbatim,raggedright]
4331 twoWays = \transpose c c' {
4340 << \context ChordNames \twoWays
4341 \context Voice \twoWays >>
4344 This example also shows that the chord printing routines do not try to
4345 be intelligent. The last chord (@code{f bes d}) is not interpreted as
4351 * Printing chord names::
4356 @subsection Chords mode
4359 Chord mode is a mode where you can input sets of pitches using common
4360 names. It is introduced by the keyword @code{\chords}.
4361 In chords mode, a chord is entered by the root, which is entered
4363 @lilypond[quote,fragment,verbatim,relative=2]
4364 \chords { es4. d8 c2 }
4369 Other chords may be entered by suffixing a colon, and introducing a
4370 modifier, and optionally, a number
4372 @lilypond[quote,fragment,verbatim]
4373 \chords { e1:m e1:7 e1:m7 }
4375 The first number following the root is taken to be the `type' of the
4376 chord, thirds are added to the root until it reaches the specified
4378 @lilypond[quote,fragment,verbatim]
4379 \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
4382 @cindex root of chord
4383 @cindex additions, in chords
4384 @cindex removals, in chords
4386 More complex chords may also be constructed adding separate steps
4387 to a chord. Additions are added after the number following
4388 the colon, and are separated by dots
4390 @lilypond[quote,verbatim,fragment]
4391 \chords { c:5.6 c:3.7.8 c:3.6.13 }
4393 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
4395 @lilypond[quote,verbatim,fragment]
4396 \chords { c:7+ c:5+.3- c:3-.5-.7- }
4398 Removals are specified similarly, and are introduced by a caret. They
4399 must come after the additions
4400 @lilypond[quote,verbatim,fragment]
4401 \chords { c^3 c:7^5 c:9^3.5 }
4404 Modifiers can be used to change pitches. The following modifiers are
4408 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
4410 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
4413 is the augmented chord. This modifier raises the 5th step.
4415 is the major 7th chord. This modifier raises the 7th step if present.
4417 is the suspended 4th or 2nd. This modifier removes the 3rd
4418 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
4421 Modifiers can be mixed with additions
4422 @lilypond[quote,verbatim,fragment]
4423 \chords { c:sus4 c:7sus4 c:dim7 c:m6 }
4426 @cindex modifiers, in chords.
4433 Since an unaltered 11 does not sound good when combined with an
4434 unaltered 3, the 11 is removed in this case (unless it is added
4437 @lilypond[quote,fragment,verbatim]
4438 \chords { c:13 c:13.11 c:m13 }
4443 An inversion (putting one pitch of the chord on the bottom), as well
4444 as bass notes, can be specified by appending
4445 @code{/}@var{pitch} to the chord
4446 @lilypond[quote,fragment,verbatim]
4447 \chords { c1 c/g c/f }
4451 A bass note can be added instead of transposed out of the chord,
4452 by using @code{/+}@var{pitch}.
4454 @lilypond[quote,fragment,verbatim]
4455 \chords { c1 c/+g c/+f }
4458 Chords is a mode similar to @code{\lyrics} etc. Most
4459 of the commands continue to work, for example, @code{r} and
4460 @code{\skip} can be used to insert rests and spaces, and property
4461 commands may be used to change various settings.
4467 Each step can only be present in a chord once. The following
4468 simply produces the augmented chord, since @code{5+} is interpreted
4471 @lilypond[quote,verbatim,fragment]
4472 \chords { c:5.5-.5+ }
4476 @node Printing chord names
4477 @subsection Printing chord names
4479 @cindex printing chord names
4483 For displaying printed chord names, use the @internalsref{ChordNames} context.
4484 The chords may be entered either using the notation
4485 described above, or directly using @code{<} and @code{>}
4487 @lilypond[quote,verbatim,raggedright]
4489 \chords {a1 b c} <d' f' a'> <e' g' b'>
4493 \context ChordNames \scheme
4494 \context Staff \scheme
4498 You can make the chord changes stand out by setting
4499 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
4500 display chord names when there is a change in the chords scheme and at
4501 the start of a new line
4503 @lilypond[quote,verbatim,linewidth=9\cm]
4505 c1:m c:m \break c:m c:m d
4508 \context ChordNames {
4509 \set chordChanges = ##t
4511 \context Staff \transpose c c' \scheme
4515 The previous examples all show chords over a staff. This is not
4516 necessary. Chords may also be printed separately. It may be necessary
4517 to add @internalsref{Volta_engraver} and @internalsref{Bar_engraver}
4518 for showing repeats.
4520 @lilypond[raggedright,verbatim]
4521 \new ChordNames \with {
4522 \override BarLine #'bar-size = #4
4523 voltaOnThisStaff = ##t
4524 \consists Bar_engraver
4525 \consists "Volta_engraver"
4527 \repeat volta 2 \chords {
4536 The default chord name layout is a system for Jazz music, proposed by
4537 Klaus Ignatzek (see @ref{Literature list}). It can be tuned through the
4538 following properties
4541 @cindex @code{chordNameExceptions}
4542 @item chordNameExceptions
4543 This is a list that contains the chords that have special formatting.
4545 @inputfileref{input/regression,chord-name-exceptions.ly}.
4546 @cindex exceptions, chord names.
4549 @cindex @code{majorSevenSymbol}
4550 @item majorSevenSymbol
4551 This property contains the markup object used for the 7th step, when
4552 it is major. Predefined options are @code{whiteTriangleMarkup} and
4553 @code{blackTriangleMarkup}. See
4554 @inputfileref{input/regression,chord-name-major7.ly} for an example.
4556 @cindex @code{chordNameSeparator}
4557 @item chordNameSeparator
4558 Different parts of a chord name are normally separated by a
4559 slash. By setting @code{chordNameSeparator}, you can specify other
4561 @lilypond[quote,fragment,verbatim]
4562 \context ChordNames \chords {
4564 \set chordNameSeparator
4565 = \markup { \typewriter "|" }
4570 @cindex @code{chordRootNamer}
4571 @item chordRootNamer
4572 The root of a chord is usually printed as a letter with an optional
4573 alteration. The transformation from pitch to letter is done by this
4574 function. Special note names (for example, the German ``H'' for a
4575 B-chord) can be produced by storing a new function in this property.
4577 @cindex @code{chordNoteNamer}
4578 @item chordNoteNamer
4579 The default is to print single pitch, e.g. the bass note, using the
4580 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
4581 to a specialized function to change this behavior. For example, the
4582 base can be printed in lower case.
4586 The predefined variables @code{\germanChords},
4587 @code{\semiGermanChords} set these variables. The effect is
4590 @lilypondfile[notexidoc]{chord-names-german.ly}
4592 There are also two other chord name schemes implemented: an alternate
4593 Jazz chord notation, and a systematic scheme called Banter chords. The
4594 alternate jazz notation is also shown on the chart in @ref{Chord name
4595 chart}. Turning on these styles is described in the input file
4596 @inputfileref{input/test,chord-names-jazz.ly}.
4600 @cindex chords, jazz
4605 @cindex @code{\germanChords}
4606 @code{\germanChords},
4607 @cindex @code{\semiGermanChords}
4608 @code{\semiGermanChords}.
4615 Examples: @inputfileref{input/regression,chord-name-major7.ly},
4616 @inputfileref{input/regression,chord-name-exceptions.ly},
4617 @inputfileref{input/test,chord-names-jazz.ly},
4618 @inputfileref{input/test,chords-without-melody.ly}.
4621 Init files: @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
4626 Chord names are determined solely from the list of pitches. Chord
4627 inversions are not identified, and neither are added bass notes. This
4628 may result in strange chord names when chords are entered with the
4629 @code{< .. >} syntax.
4633 @subsection Improvisation
4635 Improvisation is sometimes denoted with slashed note heads. Such note
4636 heads can be created by adding a @internalsref{Pitch_squash_engraver}
4637 to the @internalsref{Staff} or @internalsref{Voice} context. Then, the
4641 \set squashedPosition = #0
4642 \override NoteHead #'style = #'slash
4646 switches on the slashes.
4648 There are shortcuts @code{\improvisationOn} (and an accompanying
4649 @code{\improvisationOff}) for this command sequence. They are used in
4650 the following example
4652 @lilypond[verbatim,raggedright]
4654 \consists Pitch_squash_engraver
4656 e8 e g a a16(bes)(a8) g \improvisationOn
4659 ~fis2 \improvisationOff a16(bes) a8 g e
4665 @node Orchestral music
4666 @section Orchestral music
4668 @cindex Writing parts
4670 Orchestral music involves some special notation, both in the full
4671 score and the individual parts. This section explains how to tackle
4672 some common problems in orchestral music.
4677 * System start delimiters::
4678 * Aligning to cadenzas::
4681 * Instrument names::
4683 * Instrument transpositions::
4684 * Multi measure rests::
4685 * Automatic part combining::
4687 * Different editions from one source::
4688 * Quoting other voices::
4691 @node System start delimiters
4692 @subsection System start delimiters
4694 Polyphonic scores consist of many staves. These staves can be
4695 constructed in three different ways
4697 @item The group is started with a brace at the left, and bar lines are
4698 connected. This is done with the @internalsref{GrandStaff} context.
4700 @item The group is started with a bracket, and bar lines are connected. This is done with the
4701 @internalsref{StaffGroup} context
4704 @item The group is started with a vertical line. Bar lines are not
4705 connected. This is the default for the score.
4709 @cindex Staff, multiple
4710 @cindex bracket, vertical
4711 @cindex brace, vertical
4718 The bar lines at the start of each system are
4719 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
4720 @internalsref{SystemStartBracket}. Only one of these types is created
4721 in every context, and that type is determined by the property
4722 @code{systemStartDelimiter}.
4724 @node Aligning to cadenzas
4725 @subsection Aligning to cadenzas
4728 In an orchestral context, cadenzas present a special problem:
4729 when constructing a score that includes a cadenza, all other
4730 instruments should skip just as many notes as the length of the
4731 cadenza, otherwise they will start too soon or too late.
4733 A solution to this problem are the functions @code{mmrest-of-length}
4734 and @code{skip-of-length}. These Scheme functions take a piece music
4735 as argument, and generate a @code{\skip} or multi rest, exactly as
4736 long as the piece. The use of @code{mmrest-of-length} is demonstrated
4737 in the following example.
4739 @lilypond[verbatim,raggedright]
4740 cadenza = \relative c' {
4741 c4 d8 << { e f g } \\ { d4. } >>
4746 \new Staff { \cadenza c'4 }
4748 #(ly:export (mmrest-of-length cadenza))
4758 @node Rehearsal marks
4759 @subsection Rehearsal marks
4760 @cindex Rehearsal marks
4762 @cindex @code{\mark}
4764 To print a rehearsal mark, use the @code{\mark} command
4765 @lilypond[quote,fragment,verbatim]
4776 (The letter I is skipped in accordance with engraving traditions.)
4778 The mark is incremented automatically if you use @code{\mark
4779 \default}, but you can also use an integer argument to set the mark
4780 manually. The value to use is stored in the property
4781 @code{rehearsalMark}.
4783 The style is defined by the property @code{markFormatter}. It is a
4784 function taking the current mark (an integer) and the current context
4785 as argument. It should return a markup object. In the following
4786 example, @code{markFormatter} is set to a canned procedure. After a
4787 few measures, it is set to function that produces a boxed number.
4789 @lilypond[quote,verbatim,fragment,relative=2]
4790 \set Score.markFormatter = #format-mark-numbers
4793 \set Score.markFormatter
4794 = #(lambda (mark context)
4795 (make-bold-markup (make-box-markup (number->string mark))))
4800 The file @file{scm/translation-functions.scm} contains the definitions
4801 of @code{format-mark-numbers} (the default format) and
4802 @code{format-mark-letters}. They can be used as inspiration for other
4803 formatting functions.
4806 @cindex coda on bar line
4807 @cindex segno on bar line
4808 @cindex fermata on bar line
4809 @cindex bar lines, symbols on
4811 The @code{\mark} command can also be used to put signs like coda,
4812 segno and fermatas on a bar line. Use @code{\markup} to
4813 to access the appropriate symbol
4815 @lilypond[quote,fragment,verbatim,relative=2]
4816 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4820 In the case of a line break, marks must also be printed at the end of
4821 the line, and not at the beginning. Use the following to force that
4824 \override Score.RehearsalMark
4825 #'break-visibility = #begin-of-line-invisible
4831 @cindex bar lines, putting symbols on
4835 Program reference: @internalsref{MarkEvent}, @internalsref{RehearsalMark}.
4837 Init files: @file{scm/translation-functions.scm} contains the
4838 definition of @code{format-mark-numbers} and
4839 @code{format-mark-letters}. They can be used as inspiration for other
4840 formatting functions.
4842 Examples: @inputfileref{input/regression,rehearsal-mark-letter.ly},
4843 @inputfileref{input/regression,rehearsal-mark-number.ly}.
4847 @subsection Bar numbers
4851 @cindex measure numbers
4852 @cindex @code{currentBarNumber}
4854 Bar numbers are printed by default at the start of the line. The
4855 number itself is stored in the @code{currentBarNumber} property, which
4856 is normally updated automatically for every measure.
4858 Bar numbers can be typeset at regular intervals instead of at the
4859 beginning of each line. This is illustrated in the following example,
4860 whose source is available as
4861 @inputfileref{input/test,bar-number-regular-interval.ly}
4863 @lilypondfile[quote]{bar-number-regular-interval.ly}
4867 Program reference: @internalsref{BarNumber}.
4869 Examples: @inputfileref{input/test,bar-number-every-five-reset.ly},
4870 and @inputfileref{input/test,bar-number-regular-interval.ly}.
4874 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4875 there is one at the top. To solve this, the
4876 @code{padding} property of @internalsref{BarNumber} can be
4877 used to position the number correctly.
4879 @node Instrument names
4880 @subsection Instrument names
4882 In an orchestral score, instrument names are printed left side of the
4885 This can be achieved by setting @internalsref{Staff}.@code{instrument}
4886 and @internalsref{Staff}.@code{instr}. This will print a string before
4887 the start of the staff. For the first start, @code{instrument} is
4888 used, for the next ones @code{instr} is used.
4890 @lilypond[quote,verbatim,raggedright,relative=1,fragment]
4891 \set Staff.instrument = "Ploink "
4892 \set Staff.instr = "Plk "
4898 You can also use markup texts to construct more complicated instrument
4901 @lilypond[quote,fragment,verbatim,raggedright]
4903 \set Staff.instrument = \markup {
4904 \column < "Clarinetti" { "in B"
4905 \smaller \flat } > }
4910 For longer instrument names, it may be useful to increase the
4911 @code{indent} setting in the @code{\paper} block.
4915 Program reference: @internalsref{InstrumentName}.
4919 When you put a name on a grand staff or piano staff the width of the
4920 brace is not taken into account. You must add extra spaces to the end of
4921 the name to avoid a collision.
4924 @subsection Transpose
4926 @cindex transposition of pitches
4927 @cindex @code{\transpose}
4929 A music expression can be transposed with @code{\transpose}. The
4932 \transpose @var{from} @var{to} @var{musicexpr}
4935 This means that @var{musicexpr} is transposed by the interval between
4936 the pitches @var{from} and @var{to}: any note with pitch @code{from}
4937 is changed to @code{to}.
4940 For example, consider a piece written in the key of D major. If
4941 this piece is a little too low for its performer, it can be
4942 transposed up to E major with
4944 \transpose d e @dots{}
4947 Consider a part written for violin (a C instrument). If
4948 this part is to be played on the A clarinet, the following
4949 transposition will produce the appropriate part
4952 \transpose a c @dots{}
4955 @code{\transpose} distinguishes between enharmonic pitches: both
4956 @code{\transpose c cis} or @code{\transpose c des} will transpose up
4957 half a tone. The first version will print sharps and the second
4958 version will print flats
4960 @lilypond[quote,raggedright,verbatim]
4961 mus = { \key d \major cis d fis g }
4965 \transpose c g' \mus
4966 \transpose c f' \mus
4973 Program reference: @internalsref{TransposedMusic}, and
4974 @internalsref{UntransposableMusic}.
4978 If you want to use both @code{\transpose} and @code{\relative},
4979 you must put @code{\transpose} outside of @code{\relative}, since
4980 @code{\relative} will have no effect music that appears inside a
4983 @node Instrument transpositions
4984 @subsection Instrument transpositions
4986 The key of a transposing instrument can also be specified. This
4987 applies to many wind instruments, for example, clarinets (B-flat, A and
4988 E-flat), horn (F) and trumpet (B-flat, C, D and E-flat).
4991 The transposition is entered after the keyword @code{\transposition}
4994 \transposition bes %% B-flat clarinet
4997 This command sets the property @code{instrumentTransposition}. The value of
4998 this property is used for MIDI output and quotations. It does not
4999 affect how notes are printed in the current staff.
5001 @cindex transposition, MIDI
5002 @cindex transposition, instrument
5005 @node Multi measure rests
5006 @subsection Multi measure rests
5007 @cindex multi measure rests
5008 @cindex Rests, multi measure
5012 Multi measure rests are entered using `@code{R}'. It is specifically
5013 meant for full bar rests and for entering parts: the rest can expand
5014 to fill a score with rests, or it can be printed as a single
5015 multimeasure rest. This expansion is controlled by the property
5016 @code{Score.skipBars}. If this is set to true, empty measures will not
5017 be expanded, and the appropriate number is added automatically
5019 @lilypond[quote,fragment,verbatim]
5020 \time 4/4 r1 | R1 | R1*2
5021 \set Score.skipBars = ##t R1*17 R1*4
5024 The @code{1} in @code{R1} is similar to the duration notation used for
5025 notes. Hence, for time signatures other than 4/4, you must enter other
5026 durations. This can be done with augmentation dots or fractions
5028 @lilypond[quote,fragment,verbatim]
5029 \set Score.skipBars = ##t
5037 An @code{R} spanning a single measure is printed as either a whole rest
5038 or a breve, centered in the measure regardless of the time signature.
5040 @cindex text on multi-measure rest
5041 @cindex script on multi-measure rest
5042 @cindex fermata on multi-measure rest
5044 Texts can be added to multi-measure rests by using the
5045 @var{note}-@code{markup} syntax (see @ref{Text markup}). In this case, the number is
5046 replaced. If you need both texts and the number, you must add the
5047 number by hand. A variable (@code{\fermataMarkup}) is provided for
5051 @lilypond[quote,verbatim,fragment]
5053 R2._\markup { "Ad lib" }
5057 If you want to have a text on the left end of a multi-measure rest,
5058 attach the text to a zero-length skip note, i.e.
5066 @cindex whole rests for a full measure
5070 Program reference: @internalsref{MultiMeasureRestEvent},
5071 @internalsref{MultiMeasureTextEvent},
5072 @internalsref{MultiMeasureRestMusicGroup}, and
5073 @internalsref{MultiMeasureRest}.
5075 The layout object @internalsref{MultiMeasureRestNumber} is for the
5076 default number, and @internalsref{MultiMeasureRestText} for user
5081 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
5082 over multi-measure rests.
5084 @cindex condensing rests
5086 There is no way to automatically condense multiple rests into a single
5087 multimeasure rest. Multi measure rests do not take part in rest
5090 Be careful when entering multimeasure rests followed by whole
5091 notes. The following will enter two notes lasting four measures each
5095 When @code{skipBars} is set, the result will look OK, but the bar
5096 numbering will be off.
5098 @node Automatic part combining
5099 @subsection Automatic part combining
5100 @cindex automatic part combining
5101 @cindex part combiner
5104 Automatic part combining is used to merge two parts of music onto a
5105 staff. It is aimed at typesetting orchestral scores. When the two
5106 parts are identical for a period of time, only one is shown. In
5107 places where the two parts differ, they are typeset as separate
5108 voices, and stem directions are set automatically. Also, solo and
5109 @emph{a due} parts are identified and can be marked.
5111 The syntax for part combining is
5114 \partcombine @var{musicexpr1} @var{musicexpr2}
5117 The music expressions will be interpreted as @internalsref{Voice}
5118 contexts. If using relative octaves, @code{\relative} should be
5119 specified for both music expressions, i.e.
5122 \partcombine \relative @dots{} @var{musicexpr1}
5123 \relative @dots{} @var{musicexpr2}
5127 A @code{\relative} section that is outside of @code{\partcombine} has
5128 no effect on the pitches of @var{musicexpr1} and @var{musicexpr2}.
5131 The following example demonstrates the basic functionality of the part
5132 combiner: putting parts on one staff, and setting stem directions and
5135 @lilypond[quote,verbatim,raggedright,fragment]
5136 \new Staff \partcombine
5137 \relative g' { g g a( b) c c r r }
5138 \relative g' { g g r4 r e e g g }
5141 The first @code{g} appears only once, although it was
5142 specified twice (once in each part). Stem, slur and tie directions are
5143 set automatically, depending whether there is a solo or unisono. The
5144 first part (with context called @code{one}) always gets up stems, and
5145 `solo', while the second (called @code{two}) always gets down stems and
5148 If you just want the merging parts, and not the textual markings, you
5149 may set the property @code{soloADue} to false
5151 @lilypond[quote,verbatim,raggedright,fragment,relative=2]
5153 \set Staff.soloADue = ##f
5155 \relative g' { g a( b) r }
5156 \relative g' { g r4 r f }
5162 Program reference: @internalsref{PartCombineMusic},
5163 @internalsref{SoloOneEvent}, and
5164 @internalsref{SoloTwoEvent}, and
5165 @internalsref{UnisonoEvent}.
5169 In @code{soloADue} mode, when the two voices play the same notes on and
5170 off, the part combiner may typeset @code{a2} more than once in a
5173 @code{\partcombine} cannot be inside @code{\times}.
5175 @code{\partcombine} cannot be inside @code{\relative}.
5177 Internally, the @code{\partcombine} interprets both arguments as
5178 @code{Voice}s named @code{one} and @code{two}, and then decides when
5179 the parts can be combined. Consequently, if the arguments switch to
5180 differently named @internalsref{Voice} contexts, the events in those
5184 @subsection Hiding staves
5186 @cindex Frenched scores
5187 @cindex Hiding staves
5189 In orchestral scores, staff lines that only have rests are usually
5190 removed. This saves some space. This style is called `French Score'.
5191 For @internalsref{Lyrics},
5192 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
5193 switched on by default. When these line of these contexts turn out
5194 empty after the line-breaking process, they are removed.
5196 For normal staves, a specialized @internalsref{Staff} context is
5197 available, which does the same: staves containing nothing (or only
5198 multi measure rests) are removed. The context definition is stored in
5199 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
5200 in this example disappears in the second line
5203 @lilypond[quote,verbatim]
5206 \context { \RemoveEmptyStaffContext }
5211 \new Staff { e4 f g a \break c1 }
5212 \new Staff { c4 d e f \break R1 }
5217 The first page shows all staves in full. If empty staves should be
5218 removed from the first page too, set @code{remove-first} to false in
5219 @internalsref{RemoveEmptyVerticalGroup}.
5221 Another application is making ossia sections, i.e. alternative
5222 melodies on a separate piece of staff, with help of a Frenched
5223 staff. See @inputfileref{input/test,ossia.ly} for an example.
5226 @node Different editions from one source
5227 @subsection Different editions from one source
5229 The @code{\tag} command marks music expressions with a name. These
5230 tagged expressions can be filtered out later. With this mechanism it
5231 is possible to make different versions of the same music source.
5233 In the following example, we see two versions of a piece of music, one
5234 for the full score, and one with cue notes for the instrumental part
5250 The same can be applied to articulations, texts, etc.: they are
5253 -\tag #@var{your-tag}
5255 to an articulation, for example,
5260 This defines a note with a conditional fingering indication.
5262 By applying the @code{remove-tag} function, tagged expressions can be
5263 filtered. For example,
5267 \applymusic #(remove-tag 'score) @var{the music}
5268 \applymusic #(remove-tag 'part) @var{the music}
5273 @lilypondfile[quote]{tag-filter.ly}
5275 The argument of the @code{\tag} command should be a symbol, or a list
5276 of symbols, for example,
5278 \tag #'(original-part transposed-part) @dots{}
5283 Examples: @inputfileref{input/regression,tag-filter.ly}.
5286 @node Quoting other voices
5287 @subsection Quoting other voices
5289 With quotations, fragments of other parts can be inserted into a part
5290 directly. Before a part can be quoted, it must be marked especially as
5291 quotable. This is done with code @code{\addquote} command. The
5292 quotation may then be done with @code{\quote}
5295 \addquote @var{name} @var{music}
5296 \quote @var{name} @var{duration}
5301 Here, @var{name} is an identifying string. The @var{music} is any kind
5302 of music. This is an example of @code{\addquote}
5305 \addquote clarinet \relative c' {
5310 During a part, a piece of music can be quoted with the @code{\quote}
5317 This would cite 3 quarter notes (a dotted half note) of the previously
5318 added clarinet voice.
5320 Quotations take into account the transposition both source and target
5321 instruments, if they are specified using the @code{\transposition} command.
5323 @lilypond[quote,raggedright,verbatim]
5324 \addquote clarinet \relative c' {
5330 e'8 f'8 \quote clarinet 2
5336 Only the contents of the first @internalsref{Voice} occurring in an
5337 @code{\addquote} command will be considered for quotation, so
5338 @var{music} can not contain @code{\new} and @code{\context Voice}
5339 statements that would switch to a different Voice.
5344 In this manual: @ref{Instrument transpositions}.
5346 Examples: @inputfileref{input/regression,quote.ly}
5347 @inputfileref{input/regression,quote-transposition.ly}
5349 Program reference: @internalsref{QuoteMusic}.
5351 @node Formatting cue notes
5352 @section Formatting cue notes
5355 The previous section deals with inserting notes from another
5356 voice. When making a part, these notes need to be specially formatted.
5357 Here is an example of formatted cue notes
5362 \override Stem #'length = #5.5
5363 \override Beam #'thickness = #0.384
5364 \override Beam #'space-function =
5365 #(lambda (beam mult) (* 0.8 (Beam::space_function beam mult)))
5369 \set Staff.instrument = #"Horn in F"
5370 \set Score.skipBars = ##t
5373 \once \override Staff.MultiMeasureRest #'staff-position = #-6
5380 r8^"Bsn." c'8 f'8[ f'8]
5390 There are a couple of points to take care of:
5394 The multi rest of the original part should be moved up or down during
5397 Cue notes have smaller font sizes.
5399 When cued notes have a clef change relative to the original part, the
5400 clef should be restored after the cue section. This minimizes
5401 confusion for the reader,
5403 When the original part starts, this should be marked with the name of
5404 the instrument, in this case ``Horn.'' Of course, the cue part is
5405 marked with the instrument playing the cue.
5410 @node Ancient notation
5411 @section Ancient notation
5413 @cindex Vaticana, Editio
5414 @cindex Medicaea, Editio
5419 Support for ancient notation includes features for mensural notation
5420 and Gregorian Chant notation. There is also limited support for
5421 figured bass notation.
5423 Many graphical objects provide a @code{style} property, see
5424 @ref{Ancient note heads}, @ref{Ancient accidentals}, @ref{Ancient
5425 rests}, @ref{Ancient clefs}, @ref{Ancient flags} and @ref{Ancient time
5426 signatures}. By manipulating such a grob property, the typographical
5427 appearance of the affected graphical objects can be accommodated for a
5428 specific notation flavor without need for introducing any new
5431 Other aspects of ancient notation can not that easily be expressed as
5432 in terms of just changing a style property of a graphical object.
5433 Therefore, some notational concepts are introduced specifically for
5434 ancient notation, see @ref{Custodes}, @ref{Divisiones},
5435 @ref{Ligatures}, and @ref{Figured bass}.
5439 * Ancient note heads::
5440 * Ancient accidentals::
5444 * Ancient time signatures::
5448 * Vaticana style contexts::
5452 If this all is way too much of documentation for you, and you just
5453 want to dive into typesetting without worrying too much about the
5454 details on how to customize a context, you may have a look at the
5455 predefined contexts (see @ref{Vaticana style contexts}). Use them to
5456 set up predefined style-specific voice and staff contexts, and
5457 directly go ahead with the note entry.
5461 Ligatures need special spacing that has not yet been implemented. As
5462 a result, there is too much space between ligatures most of the time,
5463 and line breaking often is unsatisfactory. Also, lyrics do not
5464 correctly align with ligatures.
5466 Accidentals must not be printed within a ligature, but instead need to
5467 be collected and printed in front of it.
5469 Augmentum dots within ligatures are not handled correctly.
5472 @node Ancient note heads
5473 @subsection Ancient note heads
5478 For ancient notation, a note head style other than the @code{default}
5479 style may be chosen. This is accomplished by setting the @code{style}
5480 property of the NoteHead object to the desired value (@code{baroque},
5481 @code{neomensural} or @code{mensural}). The @code{baroque} style
5482 differs from the @code{default} style only in using a square shape for
5483 @code{\breve} note heads. The @code{neomensural} style differs from
5484 the @code{baroque} style in that it uses rhomboidal heads for whole
5485 notes and all smaller durations. Stems are centered on the note
5486 heads. This style is in particular useful when transcribing mensural
5487 music, e.g. for the incipit. The @code{mensural} style finally
5488 produces note heads that mimic the look of note heads in historic
5489 printings of the 16th century.
5491 The following example demonstrates the @code{neomensural} style
5493 @lilypond[quote,fragment,raggedright,verbatim]
5494 \override NoteHead #'style = #'neomensural
5495 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
5498 When typesetting a piece in Gregorian Chant notation, a Gregorian
5499 ligature engraver will automatically select the proper note heads,
5500 such there is no need to explicitly set the note head style. Still,
5501 the note head style can be set e.g. to @code{vaticana_punctum} to
5502 produce punctum neumes. Similarly, a mensural ligature engraver is
5503 used to automatically assemble mensural ligatures. See
5504 @ref{Ligatures} for how ligature engravers work.
5509 @ref{Percussion staves} use note head styles of their own that are
5510 frequently used in contemporary music notation.
5512 Examples: @inputfileref{input/regression,note-head-style.ly} gives an
5513 overview over all available note head styles.
5516 @node Ancient accidentals
5517 @subsection Ancient accidentals
5522 Use the @code{style} property of grob @internalsref{Accidental} to
5523 select ancient accidentals. Supported styles are
5524 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
5526 @lilypond[quote,raggedright,staffsize=26]
5534 { " " \musicglyph #"accidentals-vaticana-1"
5535 " " \musicglyph #"accidentals-vaticana0" }
5539 { " " \musicglyph #"accidentals-medicaea-1" }
5543 { " " \musicglyph #"accidentals-hufnagel-1" }
5547 { " " \musicglyph #"accidentals-mensural-1"
5548 " " \musicglyph #"accidentals-mensural1" }
5557 \remove "Bar_number_engraver"
5561 \remove "Clef_engraver"
5562 \remove "Key_engraver"
5563 \remove "Time_signature_engraver"
5564 \remove "Staff_symbol_engraver"
5565 minimumVerticalExtent = ##f
5571 As shown, not all accidentals are supported by each style. When
5572 trying to access an unsupported accidental, LilyPond will switch to a
5573 different style, as demonstrated in
5574 @inputfileref{input/test,ancient-accidentals.ly}.
5576 Similarly to local accidentals, the style of the key signature can be
5577 controlled by the @code{style} property of the
5578 @internalsref{KeySignature} grob.
5582 In this manual: @ref{Pitches}, @ref{Chromatic alterations} and
5583 @ref{Accidentals} give a general introduction into the use of
5584 accidentals. @ref{Key signature} gives a general introduction into
5585 the use of key signatures.
5587 Program reference: @internalsref{KeySignature}.
5589 Examples: @inputfileref{input/test,ancient-accidentals.ly}.
5592 @subsection Ancient rests
5597 Use the @code{style} property of grob @internalsref{Rest} to select
5598 ancient accidentals. Supported styles are @code{classical},
5599 @code{neomensural} and @code{mensural}. @code{classical} differs
5600 from the @code{default} style only in that the quarter rest looks like
5601 a horizontally mirrored 8th rest. The @code{neomensural} style suits
5602 well for e.g. the incipit of a transcribed mensural piece of music.
5603 The @code{mensural} style finally mimics the appearance of rests as
5604 in historic prints of the 16th century.
5606 The following example demonstrates the @code{neomensural} style
5608 @lilypond[quote,fragment,raggedright,verbatim]
5609 \override Rest #'style = #'neomensural
5610 r\longa r\breve r1 r2 r4 r8 r16
5613 There are no 32th and 64th rests specifically for the mensural or
5614 neo-mensural style. Instead, the rests from the default style will be
5615 taken. See @inputfileref{input/test,rests.ly} for a chart of all
5618 There are no rests in Gregorian Chant notation; instead, it uses
5623 In this manual: @ref{Rests} gives a general introduction into the use of rests.
5627 @subsection Ancient clefs
5632 LilyPond supports a variety of clefs, many of them ancient.
5634 The following table shows all ancient clefs that are supported via the
5635 @code{\clef} command. Some of the clefs use the same glyph, but
5636 differ only with respect to the line they are printed on. In such
5637 cases, a trailing number in the name is used to enumerate these clefs.
5638 Still, you can manually force a clef glyph to be typeset on an
5639 arbitrary line, as described in @ref{Clef}. The note printed to the
5640 right side of each clef in the example column denotes the @code{c'}
5641 with respect to that clef.
5643 @multitable @columnfractions .4 .4 .2
5646 @b{Description} @tab
5647 @b{Supported Clefs} @tab
5651 modern style mensural C clef @tab
5652 @code{neomensural_c1}, @code{neomensural_c2},
5653 @code{neomensural_c3}, @code{neomensural_c4} @tab
5654 @lilypond[fragment,quote,relative=1,notime]
5656 \clef "neomensural_c2" c
5660 petrucci style mensural C clefs, for use on different staff lines
5661 (the examples shows the 2nd staff line C clef).
5671 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5673 \clef "petrucci_c2" c
5677 petrucci style mensural F clef @tab
5678 @code{petrucci_f} @tab
5679 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5681 \clef "petrucci_f" c
5685 petrucci style mensural G clef @tab
5686 @code{petrucci_g} @tab
5687 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5689 \clef "petrucci_g" c
5693 historic style mensural C clef @tab
5694 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
5695 @code{mensural_c4} @tab
5696 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5698 \clef "mensural_c2" c
5702 historic style mensural F clef @tab
5703 @code{mensural_f} @tab
5704 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5706 \clef "mensural_f" c
5710 historic style mensural G clef @tab
5711 @code{mensural_g} @tab
5712 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5714 \clef "mensural_g" c
5718 Editio Vaticana style do clef @tab
5719 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
5720 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5721 \override Staff.StaffSymbol #'line-count = #4
5723 \clef "vaticana_do2" c
5727 Editio Vaticana style fa clef @tab
5728 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
5729 @lilypond[quote,relative=1,notime,indent=0.0\mm,fragment]
5730 \override Staff.StaffSymbol #'line-count = #4
5732 \clef "vaticana_fa2" c
5736 Editio Medicaea style do clef @tab
5737 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
5738 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5739 \override Staff.StaffSymbol #'line-count = #4
5741 \clef "medicaea_do2" c
5745 Editio Medicaea style fa clef @tab
5746 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
5747 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5748 \override Staff.StaffSymbol #'line-count = #4
5750 \clef "medicaea_fa2" c
5754 historic style hufnagel do clef @tab
5755 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
5756 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5757 \override Staff.StaffSymbol #'line-count = #4
5759 \clef "hufnagel_do2" c
5763 historic style hufnagel fa clef @tab
5764 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
5765 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5766 \override Staff.StaffSymbol #'line-count = #4
5768 \clef "hufnagel_fa2" c
5772 historic style hufnagel combined do/fa clef @tab
5773 @code{hufnagel_do_fa} @tab
5774 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5775 \clef "hufnagel_do_fa" c
5782 @emph{Modern style} means ``as is typeset in contemporary editions of
5783 transcribed mensural music''.
5785 @emph{Petrucci style} means ``inspired by printings published by the
5786 famous engraver Petrucci (1466-1539)''.
5788 @emph{Historic style} means ``as was typeset or written in historic
5789 editions (other than those of Petrucci)''.
5791 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
5793 Petrucci used C clefs with differently balanced left-side vertical
5794 beams, depending on which staff line it is printed.
5798 In this manual: see @ref{Clef}.
5802 The mensural g clef is mapped to the Petrucci g clef, until a new
5803 mensural g clef is implemented.
5808 @subsection Ancient flags
5813 Use the @code{flag-style} property of grob @internalsref{Stem} to
5814 select ancient flags. Besides the @code{default} flag style,
5815 only @code{mensural} style is supported
5817 @lilypond[quote,fragment,raggedright,verbatim]
5818 \override Stem #'flag-style = #'mensural
5819 \override Stem #'thickness = #1.0
5820 \override NoteHead #'style = #'mensural
5822 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
5823 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5826 Note that the innermost flare of each mensural flag always is
5827 vertically aligned with a staff line. If you do not like this
5828 behavior, you can set the @code{adjust-if-on-staffline} property of
5829 grob @internalsref{Stem} to @code{##f}. Then, the vertical position
5830 of the end of each flare is different between notes on staff lines and
5831 notes between staff lines
5833 @lilypond[quote,fragment,raggedright]
5834 \override Stem #'flag-style = #'mensural
5835 \override Stem #'thickness = #1.0
5836 \override Stem #'adjust-if-on-staffline = ##f
5837 \override NoteHead #'style = #'mensural
5839 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
5840 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5843 There is no particular flag style for neo-mensural notation. Hence,
5844 when typesetting e.g. the incipit of a transcribed piece of mensural
5845 music, the default flag style should be used. There are no flags in
5846 Gregorian Chant notation.
5849 @node Ancient time signatures
5850 @subsection Ancient time signatures
5852 @cindex time signatures
5855 There is limited support for mensural time signatures. The
5856 glyphs are hard-wired to particular time fractions. In other words,
5857 to get a particular mensural signature glyph with the @code{\time n/m}
5858 command, @code{n} and @code{m} have to be chosen according to the
5867 \remove Staff_symbol_engraver
5868 \remove Clef_engraver
5869 \remove Time_signature_engraver
5872 \set Score.timing = ##f
5873 \set Score.barAlways = ##t
5874 s_\markup { "$\\backslash$time 4/4" }
5875 ^\markup { " " \musicglyph #"timesig-neomensural4/4" }
5877 s_\markup { "$\\backslash$time 2/2" }
5878 ^\markup { " " \musicglyph #"timesig-neomensural2/2" }
5880 s_\markup { "$\\backslash$time 6/4" }
5881 ^\markup { " " \musicglyph #"timesig-neomensural6/4" }
5883 s_\markup { "$\\backslash$time 6/8" }
5884 ^\markup { " " \musicglyph #"timesig-neomensural6/8" }
5886 s_\markup { "$\\backslash$time 3/2" }
5887 ^\markup { " " \musicglyph #"timesig-neomensural3/2" }
5889 s_\markup { "$\\backslash$time 3/4" }
5890 ^\markup { " " \musicglyph #"timesig-neomensural3/4" }
5892 s_\markup { "$\\backslash$time 9/4" }
5893 ^\markup { " " \musicglyph #"timesig-neomensural9/4" }
5895 s_\markup { "$\\backslash$time 9/8" }
5896 ^\markup { " " \musicglyph #"timesig-neomensural9/8" }
5898 s_\markup { "$\\backslash$time 4/8" }
5899 ^\markup { " " \musicglyph #"timesig-neomensural4/8" }
5901 s_\markup { "$\\backslash$time 2/4" }
5902 ^\markup { " " \musicglyph #"timesig-neomensural2/4" }
5907 Use the @code{style} property of grob @internalsref{TimeSignature} to
5908 select ancient time signatures. Supported styles are
5909 @code{neomensural} and @code{mensural}. The above table uses the
5910 @code{neomensural} style. This style is appropriate e.g. for the
5911 incipit of transcriptions of mensural pieces. The @code{mensural}
5912 style mimics the look of historical printings of the 16th century.
5914 The following examples shows the differences in style,
5915 @lilypond[raggedright]
5918 c1^\markup { \hspace #-2.0 \typewriter default }
5920 \override Staff.TimeSignature #'style = #'numbered
5922 c1^\markup { \hspace #-2.0 \typewriter numbered }
5924 \override Staff.TimeSignature #'style = #'mensural
5926 c1^\markup { \hspace #-2.0 \typewriter mensural }
5928 \override Staff.TimeSignature #'style = #'neomensural
5930 c1^\markup { \hspace #-2.0 \typewriter neomensural }
5931 \override Staff.TimeSignature #'style = #'single-digit
5933 c1^\markup { \hspace #-2.0 \typewriter single-digit }
5939 This manual: @ref{Time signature} gives a general introduction into
5940 the use of time signatures.
5944 Ratios of note durations do not change with the time signature. For
5945 example, the ratio of 1 brevis = 3 semibrevis (tempus perfectum) must
5946 be made by hand, by setting
5949 breveTP = #(ly:make-duration -1 0 3 2)
5953 This sets breveTP to 3/2 times 2 = 3 times a whole note.
5955 The @code{old6/8alt} symbol (an alternate symbol for 6/8) is not
5956 addressable with @code{\time}. Use a @code{\markup} instead
5959 @subsection Custodes
5964 A @emph{custos} (plural: @emph{custodes}; Latin word for `guard') is a
5965 symbol that appears at the end of a staff. It anticipates the pitch
5966 of the first note(s) of the following line and thus helps the player
5967 or singer to manage line breaks during performance, thus enhancing
5968 readability of a score.
5970 Custodes were frequently used in music notation until the 17th
5971 century. Nowadays, they have survived only in a few particular forms
5972 of musical notation such as contemporary editions of Gregorian chant
5973 like the @emph{editio vaticana}. There are different custos glyphs
5974 used in different flavors of notational style.
5976 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
5977 @internalsref{Staff} context when declaring the @code{\paper} block,
5978 as shown in the following example
5984 \consists Custos_engraver
5985 Custos \override #'style = #'mensural
5990 The result looks like this
5992 @lilypond[quote,raggedright]
5996 \override Staff.Custos #'style = #'mensural
6003 \consists Custos_engraver
6009 The custos glyph is selected by the @code{style} property. The styles
6010 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
6011 @code{mensural}. They are demonstrated in the following fragment
6015 \new Lyrics \lyrics {
6019 { " " \musicglyph #"custodes-vaticana-u0" }
6023 { " " \musicglyph #"custodes-medicaea-u0" }
6028 { " " \musicglyph #"custodes-hufnagel-u0" }
6033 { " " \musicglyph #"custodes-mensural-u0" }
6045 Program reference: @internalsref{Custos}.
6047 Examples: @inputfileref{input/regression,custos.ly}.
6051 @subsection Divisiones
6057 A @emph{divisio} (plural: @emph{divisiones}; Latin word for
6058 `division') is a staff context symbol that is used to structure
6059 Gregorian music into phrases and sections. The musical meaning of
6060 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
6061 can be characterized as short, medium and long pause, somewhat like
6062 @ref{Breath marks}. The @emph{finalis} sign not only marks the end of
6063 a chant, but is also frequently used within a single
6064 antiphonal/responsorial chant to mark the end of each section.
6067 To use divisiones, include the file @code{gregorian-init.ly}. It
6068 contains definitions that you can apply by just inserting
6069 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
6070 and @code{\finalis} at proper places in the input. Some editions use
6071 @emph{virgula} or @emph{caesura} instead of divisio minima.
6072 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
6075 @lilypondfile[quote,raggedright]{divisiones.ly}
6079 @cindex @code{\virgula}
6081 @cindex @code{\caesura}
6083 @cindex @code{\divisioMinima}
6084 @code{\divisioMinima},
6085 @cindex @code{\divisioMaior}
6086 @code{\divisioMaior},
6087 @cindex @code{\divisioMaxima}
6088 @code{\divisioMaxima},
6089 @cindex @code{\finalis}
6094 In this manual: @ref{Breath marks}.
6096 Program reference: @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}.
6098 Examples: @inputfileref{input/test,divisiones.ly}.
6101 @subsection Ligatures
6105 @c TODO: Should double check if I recalled things correctly when I wrote
6106 @c down the following paragraph by heart.
6108 A ligature is a coherent graphical symbol that represents at least two
6109 distinct notes. Ligatures originally appeared in the manuscripts of
6110 Gregorian chant notation roughly since the 9th century to denote
6111 ascending or descending sequences of notes.
6113 Ligatures are entered by enclosing them in @code{\[} and @code{\]}.
6114 Some ligature styles may need additional input syntax specific for
6115 this particular type of ligature. By default, the
6116 @internalsref{LigatureBracket} engraver just puts a square bracket
6119 @lilypond[quote,raggedright,verbatim]
6127 To select a specific style of ligatures, a proper ligature engraver
6128 has to be added to the @internalsref{Voice} context, as explained in
6129 the following subsections. Only white mensural ligatures
6130 are supported with certain limitations.
6133 * White mensural ligatures::
6134 * Gregorian square neumes ligatures::
6137 @node White mensural ligatures
6138 @subsubsection White mensural ligatures
6140 @cindex Mensural ligatures
6141 @cindex White mensural ligatures
6143 There is limited support for white mensural ligatures.
6145 To engrave white mensural ligatures, in the paper block the
6146 @internalsref{Mensural_ligature_engraver} has to be put into the
6147 @internalsref{Voice} context, and remove the
6148 @internalsref{Ligature_bracket_engraver}
6154 \remove Ligature_bracket_engraver
6155 \consists Mensural_ligature_engraver
6160 There is no additional input language to describe the shape of a
6161 white mensural ligature. The shape is rather determined solely from
6162 the pitch and duration of the enclosed notes. While this approach may
6163 take a new user a while to get accustomed, it has the great advantage
6164 that the full musical information of the ligature is known internally.
6165 This is not only required for correct MIDI output, but also allows for
6166 automatic transcription of the ligatures.
6171 \set Score.timing = ##f
6172 \set Score.defaultBarType = "empty"
6173 \override NoteHead #'style = #'neomensural
6174 \override Staff.TimeSignature #'style = #'neomensural
6176 \[ g\longa c\breve a\breve f\breve d'\longa \]
6178 \[ e1 f1 a\breve g\longa \]
6180 @lilypond[quote,raggedright]
6183 \set Score.timing = ##f
6184 \set Score.defaultBarType = "empty"
6185 \override NoteHead #'style = #'neomensural
6186 \override Staff.TimeSignature #'style = #'neomensural
6188 \[ g\longa c\breve a\breve f\breve d'\longa \]
6190 \[ e1 f1 a\breve g\longa \]
6195 \remove Ligature_bracket_engraver
6196 \consists Mensural_ligature_engraver
6202 Without replacing @internalsref{Ligature_bracket_engraver} with
6203 @internalsref{Mensural_ligature_engraver}, the same music transcribes
6206 @lilypond[quote,raggedright]
6208 \set Score.timing = ##f
6209 \set Score.defaultBarType = "empty"
6210 \override NoteHead #'style = #'neomensural
6211 \override Staff.TimeSignature #'style = #'neomensural
6213 \[ g\longa c\breve a\breve f\breve d'\longa \]
6215 \[ e1 f1 a\breve g\longa \]
6221 The implementation is experimental; it may output strange warnings or
6222 even crash in some cases or produce weird results on more complex
6225 @node Gregorian square neumes ligatures
6226 @subsubsection Gregorian square neumes ligatures
6228 @cindex Square neumes ligatures
6229 @cindex Gregorian square neumes ligatures
6231 Gregorian square neumes notation (following the style of the Editio
6232 Vaticana) is under heavy development, but not yet really usable for
6233 production purposes. Core ligatures can already be typeset, but
6234 essential issues for serious typesetting are still under development,
6235 such as (among others) horizontal alignment of multiple ligatures,
6236 lyrics alignment and proper accidentals handling. Still, this section
6237 gives a sneak preview of what Gregorian chant may look like once it
6240 The following table contains the extended neumes table of the 2nd
6241 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
6242 1983 by the monks of Solesmes.
6244 @multitable @columnfractions .4 .2 .2 .2
6247 @b{Neuma aut@*Neumarum Elementa} @tab
6248 @b{Figurae@*Rectae} @tab
6249 @b{Figurae@*Liquescentes Auctae} @tab
6250 @b{Figurae@*Liquescentes Deminutae}
6252 @c TODO: \paper block is identical in all of the below examples.
6253 @c Therefore, it should somehow be included rather than duplicated all
6256 @c why not make identifiers in ly/engraver-init.ly? --hwn
6258 @c Because it's just used to typeset plain notes without
6259 @c a staff for demonstration purposes rather than something
6260 @c special of Gregorian chant notation. --jr
6265 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.5\cm]
6266 \include "gregorian-init.ly"
6271 \noBreak s^\markup {"a"} \noBreak
6273 % Punctum Inclinatum
6275 \noBreak s^\markup {"b"}
6277 \paper { \neumeDemoPaper }}
6280 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.5\cm]
6281 \include "gregorian-init.ly"
6284 % Punctum Auctum Ascendens
6285 \[ \auctum \ascendens b \]
6286 \noBreak s^\markup {"c"} \noBreak
6288 % Punctum Auctum Descendens
6289 \[ \auctum \descendens b \]
6290 \noBreak s^\markup {"d"} \noBreak
6292 % Punctum Inclinatum Auctum
6293 \[ \inclinatum \auctum b \]
6294 \noBreak s^\markup {"e"}
6296 \paper { \neumeDemoPaper }}
6299 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6300 \include "gregorian-init.ly"
6303 % Punctum Inclinatum Parvum
6304 \[ \inclinatum \deminutum b \]
6305 \noBreak s^\markup {"f"}
6307 \paper { \neumeDemoPaper }}
6313 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6314 \include "gregorian-init.ly"
6319 \noBreak s^\markup {"g"}
6321 \paper { \neumeDemoPaper }}
6327 @code{3. Apostropha vel Stropha}
6329 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6330 \include "gregorian-init.ly"
6335 \noBreak s^\markup {"h"}
6337 \paper { \neumeDemoPaper }}
6340 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6341 \include "gregorian-init.ly"
6345 \[ \stropha \auctum b \]
6346 \noBreak s^\markup {"i"}
6348 \paper { \neumeDemoPaper }}
6355 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6356 \include "gregorian-init.ly"
6361 \noBreak s^\markup {"j"}
6363 \paper { \neumeDemoPaper }}
6369 @code{5. Clivis vel Flexa}
6371 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6372 \include "gregorian-init.ly"
6379 \paper { \neumeDemoPaper }}
6382 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6383 \include "gregorian-init.ly"
6386 % Clivis Aucta Descendens
6387 \[ b \flexa \auctum \descendens g \]
6388 \noBreak s^\markup {"l"} \noBreak
6390 % Clivis Aucta Ascendens
6391 \[ b \flexa \auctum \ascendens g \]
6392 \noBreak s^\markup {"m"}
6394 \paper { \neumeDemoPaper }}
6397 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6398 \include "gregorian-init.ly"
6402 \[ b \flexa \deminutum g \]
6405 \paper { \neumeDemoPaper }}
6409 @code{6. Podatus vel Pes}
6411 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6412 \include "gregorian-init.ly"
6419 \paper { \neumeDemoPaper }}
6422 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6423 \include "gregorian-init.ly"
6426 % Pes Auctus Descendens
6427 \[ g \pes \auctum \descendens b \]
6428 \noBreak s^\markup {"p"} \noBreak
6430 % Pes Auctus Ascendens
6431 \[ g \pes \auctum \ascendens b \]
6432 \noBreak s^\markup {"q"}
6434 \paper { \neumeDemoPaper }}
6437 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6438 \include "gregorian-init.ly"
6442 \[ g \pes \deminutum b \]
6445 \paper { \neumeDemoPaper }}
6449 @code{7. Pes Quassus}
6451 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6452 \include "gregorian-init.ly"
6456 \[ \oriscus g \pes \virga b \]
6459 \paper { \neumeDemoPaper }}
6462 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6463 \include "gregorian-init.ly"
6466 % Pes Quassus Auctus Descendens
6467 \[ \oriscus g \pes \auctum \descendens b \]
6470 \paper { \neumeDemoPaper }}
6475 @code{8. Quilisma Pes}
6477 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6478 \include "gregorian-init.ly"
6482 \[ \quilisma g \pes b \]
6485 \paper { \neumeDemoPaper }}
6488 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6489 \include "gregorian-init.ly"
6492 % Quilisma Pes Auctus Descendens
6493 \[ \quilisma g \pes \auctum \descendens b \]
6496 \paper { \neumeDemoPaper }}
6501 @code{9. Podatus Initio Debilis}
6503 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6504 \include "gregorian-init.ly"
6507 % Pes Initio Debilis
6508 \[ \deminutum g \pes b \]
6511 \paper { \neumeDemoPaper }}
6514 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6515 \include "gregorian-init.ly"
6518 % Pes Auctus Descendens Initio Debilis
6519 \[ \deminutum g \pes \auctum \descendens b \]
6522 \paper { \neumeDemoPaper }}
6529 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6530 \include "gregorian-init.ly"
6534 \[ a \pes b \flexa g \]
6537 \paper { \neumeDemoPaper }}
6540 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6541 \include "gregorian-init.ly"
6544 % Torculus Auctus Descendens
6545 \[ a \pes b \flexa \auctum \descendens g \]
6548 \paper { \neumeDemoPaper }}
6551 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6552 \include "gregorian-init.ly"
6555 % Torculus Deminutus
6556 \[ a \pes b \flexa \deminutum g \]
6559 \paper { \neumeDemoPaper }}
6563 @code{11. Torculus Initio Debilis}
6565 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6566 \include "gregorian-init.ly"
6569 % Torculus Initio Debilis
6570 \[ \deminutum a \pes b \flexa g \]
6573 \paper { \neumeDemoPaper }}
6576 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6577 \include "gregorian-init.ly"
6580 % Torculus Auctus Descendens Initio Debilis
6581 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6584 \paper { \neumeDemoPaper }}
6587 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6588 \include "gregorian-init.ly"
6591 % Torculus Deminutus Initio Debilis
6592 \[ \deminutum a \pes b \flexa \deminutum g \]
6595 \paper { \neumeDemoPaper }}
6599 @code{12. Porrectus}
6601 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6602 \include "gregorian-init.ly"
6606 \[ a \flexa g \pes b \]
6609 \paper { \neumeDemoPaper }}
6612 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6613 \include "gregorian-init.ly"
6616 % Porrectus Auctus Descendens
6617 \[ a \flexa g \pes \auctum \descendens b \]
6620 \paper { \neumeDemoPaper }}
6623 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6624 \include "gregorian-init.ly"
6627 % Porrectus Deminutus
6628 \[ a \flexa g \pes \deminutum b \]
6631 \paper { \neumeDemoPaper }}
6637 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6638 \include "gregorian-init.ly"
6642 \[ \virga b \inclinatum a \inclinatum g \]
6645 \paper { \neumeDemoPaper }
6649 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6650 \include "gregorian-init.ly"
6654 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6657 \paper { \neumeDemoPaper }}
6660 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6661 \include "gregorian-init.ly"
6664 % Climacus Deminutus
6665 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6668 \paper { \neumeDemoPaper }}
6672 @code{14. Scandicus}
6674 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6675 \include "gregorian-init.ly"
6679 \[ g \pes a \virga b \]
6682 \paper { \neumeDemoPaper }}
6685 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6686 \include "gregorian-init.ly"
6689 % Scandicus Auctus Descendens
6690 \[ g \pes a \pes \auctum \descendens b \]
6693 \paper { \neumeDemoPaper }}
6696 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6697 \include "gregorian-init.ly"
6700 % Scandicus Deminutus
6701 \[ g \pes a \pes \deminutum b \]
6704 \paper { \neumeDemoPaper }}
6710 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6711 \include "gregorian-init.ly"
6715 \[ g \oriscus a \pes \virga b \]
6718 \paper { \neumeDemoPaper }}
6721 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6722 \include "gregorian-init.ly"
6725 % Salicus Auctus Descendens
6726 \[ g \oriscus a \pes \auctum \descendens b \]
6729 \paper { \neumeDemoPaper }}
6736 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6737 \include "gregorian-init.ly"
6741 \[ \stropha b \stropha b \stropha a \]
6744 \paper { \neumeDemoPaper }
6753 Unlike most other neumes notation systems, the input language for
6754 neumes does not necessarily reflect directly the typographical
6755 appearance, but is designed to solely focuse on musical meaning. For
6756 example, @code{\[ a \pes b \flexa g \]} produces a Torculus consisting
6757 of three Punctum heads, while @code{\[ a \flexa g \pes b \]} produces
6758 a Porrectus with a curved flexa shape and only a single Punctum head.
6759 There is no command to explicitly typeset the curved flexa shape; the
6760 decision of when to typeset a curved flexa shape is purely taken from
6761 the musical input. The idea of this approach is to separate the
6762 musical aspects of the input from the notation style of the output.
6763 This way, the same input can be reused to typeset the same music in a
6764 different style of Gregorian chant notation.
6766 The following table shows the code fragments that produce the
6767 ligatures in the above neumes table. The letter in the first column
6768 in each line of the below table indicates to which ligature in the
6769 above table it refers. The second column gives the name of the
6770 ligature. The third column shows the code fragment that produces this
6771 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
6773 @multitable @columnfractions .1 .4 .5
6787 Punctum Inclinatum @tab
6788 @code{\[ \inclinatum b \]}
6792 Punctum Auctum Ascendens @tab
6793 @code{\[ \auctum \ascendens b \]}
6797 Punctum Auctum Descendens @tab
6798 @code{\[ \auctum \descendens b \]}
6802 Punctum Inclinatum Auctum @tab
6803 @code{\[ \inclinatum \auctum b \]}
6807 Punctum Inclinatum Parvum @tab
6808 @code{\[ \inclinatum \deminutum b \]}
6813 @code{\[ \virga b \]}
6818 @code{\[ \stropha b \]}
6823 @code{\[ \stropha \auctum b \]}
6828 @code{\[ \oriscus b \]}
6832 Clivis vel Flexa @tab
6833 @code{\[ b \flexa g \]}
6837 Clivis Aucta Descendens @tab
6838 @code{\[ b \flexa \auctum \descendens g \]}
6842 Clivis Aucta Ascendens @tab
6843 @code{\[ b \flexa \auctum \ascendens g \]}
6848 @code{\[ b \flexa \deminutum g \]}
6852 Podatus vel Pes @tab
6853 @code{\[ g \pes b \]}
6857 Pes Auctus Descendens @tab
6858 @code{\[ g \pes \auctum \descendens b \]}
6862 Pes Auctus Ascendens @tab
6863 @code{\[ g \pes \auctum \ascendens b \]}
6868 @code{\[ g \pes \deminutum b \]}
6873 @code{\[ \oriscus g \pes \virga b \]}
6877 Pes Quassus Auctus Descendens @tab
6878 @code{\[ \oriscus g \pes \auctum \descendens b \]}
6883 @code{\[ \quilisma g \pes b \]}
6887 Quilisma Pes Auctus Descendens @tab
6888 @code{\[ \quilisma g \pes \auctum \descendens b \]}
6892 Pes Initio Debilis @tab
6893 @code{\[ \deminutum g \pes b \]}
6897 Pes Auctus Descendens Initio Debilis @tab
6898 @code{\[ \deminutum g \pes \auctum \descendens b \]}
6903 @code{\[ a \pes b \flexa g \]}
6907 Torculus Auctus Descendens @tab
6908 @code{\[ a \pes b \flexa \auctum \descendens g \]}
6912 Torculus Deminutus @tab
6913 @code{\[ a \pes b \flexa \deminutum g \]}
6917 Torculus Initio Debilis @tab
6918 @code{\[ \deminutum a \pes b \flexa g \]}
6922 Torculus Auctus Descendens Initio Debilis @tab
6923 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
6927 Torculus Deminutus Initio Debilis @tab
6928 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
6933 @code{\[ a \flexa g \pes b \]}
6937 Porrectus Auctus Descendens @tab
6938 @code{\[ a \flexa g \pes \auctum \descendens b \]}
6942 Porrectus Deminutus @tab
6943 @code{\[ a \flexa g \pes \deminutum b \]}
6948 @code{\[ \virga b \inclinatum a \inclinatum g \]}
6952 Climacus Auctus @tab
6953 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
6957 Climacus Deminutus @tab
6958 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
6963 @code{\[ g \pes a \virga b \]}
6967 Scandicus Auctus Descendens @tab
6968 @code{\[ g \pes a \pes \auctum \descendens b \]}
6972 Scandicus Deminutus @tab
6973 @code{\[ g \pes a \pes \deminutum b \]}
6978 @code{\[ g \oriscus a \pes \virga b \]}
6982 Salicus Auctus Descendens @tab
6983 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
6988 @code{\[ \stropha b \stropha b \stropha a \]}
6994 The following head prefixes are supported
6996 @cindex @code{\virga}
6998 @cindex @code{\stropha}
7000 @cindex @code{\inclinatum}
7002 @cindex @code{\auctum}
7004 @cindex @code{\descendens}
7006 @cindex @code{\ascendens}
7008 @cindex @code{\oriscus}
7010 @cindex @code{\quilisma}
7012 @cindex @code{\deminutum}
7015 Head prefixes can be accumulated, though restrictions apply. For
7016 example, either @code{\descendens} or @code{\ascendens} can be applied
7017 to a head, but not both to the same head.
7020 @cindex @code{\flexa}
7021 Two adjacent heads can be tied together with the @code{\pes} and
7022 @code{\flexa} infix commands for a rising and falling line of melody,
7027 @node Vaticana style contexts
7028 @subsection Vaticana style contexts
7030 @cindex VaticanaVoiceContext
7031 @cindex VaticanaStaffContext
7033 The predefined @code{VaticanaVoiceContext} and
7034 @code{VaticanaStaffContext} can be used to easily engrave a piece of
7035 Gregorian Chant in the style of the Editio Vaticana. These contexts
7036 initialize all relevant context properties and grob properties to
7037 proper values. With these contexts, you can immediately go ahead
7038 entering the chant, as the following short excerpt demonstrates
7040 @lilypond[quote,raggedright,verbatim,noindent]
7041 \include "gregorian-init.ly"
7044 \context VaticanaVoice = "cantus" {
7045 \override Score.BarNumber #'transparent = ##t
7047 \[ c'\melisma c' \flexa a \]
7048 \[ a \flexa \deminutum g\melismaEnd \]
7050 \[ f\melisma \pes a c' c' \pes d'\melismaEnd \]
7051 c' \divisioMinima \break
7052 \[ c'\melisma c' \flexa a \]
7053 \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
7056 \lyricsto "cantus" \new Lyrics {
7057 San- ctus, San- ctus, San- ctus
7064 @subsection Figured bass
7066 @cindex Basso continuo
7068 @c TODO: musicological blurb about FB
7071 LilyPond has limited support for figured bass
7073 @lilypond[quote,verbatim,fragment]
7075 \context Voice { \clef bass dis4 c d ais }
7076 \context FiguredBass \figures {
7077 < 6 >4 < 7 >8 < 6+ [_!] >
7083 The support for figured bass consists of two parts: there is an input
7084 mode, introduced by @code{\figures}, where you can enter bass figures
7085 as numbers, and there is a context called @internalsref{FiguredBass} that
7086 takes care of making @internalsref{BassFigure} objects.
7088 In figures input mode, a group of bass figures is delimited by
7089 @code{<} and @code{>}. The duration is entered after the @code{>>}
7093 @lilypond[quote,fragment]
7094 \context FiguredBass
7098 Accidentals are added when you append @code{-}, @code{!} and @code{+}
7104 @lilypond[quote,fragment]
7105 \context FiguredBass
7106 \figures { <4- 6+ 7!> }
7109 Spaces or dashes may be inserted by using @code{_}. Brackets are
7110 introduced with @code{[} and @code{]}
7115 @lilypond[quote,fragment]
7116 \context FiguredBass
7117 \figures { < [4 6] 8 [_! 12]> }
7120 Although the support for figured bass may superficially resemble chord
7121 support, it works much simpler. The @code{\figures} mode simply
7122 stores the numbers , and @internalsref{FiguredBass} context prints
7123 them as entered. There is no conversion to pitches, and no
7124 realizations of the bass are played in the MIDI file.
7126 Internally, the code produces markup texts. You can use any of the
7127 markup text properties to override formatting. For example, the
7128 vertical spacing of the figures may be set with @code{baseline-skip}.
7132 Program reference: @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
7133 and @internalsref{FiguredBass} context.
7137 Slash notation for alterations is not supported.
7139 @node Contemporary notation
7140 @section Contemporary notation
7142 In the 20th century, composers have greatly expanded the musical
7143 vocabulary. With this expansion, many innovations in musical notation
7144 have been tried. The book by Stone (1980) gives a comprehensive
7145 overview (see @ref{Literature list}). In general, the use of new,
7146 innovative notation makes a piece harder to understand and perform and
7147 its use should therefore be avoided if possible. For this reason,
7148 support for contemporary notation in LilyPond is limited.
7152 * Polymetric notation::
7158 @node Polymetric notation
7159 @subsection Polymetric notation
7161 Double time signatures are not supported explicitly, but they can be
7162 faked. In the next example, the markup for the time signature is
7163 created with a markup text. This markup text is inserted in the
7164 @internalsref{TimeSignature} grob.
7166 @lilypond[verbatim,raggedright]
7172 \musicglyph #"scripts-stopped"
7173 \bracket \column < "5" "8" >
7178 \override Staff.TimeSignature #'print-function = #Text_item::print
7179 \override Staff.TimeSignature #'text = #tsMarkup
7181 c'2 \bar ":" c'4 c'4.
7185 Each staff can also have its own time signature. This is done by
7186 moving the @internalsref{Timing_engraver} to @internalsref{Staff}
7193 \remove "Timing_engraver"
7197 \consists "Timing_engraver"
7203 Now, each staff has its own time signature.
7217 c4. c8 c c c4. c8 c c
7222 @lilypond[raggedright]
7226 \remove "Timing_engraver"
7230 \consists "Timing_engraver"
7246 c4. c8 c c c4. c8 c c
7252 A different form of polymetric notation is where note lengths have
7253 different values across staves.
7255 This notation can be created by setting a common time signature for
7256 each staff but replacing it manually using
7257 @code{timeSignatureFraction} to the desired fraction. Then the printed
7258 durations in each staff are scaled to the common time signature.
7259 The latter is done with @code{\compressmusic}, which is similar to
7260 @code{\times}, but does not create a tuplet bracket.
7263 In this example, music with the time signatures of 3/4, 9/8 and 10/8 are
7264 used in parallel. In the second staff, shown durations are multiplied by
7265 2/3, so that 2/3 * 9/8 = 3/4, and in the third staff, shown durations are
7266 multiplied by 3/5, so that 3/5 * 10/8 = 3/4.
7268 @lilypond[raggedright,verbatim]
7276 \set Staff.timeSignatureFraction = #'(9 . 8)
7277 \compressmusic #'(2 . 3)
7278 \repeat unfold 6 { c8[ c c] }
7282 \set Staff.timeSignatureFraction = #'(10 . 8)
7283 \compressmusic #'(3 . 5)
7284 { \repeat unfold 2 { c8[ c c] }
7285 \repeat unfold 2 { c8[ c] }
7286 | c4. c4. \times 2/3 { c8 c c } c4 }
7296 When using different time signatures in parallel, the spacing is
7297 aligned vertically, but bar lines distort the regular spacing.
7302 @subsection Clusters
7306 A cluster indicates a continuous range of pitches to be played. They
7307 can be denoted as the envelope of a set of notes. They are entered by
7308 applying the function @code{notes-to-clusters} to a sequence of
7311 @lilypond[quote,relative=2,verbatim]
7312 \applymusic #notes-to-clusters { <c e > <b f'> }
7315 The following example (from
7316 @inputfileref{input/regression,cluster.ly}) shows what the result
7319 @lilypondfile[quote]{cluster.ly}
7321 Ordinary notes and clusters can be put together in the same staff,
7322 even simultaneously. In such a case no attempt is made to
7323 automatically avoid collisions between ordinary notes and clusters.
7327 Program reference: @internalsref{ClusterSpanner},
7328 @internalsref{ClusterSpannerBeacon},
7329 @internalsref{Cluster_spanner_engraver}, and
7330 @internalsref{ClusterNoteEvent}.
7332 Examples: @inputfileref{input/regression,cluster.ly}.
7336 Music expressions like @code{<< @{ g8 e8 @} a4 >>} are not printed
7337 accurately. Use @code{<g a>8 <e a>8} instead.
7342 @subsection Fermatas
7348 Contemporary music notation frequently uses special fermata symbols to
7349 indicate fermatas of differing lengths. The following fermatas are
7352 @lilypond[quote,raggedright]
7374 \context Lyrics \lyrics {
7375 \override LyricText #'font-family = #'typewriter
7376 "shortfermata" "fermata" "longfermata" "verylongfermata"
7381 See @ref{Articulations} for general instructions how to apply scripts
7382 such as fermatas to notes.
7384 @node Feathered beams
7385 @subsection Feathered beams
7387 Feathered beams are not supported natively, but they can be faked by
7388 forcing two beams to overlap. Here is an example,
7390 @lilypond[raggedright]
7391 \relative \new Staff <<
7395 \once \override Voice.Beam #'positions = #'(0 . 0.5)
7400 \once \override Voice.Beam #'positions = #'(0 . -0.5)
7408 @node Educational use
7409 @section Educational use
7413 * Blank music paper::
7414 * Notation for excercises::
7415 * Easy Notation note heads::
7419 @subsection Balloon help
7421 Elements of notation can be marked and named with the help of a square
7422 balloon. The primary purpose of this feature is to explain notation.
7424 The following example demonstrates its use.
7426 @lilypond[quote,verbatim,fragment,raggedright,relative=2]
7429 #(add-balloon-text 'NoteHead "heads, or tails?"
7435 The function @code{add-balloon-text} takes the name of a grob, the
7436 label to print, and the position where to put the label relative to
7437 the object. In the above example, the text ``heads or tails?'' ends
7438 3 spaces below the `balloon.'
7441 @cindex notation, explaining
7445 Program reference: @internalsref{text-balloon-interface}.
7447 Examples: @inputfileref{input/regression,balloon.ly}.
7452 @node Blank music paper
7453 @subsection Blank music paper
7455 A blank music paper can be produced also by using invisible notes, and
7456 removing @code{Bar_number_engraver}.
7461 \repeat unfold 2 % Change this for more lines.
7466 \override TimeSignature #'transparent = ##t
7467 defaultBarType = #""
7468 \remove Bar_number_engraver
7470 \context Staff \emptymusic
7471 \context TabStaff \emptymusic
7476 @node Notation for excercises
7477 @subsection Notation for excercises
7481 Invisible (or transparent) notes can be useful, when weird tricks are
7482 needed; especially, a slur cannot be attach to a rest or spacer rest.
7486 blanknotes = { \override NoteHead #'transparent = ##t
7487 \override Stem #'transparent = ##t }
7488 unblanknotes = { \revert NoteHead #'transparent
7489 \revert Stem #'transparent }
7494 \blanknotes e4 f4 \unblanknotes
7500 @node Easy Notation note heads
7501 @subsection Easy Notation note heads
7503 @cindex easy notation
7506 The `easy play' note head includes a note name inside the head. It is
7507 used in music for beginners
7509 @lilypond[quote,raggedright,verbatim,fragment,staffsize=26]
7514 The command @code{\setEasyHeads} overrides settings for the
7515 @internalsref{NoteHead} object. To make the letters readable, it has
7516 to be printed in a large font size. To print with a larger font, see
7517 @ref{Setting global staff size}.
7522 If you view the result with Xdvi, staff lines may show through the
7523 letters. Printing the PostScript file obtained does produce the
7528 @cindex @code{\setEasyHeads}
7529 @code{\setEasyHeads}