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::
32 * Contemporary notation::
36 @c FIXME: Note entry vs Music entry at top level menu is confusing.
42 This section is about basic notation elements notes, rests and
43 related constructs, such as stems, tuplets and ties.
48 * Chromatic alterations::
66 A note is printed by specifying its pitch and then its duration,
68 @lilypond[quote,verbatim]
69 { cis'4 d'8 e'16 c'16 }
77 @cindex Note specification
79 @cindex entering notes
81 The most common syntax for pitch entry is used for standard notes and
82 @code{\chordmode} modes. In these modes, pitches may be designated by
83 names. The notes are specified by the letters @code{a} through
84 @code{g}. The octave is formed with notes ranging from @code{c}
85 to @code{b}. The pitch @code{c} is an octave below middle C and the
86 letters span the octave above that C
88 @lilypond[fragment,verbatim,noindent]
90 a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
93 @cindex note names, Dutch
95 A sharp is formed by adding @code{-is} to the end of a pitch name and
96 a flat is formed by adding @code{-es}. Double sharps and double flats
97 are obtained by adding @code{-isis} or @code{-eses}. These
98 names are the Dutch note names. In Dutch, @code{aes} is contracted to
99 @code{as}, but both forms are accepted. Similarly, both
100 @code{es} and @code{ees} are accepted
102 @lilypond[fragment,quote,verbatim,relative=2]
110 There are predefined sets of note names for various other languages.
111 To use them, include the language specific init file. For
112 example: @code{\include "english.ly"}. The available language files
113 and the note names they define are
118 Note Names sharp flat
119 nederlands.ly c d e f g a bes b -is -es
120 english.ly c d e f g a bf b -s/-sharp -f/-flat
122 deutsch.ly c d e f g a b h -is -es
123 norsk.ly c d e f g a b h -iss/-is -ess/-es
124 svenska.ly c d e f g a b h -iss -ess
125 italiano.ly do re mi fa sol la sib si -d -b
126 catalan.ly do re mi fa sol la sib si -d/-s -b
127 espanol.ly do re mi fa sol la sib si -s -b
136 The optional octave specification takes the form of a series of
137 single quote (`@code{'}') characters or a series of comma
138 (`@code{,}') characters. Each @code{'} raises the pitch by one
139 octave; each @code{,} lowers the pitch by an octave
141 @lilypond[quote,fragment,verbatim]
142 c' c'' es' g' as' gisis' ais'
145 @c FIXME: we need this info (hide/unhide) somewhere in the manual, but this ain't the place. -gp
147 Notes can be hidden and unhidden with the following commands
149 @cindex @code{\hideNotes}
151 @cindex @code{\unHideNotes}
157 Program reference: @internalsref{NoteEvent}, and @internalsref{NoteHead}.
161 @node Chromatic alterations
162 @subsection Chromatic alterations
164 Normally accidentals are printed automatically, but you may also
165 print them manually. A reminder accidental
166 @cindex reminder accidental
168 can be forced by adding an exclamation mark @code{!}
169 after the pitch. A cautionary accidental
170 @cindex cautionary accidental
171 @cindex parenthesized accidental
172 (i.e. an accidental within parentheses) can be obtained by adding the
173 question mark `@code{?}' after the pitch.
175 @lilypond[quote,fragment,verbatim]
176 cis' cis' cis'! cis'?
182 The automatic production of accidentals can be tuned in many
183 ways. For more information, refer to @ref{Automatic accidentals}.
188 @subsection Micro tones
190 Half-flats and half-sharps are formed by adding @code{-eh} and
191 @code{-ih}; the following is a series of Cs with increasing pitches
193 @cindex quarter tones
194 @cindex semi-flats, semi-sharps
196 @lilypond[verbatim,quote,relative=2,fragment]
197 { ceseh ceh cih cisih }
200 Micro tones are also exported to the MIDI file
205 There are no generally accepted standards for denoting three quarter
206 flats, so LilyPond's symbol does not conform to any standard.
211 A chord is formed by a enclosing a set of pitches in @code{<} and
212 @code{>}. A chord may be followed by a duration, and a set of
213 articulations, just like simple notes
215 @lilypond[verbatim,fragment,quote,relative=1]
227 Rests are entered like notes, with the note name @code{r}
229 @lilypond[fragment,quote,raggedright,verbatim]
233 Whole bar rests, centered in middle of the bar,
234 must be done with multi-measure rests. They are discussed in
235 @ref{Multi measure rests}.
238 A rest's vertical position may be explicitly specified by entering a
239 note with the @code{\rest} keyword appended. This makes manual
240 formatting in polyphonic music easier. Automatic rest collision
241 formatting will leave these rests alone
243 @lilypond[fragment,quote,raggedright,verbatim]
249 Program reference: @internalsref{RestEvent}, and @internalsref{Rest}.
256 @cindex Invisible rest
261 An invisible rest (also called a `skip') can be entered like a note
262 with note name `@code{s}' or with @code{\skip @var{duration}}
264 @lilypond[fragment,quote,raggedright,verbatim,relative=2]
265 a4 a4 s4 a4 \skip 1 a4
268 The @code{s} syntax is only available in note mode and chord mode. In
269 other situations, for example, when entering lyrics, you should use
270 the @code{\skip} command
272 @lilypond[quote,raggedright,verbatim]
275 \new Lyrics \lyricmode { \skip 2 bla1 }
279 The skip command is merely an empty musical placeholder. It does not
280 produce any output, not even transparent output.
282 The @code{s} skip command does create @internalsref{Staff} and
283 @internalsref{Voice} when necessary, similar to note and rest
284 commands. For example, the following results in an empty staff.
286 @lilypond[quote,raggedright,verbatim]
290 The fragment @code{@{ \skip 4 @} } would produce an empty page.
294 Program reference: @internalsref{SkipEvent}, @internalsref{SkipMusic}.
299 @subsection Durations
303 @cindex @code{\longa}
304 @cindex @code{\breve}
305 @cindex @code{\maxima}
308 In Note, Chord, and Lyrics mode, durations are designated by numbers
309 and dots: durations are entered as their reciprocal values. For example,
310 a quarter note is entered using a @code{4} (since it is a 1/4 note), while
311 a half note is entered using a @code{2} (since it is a 1/2 note). For notes
312 longer than a whole you must use variables
316 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
318 r1 r2 r4 r8 r16 r32 r64 r64
321 @lilypond[quote,noindent]
324 a\breve*1/2 \autoBeamOff
325 a1 a2 a4 a8 a16 a32 a64 a64
328 r\longa*1/4 r\breve *1/2
329 r1 r2 r4 r8 r16 r32 r64 r64
335 \remove "Clef_engraver"
336 \override StaffSymbol #'transparent = ##t
337 \override TimeSignature #'transparent = ##t
338 \override BarLine #'transparent = ##t
339 \consists "Pitch_squash_engraver"
345 If the duration is omitted then it is set to the previously entered
346 duration. The default for the first note is a quarter note.
348 @lilypond[quote,raggedright,verbatim,fragment]
356 @node Augmentation dots
357 @subsection Augmentation dots
360 To obtain dotted note lenghts, simply add a dot (`@code{.}') to
361 the number. Double-dotted notes are produced in a similar way.
363 @lilypond[quote,fragment,verbatim]
364 a'4 b' c''4. b'8 a'4. b'4.. c''8.
369 Dots are normally moved up to avoid staff lines, except in polyphonic
370 situations. The following commands may be used to force a particular
373 @cindex @code{\dotsUp}
375 @cindex @code{\dotsDown}
377 @cindex @code{\dotsNeutral}
382 Program reference: @internalsref{Dots}, and @internalsref{DotColumn}.
384 @node Scaling durations
385 @subsection Scaling durations
387 You can alter the length of duration by a fraction @var{N/M}
388 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
389 will not affect the appearance of the notes or rests produced.
391 In the following example, the first three notes take up exactly two
392 beats, but no triplet bracket is printed.
393 @lilypond[quote,fragment,relative=2,verbatim]
395 a4*2/3 gis4*2/3 a4*2/3
403 This manual: @ref{Tuplets}
406 @c TODO: I'm not certain that Stems belong here in the manual. -gp
410 Whenever a note is found, a @internalsref{Stem} object is created
411 automatically. For whole notes and rests, they are also created but
416 @cindex @code{\stemUp}
418 @cindex @code{\stemDown}
420 @cindex @code{\stemNeutral}
431 A tie connects two adjacent note heads of the same pitch. The tie in
432 effect extends the length of a note. Ties should not be confused with
433 slurs, which indicate articulation, or phrasing slurs, which indicate
434 musical phrasing. A tie is entered using the tilde symbol `@code{~}'
436 @lilypond[quote,fragment,verbatim]
437 e' ~ e' <c' e' g'> ~ <c' e' g'>
440 When a tie is applied to a chord, all note heads whose pitches match
441 are connected. When no note heads match, no ties will be created.
443 A tie is just a way of extending a note duration, similar to the
444 augmentation dot. The following example shows two ways of notating
445 exactly the same concept
447 @lilypond[quote,fragment,raggedright]
448 \time 3/4 c'2. c'2 ~ c'4
452 Ties are used either when the note crosses a bar line, or when dots
453 cannot be used to denote the rhythm. When using ties, larger note
454 values should be aligned to subdivisions of the measure, eg.
458 r8 c8 ~ c2 r4 | r8^"not" c2 ~ c8 r4
462 If you need to tie a lot of notes over bars, it may be easier to use
463 automatic note splitting (see @ref{Automatic note splitting}). This
464 mechanism automatically splits long notes, and ties them across bar
470 @cindex @code{\tieUp}
472 @cindex @code{\tieDown}
474 @cindex @code{\tieNeutral}
476 @cindex @code{\tieDotted}
478 @cindex @code{\tieSolid}
483 In this manual: @ref{Automatic note splitting}.
485 Program reference: @internalsref{TieEvent}, @internalsref{Tie}.
490 Switching staves when a tie is active will not produce a slanted tie.
492 Formatting of ties is a difficult subject. The results are often not
500 @cindex @code{\times}
502 Tuplets are made out of a music expression by multiplying all durations
505 @cindex @code{\times}
507 \times @var{fraction} @var{musicexpr}
511 The duration of @var{musicexpr} will be multiplied by the fraction.
512 The fraction's denominator will be printed over the notes, optionally
513 with a bracket. The most common tuplet is the triplet in which 3
514 notes have the length of 2, so the notes are 2/3 of their written
517 @lilypond[quote,fragment,verbatim]
518 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
521 The property @code{tupletSpannerDuration} specifies how long each
522 bracket should last. With this, you can make lots of tuplets while
523 typing @code{\times} only once, thus saving lots of typing. In the next
524 example, there are two triplets shown, while @code{\times} was only
527 @lilypond[quote,fragment,relative=1,raggedright,verbatim]
528 \set tupletSpannerDuration = #(ly:make-moment 1 4)
529 \times 2/3 { c'8 c c c c c }
532 The format of the number is determined by the property
533 @code{tupletNumberFormatFunction}. The default prints only the
534 denominator, but if it is set to the Scheme function
535 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
539 @cindex @code{tupletNumberFormatFunction}
540 @cindex tuplet formatting
545 @cindex @code{\tupletUp}
547 @cindex @code{\tupletDown}
549 @cindex @code{\tupletNeutral}
550 @code{\tupletNeutral}.
554 User manual: @ref{Changing context properties on the fly} for the
558 Program reference: @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
560 Examples: @inputfileref{input/regression,tuplet-nest.ly}.
564 Nested tuplets are not formatted automatically. In this case, outer
565 tuplet brackets should be moved manually, which is demonstrated in
566 @inputfileref{input/regression,tuplet-nest.ly}.
570 @node Easier music entry
571 @section Easier music entry
574 This section deals with tricks and features of the input language that
575 were added solely to help entering music and finding and correcting
576 mistakes. There are also external tools that make debugging easier.
577 See @ref{Point and click} for more information.
579 It is also possible to enter and edit music using other programs, such as
580 GUI interfaces or MIDI sequencers. Refer to the LilyPond
581 website for more information.
588 * Skipping corrected music::
589 * Automatic note splitting::
595 @node Relative octaves
596 @subsection Relative octaves
598 @cindex relative octave specification
600 Octaves are specified by adding @code{'} and @code{,} to pitch names.
601 When you copy existing music, it is easy to accidentally put a pitch
602 in the wrong octave and hard to find such an error. The relative
603 octave mode prevents these errors by making the mistakes much
604 larger: a single error puts the rest of the piece off by one octave
606 @cindex @code{\relative}
608 \relative @var{startpitch} @var{musicexpr}
612 \relative @var{musicexpr}
615 The octave of notes that appear in @var{musicexpr} are calculated as
616 follows: if no octave changing marks are used, the basic interval
617 between this and the last note is always taken to be a fourth or
618 less. This distance is determined without regarding alterations; a
619 @code{fisis} following a @code{ceses} will be put above the
620 @code{ceses}. In other words, a doubly-augmented fourth is considered
621 a smaller interval than a diminshed fifth, even though the fourth is
622 seven semitones while the fifth is only six semitones.
624 The octave changing marks @code{'} and @code{,} can be added to raise
625 or lower the pitch by an extra octave. Upon entering relative mode,
626 an absolute starting pitch can be specified that will act as the
627 predecessor of the first note of @var{musicexpr}. If no starting pitch
628 is specified, then middle C is used as a start.
630 Here is the relative mode shown in action
631 @lilypond[quote,fragment,raggedright,verbatim]
637 Octave changing marks are used for intervals greater than a fourth
638 @lilypond[quote,fragment,verbatim]
644 If the preceding item is a chord, the first note of the chord is used
645 to determine the first note of the next chord
647 @lilypond[quote,fragment,verbatim]
655 The pitch after the @code{\relative} contains a note name.
658 The relative conversion will not affect @code{\transpose},
659 @code{\chordmode} or @code{\relative} sections in its argument. To use
660 relative within transposed music, an additional @code{\relative} must
661 be placed inside @code{\transpose}.
664 @subsection Octave check
667 Octave checks make octave errors easier to correct: a note may be
668 followed by @code{=}@var{quotes} which indicates what its absolute
669 octave should be. In the following example,
671 \relative c'' @{ c='' b=' d,='' @}
675 @c take care with @code, adds confusing quotes.
676 the @code{d} will generate a warning, because a @code{d''} is expected
677 (because @code{b'} to @code{d''} is only a third), but a @code{d}' is
678 found. In the output, the octave is corrected to be a @code{d''} and
679 the next note is calculated relative to @code{d''} instead of @code{d'}.
683 There is also a syntax that is separate from the notes. The syntax
689 This checks that @var{pitch} (without quotes) yields @var{pitch} (with
690 quotes) in \relative mode. If not, a warning is printed, and the
693 In the example below, the first check passes without incident, since
694 the @code{e} (in relative mode) is within a fifth of @code{a'}. However,
695 the second check produces a warning, since the @code{e} is not within
696 a fifth of @code{b'}. The warning message is printed, and the octave
697 is adjusted so that the following notes are in the correct octave
709 The octave of a note following an octave check is determined with
710 respect to the note preceding it. In the next fragment, the last note
711 is a @code{a'}, above middle C. That means that the @code{\octave}
712 check passes successfully, so the check could be deleted without changing
713 the output of the piece.
715 @lilypond[quote,verbatim,fragment]
724 @subsection Bar check
728 @cindex @code{barCheckSynchronize}
731 Bar checks help detect errors in the durations. A bar check is
732 entered using the bar symbol, `@code{|}'. Whenever it is encountered
733 during interpretation, it should fall on a measure boundary. If it
734 does not, a warning is printed. In the next example, the second bar
735 check will signal an error
737 \time 3/4 c2 e4 | g2 |
740 Bar checks can also be used in lyrics, for example
745 Twin -- kle | Twin -- kle
750 @cindex @code{skipTypesetting}
752 Failed bar checks are caused by entering incorrect
753 durations. Incorrect durations often completely garble up the score,
754 especially if the score is polyphonic, so a good place to start correcting
755 input is by scanning for failed bar checks and incorrect durations. To
756 speed up this process, the @code{skipTypesetting} feature may be
757 used. It is described in the next section.
760 @cindex @code{pipeSymbol}
762 It is also possible to redefine the meaning of @code{|}. This is done
763 by assigning a music expression to @code{pipeSymbol},
765 @lilypond[quote,raggedright,verbatim]
766 pipeSymbol = \bar "||"
772 @node Skipping corrected music
773 @subsection Skipping corrected music
775 The property @code{Score.skipTypesetting} can be used to switch on and
776 off typesetting completely during the interpretation phase. When
777 typesetting is switched off, the music is processed much more
778 quickly. This can be used to skip over the parts of a score that
779 have already been checked for errors
781 @lilypond[quote,fragment,raggedright,verbatim]
784 \set Score.skipTypesetting = ##t
786 \set Score.skipTypesetting = ##f
790 In polyphonic music, @code{Score.skipTypesetting} will affect all
791 voices and staves, saving even more time.
793 @node Automatic note splitting
794 @subsection Automatic note splitting
796 Long notes can be converted automatically to tied notes. This is done
797 by replacing the @internalsref{Note_heads_engraver} by the
798 @internalsref{Completion_heads_engraver}.
799 In the following examples, notes crossing the bar line are split and tied.
802 @lilypond[quote,fragment,verbatim,relative=1,raggedright]
804 \remove "Note_heads_engraver"
805 \consists "Completion_heads_engraver"
807 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
811 This engraver splits all running notes at the bar line, and inserts
812 ties. One of its uses is to debug complex scores: if the measures are
813 not entirely filled, then the ties exactly show how much each measure
818 Not all durations (especially those containing tuplets) can be
819 represented exactly with normal notes and dots, but the engraver will
824 Examples: @inputfileref{input/regression,completion-heads.ly}.
828 Program reference: @internalsref{Completion_heads_engraver}.
832 @section Staff notation
834 This section describes music notation that occurs on staff level,
835 such as key signatures, clefs and time signatures.
837 @cindex Staff notation
848 * Time administration::
849 * Controlling formatting of prefatory matter::
853 @subsection Staff symbol
855 @cindex adjusting staff symbol
857 Notes, dynamic signs, etc. are grouped
858 with a set of horizontal lines, into a staff (plural `staves'). In our
859 system, these lines are drawn using a separate layout object called
863 @cindex staff lines, setting number of
864 @cindex staff lines, setting thickness of
865 @cindex thickness of staff lines, setting
866 @cindex number of staff lines, setting
870 Program reference: @internalsref{StaffSymbol}.
872 Examples: @inputfileref{input/test,staff-lines.ly},
873 @inputfileref{input/test,staff-size.ly}.
877 If a staff is ended halfway a piece, the staff symbol may not end
878 exactly on the bar line.
882 @subsection Key signature
883 @cindex Key signature
887 The key signature indicates the scale in which a piece is played. It
888 is denoted by a set of alterations (flats or sharps) at the start of
892 Setting or changing the key signature is done with the @code{\key}
895 @code{\key} @var{pitch} @var{type}
898 @cindex @code{\minor}
899 @cindex @code{\major}
900 @cindex @code{\minor}
901 @cindex @code{\ionian}
902 @cindex @code{\locrian}
903 @cindex @code{\aeolian}
904 @cindex @code{\mixolydian}
905 @cindex @code{\lydian}
906 @cindex @code{\phrygian}
907 @cindex @code{\dorian}
909 Here, @var{type} should be @code{\major} or @code{\minor} to get
910 @var{pitch}-major or @var{pitch}-minor, respectively.
911 The standard mode names @code{\ionian},
912 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
913 @code{\phrygian}, and @code{\dorian} are also defined.
915 This command sets the context property
916 @internalsref{Staff}.@code{keySignature}. Non-standard key signatures
917 can be specified by setting this property directly.
919 Accidentals and key signatures often confuse new users, because
920 unaltered notes get natural signs depending on the key signature. For
921 more information, see @ref{More about pitches}.
925 Program reference: @internalsref{KeyChangeEvent},
926 @internalsref{KeyCancellation} and @internalsref{KeySignature}.
928 @cindex @code{keySignature}
935 The clef indicates which lines of the staff correspond to which
939 The clef can be set with the @code{\clef} command
940 @lilypond[quote,fragment,verbatim]
941 { c''2 \clef alto g'2 }
944 Supported clef-names include
945 @c Moved standard clefs to the top /MB
949 @item treble, violin, G, G2
962 G clef on 1st line, so-called French violin clef
967 @cindex mezzosoprano clef
970 @cindex baritone clef
973 @cindex varbaritone clef
984 By adding @code{_8} or @code{^8} to the clef name, the clef is
985 transposed one octave down or up, respectively, and @code{_15} and
986 @code{^15} transposes by two octaves. The argument @var{clefname}
987 must be enclosed in quotes when it contains underscores or digits. For
991 @cindex choral tenor clef
992 @lilypond[quote,verbatim,fragment,relative=1]
996 This command is equivalent to setting @code{clefGlyph},
997 @code{clefPosition} (which controls the Y position of the clef),
998 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
999 when any of these properties are changed. The following example shows
1000 possibilities when setting properties manually.
1004 \set Staff.clefGlyph = #"clefs-F"
1005 \set Staff.clefPosition = #2
1007 \set Staff.clefGlyph = #"clefs-G"
1009 \set Staff.clefGlyph = #"clefs-C"
1011 \set Staff.clefOctavation = #7
1013 \set Staff.clefOctavation = #0
1014 \set Staff.clefPosition = #0
1024 Program reference: @internalsref{Clef}.
1028 @node Ottava brackets
1029 @subsection Ottava brackets
1031 `Ottava' brackets introduce an extra transposition of an octave for
1032 the staff. They are created by invoking the function
1033 @code{set-octavation}
1039 @lilypond[quote,verbatim,fragment]
1049 The @code{set-octavation} function also takes -1 (for 8va bassa) and 2
1050 (for 15ma) as arguments. Internally the function sets the properties
1051 @code{ottavation} (e.g. to @code{"8va"}) and
1052 @code{centralCPosition}. For overriding the text of the bracket, set
1053 @code{ottavation} after invoking @code{set-octavation}, i.e.,
1058 \set Staff.ottavation = #"8"
1065 Program reference: @internalsref{OttavaBracket}.
1067 Examples: @inputfileref{input/regression,ottava.ly},
1068 @inputfileref{input/regression,ottava-broken.ly}.
1072 @code{set-octavation} will get confused when clef changes happen
1073 during an octavation bracket.
1078 @node Time signature
1079 @subsection Time signature
1080 @cindex Time signature
1082 @cindex @code{\time}
1084 Time signature indicates the metrum of a piece: a regular pattern of
1085 strong and weak beats. It is denoted by a fraction at the start of the
1089 The time signature is set or changed by the @code{\time}
1091 @lilypond[quote,fragment,verbatim]
1092 \time 2/4 c'2 \time 3/4 c'2.
1095 The symbol that is printed can be customized with the @code{style}
1096 property. Setting it to @code{#'()} uses fraction style for 4/4 and
1099 @lilypond[fragment,verbatim]
1102 \override Staff.TimeSignature #'style = #'()
1109 There are many more options for its layout. See @ref{Ancient time
1110 signatures} for more examples.
1113 This command sets the property @code{timeSignatureFraction},
1114 @code{beatLength} and @code{measureLength} in the @code{Timing}
1115 context, which is normally aliased to @internalsref{Score}. The
1116 property @code{measureLength} determines where bar lines should be
1117 inserted, and how automatic beams should be generated. Changing the
1118 value of @code{timeSignatureFraction} also causes the symbol to be
1121 More options are available through the Scheme function
1122 @code{set-time-signature}. In combination with the
1123 @internalsref{Measure_grouping_engraver}, it will create
1124 @internalsref{MeasureGrouping} signs. Such signs ease reading
1125 rhythmically complex modern music. In the following example, the 9/8
1126 measure is subdivided in 2, 2, 2 and 3. This is passed to
1127 @code{set-time-signature} as the third argument @code{(2 2 2 3)}
1129 @lilypond[quote,raggedright,verbatim]
1132 #(set-time-signature 9 8 '(2 2 2 3))
1133 g8[ g] d[ d] g[ g] a8[( bes g]) |
1134 #(set-time-signature 5 8 '(3 2))
1140 \consists "Measure_grouping_engraver"
1148 Program reference: @internalsref{TimeSignature}, and @internalsref{Timing_engraver}.
1153 Automatic beaming does not use the measure grouping specified with
1154 @code{set-time-signature}.
1156 @node Partial measures
1157 @subsection Partial measures
1160 @cindex partial measure
1161 @cindex measure, partial
1162 @cindex shorten measures
1163 @cindex @code{\partial}
1165 Partial measures, for example in upsteps, are entered using the
1166 @code{\partial} command
1167 @lilypond[quote,fragment,verbatim,relative=2]
1168 \partial 16*5 c16 cis d dis e | a2. c,4 | b2
1171 The syntax for this command is
1173 \partial @var{duration}
1175 This is internally translated into
1177 \set Timing.measurePosition = -@var{length of duration}
1180 The property @code{measurePosition} contains a rational number
1181 indicating how much of the measure has passed at this point.
1185 This command does not take into account grace notes at the start of
1186 the music. When a piece starts with graces notes in the pickup, then
1187 the @code{\partial} should follow the grace notes
1189 @lilypond[verbatim,relative,fragment]
1199 @node Unmetered music
1200 @subsection Unmetered music
1204 Bar lines and bar numbers are calculated automatically. For unmetered
1205 music (e.g. cadenzas), this is not desirable. By setting
1206 @code{Score.timing} to false, this automatic timing can be switched
1207 off. Empty bar lines,
1214 indicate where line breaks can occur.
1218 @cindex @code{\cadenzaOn}
1220 @cindex @code{\cadenzaOff}
1227 @subsection Bar lines
1231 @cindex measure lines
1235 Bar lines delimit measures, but are also used to indicate repeats.
1236 Normally, they are inserted automatically. Line breaks may only
1237 happen on bar lines.
1239 Special types of bar lines can be forced with the @code{\bar} command
1241 @lilypond[quote,relative=2,fragment,verbatim]
1245 The following bar types are available
1246 @lilypondfile[]{bar-lines.ly}
1248 For allowing line breaks, there is a special command,
1252 This will insert an invisible bar line, and allow line breaks at this
1255 In scores with many staves, a @code{\bar} command in one staff is
1256 automatically applied to all staves. The resulting bar lines are
1257 connected between different staves of a @internalsref{StaffGroup}
1259 @lilypond[quote,fragment,verbatim]
1261 \context StaffGroup <<
1267 \new Staff { \clef bass c4 g e g }
1269 \new Staff { \clef bass c2 c2 }
1274 The command @code{\bar }@var{bartype} is a short cut for doing
1275 @code{\set Timing.whichBar = }@var{bartype}. Whenever @code{whichBar}
1276 is set to a string, a bar line of that type is created.
1278 A bar line is created whenever the @code{whichBar} property is set.
1279 At the start of a measure it is set to the contents of
1280 @code{defaultBarType}. The contents of @code{repeatCommands} are used
1281 to override default measure bars.
1283 @cindex @code{whichBar}
1284 @cindex @code{repeatCommands}
1285 @cindex @code{defaultBarType}
1287 You are encouraged to use @code{\repeat} for repetitions. See
1294 In this manual: @ref{Repeats}, @ref{System start delimiters}
1297 Program reference: @internalsref{BarLine} (created at
1298 @internalsref{Staff} level), @internalsref{SpanBar} (across staves).
1300 @cindex bar lines at start of system
1301 @cindex start of system
1305 Examples: @inputfileref{input/test,bar-lines.ly},
1308 @node Time administration
1309 @subsection Time administration
1311 Time is administered by the @internalsref{Time_signature_engraver},
1312 which usually lives in the @internalsref{Score} context.
1313 The bookkeeping deals with the following variables
1316 @item currentBarNumber
1319 the length of the measures in the current time signature. For a 4/4
1320 time this is 1, and for 6/8 it is 3/4.
1321 @item measurePosition
1322 the point within the measure where we currently are. This quantity
1323 is reset to 0 whenever it exceeds @code{measureLength}. When that happens,
1324 @code{currentBarNumber} is incremented.
1326 if set to true, the above variables are updated for every time
1327 step. When set to false, the engraver stays in the current measure
1331 Timing can be changed by setting any of these variables explicitly.
1332 In the next example, the 4/4 time signature is printed, but
1333 @code{measureLength} is set to 5/4. After a while, the measure is
1334 shortened by 1/8, by setting @code{measurePosition} to -3/8 at 2/4 in
1335 the measure, so the next bar line will fall at 2/4 + 3/8.
1339 \set Score.measureLength = #(ly:make-moment 5 4)
1343 \set Score.measurePosition = #(ly:make-moment -3 8)
1350 @node Controlling formatting of prefatory matter
1351 @subsection Controlling formatting of prefatory matter
1353 TODO Somebody needs to explain this example, but I don't know what
1354 they're trying to do, so it won't be me. -gp
1358 \override Staff.Clef #'break-visibility = #end-of-line-visible
1359 \override Staff.KeySignature #'break-visibility = #end-of-line-visible
1360 \set Staff.explicitClefVisibility = #end-of-line-visible
1361 \set Staff.explicitKeySignatureVisibility = #end-of-line-visible
1363 % We want the time sig to take space, otherwise there is not
1364 % enough white at the start of the line.
1367 \override Staff.TimeSignature #'transparent = ##t
1368 \set Score.defaultBarType = #"empty"
1388 Polyphony in music refers to having more than one voice occuring in
1389 a piece of music. Polyphony in LilyPond refers to having more than
1390 one voice on the same staff.
1393 * Writing polyphonic music::
1396 @node Writing polyphonic music
1397 @subsection Writing polyphonic music
1400 The easiest way to enter fragments with more than one voice on a staff
1401 is to split chords using the separator @code{\\}. You can use it for
1402 small, short-lived voices or for single chords
1406 @lilypond[quote,verbatim,fragment]
1407 \context Staff \relative c'' {
1408 c4 << { f d e } \\ { b c2 } >>
1409 c4 << g' \\ b, \\ f' \\ d >>
1413 The separator causes @internalsref{Voice} contexts@footnote{Polyphonic
1414 voices are sometimes called ``layers'' in other notation packages}
1416 to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
1417 each of these contexts, vertical direction of slurs, stems, etc. is set
1420 @cindex @code{\voiceOne}
1421 @cindex @code{\voiceFour}
1423 This can also be done by instantiating @internalsref{Voice} contexts
1424 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1425 a stem directions and horizontal shift for each part
1428 @lilypond[quote,raggedright,verbatim]
1431 \new Voice { \voiceOne cis2 b }
1432 \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
1433 \new Voice { \voiceTwo fis4~ fis4 f ~ f } >>
1437 The command @code{\oneVoice} will revert back to the normal setting.
1438 @cindex @code{\oneVoice}
1441 Normally, note heads with a different number of dots are not merged, but
1442 when the object property @code{merge-differently-dotted} is set in
1443 the @internalsref{NoteCollision} object, they are merged
1444 @lilypond[quote,verbatim,fragment,raggedright,relative=2]
1447 \override Staff.NoteCollision
1448 #'merge-differently-dotted = ##t
1450 } \\ { g8.[ f16] g8.[ f16] } >>
1453 Similarly, you can merge half note heads with eighth notes, by setting
1454 @code{merge-differently-headed}
1455 @lilypond[quote,fragment,relative=2,verbatim]
1458 \override Staff.NoteCollision
1459 #'merge-differently-headed = ##t
1460 c8 c4. } \\ { c2 c2 } >>
1463 LilyPond also vertically shifts rests that are opposite of a stem,
1466 @lilypond[quote,raggedright,fragment,verbatim]
1467 \context Voice << c''4 \\ r4 >>
1475 @cindex @code{\oneVoice}
1477 @cindex @code{\voiceOne}
1479 @cindex @code{\voiceTwo}
1481 @cindex @code{\voiceThree}
1483 @cindex @code{\voiceFour}
1488 @cindex @code{\shiftOn}
1490 @cindex @code{\shiftOnn}
1492 @cindex @code{\shiftOnnn}
1494 @cindex @code{\shiftOff}
1495 @code{\shiftOff}: these commands specify in what chords of the current
1496 voice should be shifted. The outer voices (normally: voice one and
1497 two) have @code{\shiftOff}, while the inner voices (three and four)
1498 have @code{\shiftOn}. @code{\shiftOnn} and @code{\shiftOnnn} define
1499 further shift levels.
1502 When LilyPond cannot cope, the @code{force-hshift}
1503 property of the @internalsref{NoteColumn} object and pitched rests can
1504 be used to override typesetting decisions.
1506 @lilypond[verbatim,raggedright]
1513 \once \override NoteColumn #'force-hshift = #1.7
1522 Program reference: the objects responsible for resolving collisions are
1523 @internalsref{NoteCollision} and @internalsref{RestCollision}.
1526 @inputfileref{input/regression,collision-dots.ly},
1527 @inputfileref{input/regression,collision-head-chords.ly},
1528 @inputfileref{input/regression,collision-heads.ly},
1529 @inputfileref{input/regression,collision-mesh.ly}, and
1530 @inputfileref{input/regression,collisions.ly}.
1536 When using @code{merge-differently-headed} with an upstem eighth or a
1537 shorter note, and a downstem half note, the eighth note gets the wrong
1540 There is no support for clusters where the same note occurs with
1541 different accidentals in the same chord. In this case, it is
1542 recommended to use enharmonic transcription, or to use special cluster
1543 notation (see @ref{Clusters}).
1548 Beams are used to group short notes into chunks that are aligned with
1549 the metrum. LilyPond normally inserts beams automatically, but if you
1550 wish you may control them manually or changed how beams are automatically
1553 @cindex Automatic beams
1557 * Setting automatic beam behavior::
1561 @node Automatic beams
1562 @subsection Automatic beams
1564 LilyPond inserts beams automatically
1566 @lilypond[quote,fragment,verbatim,relative=2]
1567 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1570 When these automatic decisions are not good enough, beaming can be
1571 entered explicitly. It is also possible to define beaming patterns
1572 that differ from the defaults.
1574 Individual notes may be marked with @code{\noBeam}, to prevent them
1577 @lilypond[quote,fragment,verbatim,relative=2]
1578 \time 2/4 c8 c\noBeam c c
1584 Program reference: @internalsref{Beam}.
1588 @subsection Manual beams
1589 @cindex beams, manual
1593 In some cases it may be necessary to override the automatic beaming
1594 algorithm. For example, the autobeamer will not put beams over rests
1595 or bar lines. Such beams are specified manually by marking the begin
1596 and end point with @code{[} and @code{]}
1598 @lilypond[quote,fragment,relative=1,verbatim]
1600 r4 r8[ g' a r8] r8 g[ | a] r8
1604 @cindex @code{stemLeftBeamCount}
1606 Normally, beaming patterns within a beam are determined automatically.
1607 If necessary, the properties @code{stemLeftBeamCount} and
1608 @code{stemRightBeamCount} can be used to override the defaults. If
1609 either property is set, its value will be used only once, and then it
1612 @lilypond[quote,fragment,relative=1,verbatim]
1617 \set stemLeftBeamCount = #1
1621 @cindex @code{stemRightBeamCount}
1624 The property @code{subdivideBeams} can be set in order to subdivide
1625 all 16th or shorter beams at beat positions, as defined by the
1626 @code{beatLength} property.
1629 @lilypond[fragment,quote,relative=2,verbatim,noindent]
1631 \set subdivideBeams = ##t
1633 \set Score.beatLength = #(ly:make-moment 1 8)
1636 @cindex @code{subdivideBeams}
1638 Normally, line breaks are forbidden when beams cross bar lines. This
1639 behavior can be changed by setting @code{allowBeamBreak}.
1641 @cindex @code{allowBeamBreak}
1642 @cindex beams and line breaks
1644 @cindex beams, kneed
1646 @cindex auto-knee-gap
1651 User manual: @ref{Changing context properties on the fly} for the
1657 @cindex Frenched staves
1658 Kneed beams are inserted automatically, when a large gap is detected
1659 between the note heads. This behavior can be tuned through the object.
1662 Automatically kneed cross-staff beams cannot be used together with
1663 hidden staves. See @ref{Hiding staves}.
1665 Beams do not avoid collisions with symbols around the notes, such as
1666 texts and accidentals.
1671 @node Setting automatic beam behavior
1672 @subsection Setting automatic beam behavior
1674 @cindex @code{autoBeamSettings}
1675 @cindex @code{(end * * * *)}
1676 @cindex @code{(begin * * * *)}
1677 @cindex automatic beams, tuning
1678 @cindex tuning automatic beaming
1680 @c [TODO: use \applycontext]
1682 In normal time signatures, automatic beams can start on any note but can
1683 only end in a few positions within the measure: beams can end on a beat,
1684 or at durations specified by the properties in
1685 @code{autoBeamSettings}. The defaults for @code{autoBeamSettings}
1686 are defined in @file{scm/auto-beam.scm}.
1688 The value of @code{autoBeamSettings} is changed with two functions,
1690 #(override-auto-beam-setting
1691 '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b}
1693 #(revert-auto-beam-setting '(@var{be} @var{p} @var{q} @var{n} @var{m}))
1695 Here, @var{be} is the symbol @code{begin} or @code{end}, and
1696 @var{context} is an optional context (default: @code{'Voice}). It
1697 determines whether the rule applies to begin or end-points. The
1698 quantity @var{p}/@var{q} refers to the length of the beamed notes (and
1699 `@code{* *}' designates notes of any length), @var{n}/@var{M} refers
1700 to a time signature (wildcards `@code{* *}' may be entered to
1701 designate all time signatures), @var{a}/@var{b} is a duration. By
1702 default, this command changes settings for the current voice. It is
1703 also possible to adjust settings at higher contexts, by adding a
1704 @var{context} argument.
1706 For example, if automatic beams should end on every quarter note, use
1709 #(override-auto-beam-setting '(end * * * *) 1 4 'Staff)
1711 Since the duration of a quarter note is 1/4 of a whole note, it is
1712 entered as @code{(ly:make-moment 1 4)}.
1714 The same syntax can be used to specify beam starting points. In this
1715 example, automatic beams can only end on a dotted quarter note
1717 #(override-auto-beam-setting '(end * * * *) 3 8)
1719 In 4/4 time signature, this means that automatic beams could end only on
1720 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1721 3/8, has passed within the measure).
1723 Rules can also be restricted to specific time signatures. A rule that
1724 should only be applied in @var{N}/@var{M} time signature is formed by
1725 replacing the second asterisks by @var{N} and @var{M}. For example, a
1726 rule for 6/8 time exclusively looks like
1728 #(override-auto-beam-setting '(begin * * 6 8) @dots{})
1731 If a rule should be to applied only to certain types of beams, use the
1732 first pair of asterisks. Beams are classified according to the
1733 shortest note they contain. For a beam ending rule that only applies
1734 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1737 @cindex automatic beam generation
1739 @cindex @code{autoBeaming}
1742 If beams are used to indicate melismata in songs, then automatic
1743 beaming should be switched off. This is done by setting
1744 @code{autoBeaming} to @code{#f}.
1748 @cindex @code{\autoBeamOff}
1749 @code{\autoBeamOff},
1750 @cindex @code{\autoBeamOn}
1756 If a score ends while an automatic beam has not been ended and is
1757 still accepting notes, this last beam will not be typeset at all. The
1758 same holds polyphonic voices, entered with @code{<< @dots{} \\ @dots{}
1759 >>}. If a polyphonic voice ends while an automatic beam is still
1760 accepting notes, it is not typeset.
1762 The rules for ending a beam depend on the shortest note in a beam.
1763 So, while it is possible to have different ending rules for eight
1764 beams and sixteenth beams, a beam that contains both eight and
1765 sixteenth notes will use the rules for the sixteenth beam.
1767 In the example below, the autobeamer makes eighth beams and sixteenth
1768 end at three eighths. The third beam can only be corrected by
1769 specifying manual beaming.
1771 @lilypond[quote,raggedright,fragment,relative=1]
1772 #(override-auto-beam-setting '(end * * * *) 3 8)
1773 % rather show case where it goes wrong
1774 %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
1775 \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
1777 It is not possible to specify beaming parameters that act differently in
1778 different parts of a measure. This means that it is not possible to use
1779 automatic beaming in irregular meters such as @code{5/8}.
1781 @node Beam formatting
1782 @subsection Beam formatting
1785 When a beam falls in the middle of the staff, the beams point normally
1786 down. However, this behaviour can be altered with the
1787 @code{neutral-direction} property.
1790 @lilypond[quote,raggedright,relative=2,fragment,verbatim]
1793 \override Beam #'neutral-direction = #-1
1795 \override Beam #'neutral-direction = #1
1801 @section Accidentals
1803 This section describes how to change the way that accidentals are
1804 inserted automatically before notes.
1807 * Automatic accidentals::
1810 @node Automatic accidentals
1811 @subsection Automatic accidentals
1812 @cindex Automatic accidentals
1814 Common rules for typesetting accidents have been placed in a
1815 function. This function is called as follows
1817 @cindex @code{set-accidental-style}
1819 #(set-accidental-style 'STYLE #('CONTEXT#))
1822 The function can take two arguments: the name of the accidental style,
1823 and an optional argument that denotes the context which should be
1824 changed. If no context name is supplied, @code{Staff} is the default,
1825 but you may wish to apply the accidental style to a single @code{Voice}
1828 The following accidental styles are supported
1831 This is the default typesetting behavior. It corresponds
1832 to 18th century common practice: Accidentals are
1833 remembered to the end of the measure in which they occur and
1834 only on their own octave.
1837 The normal behavior is to remember the accidentals on
1838 Staff-level. This variable, however, typesets accidentals
1839 individually for each voice. Apart from that, the rule is similar to
1842 As a result, accidentals from one voice do not get canceled in other
1843 voices, which is often an unwanted result
1845 @lilypond[quote,raggedright,relative=1,fragment,verbatim]
1847 #(set-accidental-style 'voice)
1854 The @code{voice} option should be used if the voices
1855 are to be read solely by individual musicians. If the staff is to be
1856 used by one musician (e.g. a conductor) then
1857 @code{modern} or @code{modern-cautionary}
1858 should be used instead.
1861 @cindex @code{modern} style accidentals
1862 This rule corresponds to the common practice in the 20th century. This rule
1863 prints the same accidentals as @code{default}, but temporary
1864 accidentals also are canceled in other octaves. Furthermore,
1865 in the same octave, they also get canceled in the following
1868 @lilypond[quote,raggedright,fragment,verbatim]
1869 #(set-accidental-style 'modern)
1870 cis' c'' cis'2 | c'' c'
1873 @item @code{modern-cautionary}
1874 @cindex @code{modern-cautionary}
1875 This rule is similar to @code{modern}, but the ``extra'' accidentals
1876 (the ones not typeset by @code{default}) are typeset as cautionary
1877 accidentals. They are printed in reduced size or with parentheses
1878 @lilypond[quote,raggedright,fragment,verbatim]
1879 #(set-accidental-style 'modern-cautionary)
1880 cis' c'' cis'2 | c'' c'
1883 @cindex @code{modern-voice}
1885 This rule is used for multivoice accidentals to be read both by musicians
1886 playing one voice and musicians playing all voices. Accidentals are
1887 typeset for each voice, but they @emph{are} canceled across voices in
1888 the same @internalsref{Staff}.
1890 @cindex @code{modern-voice-cautionary}
1891 @item modern-voice-cautionary
1892 This rule is the same as @code{modern-voice}, but with the extra
1893 accidentals (the ones not typeset by @code{voice}) typeset
1894 as cautionaries. Even though all accidentals typeset by
1895 @code{default} @emph{are} typeset by this variable then
1896 some of them are typeset as cautionaries.
1899 @cindex @code{piano} accidentals
1900 This rule reflects 20th century practice for piano notation. Very similar to
1901 @code{modern} but accidentals also get canceled
1902 across the staves in the same @internalsref{GrandStaff} or
1903 @internalsref{PianoStaff}.
1905 @item piano-cautionary
1906 @cindex @code{#(set-accidental-style 'piano-cautionary)}
1907 As @code{#(set-accidental-style 'piano)} but with the extra accidentals
1908 typeset as cautionaries.
1911 @cindex @code{no-reset} accidental style
1912 This is the same as @code{default} but with accidentals lasting
1913 ``forever'' and not only until the next measure
1914 @lilypond[quote,raggedright,fragment,verbatim,relative=1]
1915 #(set-accidental-style 'no-reset)
1920 This is sort of the opposite of @code{no-reset}: Accidentals
1921 are not remembered at all---and hence all accidentals are
1922 typeset relative to the key signature, regardless of what was
1925 @lilypond[quote,raggedright,fragment,verbatim,relative=1]
1926 #(set-accidental-style 'forget)
1927 \key d\major c4 c cis cis d d dis dis
1934 Program reference: @internalsref{Accidental_engraver},
1935 @internalsref{Accidental}, and @internalsref{AccidentalPlacement}.
1940 Simultaneous notes are considered to be entered in sequential
1941 mode. This means that in a chord the accidentals are typeset as if the
1942 notes in the chord happened once at a time - in the order in which
1943 they appear in the input file.
1945 This is a problem when accidentals in a chord depend on each other,
1946 which does not happen for the default accidental style. The problem
1947 can be solved by manually inserting @code{!} and @code{?} for the
1951 @node Expressive marks
1952 @section Expressive marks
1955 @c todo: should change ordering
1956 @c where to put text spanners, metronome marks,
1959 Expressive marks help musicians to bring more to the music than simple
1969 * Analysis brackets::
1972 * Fingering instructions::
1982 A slur indicates that notes are to be played bound or @emph{legato}.
1984 They are entered using parentheses
1985 @lilypond[quote,relative=2,fragment,verbatim]
1986 f( g a) a8 b( a4 g2 f4)
1990 The direction of a slur can be set with the
1994 \override Slur #'direction = #UP
1995 \slurUp % shortcut for the previous line
1999 However, there is a convenient shorthand for forcing slur
2000 directions. By adding @code{_} or @code{^} before the opening
2001 parentheses, the direction is also set. For example,
2003 @lilypond[relative=2,verbatim,fragment]
2007 Some composers write two slurs when they want legato chords. This can
2008 be achieved in LilyPond by setting @code{doubleSlurs},
2010 @lilypond[verbatim,raggedright]
2012 \set doubleSlurs = ##t
2013 <c e>4 ( <d f> <c e> <d f> )
2021 @cindex @code{\slurUp}
2023 @cindex @code{\slurDown}
2025 @cindex @code{\slurNeutral}
2026 @code{\slurNeutral},
2027 @cindex @code{\slurDotted}
2029 @cindex @code{\slurSolid}
2034 Program reference: @seeinternals{Slur}, and @internalsref{SlurEvent}.
2037 @node Phrasing slurs
2038 @subsection Phrasing slurs
2040 @cindex phrasing slurs
2041 @cindex phrasing marks
2043 A phrasing slur (or phrasing mark) connects chords and is used to
2044 indicate a musical sentence. It is written using @code{\(} and @code{\)}
2047 @lilypond[quote,fragment,verbatim,relative=1]
2048 \time 6/4 c'\( d( e) f( e) d\)
2051 Typographically, the phrasing slur behaves almost exactly like a
2052 normal slur. However, they are treated as different objects. A
2053 @code{\slurUp} will have no effect on a phrasing slur; instead, use
2054 @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
2055 @code{\phrasingSlurNeutral}.
2057 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurNeutral}
2058 will only affect normal slurs and not phrasing slurs.
2062 @cindex @code{\phrasingSlurUp}
2063 @code{\phrasingSlurUp},
2064 @cindex @code{\phrasingSlurDown}
2065 @code{\phrasingSlurDown},
2066 @cindex @code{\phrasingSlurNeutral}
2067 @code{\phrasingSlurNeutral}.
2071 Program reference: see also @internalsref{PhrasingSlur}, and
2072 @internalsref{PhrasingSlurEvent}.
2076 Putting phrasing slurs over rests leads to spurious warnings.
2079 @subsection Breath marks
2081 Breath marks are entered using @code{\breathe}
2084 @lilypond[quote,fragment,relative=1,verbatim]
2088 The glyph of the breath mark can be tuned by overriding the
2089 @code{text} property of the @code{BreathingSign} layout object with
2090 any markup text. For example,
2091 @lilypond[quote,fragment,verbatim,relative=1]
2093 \override BreathingSign #'text
2094 = #(make-musicglyph-markup "scripts-rvarcomma")
2101 Program reference: @internalsref{BreathingSign},
2102 @internalsref{BreathingSignEvent}.
2104 Examples: @inputfileref{input/regression,breathing-sign.ly}.
2107 @node Metronome marks
2108 @subsection Metronome marks
2111 @cindex beats per minute
2112 @cindex metronome marking
2114 Metronome settings can be entered as follows
2116 \tempo @var{duration} = @var{per-minute}
2119 In the MIDI output, they are interpreted as a tempo change. In the
2120 paper output, a metronome marking is printed
2121 @cindex @code{\tempo}
2122 @lilypond[quote,verbatim,fragment]
2128 Program reference: @internalsref{MetronomeChangeEvent}.
2132 @subsection Text scripts
2133 @cindex Text scripts
2135 @cindex text items, non-empty
2136 @cindex non-empty texts
2138 It is possible to place arbitrary strings of text or markup text (see
2139 @ref{Text markup}) above or below notes by using a string
2140 @code{c^"text"}. By default, these indications do not influence the
2141 note spacing, but by using the command @code{\fatText}, the widths
2142 will be taken into account
2144 @lilypond[quote,fragment,raggedright,verbatim,relative=1]
2145 c4^"longtext" \fatText c4_"longlongtext" c4
2148 More complex formatting may also be added to a note by using the
2150 @lilypond[fragment,raggedright,verbatim]
2151 c'4^\markup { bla \bold bla }
2154 The @code{\markup} is described in more detail in
2160 @cindex @code{\fatText}
2162 @cindex @code{\emptyText}
2167 In this manual: @ref{Text markup}.
2169 Program reference: @internalsref{TextScriptEvent}, @internalsref{TextScript}.
2173 @subsection Text spanners
2174 @cindex Text spanners
2176 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
2177 are written as text and are extended over many measures with dotted
2178 lines. Such texts are created using text spanners; attach
2179 @code{\startTextSpan} and @code{\stopTextSpan} to the first and last
2180 notes of the spanner.
2182 The string to be printed, as well as the style, is set through object
2185 @lilypond[quote,fragment,relative=1,verbatim]
2187 \override TextSpanner #'direction = #-1
2188 \override TextSpanner #'edge-text = #'("rall " . "")
2189 c2\startTextSpan b c\stopTextSpan a
2195 Internals @internalsref{TextSpanEvent},
2196 @internalsref{TextSpanner}.
2198 Examples: @inputfileref{input/regression,text-spanner.ly}.
2201 @node Analysis brackets
2202 @subsection Analysis brackets
2204 @cindex phrasing brackets
2205 @cindex musicological analysis
2206 @cindex note grouping bracket
2208 Brackets are used in musical analysis to indicate structure in musical
2209 pieces. LilyPond supports a simple form of nested horizontal
2210 brackets. To use this, add the @internalsref{Horizontal_bracket_engraver}
2211 to @internalsref{Staff} context. A bracket is started with
2212 @code{\startGroup} and closed with @code{\stopGroup}
2214 @lilypond[quote,raggedright,verbatim]
2217 c4\startGroup\startGroup
2220 c4\stopGroup\stopGroup
2224 \Staff \consists "Horizontal_bracket_engraver"
2230 Program reference: @internalsref{HorizontalBracket},
2231 @internalsref{NoteGroupingEvent}.
2233 Examples: @inputfileref{input/regression,note-group-bracket.ly}.
2237 @subsection Articulations
2238 @cindex Articulations
2240 @cindex articulations
2244 A variety of symbols can appear above and below notes to indicate
2245 different characteristics of the performance. They are added to a note
2246 by adding a dash and the character signifying the
2247 articulation. They are demonstrated here
2249 @lilypondfile[quote,raggedright]{script-abbreviations.ly}
2251 The meanings of these shorthands can be changed. See
2252 @file{ly/script-init.ly} for examples.
2255 The script is automatically placed, but the direction can be forced as
2256 well. Like other pieces of LilyPond code, @code{_} will place them
2257 below the staff, and @code{^} will place them above.
2260 @lilypond[quote,fragment,verbatim]
2264 Other symbols can be added using the syntax
2265 @var{note}@code{\}@var{name}. Again, they
2266 can be forced up or down using @code{^} and @code{_},
2269 @lilypond[quote,verbatim,fragment,relative=2]
2270 c\fermata c^\fermata c_\fermata
2277 @cindex staccatissimo
2286 @cindex organ pedal marks
2295 @cindex prallmordent
2299 @cindex thumb marking
2304 Here is a chart showing all scripts available,
2306 @lilypondfile[quote]{script-chart.ly}
2309 The vertical ordering of scripts is controlled with the
2310 @code{script-priority} property. The lower this number, the closer it
2311 will be put to the note. In this example, the
2312 @internalsref{TextScript} (the sharp symbol) first has the lowest
2313 priority, so it is put lowest in the first example. In the second, the
2314 prall trill (the @internalsref{Script}) has the lowest, so it on the
2315 inside. When two objects have the same priority, the order in which
2316 they are entered decides which one comes first.
2319 @lilypond[verbatim,relative=3,raggedright,fragment,quote]
2320 \once \override TextScript #'script-priority = #-100
2321 a4^\prall^\markup { \sharp }
2323 \once \override Script #'script-priority = #-100
2324 a4^\prall^\markup { \sharp }
2332 Program reference: @internalsref{ScriptEvent}, and @internalsref{Script}.
2336 These signs appear in the printed output but have no effect on the
2337 MIDI rendering of the music.
2341 @node Running trills
2342 @subsection Running trills
2344 Long running trills are made with @code{\startTrillSpan} and
2345 @code{\stopTrillSpan},
2348 @lilypond[verbatim,raggedright,relative=2,quote,fragment]
2350 << { c1 \startTrillSpan }
2351 { s2. \grace { d16[\stopTrillSpan e] } } >>
2357 @code{\startTrillSpan},
2358 @cindex @code{\startTrillSpan}
2359 @code{\stopTrillSpan}.
2360 @cindex @code{\stopTrillSpan}
2364 Program reference: @internalsref{TrillSpanner},
2365 @internalsref{TrillSpanEvent}.
2367 @node Fingering instructions
2368 @subsection Fingering instructions
2372 Fingering instructions can be entered using
2374 @var{note}-@var{digit}
2376 For finger changes, use markup texts
2378 @lilypond[quote,verbatim,raggedright,fragment,relative=1]
2380 c^\markup { \finger "2-3" }
2383 @cindex finger change
2388 You can use the thumb-script to indicate that a note should be
2389 played with the thumb (e.g. in cello music)
2391 @lilypond[quote,verbatim,raggedright,fragment,relative=2]
2392 <a_\thumb a'-3>8 <b_\thumb b'-3>
2395 Fingerings for chords can also be added to individual notes
2396 of the chord by adding them after the pitches
2397 @lilypond[quote,verbatim,raggedright,fragment,relative=2]
2398 < c-1 e-2 g-3 b-5 >4
2402 In this case, setting @code{fingeringOrientations} will put fingerings next
2405 @lilypond[quote,verbatim,raggedright,fragment,relative=1]
2406 \set fingeringOrientations = #'(left down)
2407 <c-1 es-2 g-4 bes-5 > 4
2408 \set fingeringOrientations = #'(up right down)
2409 <c-1 es-2 g-4 bes-5 > 4
2412 Using this feature, it is also possible to put fingering instructions
2413 very close to note heads in monophonic music,
2415 @lilypond[verbatim,raggedright]
2417 \set fingeringOrientations = #'(right)
2425 Program reference: @internalsref{FingerEvent}, and @internalsref{Fingering}.
2427 Examples: @inputfileref{input/regression,finger-chords.ly}.
2433 @subsection Grace notes
2436 @c should have blurb about accaciatura / appogiatura
2438 @cindex @code{\grace}
2442 Grace notes are ornaments that are written out. The most common ones
2443 are acciaccatura, which should be played as very short. It is denoted
2444 by a slurred small note with a slashed stem. The appoggiatura is a
2445 grace note that takes a fixed fraction of the main note, and is
2446 denoted as a slurred note in small print without a slash. They
2447 are entered with the commands @code{\acciaccatura} and
2448 @code{\appoggiatura}, as demonstrated in the following example
2451 @cindex appoggiatura
2452 @cindex acciaccatura
2454 @lilypond[quote,relative=2,verbatim,fragment]
2455 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
2456 \acciaccatura { g16[ f] } e4
2459 Both are special forms of the @code{\grace} command. By prefixing this
2460 keyword to a music expression, a new one is formed, which will be
2461 printed in a smaller font and takes up no logical time in a measure.
2463 @lilypond[quote,relative=2,verbatim,fragment]
2465 \grace { c16[ d16] } c2 c4
2469 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
2470 @code{\grace} command does not start a slur.
2472 Internally, timing for grace notes is done using a second, `grace'
2473 time. Every point in time consists of two rational numbers: one
2474 denotes the logical time, one denotes the grace timing. The above
2475 example is shown here with timing tuples
2477 @lilypond[quote,raggedright]
2480 c4 \grace c16 c4 \grace {
2483 \new Lyrics \lyricmode {
2484 \override LyricText #'font-family = #'typewriter
2488 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
2489 \markup { (\fraction 1 4 , 0 ) } 4
2491 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2492 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2494 \markup { ( \fraction 2 4 , 0 ) }
2500 The placement of grace notes is synchronized between different staves.
2501 In the following example, there are two sixteenth graces notes for
2502 every eighth grace note
2504 @lilypond[quote,relative=2,verbatim,fragment]
2505 << \new Staff { e4 \grace { c16[ d e f] } e4 }
2506 \new Staff { c4 \grace { g8[ b] } c4 } >>
2511 If you want to end a note with a grace, the standard trick is to put
2512 the grace notes after a ``space note''
2514 @lilypond[quote,fragment,verbatim,relative=2]
2517 { s2 \grace { c16[ d] } } >>
2523 By adjusting the duration of the skip note (here it is a half-note),
2524 the space between the main-note and the grace is adjusted.
2527 A @code{\grace} section will introduce special typesetting settings,
2528 for example, to produce smaller type, and set directions. Hence, when
2529 introducing layout tweaks, they should be inside the grace section,
2531 @lilypond[quote,fragment,verbatim,relative=2]
2543 The overrides should also be reverted inside the grace section.
2545 The layout of grace sections can be changed throughout the music using
2546 the function @code{add-grace-property}. The following example
2547 undefines the Stem direction for this grace, so stems do not always
2552 #(add-grace-property 'Voice 'Stem 'direction '())
2558 Another option is to change the variables @code{startGraceMusic},
2559 @code{stopGraceMusic}, @code{startAcciaccaturaMusic},
2560 @code{stopAcciaccaturaMusic}, @code{startAppoggiaturaMusic},
2561 @code{stopAppoggiaturaMusic}. More information is in the file
2562 @file{ly/grace-init.ly}.
2567 Program reference: @internalsref{GraceMusic}.
2571 A score that starts with a @code{\grace} section needs an explicit
2572 @code{\context Voice} declaration, otherwise the main note and grace
2573 note end up on different staves.
2575 Grace note synchronization can also lead to surprises. Staff notation,
2576 such as key signatures, bar lines, etc. are also synchronized. Take
2577 care when you mix staves with grace notes and staves without, for example,
2579 @lilypond[quote,relative=2,verbatim,fragment]
2580 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2581 \new Staff { c4 \bar "|:" d4 } >>
2585 This can be remedied by inserting grace skips, for the above example
2588 \new Staff @{ c4 \bar "|:" \grace s16 d4 @}
2591 Grace sections should only be used within sequential music
2592 expressions. Nesting or juxtaposing grace sections is not supported,
2593 and might produce crashes or other errors.
2597 @subsection Glissando
2600 @cindex @code{\glissando}
2602 A glissando is a smooth change in pitch. It is denoted by a line or a
2603 wavy line between two notes. It is requested by attaching
2604 @code{\glissando} to a note
2606 @lilypond[quote,fragment,relative=2,verbatim]
2612 Program reference: @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2614 Example files: @file{input/regression/glissando.ly}.
2620 Printing text over the line (such as @emph{gliss.}) is not supported.
2624 @subsection Dynamics
2637 @cindex @code{\ffff}
2647 Absolute dynamic marks are specified using a command after a note
2648 @code{c4\ff}. The available dynamic marks are @code{\ppp},
2649 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2650 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2651 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}
2653 @lilypond[quote,verbatim,raggedright,fragment,relative=2]
2654 c\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2655 c2\fp c\sf c\sff c\sp c\spp c\sfz c\rfz
2664 A crescendo mark is started with @code{\<} and terminated with
2665 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2666 with @code{\!}. Because these marks are bound to notes, if you must
2667 use spacer notes if multiple marks are needed during one note
2669 @lilypond[quote,fragment,verbatim,relative=2]
2671 << f1 { s4 s4\< s4\! \> s4\! } >>
2673 This may give rise to very short hairpins. Use @code{minimum-length}
2674 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2678 \override Staff.Hairpin #'minimum-length = #5
2681 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2682 is an example how to do it
2684 @lilypond[quote,fragment,relative=2,verbatim]
2694 You can also supply your own texts
2695 @lilypond[quote,fragment,relative=1,verbatim]
2696 \set crescendoText = \markup { \italic "cresc. poco" }
2697 \set crescendoSpanner = #'dashed-line
2706 @cindex @code{\dynamicUp}
2708 @cindex @code{\dynamicDown}
2709 @code{\dynamicDown},
2710 @cindex @code{\dynamicNeutral}
2711 @code{\dynamicNeutral}.
2713 @cindex direction, of dynamics
2717 Program reference: @internalsref{CrescendoEvent},
2718 @internalsref{DecrescendoEvent}, and
2719 @internalsref{AbsoluteDynamicEvent}.
2721 Dynamics are @internalsref{DynamicText} and @internalsref{Hairpin}
2722 objects. Vertical positioning of these symbols is handled by the
2723 @internalsref{DynamicLineSpanner} object.
2729 Repetition is a central concept in music, and multiple notations exist
2735 * Repeats and MIDI::
2736 * Manual repeat commands::
2738 * Tremolo subdivisions::
2743 @subsection Repeat types
2746 @cindex @code{\repeat}
2748 The following types of repetition are supported
2752 Repeated music is fully written (played) out. This is useful when
2753 entering repetitious music. This is the only kind of repeat that
2754 is included in MIDI output.
2757 Repeats are not written out, but alternative endings (volte) are
2758 printed, left to right with brackets. This is the standard notation
2759 for repeats with alternatives. These are not played in MIDI output by default.
2763 Alternative endings are written stacked. This has limited use but may be
2764 used to typeset two lines of lyrics in songs with repeats, see
2765 @inputfileref{input,star-spangled-banner.ly}.
2770 Make tremolo beams. These are not played in MIDI output by default.
2773 Make beat or measure repeats. These look like percent signs. These are not played
2774 in MIDI output by default.
2779 @subsection Repeat syntax
2782 LilyPond has one syntactic construct for specifying different types of
2783 repeats. The syntax is
2786 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2789 If you have alternative endings, you may add
2790 @cindex @code{\alternative}
2792 \alternative @code{@{} @var{alternative1}
2794 @var{alternative3} @dots{} @code{@}}
2796 where each @var{alternative} is a music expression. If you do not
2797 give enough alternatives for all of the repeats, the first alternative
2798 is assumed to be played more than once.
2800 Standard repeats are used like this
2801 @lilypond[quote,fragment,verbatim,relative=2]
2803 \repeat volta 2 { c4 d e f }
2804 \repeat volta 2 { f e d c }
2807 With alternative endings
2808 @lilypond[quote,fragment,verbatim,relative=2]
2810 \repeat volta 2 {c4 d e f}
2811 \alternative { {d2 d} {f f,} }
2815 @lilypond[quote,fragment,verbatim,relative=2]
2818 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2819 \alternative { { g4 g g } { a | a a a a | b2. } }
2823 It is possible to shorten volta brackets
2824 by setting @code{voltaSpannerDuration}. In the next example, the
2825 bracket only lasts one measure, which is a duration of 3/4.
2829 @lilypond[verbatim,raggedright]
2833 \set Staff.voltaSpannerDuration = #(ly:make-moment 3 4)
2834 \repeat "volta" 5 { d d d }
2835 \alternative { { e e e f f f }
2845 Brackets for the repeat are normally only printed over the topmost
2846 staff. This can be adjusted by setting the @code{voltaOnThisStaff}
2847 property @inputfileref{input/regression,volta-multi-staff.ly},
2848 @inputfileref{input/regression,volta-chord-names.ly}
2853 A nested repeat like
2862 is ambiguous, since it is is not clear to which @code{\repeat} the
2863 @code{\alternative} belongs. This ambiguity is resolved by always
2864 having the @code{\alternative} belong to the inner @code{\repeat}.
2865 For clarity, it is advisable to use braces in such situations.
2870 Timing information is not remembered at the start of an alternative,
2871 so after a repeat timing information must be reset by hand, for
2872 example by setting @code{Score.measurePosition} or entering
2873 @code{\partial}. Similarly, slurs or ties are also not repeated.
2878 @node Repeats and MIDI
2879 @subsection Repeats and MIDI
2881 @cindex expanding repeats
2883 With a little bit of tweaking, all types of repeats can be present
2884 in the MIDI output. This is achieved by applying the
2885 @code{\unfoldrepeats} music function. This functions changes all
2886 repeats to unfold repeats.
2888 @lilypond[verbatim,raggedright,fragment]
2890 \repeat tremolo 8 {c'32 e' }
2891 \repeat percent 2 { c''8 d'' }
2892 \repeat volta 2 {c'4 d' e' f'}
2901 When creating a score file using @code{\unfoldrepeats} for midi, then
2902 it is necessary to make two @code{\score} blocks. One for MIDI (with
2903 unfolded repeats) and one for notation (with volta, tremolo, and
2904 percent repeats). For example,
2912 \unfoldrepeats @var{..music..}
2917 @node Manual repeat commands
2918 @subsection Manual repeat commands
2920 @cindex @code{repeatCommands}
2922 The property @code{repeatCommands} can be used to control the layout of
2923 repeats. Its value is a Scheme list of repeat commands, where each repeat
2927 @item @code{start-repeat},
2928 which prints a @code{|:} bar line;
2929 @item @code{end-repeat},
2930 which prints a @code{:|} bar line;
2931 @item @code{(volta @var{text})},
2932 which prints a volta bracket saying @var{text}: The text can be specified as
2933 a text string or as a markup text, see @ref{Text markup}. Do not
2934 forget to change the font, as the default number font does not contain
2935 alphabetic characters;
2936 @item @code{(volta #f)}, which
2937 stops a running volta bracket.
2940 @lilypond[quote,verbatim,fragment,relative=2]
2942 \set Score.repeatCommands = #'((volta "93") end-repeat)
2944 \set Score.repeatCommands = #'((volta #f))
2952 Program reference: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2953 @internalsref{VoltaRepeatedMusic},
2954 @internalsref{UnfoldedRepeatedMusic}, and
2955 @internalsref{FoldedRepeatedMusic}.
2957 @node Tremolo repeats
2958 @subsection Tremolo repeats
2959 @cindex tremolo beams
2961 To place tremolo marks between notes, use @code{\repeat} with tremolo
2963 @lilypond[quote,verbatim,raggedright]
2964 \new Voice \relative c' {
2965 \repeat "tremolo" 8 { c16 d16 }
2966 \repeat "tremolo" 4 { c16 d16 }
2967 \repeat "tremolo" 2 { c16 d16 }
2971 Tremolo marks can also be put on a single note. In this case, the
2972 note should not be surrounded by braces.
2973 @lilypond[quote,verbatim,raggedright]
2974 \repeat "tremolo" 4 c'16
2977 Similar output is obtained using the tremolo subdivision, described in
2978 @ref{Tremolo subdivisions}.
2982 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
2984 Program reference: tremolo beams are @internalsref{Beam} objects. Single stem
2985 tremolos are @internalsref{StemTremolo} objects. The music expression is
2986 @internalsref{TremoloEvent}.
2988 Example files: @inputfileref{input/regression,chord-tremolo.ly},
2989 @inputfileref{input/regression,stem-tremolo.ly}.
2991 @node Tremolo subdivisions
2992 @subsection Tremolo subdivisions
2993 @cindex tremolo marks
2994 @cindex @code{tremoloFlags}
2996 Tremolo marks can be printed on a single note by adding
2997 `@code{:}[@var{number}]' after the note. The number indicates the
2998 duration of the subdivision, and it must be at least 8. A
2999 @var{length} value of 8 gives one line across the note stem. If the
3000 length is omitted, the last value (stored in @code{tremoloFlags}) is
3003 @lilypond[quote,verbatim,fragment]
3004 c'2:8 c':32 | c': c': |
3007 @c [TODO : stok is te kort bij 32en]
3008 @c somebody want to translate that into English? :)
3012 Tremolos entered in this way do not carry over into the MIDI output.
3016 In this manual: @ref{Tremolo repeats}.
3018 Elsewhere: @internalsref{StemTremolo}, @internalsref{TremoloEvent}.
3020 @node Measure repeats
3021 @subsection Measure repeats
3023 @cindex percent repeats
3024 @cindex measure repeats
3026 In the @code{percent} style, a note pattern can be repeated. It is
3027 printed once, and then the pattern is replaced with a special sign.
3028 Patterns of one and two measures are replaced by percent-like signs,
3029 patterns that divide the measure length are replaced by slashes
3031 @lilypond[quote,verbatim,raggedright]
3032 \new Voice \relative c' {
3033 \repeat "percent" 4 { c4 }
3034 \repeat "percent" 2 { c2 es2 f4 fis4 g4 c4 }
3040 Program reference: @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
3041 @internalsref{PercentRepeatedMusic}, and
3042 @internalsref{DoublePercentRepeat}.
3046 @node Rhythmic music
3047 @section Rhythmic music
3049 Rhythmic music is primarily used for percussion and drum notation, but it can
3050 also be used to show the rhythms of melodies.
3053 * Showing melody rhythms::
3054 * Entering percussion::
3055 * Percussion staves::
3059 @node Showing melody rhythms
3060 @subsection Showing melody rhythms
3062 Sometimes you might want to show only the rhythm of a melody. This
3063 can be done with the rhythmic staff. All pitches of notes on such a
3064 staff are squashed, and the staff itself has a single line
3066 @lilypond[quote,fragment,relative=1,verbatim]
3067 \context RhythmicStaff {
3069 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
3075 Program reference: @internalsref{RhythmicStaff}.
3077 Examples: @inputfileref{input/regression,rhythmic-staff.ly}.
3080 @node Entering percussion
3081 @subsection Entering percussion
3087 Percussion notes may be entered in @code{\drummode} mode, which is
3088 similar to the standard mode for entering notes. Each piece of
3089 percussion has a full name and an abbreviated name, and both can be used
3092 @lilypond[quote,raggedright,verbatim]
3094 hihat hh bassdrum bd
3098 The complete list of drum names is in the init file
3099 @file{ly/drumpitch-init.ly}.
3100 @c TODO: properly document this.
3104 Program reference: @internalsref{DrumNoteEvent}.
3106 @node Percussion staves
3107 @subsection Percussion staves
3111 A percussion part for more than one instrument typically uses a
3112 multi line staff where each position in the staff refers to one piece
3116 To typeset the music, the notes must be interpreted in a
3117 @internalsref{DrumStaff} and @internalsref{DrumVoice} contexts
3120 @lilypond[quote,raggedright,verbatim]
3121 up = \drummode { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
3122 down = \drummode { bassdrum4 snare8 bd r bd sn4 }
3124 \new DrumVoice { \voiceOne \up }
3125 \new DrumVoice { \voiceTwo \down }
3129 The above example shows verbose polyphonic notation. The short
3130 polyphonic notation, described in @ref{Polyphony}, can also be used if
3131 the @internalsref{DrumVoices} are instantiated by hand first. For example,
3133 @lilypond[quote,fragment,verbatim]
3135 \context DrumVoice = "1" { s1 *2 }
3136 \context DrumVoice = "2" { s1 *2 }
3140 { \repeat unfold 16 hh16 }
3149 There are also other layout possibilities. To use these, set the
3150 property @code{drumStyleTable} in context @internalsref{DrumVoice}.
3151 The following variables have been predefined
3155 This is the default. It typesets a typical drum kit on a five-line staff
3157 @lilypond[quote,noindent]
3158 nam = \lyricmode { cymc cyms cymr hh hhc hho hhho hhp cb hc
3159 bd sn ss tomh tommh tomml toml tomfh tomfl }
3160 mus = \drummode { cymc cyms cymr hh | hhc hho hhho hhp | \break cb hc
3161 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
3163 << \new DrumStaff\with {
3164 \remove Bar_engraver
3165 \remove Time_signature_engraver
3166 \override Stem #'transparent = ##t
3167 \override Stem #'Y-extent-callback = ##f
3168 minimumVerticalExtent = #'(-4.0 . 5.0)
3170 \context Lyrics \nam
3173 %% need to do this, because of indented @itemize
3176 \override LyricText #'font-family = #'typewriter
3177 \override BarNumber #'transparent =##T
3181 The drum scheme supports six different toms. When there fewer toms, simply
3182 select the toms that produce the desired result, i.e. to get toms on
3183 the three middle lines you use @code{tommh}, @code{tomml} and
3186 @item timbales-style
3187 This typesets timbales on a two line staff
3189 @lilypond[quote,raggedright]
3190 nam = \lyricmode { timh ssh timl ssl cb }
3191 mus = \drummode { timh ssh timl ssl cb s16 }
3194 \context DrumStaff \with {
3195 \remove Bar_engraver
3196 \remove Time_signature_engraver
3197 \override Stem #'transparent = ##t
3198 \override Stem #'Y-extent-callback = ##f
3199 \override StaffSymbol #'line-count = #2
3200 \override StaffSymbol #'staff-space = #2
3201 minimumVerticalExtent = #'(-3.0 . 4.0)
3202 drumStyleTable = #timbales-style
3205 \override LyricText #'font-family = #'typewriter
3211 This typesets congas on a two line staff
3213 @lilypond[quote,raggedright]
3214 nam = \lyricmode { cgh cgho cghm ssh cgl cglo cglm ssl }
3215 mus = \drummode { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
3217 \context DrumStaff\with {
3218 \remove Bar_engraver
3219 \remove Time_signature_engraver
3220 drumStyleTable = #congas-style
3221 \override StaffSymbol #'line-count = #2
3223 %% this sucks; it will lengthen stems.
3224 \override StaffSymbol #'staff-space = #2
3225 \override Stem #'transparent = ##t
3226 \override Stem #'Y-extent-callback = ##f
3229 \override LyricText #'font-family = #'typewriter
3234 This typesets bongos on a two line staff
3236 @lilypond[quote,raggedright]
3237 nam = \lyricmode { boh boho bohm ssh bol bolo bolm ssl }
3238 mus = \drummode { boh boho bohm ssh bol bolo bolm ssl s16 }
3240 \context DrumStaff\with {
3241 \remove Bar_engraver
3242 \remove Time_signature_engraver
3243 \override StaffSymbol #'line-count = #2
3244 drumStyleTable = #bongos-style
3246 %% this sucks; it will lengthen stems.
3247 \override StaffSymbol #'staff-space = #2
3248 \override Stem #'transparent = ##t
3249 \override Stem #'Y-extent-callback = ##f
3252 \override LyricText #'font-family = #'typewriter
3257 @item percussion-style
3258 to typeset all kinds of simple percussion on one line staves
3259 @lilypond[quote,raggedright]
3260 nam = \lyricmode { tri trio trim gui guis guil cb cl tamb cab mar hc }
3261 mus = \drummode { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
3263 \context DrumStaff\with{
3264 \remove Bar_engraver
3265 drumStyleTable = #percussion-style
3266 \override StaffSymbol #'line-count = #1
3267 \remove Time_signature_engraver
3268 \override Stem #'transparent = ##t
3269 \override Stem #'Y-extent-callback = ##f
3272 \override LyricText #'font-family = #'typewriter
3279 If you do not like any of the predefined lists you can define your own
3280 list at the top of your file
3282 @lilypond[quote,raggedright,verbatim]
3284 (bassdrum default #f -1)
3285 (snare default #f 0)
3287 (pedalhihat xcircle "stopped" 2)
3288 (lowtom diamond #f 3)))
3289 up = \drummode { hh8 hh hh hh hhp4 hhp }
3290 down = \drummode { bd4 sn bd toml8 toml }
3293 \set DrumStaff.drumStyleTable
3294 = #(alist->hash-table mydrums)
3295 \new DrumVoice { \voiceOne \up }
3296 \new DrumVoice { \voiceTwo \down }
3303 Init files: @file{ly/drumpitch-init.ly}.
3305 Program reference: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
3309 Because general MIDI does not contain rim shots, the sidestick is used
3310 for this purpose instead.
3313 @section Piano music
3315 Piano staves are two normal staves coupled with a brace. The staves
3316 are largely independent, but sometimes voices can cross between the
3317 two staves. The same notation is also used for harps and other key
3318 instruments. The @internalsref{PianoStaff} is especially built to
3319 handle this cross-staffing behavior. In this section we discuss the
3320 @internalsref{PianoStaff} and some other pianistic peculiarities.
3324 * Automatic staff changes::
3325 * Manual staff switches::
3328 * Staff switch lines::
3329 * Cross staff stems::
3334 Dynamics are not centered, but workarounds do exist. See the
3335 ``piano centered dynamics'' template in @ref{Piano templates}.
3337 @cindex cross staff stem
3338 @cindex stem, cross staff
3339 @cindex distance between staves in piano music
3341 The distance between the two staves is the same for all systems in the
3342 score. It is possible to override this per system, but it does require
3343 an arcane command incantation. See
3344 @inputfileref{input/test,piano-staff-distance.ly}.
3347 @node Automatic staff changes
3348 @subsection Automatic staff changes
3349 @cindex Automatic staff changes
3351 Voices can be made to switch automatically between the top and the bottom
3352 staff. The syntax for this is
3356 \autochange @dots{}@var{music}@dots{}
3361 This will create two staves inside the current PianoStaff, called
3362 @code{up} and @code{down}. The lower staff will be in bass clef by
3365 A @code{\relative} section that is outside of @code{\autochange} has
3366 no effect on the pitches of @var{music}, so, if necessary, put
3367 @code{\relative} inside @code{\autochange} like
3371 \autochange \relative @dots{} @dots{}
3376 The autochanger switches on basis of pitch (middle C is the turning
3377 point), and it looks ahead skipping over rests to switch in
3378 advance. Here is a practical example
3380 @lilypond[quote,verbatim,raggedright]
3382 \autochange \relative c'
3391 In this manual: @ref{Manual staff switches}.
3393 Program reference: @internalsref{AutoChangeMusic}.
3399 The staff switches may not end up in optimal places. For high
3400 quality output, staff switches should be specified manually.
3403 @code{\autochange} cannot be inside @code{\times}.
3405 Internally, the @code{\partcombine} interprets both arguments as
3406 @code{Voice}s named @code{one} and @code{two}, and then decides when
3407 the parts can be combined. Consequently, if the arguments switch to
3408 differently named @internalsref{Voice} contexts, the events in those
3412 @node Manual staff switches
3413 @subsection Manual staff switches
3415 @cindex manual staff switches
3416 @cindex staff switch, manual
3418 Voices can be switched between staves manually, using the command
3420 \change Staff = @var{staffname} @var{music}
3424 The string @var{staffname} is the name of the staff. It switches the
3425 current voice from its current staff to the Staff called
3426 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3427 @code{"down"}. The @context{Staff} referred to must already exist, so
3428 usually the setup for a score will start with a setup of the staves,
3432 \context Staff = up @{
3433 \skip 1 * 10 %@emph{ keep staff alive}
3435 \context Staff = down @{
3436 \skip 1 * 10 %@emph{idem}
3442 and the @context{Voice} is inserted afterwards
3445 \context Staff = down
3446 \new Voice @{ @dots{} \change Staff = up @dots{} @}
3454 Pianos have pedals that alter the way sound is produced. Generally, a
3455 piano has three pedals, sustain, una corda, and sostenuto.
3458 Piano pedal instruction can be expressed by attaching
3459 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3460 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3463 @lilypond[quote,fragment,verbatim]
3464 c'4\sustainDown c'4\sustainUp
3467 What is printed can be modified by setting @code{pedal@var{X}Strings},
3468 where @var{X} is one of the pedal types: @code{Sustain},
3469 @code{Sostenuto} or @code{UnaCorda}. Refer to
3470 @internalsref{SustainPedal} in the program reference for more
3473 Pedals can also be indicated by a sequence of brackets, by setting the
3474 @code{pedalSustainStyle} property to bracket objects
3476 @lilypond[quote,fragment,verbatim,relative=2]
3477 \set Staff.pedalSustainStyle = #'bracket
3479 b\sustainUp\sustainDown
3480 b g \sustainUp a \sustainDown \bar "|."
3483 A third style of pedal notation is a mixture of text and brackets,
3484 obtained by setting the @code{pedalSustainStyle} style property to
3487 @lilypond[quote,fragment,verbatim,relative=2]
3488 \set Staff.pedalSustainStyle = #'mixed
3490 b\sustainUp\sustainDown
3491 b g \sustainUp a \sustainDown \bar "|."
3494 The default `*Ped.' style for sustain and damper pedals corresponds to
3495 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
3498 @lilypond[quote,fragment,verbatim,relative=2]
3499 c\sostenutoDown d e c, f g a\sostenutoUp
3502 For fine-tuning of the appearance of a pedal bracket, the properties
3503 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3504 @code{PianoPedalBracket} objects (see
3505 @internalsref{PianoPedalBracket} in the Program reference) can be modified. For example, the
3506 bracket may be extended to the right edge of the note head
3508 @lilypond[quote,fragment,verbatim,relative=2]
3509 \override Staff.PianoPedalBracket #'shorten-pair = #'(0 . -1.0)
3510 c\sostenutoDown d e c, f g a\sostenutoUp
3514 @subsection Arpeggio
3517 @cindex broken arpeggio
3518 @cindex @code{\arpeggio}
3520 You can specify an arpeggio sign on a chord by attaching an
3521 @code{\arpeggio} to a chord
3524 @lilypond[quote,fragment,relative=1,verbatim]
3528 When an arpeggio crosses staves, you attach an arpeggio to the chords
3529 in both staves, and set
3530 @internalsref{PianoStaff}.@code{connectArpeggios}
3532 @lilypond[quote,fragment,relative=1,verbatim]
3533 \context PianoStaff <<
3534 \set PianoStaff.connectArpeggios = ##t
3535 \new Staff { <c' e g c>\arpeggio }
3536 \new Staff { \clef bass <c,, e g>\arpeggio }
3540 The direction of the arpeggio is sometimes denoted by adding an
3541 arrowhead to the wiggly line
3543 @lilypond[quote,fragment,relative=1,verbatim]
3552 A square bracket on the left indicates that the player should not
3553 arpeggiate the chord
3555 @c todo: ugh, lousy typography. Look for real example. --hwn
3557 @lilypond[quote,fragment,relative=1,verbatim]
3564 @cindex @code{\arpeggio}
3566 @cindex @code{\arpeggioUp}
3568 @cindex @code{\arpeggioDown}
3569 @code{\arpeggioDown},
3570 @cindex @code{\arpeggioNeutral}
3571 @code{\arpeggioNeutral},
3572 @cindex @code{\arpeggioBracket}
3573 @code{\arpeggioBracket}.
3577 Program reference: @internalsref{ArpeggioEvent},
3578 @internalsref{Arpeggio}.
3582 It is not possible to mix connected arpeggios and unconnected
3583 arpeggios in one @internalsref{PianoStaff} at the same point in time.
3585 @node Staff switch lines
3586 @subsection Staff switch lines
3589 @cindex follow voice
3590 @cindex staff switching
3593 @cindex @code{followVoice}
3595 Whenever a voice switches to another staff a line connecting the notes
3596 can be printed automatically. This is switched on by setting
3597 @code{PianoStaff.followVoice} to true
3599 @lilypond[quote,fragment,relative=1,verbatim]
3600 \context PianoStaff <<
3601 \set PianoStaff.followVoice = ##t
3602 \context Staff \context Voice {
3607 \context Staff=two { \clef bass \skip 1*2 }
3613 Program reference: @internalsref{VoiceFollower}.
3617 @cindex @code{\showStaffSwitch}
3618 @code{\showStaffSwitch},
3619 @cindex @code{\hideStaffSwitch}
3620 @code{\hideStaffSwitch}.
3623 @node Cross staff stems
3624 @subsection Cross staff stems
3626 The chords which cross staves may be produced by increasing the length
3627 of the stem in the lower stave, so it reaches the stem in the upper
3628 stave, or vice versa.
3630 @lilypond[raggedright,verbatim,quote]
3631 stemExtend = \once \override Stem #'length = #22
3632 noFlag = \once \override Stem #'flag-style = #'no-flag
3633 \context PianoStaff <<
3635 \stemDown \stemExtend
3649 @section Vocal music
3651 There are three different issues when printing vocal music
3655 Song texts must be entered as texts, not notes. For example, the
3656 input @code{d} should be interpreted as a one letter syllable, not the note D.
3658 Song texts must be printed as text, not as notes.
3660 Song texts must be aligned with the notes of their melody
3663 The simplest solution to printing music uses the @code{\addlyrics}
3664 function to solve all these problems at once. However, these
3665 three functions can be controlled separately, which is necessary
3666 for complex vocal music.
3670 * Setting simple songs::
3672 * Hyphens and extenders::
3673 * The Lyrics context::
3674 * Flexibility in alignment::
3679 @node Setting simple songs
3680 @subsection Setting simple songs
3682 The easiest way to add lyrics to a melody is to append
3685 \addlyrics @{ @var{the lyrics} @}
3689 to a melody. Here is an example,
3691 @lilypond[raggedright,verbatim,fragment,quote]
3693 \relative { c2 e4 g2. }
3694 \addlyrics { play the game }
3697 More stanzas can be added by adding more
3698 @code{\addlyrics} sections
3700 @lilypond[raggedright,verbatim,fragment,quote]
3702 \relative { c2 e4 g2. }
3703 \addlyrics { play the game }
3704 \addlyrics { speel het spel }
3705 \addlyrics { joue le jeu }
3708 @c TODO - this isn't such a great place for this note, but I can't
3709 @c find a better place without rearranging a lot of lyric stuff.
3710 @c It's yet another thing to look at post-3.0.
3712 The @code{\addlyrics} command is actually just a convienient way
3713 to write a more complicated LilyPond structure that sets up the
3714 lyrics. You should use @code{\addlyrics} unless you need to
3715 fancy things, in which case you should investigate
3716 @code{\lyricsto} or @code{\lyricmode}.
3720 \addlyrics @{ LYRICS @}
3726 \context Voice = blah @{ music @}
3727 \lyricsto "blah" \lyricsmode \new lyrics @{ LYRICS @}
3731 @node Entering lyrics
3732 @subsection Entering lyrics
3736 @cindex @code{\lyricmode}
3739 Lyrics are entered in a special input mode. This mode is is introduced
3740 by the keyword @code{\lyricmode}, or by using @code{addlyrics} or
3741 @code{lyricsto}. In this mode you can enter lyrics,
3742 with punctuation and accents, and the input @code{d} is not parsed as
3743 a pitch, but rather as a one letter syllable. Syllables are entered
3744 like notes, but with pitches replaced by text. For example,
3746 \lyricmode @{ Twin-4 kle4 twin- kle litt- le star2 @}
3750 A word lyrics mode begins with an alphabetic character, and ends with
3751 any space or digit. The following characters can be any character
3752 that is not a digit or white space. One important consequence of this
3753 is that a word can end with @code{@}}. The following example is
3754 usually a mistake in the input file. The syllable includes a @code{@}}, so the
3755 opening brace is not balanced
3757 \lyricmode @{ twinkle@}
3760 @cindex @code{\property}, in @code{\lyricmode}
3762 Similarly, a period which follows an alphabetic sequence is included in
3763 the resulting string. As a consequence, spaces must be inserted around
3766 \override Score . LyricText #'font-shape = #'italic
3770 @cindex spaces, in lyrics
3771 @cindex quotes, in lyrics
3773 Any @code{_} character which appears in an unquoted word is converted
3774 to a space. This provides a mechanism for introducing spaces into words
3775 without using quotes. Quoted words can also be used in Lyrics mode to
3776 specify words that cannot be written with the above rules. The
3777 following example incorporates double quotes
3780 \lyricmode @{ He said: "\"Let" my peo ple "go\"" @}
3783 This example is slightly academic, since it gives better looking
3784 results to use single quotes, @code{``} and @code{''}
3786 \lyricmode @{ He said: ``Let my peo ple go'' @}
3790 The full definition of a word start in Lyrics mode is somewhat more
3793 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3794 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3795 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3796 any 8-bit character with ASCII code over 127, or a two-character
3797 combination of a backslash followed by one of @code{`}, @code{'},
3798 @code{"}, or @code{^}.
3804 Program reference: events @internalsref{LyricEvent}, and
3805 @internalsref{LyricText}.
3809 The definition of lyrics mode is too complex.
3811 @node Hyphens and extenders
3812 @subsection Hyphens and extenders
3816 Centered hyphens are entered as `@code{-}@code{-}' between syllables.
3817 The hyphen will have variable length depending on the space between
3818 the syllables and it will be centered between the syllables.
3823 When a lyric is sung over many notes (this is called a melisma), this is
3824 indicated with a horizontal line centered between a syllable and the
3825 next one. Such a line is called an extender line, and it is entered as
3831 Program reference: @internalsref{HyphenEvent},
3832 @internalsref{ExtenderEvent}, @internalsref{LyricHyphen}, and
3833 @internalsref{LyricExtender}
3835 Examples: @inputfileref{input/test,lyric-hyphen-retain.ly}.
3839 @node The Lyrics context
3840 @subsection The Lyrics context
3843 Lyrics are printed by interpreting them in a @internalsref{Lyrics} context
3845 \context Lyrics \lyricmode @dots{}
3848 @cindex automatic syllable durations
3849 @cindex @code{\lyricsto}
3850 @cindex lyrics and melodies
3852 This will place the lyrics according to the durations that were
3853 entered. The lyrics can also be aligned under a given melody
3854 automatically. In this case, it is no longer necessary to enter the
3855 correct duration for each syllable. This is achieved by combining the
3856 melody and the lyrics with the @code{\lyricsto} expression
3858 \lyricsto @var{name} \new Lyrics @dots{}
3861 This aligns the lyrics to the
3863 notes of the @internalsref{Voice} context called @var{name}, which has
3864 to exist. Therefore, normally the @code{Voice} is specified first, and
3865 then the lyrics are specified with @code{\lyricsto}. The command
3866 @code{\lyricsto} switches to @code{\lyricmode} mode automatically, so the
3867 @code{\lyricmode} keyword may be omitted.
3869 For different or more complex orderings, the best way is to setup the
3870 hierarchy of staves and lyrics first, e.g.
3872 \context ChoirStaff <<
3873 \context Lyrics = sopranoLyrics @{ s1 @}
3874 \context Voice = soprano @{ @emph{music} @}
3875 \context Lyrics = tenorLyrics @{ s1 @}
3876 \context Voice = tenor @{ @emph{music} @}
3879 and then combine the appropriate melodies and lyric lines
3881 \lyricsto "soprano" \context Lyrics = sopranoLyrics
3886 The final input would resemble
3889 <<\context ChoirStaff << @emph{setup the music} >>
3890 \lyricsto "soprano" @emph{etc}
3891 \lyricsto "alto" @emph{etc}
3897 The @code{\lyricsto} command detects melismata: it only puts one
3898 syllable under a tied or slurred group of notes. If you want to force
3899 an unslurred group of notes to be a melisma, insert @code{\melisma}
3900 after the first note of the group, and @code{\melismaEnd} after the
3903 @lilypond[quote,relative=2,raggedright,fragment,verbatim]
3905 \context Voice = "lala" {
3913 \lyricsto "lala" \new Lyrics {
3919 In addition, notes are considered a melisma if they are manually
3920 beamed, and automatic beaming (see @ref{Setting automatic beam
3921 behavior}) is switched off.
3927 The criteria for deciding melismata can
3928 be tuned with the property @code{melismaBusyProperties}. See
3929 @internalsref{Melisma_translator} in the program reference for more
3934 Lyrics can also be entered without @code{\lyricsto}. In this case the
3935 durations of each syllable must be entered explicitly, for example,
3942 The alignment to a melody can be specified with the
3943 @code{associatedVoice} property,
3946 \set associatedVoice = #"lala"
3950 The value of the property (here: @code{"lala"}) should be the name of
3951 a @internalsref{Voice} context. Without this setting, extender lines
3952 will not be formatted properly.
3954 Here is an example demonstrating manual lyric durations,
3956 @lilypond[relative=1,verbatim,fragment,quote]
3957 << \context Voice = melody {
3961 \new Lyrics \lyricmode {
3962 \set associatedVoice = #"melody"
3968 @cindex choral score
3970 A complete example of a SATB score setup is in section
3971 @ref{Small ensembles}.
3976 @code{\melisma}, @code{\melismaEnd}
3977 @cindex @code{\melismaEnd}
3978 @cindex @code{\melisma}
3982 Program reference: @internalsref{LyricCombineMusic},
3983 @internalsref{Lyrics}, @internalsref{Melisma_translator}.
3985 Examples: @ref{Small ensembles},
3986 @inputfileref{input/regression,lyric-combine-new.ly},
3987 @c TODO: make separate section for melismata
3988 @inputfileref{input/test,lyrics-melisma-variants.ly}.
3989 @inputfileref{input/test,lyrics-melisma-faster.ly}.
3993 Melismata are not detected automatically, and extender lines must be
3997 @c TODO: document \new Staff << Voice \lyricsto >> bug
3999 @node Flexibility in alignment
4000 @subsection Flexibility in alignment
4003 Often, different stanzas of one song are put to one melody in slightly
4004 differing ways. Such variations can still be captured with
4007 One possibility is that the text has a melisma in one stanza, but
4008 multiple syllables in another one. One solution is to make the faster
4009 voice ignore the melisma. This is done by setting
4010 @code{ignoreMelismata} in the Lyrics context.
4012 There has one tricky aspect. The setting for @code{ignoreMelismata}
4013 must be set one syllable @emph{before} the non-melismatic syllable
4014 in the text, as shown here,
4016 @lilypond[verbatim,raggedright,quote]
4018 \relative \context Voice = "lahlah" {
4019 \set Staff.autoBeaming = ##f
4025 \new Lyrics \lyricsto "lahlah" {
4028 \new Lyrics \lyricsto "lahlah" {
4029 \set ignoreMelismata = ##t % applies to "fas"
4031 \unset ignoreMelismata
4038 The @code{ignoreMelismata} applies to the syllable ``fas'', so it
4039 should be entered before ``go''.
4041 The reverse is also possible: making a lyric line slower than the
4042 standard. This can be achieved by insert @code{\skip}s into the
4043 lyrics. For every @code{\skip}, the text will be delayed another note.
4046 @lilypond[verbatim,raggedright,quote]
4047 \relative { c c g' }
4054 More complex variations in text underlay are possible. It is possible
4055 to switch the melody for a line of lyrics during the text. This is
4056 done by setting the @code{associatedVoice} property. In the example
4058 @lilypond[raggedright,quote]
4061 \relative \context Voice = "lahlah" {
4062 \set Staff.autoBeaming = ##f
4065 \context Voice = alternative {
4068 % show associations clearly.
4069 \override NoteColumn #'force-hshift = #-3
4080 \new Lyrics \lyricsto "lahlah" {
4081 Ju -- ras -- sic Park
4083 \new Lyrics \lyricsto "lahlah" {
4084 % Tricky: need to set associatedVoice
4085 % one syllable too soon!
4086 \set associatedVoice = alternative % applies to "ran"
4090 \set associatedVoice = lahlah % applies to "rus"
4096 the text for the first stanza is set to a melody called ``lahlah'',
4099 \new Lyrics \lyricsto "lahlah" {
4100 Ju -- ras -- sic Park
4105 The second stanza initially is set to the @code{lahlah} context, but
4106 for the syllable ``ran'', it switches to a different melody.
4107 This is achieved with
4109 \set associatedVoice = alternative
4113 Here, @code{alternative} is the name of the @code{Voice} context
4114 containing the triplet.
4116 Again, the command must be one syllable too early, before ``Ty'' in
4120 \new Lyrics \lyricsto "lahlah" {
4121 \set associatedVoice = alternative % applies to "ran"
4125 \set associatedVoice = lahlah % applies to "rus"
4131 The underlay is switched back to the starting situation by assigning
4132 @code{lahlah} to @code{associatedVoice}.
4138 @subsection More stanzas
4140 @cindex phrasing, in lyrics
4143 @cindex stanza number
4144 @cindex singer's names
4145 @cindex name of singer
4147 Stanza numbers can be added by setting @code{stanza}, e.g.
4149 @lilypond[quote,verbatim,relative=2,fragment]
4151 \time 3/4 g2 e4 a2 f4 g2.
4154 Hi, my name is Bert.
4157 Oh, che -- ri, je t'aime
4161 These numbers are put just before the start of first syllable.
4163 Names of singers can also be added. They are printed at the start of
4164 the line, just like instrument names. They are created by setting
4165 @code{vocalName}. A short version may be entered as @code{vocNam}.
4168 @lilypond[fragment,quote,verbatim,relative=2]
4170 \time 3/4 g2 e4 a2 f4 g2.
4172 \set vocalName = "Bert "
4173 Hi, my name is Bert.
4175 \set vocalName = "Ernie "
4176 Oh, che -- ri, je t'aime
4182 Program reference: Layout objects @internalsref{LyricText} and
4183 @internalsref{VocalName}. Music expressions
4184 @internalsref{LyricEvent}.
4192 The term @emph{ambitus} denotes a range of pitches for a given voice
4193 in a part of music. It also may denote the pitch range that a musical
4194 instrument is capable of playing. Ambits are printed on vocal parts,
4195 so performers can easily determine it meets their capabilities.
4197 It denoted at the beginning of a piece near the initial clef. The
4198 range is graphically specified by two note heads, that represent the
4199 minimum and maximum pitch. To print such ambits, add the
4200 @internalsref{Ambitus_engraver} to the @internalsref{Voice} context,
4207 \consists Ambitus_engraver
4212 This results in the following output
4214 @lilypond[quote,raggedright]
4218 \consists Ambitus_engraver
4222 \relative \new Staff {
4227 If you have multiple voices in a single staff, and you want a single
4228 ambitus per staff rather than per each voice, add the
4229 @internalsref{Ambitus_engraver} to the @internalsref{Staff} context
4230 rather than to the @internalsref{Voice} context. Here is an example,
4232 @lilypond[verbatim,raggedright,quote]
4235 \consists "Ambitus_engraver"
4237 \override Ambitus #'X-offset-callbacks
4238 = #(list (lambda (grob axis) -1.0))
4243 \consists "Ambitus_engraver"
4252 This example uses one advanced feature,
4255 \override Ambitus #'X-offset-callbacks
4256 = #(list (lambda (grob axis) -1.0))
4260 This code moves the ambitus to the left. The same effect could have
4261 been achieved with @code{extra-offset}, but then the formatting system
4262 would not reserve space for the moved object.
4266 Program reference: @internalsref{Ambitus},
4267 @internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
4268 @internalsref{AmbitusAccidental}.
4270 Examples: @inputfileref{input/regression,ambitus.ly}.
4274 There is no collision handling in the case of multiple per-voice
4277 @node Other instrument specific notation, Tablatures, Vocal music, Notation manual
4278 @section Other instrument specific notation
4280 This section includes extra information for writing string music, and may
4281 include extra information for other instruments in the future.
4287 @node Harmonic notes, , Other instrument specific notation, Other instrument specific notation
4288 @subsection Harmonic notes
4290 @cindex artificial harmonics
4293 Artificial harmonics are notated with a different notehead style. They
4295 marking the harmonic pitch with @code{\harmonic}.
4297 @lilypond[raggedright,verbatim,quote,fragment]
4302 @node Tablatures, Popular music, Other instrument specific notation, Notation manual
4306 @cindex guitar tablature
4308 Tablature notation is used for notating music for plucked string
4309 instruments. Pitches are not denoted with note heads, but by
4310 indicating on which string and fret a note must be played. LilyPond
4311 offers limited support for tablature.
4314 * Tablatures basic::
4315 * Non-guitar tablatures::
4318 @node Tablatures basic, Non-guitar tablatures, Tablatures, Tablatures
4319 @subsection Tablatures basic
4320 @cindex Tablatures basic
4322 The string number associated to a note is given as a backslash
4323 followed by a number, e.g. @code{c4\3} for a C quarter on the third
4324 string. By default, string 1 is the highest one, and the tuning
4325 defaults to the standard guitar tuning (with 6 strings). The notes
4326 are printed as tablature, by using @internalsref{TabStaff} and
4327 @internalsref{TabVoice} contexts
4329 @lilypond[quote,fragment,verbatim]
4336 @cindex @code{minimumFret}
4339 When no string is specified, the first string that does not give a
4340 fret number less than @code{minimumFret} is selected. The default
4341 value for @code{minimumFret} is 0
4346 \set TabStaff.minimumFret = #8
4349 @lilypond[quote,noindent,raggedright]
4353 \set TabStaff.minimumFret = #8
4356 \context StaffGroup <<
4357 \context Staff { \clef "G_8" \frag }
4358 \context TabStaff { \frag }
4364 Program reference: @internalsref{TabStaff}, @internalsref{TabVoice}, and
4365 @internalsref{StringNumberEvent}.
4369 Chords are not handled in a special way, and hence the automatic
4370 string selector may easily select the same string to two notes in a
4374 @node Non-guitar tablatures, , Tablatures basic, Tablatures
4375 @subsection Non-guitar tablatures
4376 @cindex Non-guitar tablatures
4378 You can change the number of strings, by setting the number of lines
4379 in the @internalsref{TabStaff}.
4381 You can change the tuning of the strings. A string tuning is given as
4382 a Scheme list with one integer number for each string, the number
4383 being the pitch (measured in semitones relative to middle C) of an
4384 open string. The numbers specified for @code{stringTuning} are the
4385 numbers of semitones to subtract or add, starting the specified pitch
4386 by default middle C, in string order. In the next example,
4387 @code{stringTunings} is set for the pitches e, a, d, and g
4389 @lilypond[quote,fragment,verbatim]
4390 \context TabStaff <<
4391 \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
4394 a,4 c' a e' e c' a e'
4401 No guitar special effects have been implemented.
4405 Program reference: @internalsref{Tab_note_heads_engraver}.
4408 @node Popular music, Orchestral music, Tablatures, Notation manual
4409 @section Popular music
4411 This section discusses issues that arise when writing popular music.
4416 * Printing chord names::
4420 @node Chord names, Chords mode, Popular music, Popular music
4421 @subsection Chord names
4424 LilyPond has support for both printing chord names. Chords may be
4425 entered in musical chord notation, i.e. @code{< .. >}, but they can
4426 also be entered by name. Internally, the chords are represented as a
4427 set of pitches, so they can be transposed
4430 @lilypond[quote,verbatim,raggedright]
4431 twoWays = \transpose c c' {
4440 << \context ChordNames \twoWays
4441 \context Voice \twoWays >>
4444 This example also shows that the chord printing routines do not try to
4445 be intelligent. The last chord (@code{f bes d}) is not interpreted as
4448 @c this menu isn't needed.
4452 * Printing chord names::
4457 @subsection Chords mode
4460 In chord mode sets of pitches (chords) are entered with normal note
4461 names. A chord is entered by the root, which is entered like a
4464 @lilypond[quote,fragment,verbatim,relative=2]
4465 \chordmode { es4. d8 c2 }
4469 The mode is introduced by the keyword @code{\chordmode}.
4474 Other chords may be entered by suffixing a colon and introducing a
4475 modifier (which may include a number if desired)
4477 @lilypond[quote,fragment,verbatim]
4478 \chordmode { e1:m e1:7 e1:m7 }
4480 The first number following the root is taken to be the `type' of the
4481 chord, thirds are added to the root until it reaches the specified
4483 @lilypond[quote,fragment,verbatim]
4484 \chordmode { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
4487 @cindex root of chord
4488 @cindex additions, in chords
4489 @cindex removals, in chords
4491 More complex chords may also be constructed adding separate steps
4492 to a chord. Additions are added after the number following
4493 the colon, and are separated by dots
4495 @lilypond[quote,verbatim,fragment]
4496 \chordmode { c:5.6 c:3.7.8 c:3.6.13 }
4498 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
4500 @lilypond[quote,verbatim,fragment]
4501 \chordmode { c:7+ c:5+.3- c:3-.5-.7- }
4503 Removals are specified similarly, and are introduced by a caret. They
4504 must come after the additions
4505 @lilypond[quote,verbatim,fragment]
4506 \chordmode { c^3 c:7^5 c:9^3.5 }
4509 Modifiers can be used to change pitches. The following modifiers are
4513 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
4515 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
4518 is the augmented chord. This modifier raises the 5th step.
4520 is the major 7th chord. This modifier raises the 7th step if present.
4522 is the suspended 4th or 2nd. This modifier removes the 3rd
4523 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
4526 Modifiers can be mixed with additions
4527 @lilypond[quote,verbatim,fragment]
4528 \chordmode { c:sus4 c:7sus4 c:dim7 c:m6 }
4531 @cindex modifiers, in chords.
4538 Since an unaltered 11 does not sound good when combined with an
4539 unaltered 3, the 11 is removed in this case (unless it is added
4542 @lilypond[quote,fragment,verbatim]
4543 \chordmode { c:13 c:13.11 c:m13 }
4548 An inversion (putting one pitch of the chord on the bottom), as well
4549 as bass notes, can be specified by appending
4550 @code{/}@var{pitch} to the chord
4551 @lilypond[quote,fragment,verbatim]
4552 \chordmode { c1 c/g c/f }
4556 A bass note can be added instead of transposed out of the chord,
4557 by using @code{/+}@var{pitch}.
4559 @lilypond[quote,fragment,verbatim]
4560 \chordmode { c1 c/+g c/+f }
4563 Chords is a mode similar to @code{\lyricmode} etc. Most
4564 of the commands continue to work, for example, @code{r} and
4565 @code{\skip} can be used to insert rests and spaces, and property
4566 commands may be used to change various settings.
4572 Each step can only be present in a chord once. The following
4573 simply produces the augmented chord, since @code{5+} is interpreted
4576 @lilypond[quote,verbatim,fragment]
4577 \chordmode { c:5.5-.5+ }
4581 @node Printing chord names
4582 @subsection Printing chord names
4584 @cindex printing chord names
4588 For displaying printed chord names, use the @internalsref{ChordNames} context.
4589 The chords may be entered either using the notation
4590 described above, or directly using @code{<} and @code{>}
4592 @lilypond[quote,verbatim,raggedright]
4594 \chordmode {a1 b c} <d' f' a'> <e' g' b'>
4597 \context ChordNames \harmonies
4598 \context Staff \harmonies
4602 You can make the chord changes stand out by setting
4603 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
4604 display chord names when there is a change in the chords scheme and at
4605 the start of a new line
4607 @lilypond[quote,verbatim,linewidth=9\cm]
4608 harmonies = \chordmode {
4609 c1:m c:m \break c:m c:m d
4612 \context ChordNames {
4613 \set chordChanges = ##t
4615 \context Staff \transpose c c' \harmonies
4619 The previous examples all show chords over a staff. This is not
4620 necessary. Chords may also be printed separately. It may be necessary
4621 to add @internalsref{Volta_engraver} and @internalsref{Bar_engraver}
4622 for showing repeats.
4624 @lilypond[raggedright,verbatim]
4625 \new ChordNames \with {
4626 \override BarLine #'bar-size = #4
4627 voltaOnThisStaff = ##t
4628 \consists Bar_engraver
4629 \consists "Volta_engraver"
4631 \repeat volta 2 \chordmode {
4640 The default chord name layout is a system for Jazz music, proposed by
4641 Klaus Ignatzek (see @ref{Literature list}). It can be tuned through the
4642 following properties
4645 @cindex @code{chordNameExceptions}
4646 @item chordNameExceptions
4647 This is a list that contains the chords that have special formatting.
4648 For an example of tuning this property, see
4649 @inputfileref{input/regression,chord-name-exceptions.ly}.
4650 @cindex exceptions, chord names.
4653 @cindex @code{majorSevenSymbol}
4654 @item majorSevenSymbol
4655 This property contains the markup object used for the 7th step, when
4656 it is major. Predefined options are @code{whiteTriangleMarkup} and
4657 @code{blackTriangleMarkup}. See
4658 @inputfileref{input/regression,chord-name-major7.ly} for an example.
4660 @cindex @code{chordNameSeparator}
4661 @item chordNameSeparator
4662 Different parts of a chord name are normally separated by a
4663 slash. By setting @code{chordNameSeparator}, you can specify other
4665 @lilypond[quote,fragment,verbatim]
4666 \context ChordNames \chordmode {
4668 \set chordNameSeparator
4669 = \markup { \typewriter "|" }
4674 @cindex @code{chordRootNamer}
4675 @item chordRootNamer
4676 The root of a chord is usually printed as a letter with an optional
4677 alteration. The transformation from pitch to letter is done by this
4678 function. Special note names (for example, the German ``H'' for a
4679 B-chord) can be produced by storing a new function in this property.
4681 @cindex @code{chordNoteNamer}
4682 @item chordNoteNamer
4683 The default is to print single pitch, e.g. the bass note, using the
4684 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
4685 to a specialized function to change this behavior. For example, the
4686 base can be printed in lower case.
4690 The predefined variables @code{\germanChords},
4691 @code{\semiGermanChords} set these variables. The effect is
4694 @lilypondfile[]{chord-names-german.ly}
4696 There are also two other chord name schemes implemented: an alternate
4697 Jazz chord notation, and a systematic scheme called Banter chords. The
4698 alternate jazz notation is also shown on the chart in @ref{Chord name
4699 chart}. Turning on these styles is described in the input file
4700 @inputfileref{input/test,chord-names-jazz.ly}.
4704 @cindex chords, jazz
4709 @cindex @code{\germanChords}
4710 @code{\germanChords},
4711 @cindex @code{\semiGermanChords}
4712 @code{\semiGermanChords}.
4719 Examples: @inputfileref{input/regression,chord-name-major7.ly},
4720 @inputfileref{input/regression,chord-name-exceptions.ly},
4721 @inputfileref{input/test,chord-names-jazz.ly},
4722 @inputfileref{input/test,chords-without-melody.ly}.
4725 Init files: @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
4730 Chord names are determined solely from the list of pitches. Chord
4731 inversions are not identified, and neither are added bass notes. This
4732 may result in strange chord names when chords are entered with the
4733 @code{< .. >} syntax.
4737 @subsection Improvisation
4739 Improvisation is sometimes denoted with slashed note heads. Such note
4740 heads can be created by adding a @internalsref{Pitch_squash_engraver}
4741 to the @internalsref{Staff} or @internalsref{Voice} context. Then, the
4745 \set squashedPosition = #0
4746 \override NoteHead #'style = #'slash
4750 switches on the slashes.
4752 There are shortcuts @code{\improvisationOn} (and an accompanying
4753 @code{\improvisationOff}) for this command sequence. They are used in
4754 the following example
4756 @lilypond[verbatim,raggedright,quote]
4758 \consists Pitch_squash_engraver
4760 e8 e g a a16(bes)(a8) g \improvisationOn
4763 ~fis2 \improvisationOff a16(bes) a8 g e
4769 @node Orchestral music
4770 @section Orchestral music
4772 @cindex Writing parts
4774 Orchestral music involves some special notation, both in the full
4775 score and the individual parts. This section explains how to tackle
4776 some common problems in orchestral music.
4781 * System start delimiters::
4782 * Aligning to cadenzas::
4785 * Instrument names::
4787 * Instrument transpositions::
4788 * Multi measure rests::
4789 * Automatic part combining::
4791 * Different editions from one source::
4792 * Quoting other voices::
4793 * Formatting cue notes::
4796 @node System start delimiters
4797 @subsection System start delimiters
4799 Polyphonic scores consist of many staves. These staves can be
4800 constructed in three different ways
4802 @item The group is started with a brace at the left, and bar lines are
4803 connected. This is done with the @internalsref{GrandStaff} context.
4805 @lilypond[verbatim,quote]
4814 @item The group is started with a bracket, and bar lines are connected. This is done with the
4815 @internalsref{StaffGroup} context
4817 @lilypond[verbatim,quote]
4826 @item The group is started with a vertical line. Bar lines are not
4827 connected. This is the default for the score.
4829 @lilypond[verbatim,quote]
4838 @cindex Staff, multiple
4839 @cindex bracket, vertical
4840 @cindex brace, vertical
4847 The bar lines at the start of each system are
4848 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
4849 @internalsref{SystemStartBracket}. Only one of these types is created
4850 in every context, and that type is determined by the property
4851 @code{systemStartDelimiter}.
4853 @node Aligning to cadenzas
4854 @subsection Aligning to cadenzas
4857 In an orchestral context, cadenzas present a special problem:
4858 when constructing a score that includes a cadenza, all other
4859 instruments should skip just as many notes as the length of the
4860 cadenza, otherwise they will start too soon or too late.
4862 A solution to this problem are the functions @code{mmrest-of-length}
4863 and @code{skip-of-length}. These Scheme functions take a piece music
4864 as argument, and generate a @code{\skip} or multi rest, exactly as
4865 long as the piece. The use of @code{mmrest-of-length} is demonstrated
4866 in the following example.
4868 @lilypond[verbatim,raggedright,quote]
4869 cadenza = \relative c' {
4870 c4 d8 << { e f g } \\ { d4. } >>
4875 \new Staff { \cadenza c'4 }
4877 #(ly:export (mmrest-of-length cadenza))
4887 @node Rehearsal marks
4888 @subsection Rehearsal marks
4889 @cindex Rehearsal marks
4891 @cindex @code{\mark}
4893 To print a rehearsal mark, use the @code{\mark} command
4895 @lilypond[quote,fragment,verbatim,relative=1]
4904 (The letter I is skipped in accordance with engraving traditions.)
4905 @c umm, is the manual the right place for feature requests? :) -gp
4906 @c FIXME - should make that tunable.
4908 The mark is incremented automatically if you use @code{\mark
4909 \default}, but you can also use an integer argument to set the mark
4910 manually. The value to use is stored in the property
4911 @code{rehearsalMark}.
4913 The style is defined by the property @code{markFormatter}. It is a
4914 function taking the current mark (an integer) and the current context
4915 as argument. It should return a markup object. In the following
4916 example, @code{markFormatter} is set to a canned procedure. After a
4917 few measures, it is set to function that produces a boxed number.
4920 @lilypond[quote,verbatim,relative=2]
4922 \set Score.markFormatter = #format-mark-numbers
4925 \set Score.markFormatter
4926 = #(lambda (mark context)
4928 (make-box-markup (number->string mark))))
4934 The file @file{scm/translation-functions.scm} contains the definitions
4935 of @code{format-mark-numbers} (the default format) and
4936 @code{format-mark-letters}. These can be used as inspiration for other
4937 formatting functions.
4940 @cindex coda on bar line
4941 @cindex segno on bar line
4942 @cindex fermata on bar line
4943 @cindex bar lines, symbols on
4945 The @code{\mark} command can also be used to put signs like coda,
4946 segno and fermatas on a bar line. Use @code{\markup} to
4947 to access the appropriate symbol
4950 @lilypond[quote,verbatim,relative=2]
4952 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4957 In the case of a line break, marks must also be printed at the end of
4958 the line, and not at the beginning. Use the following to force that
4961 \override Score.RehearsalMark
4962 #'break-visibility = #begin-of-line-invisible
4968 @cindex bar lines, putting symbols on
4972 Program reference: @internalsref{MarkEvent}, @internalsref{RehearsalMark}.
4974 Init files: @file{scm/translation-functions.scm} contains the
4975 definition of @code{format-mark-numbers} and
4976 @code{format-mark-letters}. They can be used as inspiration for other
4977 formatting functions.
4979 Examples: @inputfileref{input/regression,rehearsal-mark-letter.ly},
4981 @inputfileref{input/regression,rehearsal-mark-number.ly}.
4985 @subsection Bar numbers
4989 @cindex measure numbers
4990 @cindex @code{currentBarNumber}
4992 Bar numbers are printed by default at the start of the line. The
4993 number itself is stored in the @code{currentBarNumber} property, which
4994 is normally updated automatically for every measure.
4996 Bar numbers can be typeset at regular intervals instead of at the
4997 beginning of each line. This is illustrated in the following example,
4998 whose source is available as
4999 @inputfileref{input/test,bar-number-regular-interval.ly}
5001 @lilypondfile[quote]{bar-number-regular-interval.ly}
5005 Program reference: @internalsref{BarNumber}.
5007 Examples: @inputfileref{input/test,bar-number-every-five-reset.ly},
5008 and @inputfileref{input/test,bar-number-regular-interval.ly}.
5012 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
5013 there is one at the top. To solve this, the
5014 @code{padding} property of @internalsref{BarNumber} can be
5015 used to position the number correctly.
5017 @node Instrument names
5018 @subsection Instrument names
5020 In an orchestral score, instrument names are printed left side of the
5023 This can be achieved by setting @internalsref{Staff}.@code{instrument}
5024 and @internalsref{Staff}.@code{instr}. This will print a string before
5025 the start of the staff. For the first start, @code{instrument} is
5026 used, for the next ones @code{instr} is used.
5028 @lilypond[quote,verbatim,raggedright,relative=1,fragment]
5029 \set Staff.instrument = "Ploink "
5030 \set Staff.instr = "Plk "
5036 You can also use markup texts to construct more complicated instrument
5039 @lilypond[quote,fragment,verbatim,raggedright]
5040 \set Staff.instrument = \markup {
5041 \column < "Clarinetti" { "in B"
5042 \smaller \flat } > }
5046 For longer instrument names, it may be useful to increase the
5047 @code{indent} setting in the @code{\paper} block.
5051 Program reference: @internalsref{InstrumentName}.
5055 When you put a name on a grand staff or piano staff the width of the
5056 brace is not taken into account. You must add extra spaces to the end of
5057 the name to avoid a collision.
5060 @subsection Transpose
5062 @cindex transposition of pitches
5063 @cindex @code{\transpose}
5065 A music expression can be transposed with @code{\transpose}. The
5068 \transpose @var{from} @var{to} @var{musicexpr}
5071 This means that @var{musicexpr} is transposed by the interval between
5072 the pitches @var{from} and @var{to}: any note with pitch @code{from}
5073 is changed to @code{to}.
5076 For example, consider a piece written in the key of D major. If
5077 this piece is a little too low for its performer, it can be
5078 transposed up to E major with
5080 \transpose d e @dots{}
5083 Consider a part written for violin (a C instrument). If
5084 this part is to be played on the A clarinet, the following
5085 transposition will produce the appropriate part
5088 \transpose a c @dots{}
5091 @code{\transpose} distinguishes between enharmonic pitches: both
5092 @code{\transpose c cis} or @code{\transpose c des} will transpose up
5093 half a tone. The first version will print sharps and the second
5094 version will print flats
5096 @lilypond[quote,raggedright,verbatim]
5097 mus = { \key d \major cis d fis g }
5101 \transpose c g' \mus
5102 \transpose c f' \mus
5109 Program reference: @internalsref{TransposedMusic}, and
5110 @internalsref{UntransposableMusic}.
5114 If you want to use both @code{\transpose} and @code{\relative},
5115 you must put @code{\transpose} outside of @code{\relative}, since
5116 @code{\relative} will have no effect music that appears inside a
5119 @node Instrument transpositions
5120 @subsection Instrument transpositions
5122 The key of a transposing instrument can also be specified. This
5123 applies to many wind instruments, for example, clarinets (B-flat, A and
5124 E-flat), horn (F) and trumpet (B-flat, C, D and E-flat).
5126 The transposition is entered after the keyword @code{\transposition}
5129 \transposition bes %% B-flat clarinet
5133 This command sets the property @code{instrumentTransposition}. The value of
5134 this property is used for MIDI output and quotations. It does not
5135 affect how notes are printed in the current staff.
5137 The pitch to use for @code{\transposition} should correspond to the
5138 transposition of the notes. For example, when entering a score in
5139 concert pitch, typically all voices are entered in C, so
5140 they should be entered as
5154 in this case, @code{\transposition} does not have to be used, since
5155 @code{c'} is the default.
5157 @code{\transposition} should be used when the music is entered from a
5158 (transposed) orchestral part. For example, in classical horn parts,
5159 the tuning of the instrument is often changed during a piece. When copying
5160 the notes from the part, use @code{\transposition}, e.g.
5173 @cindex transposition, MIDI
5174 @cindex transposition, instrument
5177 @node Multi measure rests
5178 @subsection Multi measure rests
5179 @cindex multi measure rests
5180 @cindex Rests, multi measure
5184 Multi measure rests are entered using `@code{R}'. It is specifically
5185 meant for full bar rests and for entering parts: the rest can expand
5186 to fill a score with rests, or it can be printed as a single
5187 multimeasure rest. This expansion is controlled by the property
5188 @code{Score.skipBars}. If this is set to true, empty measures will not
5189 be expanded, and the appropriate number is added automatically
5191 @lilypond[quote,fragment,verbatim]
5192 \time 4/4 r1 | R1 | R1*2
5193 \set Score.skipBars = ##t R1*17 R1*4
5196 The @code{1} in @code{R1} is similar to the duration notation used for
5197 notes. Hence, for time signatures other than 4/4, you must enter other
5198 durations. This can be done with augmentation dots or fractions
5200 @lilypond[quote,fragment,verbatim]
5201 \set Score.skipBars = ##t
5210 An @code{R} spanning a single measure is printed as either a whole rest
5211 or a breve, centered in the measure regardless of the time signature.
5213 If there are only a few measures of rest, LilyPond prints ``church rests''
5214 (a series of rectangles) in the staff. To replace that with a simple
5215 rest, use @code{MultiMeasureRest.expand-limit}.
5217 @lilypond[quote,fragment,verbatim]
5218 \set Score.skipBars = ##t
5220 \override MultiMeasureRest #'expand-limit = 1
5225 @cindex text on multi-measure rest
5226 @cindex script on multi-measure rest
5227 @cindex fermata on multi-measure rest
5229 Texts can be added to multi-measure rests by using the
5230 @var{note}-@code{markup} syntax (see @ref{Text markup}). In this case, the number is
5231 replaced. If you need both texts and the number, you must add the
5232 number by hand. A variable (@code{\fermataMarkup}) is provided for
5236 @lilypond[quote,verbatim,fragment]
5237 \set Score.skipBars = ##t
5239 R2.*10^\markup { \number 10 }_\markup { "Ad lib" }
5243 If you want to have a text on the left end of a multi-measure rest,
5244 attach the text to a zero-length skip note, i.e.
5252 @cindex whole rests for a full measure
5256 Program reference: @internalsref{MultiMeasureRestEvent},
5257 @internalsref{MultiMeasureTextEvent},
5258 @internalsref{MultiMeasureRestMusicGroup}, and
5259 @internalsref{MultiMeasureRest}.
5261 The layout object @internalsref{MultiMeasureRestNumber} is for the
5262 default number, and @internalsref{MultiMeasureRestText} for user
5267 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
5268 over multi-measure rests.
5270 @cindex condensing rests
5272 There is no way to automatically condense multiple rests into a single
5273 multimeasure rest. Multi measure rests do not take part in rest
5276 Be careful when entering multimeasure rests followed by whole
5277 notes. The following will enter two notes lasting four measures each
5281 When @code{skipBars} is set, the result will look OK, but the bar
5282 numbering will be off.
5284 @node Automatic part combining
5285 @subsection Automatic part combining
5286 @cindex automatic part combining
5287 @cindex part combiner
5290 Automatic part combining is used to merge two parts of music onto a
5291 staff. It is aimed at typesetting orchestral scores. When the two
5292 parts are identical for a period of time, only one is shown. In
5293 places where the two parts differ, they are typeset as separate
5294 voices, and stem directions are set automatically. Also, solo and
5295 @emph{a due} parts are identified and can be marked.
5297 The syntax for part combining is
5300 \partcombine @var{musicexpr1} @var{musicexpr2}
5305 The following example demonstrates the basic functionality of the part
5306 combiner: putting parts on one staff, and setting stem directions and
5309 @lilypond[quote,verbatim,raggedright,fragment]
5310 \new Staff \partcombine
5311 \relative g' { g g a( b) c c r r }
5312 \relative g' { g g r4 r e e g g }
5315 The first @code{g} appears only once, although it was
5316 specified twice (once in each part). Stem, slur and tie directions are
5317 set automatically, depending whether there is a solo or unisono. The
5318 first part (with context called @code{one}) always gets up stems, and
5319 `solo', while the second (called @code{two}) always gets down stems and
5322 If you just want the merging parts, and not the textual markings, you
5323 may set the property @code{printPartCombineTexts} to false
5325 @lilypond[quote,verbatim,raggedright,fragment,relative=2]
5327 \set Staff.printPartCombineTexts = ##f
5329 \relative g' { g a( b) r }
5330 \relative g' { g r4 r f }
5335 Both arguments to @code{\partcombine} will be interpreted as
5336 @internalsref{Voice} contexts. If using relative octaves,
5337 @code{\relative} should be specified for both music expressions, i.e.
5341 \relative @dots{} @var{musicexpr1}
5342 \relative @dots{} @var{musicexpr2}
5346 A @code{\relative} section that is outside of @code{\partcombine} has
5347 no effect on the pitches of @var{musicexpr1} and @var{musicexpr2}.
5351 Program reference: @internalsref{PartCombineMusic},
5352 @internalsref{SoloOneEvent}, and
5353 @internalsref{SoloTwoEvent}, and
5354 @internalsref{UnisonoEvent}.
5358 When @code{printPartCombineTexts} is set, when the two voices play the
5359 same notes on and off, the part combiner may typeset @code{a2} more
5360 than once in a measure.
5362 @code{\partcombine} cannot be inside @code{\times}.
5364 @code{\partcombine} cannot be inside @code{\relative}.
5366 Internally, the @code{\partcombine} interprets both arguments as
5367 @code{Voice}s named @code{one} and @code{two}, and then decides when
5368 the parts can be combined. Consequently, if the arguments switch to
5369 differently named @internalsref{Voice} contexts, the events in those
5373 @subsection Hiding staves
5375 @cindex Frenched scores
5376 @cindex Hiding staves
5378 In orchestral scores, staff lines that only have rests are usually
5379 removed. This saves some space. This style is called `French Score'.
5380 For @internalsref{Lyrics},
5381 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
5382 switched on by default. When these line of these contexts turn out
5383 empty after the line-breaking process, they are removed.
5385 For normal staves, a specialized @internalsref{Staff} context is
5386 available, which does the same: staves containing nothing (or only
5387 multi measure rests) are removed. The context definition is stored in
5388 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
5389 in this example disappears in the second line
5392 @lilypond[quote,verbatim]
5394 \context { \RemoveEmptyStaffContext }
5399 \new Staff { e4 f g a \break c1 }
5400 \new Staff { c4 d e f \break R1 }
5405 The first system shows all staves in full. If empty staves should be
5406 removed from the first system too, set @code{remove-first} to false in
5407 @internalsref{RemoveEmptyVerticalGroup}.
5409 Another application is making ossia sections, i.e. alternative
5410 melodies on a separate piece of staff, with help of a Frenched
5411 staff. See @inputfileref{input/test,ossia.ly} for an example.
5414 @node Different editions from one source
5415 @subsection Different editions from one source
5417 The @code{\tag} command marks music expressions with a name. These
5418 tagged expressions can be filtered out later. With this mechanism it
5419 is possible to make different versions of the same music source.
5421 In the following example, we see two versions of a piece of music, one
5422 for the full score, and one with cue notes for the instrumental part
5438 The same can be applied to articulations, texts, etc.: they are
5441 -\tag #@var{your-tag}
5443 to an articulation, for example,
5448 This defines a note with a conditional fingering indication.
5450 By applying the @code{\keepWithTag} command, tagged expressions
5451 can be filtered. For example,
5455 \keepWithTag #'score @var{the music}
5456 \keepWithTag #'part @var{the music}
5461 @lilypondfile[quote]{tag-filter.ly}
5464 The argument of the @code{\tag} command should be a symbol, or a list
5465 of symbols, for example,
5467 \tag #'(original-part transposed-part) @dots{}
5472 Examples: @inputfileref{input/regression,tag-filter.ly}.
5476 Multiple rests are not merged if you create the score with both tagged
5479 @node Quoting other voices
5480 @subsection Quoting other voices
5482 With quotations, fragments of other parts can be inserted into a part
5483 directly. Before a part can be quoted, it must be marked especially as
5484 quotable. This is done with code @code{\addquote} command.
5487 \addquote @var{name} @var{music}
5492 Here, @var{name} is an identifying string. The @var{music} is any kind
5493 of music. This is an example of @code{\addquote}
5496 \addquote clarinet \relative c' {
5501 This command must be entered at toplevel, i.e. outside any music
5504 After calling @code{\addquote}, the quotation may then be done with
5508 \quote @var{name} @var{duration}
5511 During a part, a piece of music can be quoted with the @code{\quote}
5518 This would cite three quarter notes (@code{2.} is a dotted half note)
5519 of the previously added @code{clarinet} voice.
5521 More precisely, it takes the current time-step of the part being
5522 printed, and extracts the notes at the corresponding point of the
5523 @code{\addquote}d voice. Therefore, the argument to @code{\addquote}
5524 should be the entire part of the voice to be quoted, including any
5525 rests at the beginning.
5527 Quotations take into account the transposition of both source and target
5528 instruments, if they are specified using the @code{\transposition} command.
5530 @lilypond[quote,raggedright,verbatim]
5531 \addquote clarinet \relative c' {
5537 e'8 f'8 \quote clarinet 2
5541 The type of events that are present in cue notes can be trimmed with
5542 the @code{quotedEventTypes} property. The default value is
5543 @code{(note-event rest-event)}, which means that only notes of and
5544 rests of the cued voice end up in the @code{\quote}.
5548 \set Staff.quotedEventTypes = #'(note-event articulation-event dynamic-event)
5552 will quote notes (but no rests), together with scripts and dynamics.
5556 Only the contents of the first @internalsref{Voice} occurring in an
5557 @code{\addquote} command will be considered for quotation, so
5558 @var{music} can not contain @code{\new} and @code{\context Voice}
5559 statements that would switch to a different Voice.
5564 In this manual: @ref{Instrument transpositions}.
5566 Examples: @inputfileref{input/regression,quote.ly}
5567 @inputfileref{input/regression,quote-transposition.ly}
5569 Program reference: @internalsref{QuoteMusic}.
5571 @node Formatting cue notes
5572 @subsection Formatting cue notes
5575 The previous section deals with inserting notes from another
5576 voice. When making a part, these notes need to be specially formatted.
5577 Here is an example of formatted cue notes
5579 @c TODO: This should be done with \quote stuff, not manually.
5584 \override Stem #'length = #5.5
5585 \override Beam #'thickness = #0.384
5586 \override Beam #'space-function =
5587 #(lambda (beam mult) (* 0.8 (Beam::space_function beam mult)))
5591 \set Staff.instrument = #"Horn in F"
5592 \set Score.skipBars = ##t
5595 \once \override Staff.MultiMeasureRest #'staff-position = #-6
5602 r8^"Bsn." c'8 f'8[ f'8]
5612 There are a couple of points to take care of:
5616 The multi rest of the original part should be moved up or down during
5619 Cue notes have smaller font sizes.
5621 When cued notes have a clef change relative to the original part, the
5622 clef should be restored after the cue section. This minimizes
5623 confusion for the reader,
5625 When the original part starts, this should be marked with the name of
5626 the instrument, in this case ``Horn.'' Of course, the cue part is
5627 marked with the instrument playing the cue.
5630 @c really? Are you sure about that last point? I'll check after 3.0 -gp
5633 @node Ancient notation
5634 @section Ancient notation
5636 @cindex Vaticana, Editio
5637 @cindex Medicaea, Editio
5642 Support for ancient notation includes features for mensural notation
5643 and Gregorian Chant notation. There is also limited support for
5644 figured bass notation.
5646 Many graphical objects provide a @code{style} property, see
5649 @ref{Ancient note heads},
5651 @ref{Ancient accidentals},
5653 @ref{Ancient rests},
5655 @ref{Ancient clefs},
5657 @ref{Ancient flags},
5659 @ref{Ancient time signatures}.
5662 By manipulating such a grob property, the typographical appearance of
5663 the affected graphical objects can be accommodated for a specific
5664 notation flavor without need for introducing any new notational
5667 In addition to the standard articulation signs described in section
5668 @ref{Articulations}, specific articulation signs for ancient notation
5673 @ref{Ancient articulations}
5676 Other aspects of ancient notation can not that easily be expressed as
5677 in terms of just changing a style property of a graphical object or
5678 adding articulation signs. Some notational concepts are introduced
5679 specifically for ancient notation,
5690 If this all is too much of documentation for you, and you just want to
5691 dive into typesetting without worrying too much about the details on
5692 how to customize a context, you may have a look at the predefined
5693 contexts. Use them to set up predefined style-specific voice and
5694 staff contexts, and directly go ahead with the note entry,
5698 @ref{Gregorian Chant contexts},
5700 @ref{Mensural contexts}.
5703 There is limited support for figured bass notation which came
5704 up during the baroque period.
5711 Here are all suptopics at a glance:
5714 * Ancient note heads::
5715 * Ancient accidentals::
5719 * Ancient time signatures::
5720 * Ancient articulations::
5724 * Gregorian Chant contexts::
5725 * Mensural contexts::
5730 @node Ancient note heads
5731 @subsection Ancient note heads
5736 For ancient notation, a note head style other than the @code{default}
5737 style may be chosen. This is accomplished by setting the @code{style}
5738 property of the NoteHead object to @code{baroque}, @code{neomensural}
5739 or @code{mensural}. The @code{baroque} style differs from the
5740 @code{default} style only in using a square shape for @code{\breve}
5741 note heads. The @code{neomensural} style differs from the
5742 @code{baroque} style in that it uses rhomboidal heads for whole notes
5743 and all smaller durations. Stems are centered on the note heads.
5744 This style is in particular useful when transcribing mensural music,
5745 e.g. for the incipit. The @code{mensural} style finally produces note
5746 heads that mimic the look of note heads in historic printings of the
5749 The following example demonstrates the @code{neomensural} style
5751 @lilypond[quote,fragment,raggedright,verbatim]
5752 \set Score.skipBars = ##t
5753 \override NoteHead #'style = #'neomensural
5754 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
5757 When typesetting a piece in Gregorian Chant notation, the
5758 @internalsref{Gregorian_ligature_engraver} will automatically select
5759 the proper note heads, such there is no need to explicitly set the
5760 note head style. Still, the note head style can be set e.g.@: to
5761 @code{vaticana_punctum} to produce punctum neumes. Similarly, a
5762 @internalsref{Mensural_ligature_engraver} is used to automatically
5763 assemble mensural ligatures. See @ref{Ligatures} for how ligature
5768 Examples: @inputfileref{input/regression,note-head-style.ly} gives an
5769 overview over all available note head styles.
5772 @node Ancient accidentals
5773 @subsection Ancient accidentals
5778 Use the @code{style} property of grob @internalsref{Accidental} to
5779 select ancient accidentals. Supported styles are
5780 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
5782 @lilypond[quote,raggedright,staffsize=26]
5789 { " " \musicglyph #"accidentals-vaticana-1"
5790 " " \musicglyph #"accidentals-vaticana0" }
5794 { " " \musicglyph #"accidentals-medicaea-1" }
5798 { " " \musicglyph #"accidentals-hufnagel-1" }
5802 { " " \musicglyph #"accidentals-mensural-1"
5803 " " \musicglyph #"accidentals-mensural1" }
5809 \context { \Score \remove "Bar_number_engraver" }
5811 \remove "Clef_engraver"
5812 \remove "Key_engraver"
5813 \remove "Time_signature_engraver"
5814 \remove "Staff_symbol_engraver"
5815 minimumVerticalExtent = ##f
5821 As shown, not all accidentals are supported by each style. When
5822 trying to access an unsupported accidental, LilyPond will switch to a
5823 different style, as demonstrated in
5824 @inputfileref{input/test,ancient-accidentals.ly}.
5826 Similarly to local accidentals, the style of the key signature can be
5827 controlled by the @code{style} property of the
5828 @internalsref{KeySignature} grob.
5832 In this manual: @ref{Pitches}, @ref{Chromatic alterations} and
5833 @ref{Accidentals} give a general introduction into the use of
5834 accidentals. @ref{Key signature} gives a general introduction into
5835 the use of key signatures.
5837 Program reference: @internalsref{KeySignature}.
5839 Examples: @inputfileref{input/test,ancient-accidentals.ly}.
5842 @subsection Ancient rests
5847 Use the @code{style} property of grob @internalsref{Rest} to select
5848 ancient accidentals. Supported styles are @code{classical},
5849 @code{neomensural} and @code{mensural}. @code{classical} differs
5850 from the @code{default} style only in that the quarter rest looks like
5851 a horizontally mirrored 8th rest. The @code{neomensural} style suits
5852 well for e.g. the incipit of a transcribed mensural piece of music.
5853 The @code{mensural} style finally mimics the appearance of rests as
5854 in historic prints of the 16th century.
5856 The following example demonstrates the @code{neomensural} style
5858 @lilypond[quote,fragment,raggedright,verbatim]
5859 \set Score.skipBars = ##t
5860 \override Rest #'style = #'neomensural
5861 r\longa r\breve r1 r2 r4 r8 r16
5864 There are no 32th and 64th rests specifically for the mensural or
5865 neo-mensural style. Instead, the rests from the default style will be
5866 taken. See @inputfileref{input/test,rests.ly} for a chart of all
5869 There are no rests in Gregorian Chant notation; instead, it uses
5874 In this manual: @ref{Rests} gives a general introduction into the use of rests.
5878 @subsection Ancient clefs
5883 LilyPond supports a variety of clefs, many of them ancient.
5885 The following table shows all ancient clefs that are supported via the
5886 @code{\clef} command. Some of the clefs use the same glyph, but
5887 differ only with respect to the line they are printed on. In such
5888 cases, a trailing number in the name is used to enumerate these clefs.
5889 Still, you can manually force a clef glyph to be typeset on an
5890 arbitrary line, as described in @ref{Clef}. The note printed to the
5891 right side of each clef in the example column denotes the @code{c'}
5892 with respect to that clef.
5894 @multitable @columnfractions .4 .4 .2
5897 @b{Description} @tab
5898 @b{Supported Clefs} @tab
5902 modern style mensural C clef @tab
5903 @code{neomensural-c1}, @code{neomensural-c2},
5904 @code{neomensural-c3}, @code{neomensural-c4} @tab
5905 @lilypond[fragment,quote,relative=1,notime]
5906 \clef "neomensural-c2" c
5910 petrucci style mensural C clefs, for use on different staff lines
5911 (the examples shows the 2nd staff line C clef).
5921 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5922 \clef "petrucci-c2" c
5926 petrucci style mensural F clef @tab
5927 @code{petrucci-f} @tab
5928 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5929 \clef "petrucci-f" c
5933 petrucci style mensural G clef @tab
5934 @code{petrucci-g} @tab
5935 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5936 \clef "petrucci-g" c
5940 historic style mensural C clef @tab
5941 @code{mensural-c1}, @code{mensural-c2}, @code{mensural-c3},
5942 @code{mensural-c4} @tab
5943 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5944 \clef "mensural-c2" c
5948 historic style mensural F clef @tab
5949 @code{mensural-f} @tab
5950 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5951 \clef "mensural-f" c
5955 historic style mensural G clef @tab
5956 @code{mensural-g} @tab
5957 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5958 \clef "mensural-g" c
5962 Editio Vaticana style do clef @tab
5963 @code{vaticana-do1}, @code{vaticana-do2}, @code{vaticana-do3} @tab
5964 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5965 \override Staff.StaffSymbol #'line-count = #4
5966 \clef "vaticana-do2" c
5970 Editio Vaticana style fa clef @tab
5971 @code{vaticana-fa1}, @code{vaticana-fa2} @tab
5972 @lilypond[quote,relative=1,notime,indent=0.0\mm,fragment]
5973 \override Staff.StaffSymbol #'line-count = #4
5974 \clef "vaticana-fa2" c
5978 Editio Medicaea style do clef @tab
5979 @code{medicaea-do1}, @code{medicaea-do2}, @code{medicaea-do3} @tab
5980 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5981 \override Staff.StaffSymbol #'line-count = #4
5982 \clef "medicaea-do2" c
5986 Editio Medicaea style fa clef @tab
5987 @code{medicaea-fa1}, @code{medicaea-fa2} @tab
5988 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5989 \override Staff.StaffSymbol #'line-count = #4
5990 \clef "medicaea-fa2" c
5994 historic style hufnagel do clef @tab
5995 @code{hufnagel-do1}, @code{hufnagel-do2}, @code{hufnagel-do3} @tab
5996 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5997 \override Staff.StaffSymbol #'line-count = #4
5998 \clef "hufnagel-do2" c
6002 historic style hufnagel fa clef @tab
6003 @code{hufnagel-fa1}, @code{hufnagel-fa2} @tab
6004 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
6005 \override Staff.StaffSymbol #'line-count = #4
6006 \clef "hufnagel-fa2" c
6010 historic style hufnagel combined do/fa clef @tab
6011 @code{hufnagel-do-fa} @tab
6012 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
6013 \clef "hufnagel-do-fa" c
6020 @emph{Modern style} means ``as is typeset in contemporary editions of
6021 transcribed mensural music''.
6023 @emph{Petrucci style} means ``inspired by printings published by the
6024 famous engraver Petrucci (1466-1539)''.
6026 @emph{Historic style} means ``as was typeset or written in historic
6027 editions (other than those of Petrucci)''.
6029 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
6031 Petrucci used C clefs with differently balanced left-side vertical
6032 beams, depending on which staff line it is printed.
6036 In this manual: see @ref{Clef}.
6040 The mensural g clef is mapped to the Petrucci g clef.
6045 @subsection Ancient flags
6050 Use the @code{flag-style} property of grob @internalsref{Stem} to
6051 select ancient flags. Besides the @code{default} flag style,
6052 only @code{mensural} style is supported
6054 @lilypond[quote,fragment,raggedright,verbatim]
6055 \override Stem #'flag-style = #'mensural
6056 \override Stem #'thickness = #1.0
6057 \override NoteHead #'style = #'mensural
6059 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
6060 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
6063 Note that the innermost flare of each mensural flag always is
6064 vertically aligned with a staff line.
6066 There is no particular flag style for neo-mensural notation. Hence,
6067 when typesetting the incipit of a transcribed piece of mensural
6068 music, the default flag style should be used. There are no flags in
6069 Gregorian Chant notation.
6073 The attachment of ancient flags to stems is slightly off due to a
6074 change in early 2.3.x.
6076 Vertically aligning each flag with a staff line assumes that stems
6077 always end either exactly on or exactly in the middle between two
6078 staff lines. This may not always be true when using advanced layout
6079 features of classical notation (which however are typically out of
6080 scope for mensural notation).
6082 @node Ancient time signatures
6083 @subsection Ancient time signatures
6085 @cindex time signatures
6088 There is limited support for mensural time signatures. The
6089 glyphs are hard-wired to particular time fractions. In other words,
6090 to get a particular mensural signature glyph with the @code{\time n/m}
6091 command, @code{n} and @code{m} have to be chosen according to the
6094 @lilypond[quote,raggedright]
6098 \remove Staff_symbol_engraver
6099 \remove Clef_engraver
6100 \remove Time_signature_engraver
6103 \set Score.timing = ##f
6104 \set Score.barAlways = ##t
6105 s_\markup { "$\\backslash$time 4/4" }
6106 ^\markup { " " \musicglyph #"timesig-neomensural4/4" }
6108 s_\markup { "$\\backslash$time 2/2" }
6109 ^\markup { " " \musicglyph #"timesig-neomensural2/2" }
6111 s_\markup { "$\\backslash$time 6/4" }
6112 ^\markup { " " \musicglyph #"timesig-neomensural6/4" }
6114 s_\markup { "$\\backslash$time 6/8" }
6115 ^\markup { " " \musicglyph #"timesig-neomensural6/8" }
6117 s_\markup { "$\\backslash$time 3/2" }
6118 ^\markup { " " \musicglyph #"timesig-neomensural3/2" }
6120 s_\markup { "$\\backslash$time 3/4" }
6121 ^\markup { " " \musicglyph #"timesig-neomensural3/4" }
6123 s_\markup { "$\\backslash$time 9/4" }
6124 ^\markup { " " \musicglyph #"timesig-neomensural9/4" }
6126 s_\markup { "$\\backslash$time 9/8" }
6127 ^\markup { " " \musicglyph #"timesig-neomensural9/8" }
6129 s_\markup { "$\\backslash$time 4/8" }
6130 ^\markup { " " \musicglyph #"timesig-neomensural4/8" }
6132 s_\markup { "$\\backslash$time 2/4" }
6133 ^\markup { " " \musicglyph #"timesig-neomensural2/4" }
6137 Use the @code{style} property of grob @internalsref{TimeSignature} to
6138 select ancient time signatures. Supported styles are
6139 @code{neomensural} and @code{mensural}. The above table uses the
6140 @code{neomensural} style. This style is appropriate for the
6141 incipit of transcriptions of mensural pieces. The @code{mensural}
6142 style mimics the look of historical printings of the 16th century.
6144 The following examples shows the differences in style,
6146 @c why isn't relative working?
6147 @lilypond[raggedright,relative=1,quote]
6151 c1^\markup { \hspace #-2.0 \typewriter default }
6153 \override Staff.TimeSignature #'style = #'numbered
6155 c1^\markup { \hspace #-2.0 \typewriter numbered }
6157 \override Staff.TimeSignature #'style = #'mensural
6159 c1^\markup { \hspace #-2.0 \typewriter mensural }
6161 \override Staff.TimeSignature #'style = #'neomensural
6163 c1^\markup { \hspace #-2.0 \typewriter neomensural }
6164 \override Staff.TimeSignature #'style = #'single-digit
6166 c1^\markup { \hspace #-2.0 \typewriter single-digit }
6172 This manual: @ref{Time signature} gives a general introduction into
6173 the use of time signatures.
6177 Ratios of note durations do not change with the time signature. For
6178 example, the ratio of 1 brevis = 3 semibrevis (tempus perfectum) must
6179 be made by hand, by setting
6182 breveTP = #(ly:make-duration -1 0 3 2)
6188 This sets @code{breveTP} to 3/2 times 2 = 3 times a whole note.
6190 The @code{old6/8alt} symbol (an alternate symbol for 6/8) is not
6191 addressable with @code{\time}. Use a @code{\markup} instead
6193 @node Ancient articulations
6194 @subsection Ancient articulations
6196 @cindex articulations
6198 In addition to the standard articulation signs described in section
6199 @ref{Articulations}, articulation signs for ancient notation are
6200 provided. These are specifically designed for use with notation in
6201 Editio Vaticana style.
6203 @lilypond[quote,raggedright,verbatim,noindent]
6204 \include "gregorian-init.ly"
6206 \context VaticanaVoice {
6207 \override TextScript #'font-family = #'typewriter
6208 \override TextScript #'font-shape = #'upright
6209 \override Script #'padding = #-0.1
6211 a4\circulus_"circulus" s1
6212 a4\semicirculus_"semicirculus" s1 s
6213 a4\accentus_"accentus" s1
6214 \[ a4_"episem" \episemInitium \pes b \flexa a \episemFinis \]
6221 Some articulations are vertically placed too closely to the
6222 correpsonding note heads.
6225 @subsection Custodes
6230 A @emph{custos} (plural: @emph{custodes}; Latin word for `guard') is a
6231 symbol that appears at the end of a staff. It anticipates the pitch
6232 of the first note(s) of the following line thus helping the performer
6233 to manage line breaks during performance.
6235 Custodes were frequently used in music notation until the 17th
6236 century. Nowadays, they have survived only in a few particular forms
6237 of musical notation such as contemporary editions of Gregorian chant
6238 like the @emph{editio vaticana}. There are different custos glyphs
6239 used in different flavors of notational style.
6241 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
6242 @internalsref{Staff} context when declaring the @code{\paper} block,
6243 as shown in the following example
6249 \consists Custos_engraver
6250 Custos \override #'style = #'mensural
6255 The result looks like this
6257 @lilypond[quote,raggedright]
6261 \override Staff.Custos #'style = #'mensural
6266 \context { \Staff \consists Custos_engraver }
6271 The custos glyph is selected by the @code{style} property. The styles
6272 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
6273 @code{mensural}. They are demonstrated in the following fragment
6275 @lilypond[quote,raggedright,fragment]
6276 \new Lyrics \lyricmode {
6278 \typewriter "vaticana"
6279 { " " \musicglyph #"custodes-vaticana-u0" }
6282 \typewriter "medicaea"
6283 { " " \musicglyph #"custodes-medicaea-u0" }
6286 \typewriter "hufnagel"
6287 { " " \musicglyph #"custodes-hufnagel-u0" }
6290 \typewriter "mensural"
6291 { " " \musicglyph #"custodes-mensural-u0" }
6299 Program reference: @internalsref{Custos}.
6301 Examples: @inputfileref{input/regression,custos.ly}.
6305 @subsection Divisiones
6311 A @emph{divisio} (plural: @emph{divisiones}; Latin word for
6312 `division') is a staff context symbol that is used to structure
6313 Gregorian music into phrases and sections. The musical meaning of
6314 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
6315 can be characterized as short, medium and long pause, somewhat like
6316 the breathmarks from @ref{Breath marks}. The @emph{finalis} sign not
6317 only marks the end of a chant, but is also frequently used within a
6318 single antiphonal/responsorial chant to mark the end of each section.
6321 To use divisiones, include the file @code{gregorian-init.ly}. It
6322 contains definitions that you can apply by just inserting
6323 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
6324 and @code{\finalis} at proper places in the input. Some editions use
6325 @emph{virgula} or @emph{caesura} instead of divisio minima.
6326 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
6329 @lilypondfile[quote,raggedright]{divisiones.ly}
6333 @cindex @code{\virgula}
6335 @cindex @code{\caesura}
6337 @cindex @code{\divisioMinima}
6338 @code{\divisioMinima},
6339 @cindex @code{\divisioMaior}
6340 @code{\divisioMaior},
6341 @cindex @code{\divisioMaxima}
6342 @code{\divisioMaxima},
6343 @cindex @code{\finalis}
6348 In this manual: @ref{Breath marks}.
6350 Program reference: @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}.
6352 Examples: @inputfileref{input/test,divisiones.ly}.
6355 @subsection Ligatures
6359 @c TODO: Should double check if I recalled things correctly when I wrote
6360 @c down the following paragraph by heart.
6362 A ligature is a graphical symbol that represents at least two distinct
6363 notes. Ligatures originally appeared in the manuscripts of Gregorian
6364 chant notation to denote ascending or descending sequences of notes.
6366 Ligatures are entered by enclosing them in @code{\[} and @code{\]}.
6367 Some ligature styles may need additional input syntax specific for
6368 this particular type of ligature. By default, the
6369 @internalsref{LigatureBracket} engraver just puts a square bracket
6372 @lilypond[quote,raggedright,verbatim]
6380 To select a specific style of ligatures, a proper ligature engraver
6381 has to be added to the @internalsref{Voice} context, as explained in
6382 the following subsections. Only white mensural ligatures
6383 are supported with certain limitations.
6389 Ligatures need special spacing that has not yet been implemented. As
6390 a result, there is too much space between ligatures most of the time,
6391 and line breaking often is unsatisfactory. Also, lyrics do not
6392 correctly align with ligatures.
6394 Accidentals must not be printed within a ligature, but instead need to
6395 be collected and printed in front of it.
6397 Augmentum dots within ligatures are not handled correctly.
6401 * White mensural ligatures::
6402 * Gregorian square neumes ligatures::
6405 @node White mensural ligatures
6406 @subsubsection White mensural ligatures
6408 @cindex Mensural ligatures
6409 @cindex White mensural ligatures
6411 There is limited support for white mensural ligatures.
6413 To engrave white mensural ligatures, in the paper block the
6414 @internalsref{Mensural_ligature_engraver} has to be put into the
6415 @internalsref{Voice} context, and remove the
6416 @internalsref{Ligature_bracket_engraver}
6422 \remove Ligature_bracket_engraver
6423 \consists Mensural_ligature_engraver
6428 There is no additional input language to describe the shape of a
6429 white mensural ligature. The shape is rather determined solely from
6430 the pitch and duration of the enclosed notes. While this approach may
6431 take a new user a while to get accustomed, it has the great advantage
6432 that the full musical information of the ligature is known internally.
6433 This is not only required for correct MIDI output, but also allows for
6434 automatic transcription of the ligatures.
6439 \set Score.timing = ##f
6440 \set Score.defaultBarType = "empty"
6441 \override NoteHead #'style = #'neomensural
6442 \override Staff.TimeSignature #'style = #'neomensural
6444 \[ g\longa c\breve a\breve f\breve d'\longa \]
6446 \[ e1 f1 a\breve g\longa \]
6448 @lilypond[quote,raggedright]
6451 \set Score.timing = ##f
6452 \set Score.defaultBarType = "empty"
6453 \override NoteHead #'style = #'neomensural
6454 \override Staff.TimeSignature #'style = #'neomensural
6456 \[ g\longa c\breve a\breve f\breve d'\longa \]
6458 \[ e1 f1 a\breve g\longa \]
6463 \remove Ligature_bracket_engraver
6464 \consists Mensural_ligature_engraver
6470 Without replacing @internalsref{Ligature_bracket_engraver} with
6471 @internalsref{Mensural_ligature_engraver}, the same music transcribes
6474 @lilypond[quote,raggedright]
6476 \set Score.timing = ##f
6477 \set Score.defaultBarType = "empty"
6478 \override NoteHead #'style = #'neomensural
6479 \override Staff.TimeSignature #'style = #'neomensural
6481 \[ g\longa c\breve a\breve f\breve d'\longa \]
6483 \[ e1 f1 a\breve g\longa \]
6489 The implementation is experimental. It may output strange warnings,
6490 incorrect results, and might even crash on more complex ligatures.
6492 @node Gregorian square neumes ligatures
6493 @subsubsection Gregorian square neumes ligatures
6495 @cindex Square neumes ligatures
6496 @cindex Gregorian square neumes ligatures
6498 There is limited support for Gregorian square neumes notation
6499 (following the style of the Editio Vaticana). Core ligatures can
6500 already be typeset, but essential issues for serious typesetting are
6501 still lacking, such as (among others) horizontal alignment of multiple
6502 ligatures, lyrics alignment and proper accidentals handling.
6505 The following table contains the extended neumes table of the 2nd
6506 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
6507 1983 by the monks of Solesmes.
6509 @multitable @columnfractions .4 .2 .2 .2
6512 @b{Neuma aut@*Neumarum Elementa} @tab
6513 @b{Figurae@*Rectae} @tab
6514 @b{Figurae@*Liquescentes Auctae} @tab
6515 @b{Figurae@*Liquescentes Deminutae}
6517 @c TODO: \paper block is identical in all of the below examples.
6518 @c Therefore, it should somehow be included rather than duplicated all
6521 @c why not make identifiers in ly/engraver-init.ly? --hwn
6523 @c Because it's just used to typeset plain notes without
6524 @c a staff for demonstration purposes rather than something
6525 @c special of Gregorian chant notation. --jr
6530 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.5\cm]
6531 \include "gregorian-init.ly"
6536 \noBreak s^\markup {"a"} \noBreak
6538 % Punctum Inclinatum
6540 \noBreak s^\markup {"b"}
6542 \paper { \neumeDemoPaper }}
6545 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.5\cm]
6546 \include "gregorian-init.ly"
6549 % Punctum Auctum Ascendens
6550 \[ \auctum \ascendens b \]
6551 \noBreak s^\markup {"c"} \noBreak
6553 % Punctum Auctum Descendens
6554 \[ \auctum \descendens b \]
6555 \noBreak s^\markup {"d"} \noBreak
6557 % Punctum Inclinatum Auctum
6558 \[ \inclinatum \auctum b \]
6559 \noBreak s^\markup {"e"}
6561 \paper { \neumeDemoPaper }}
6564 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6565 \include "gregorian-init.ly"
6568 % Punctum Inclinatum Parvum
6569 \[ \inclinatum \deminutum b \]
6570 \noBreak s^\markup {"f"}
6572 \paper { \neumeDemoPaper }}
6578 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6579 \include "gregorian-init.ly"
6584 \noBreak s^\markup {"g"}
6586 \paper { \neumeDemoPaper }}
6592 @code{3. Apostropha vel Stropha}
6594 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6595 \include "gregorian-init.ly"
6600 \noBreak s^\markup {"h"}
6602 \paper { \neumeDemoPaper }}
6605 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6606 \include "gregorian-init.ly"
6610 \[ \stropha \auctum b \]
6611 \noBreak s^\markup {"i"}
6613 \paper { \neumeDemoPaper }}
6620 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6621 \include "gregorian-init.ly"
6626 \noBreak s^\markup {"j"}
6628 \paper { \neumeDemoPaper }}
6634 @code{5. Clivis vel Flexa}
6636 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6637 \include "gregorian-init.ly"
6644 \paper { \neumeDemoPaper }}
6647 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6648 \include "gregorian-init.ly"
6651 % Clivis Aucta Descendens
6652 \[ b \flexa \auctum \descendens g \]
6653 \noBreak s^\markup {"l"} \noBreak
6655 % Clivis Aucta Ascendens
6656 \[ b \flexa \auctum \ascendens g \]
6657 \noBreak s^\markup {"m"}
6659 \paper { \neumeDemoPaper }}
6662 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6663 \include "gregorian-init.ly"
6667 \[ b \flexa \deminutum g \]
6670 \paper { \neumeDemoPaper }}
6674 @code{6. Podatus vel Pes}
6676 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6677 \include "gregorian-init.ly"
6684 \paper { \neumeDemoPaper }}
6687 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6688 \include "gregorian-init.ly"
6691 % Pes Auctus Descendens
6692 \[ g \pes \auctum \descendens b \]
6693 \noBreak s^\markup {"p"} \noBreak
6695 % Pes Auctus Ascendens
6696 \[ g \pes \auctum \ascendens b \]
6697 \noBreak s^\markup {"q"}
6699 \paper { \neumeDemoPaper }}
6702 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6703 \include "gregorian-init.ly"
6707 \[ g \pes \deminutum b \]
6710 \paper { \neumeDemoPaper }}
6714 @code{7. Pes Quassus}
6716 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6717 \include "gregorian-init.ly"
6721 \[ \oriscus g \pes \virga b \]
6724 \paper { \neumeDemoPaper }}
6727 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6728 \include "gregorian-init.ly"
6731 % Pes Quassus Auctus Descendens
6732 \[ \oriscus g \pes \auctum \descendens b \]
6735 \paper { \neumeDemoPaper }}
6740 @code{8. Quilisma Pes}
6742 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6743 \include "gregorian-init.ly"
6747 \[ \quilisma g \pes b \]
6750 \paper { \neumeDemoPaper }}
6753 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6754 \include "gregorian-init.ly"
6757 % Quilisma Pes Auctus Descendens
6758 \[ \quilisma g \pes \auctum \descendens b \]
6761 \paper { \neumeDemoPaper }}
6766 @code{9. Podatus Initio Debilis}
6768 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6769 \include "gregorian-init.ly"
6772 % Pes Initio Debilis
6773 \[ \deminutum g \pes b \]
6776 \paper { \neumeDemoPaper }}
6779 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6780 \include "gregorian-init.ly"
6783 % Pes Auctus Descendens Initio Debilis
6784 \[ \deminutum g \pes \auctum \descendens b \]
6787 \paper { \neumeDemoPaper }}
6794 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6795 \include "gregorian-init.ly"
6799 \[ a \pes b \flexa g \]
6802 \paper { \neumeDemoPaper }}
6805 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6806 \include "gregorian-init.ly"
6809 % Torculus Auctus Descendens
6810 \[ a \pes b \flexa \auctum \descendens g \]
6813 \paper { \neumeDemoPaper }}
6816 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6817 \include "gregorian-init.ly"
6820 % Torculus Deminutus
6821 \[ a \pes b \flexa \deminutum g \]
6824 \paper { \neumeDemoPaper }}
6828 @code{11. Torculus Initio Debilis}
6830 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6831 \include "gregorian-init.ly"
6834 % Torculus Initio Debilis
6835 \[ \deminutum a \pes b \flexa g \]
6838 \paper { \neumeDemoPaper }}
6841 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6842 \include "gregorian-init.ly"
6845 % Torculus Auctus Descendens Initio Debilis
6846 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6849 \paper { \neumeDemoPaper }}
6852 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6853 \include "gregorian-init.ly"
6856 % Torculus Deminutus Initio Debilis
6857 \[ \deminutum a \pes b \flexa \deminutum g \]
6860 \paper { \neumeDemoPaper }}
6864 @code{12. Porrectus}
6866 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6867 \include "gregorian-init.ly"
6871 \[ a \flexa g \pes b \]
6874 \paper { \neumeDemoPaper }}
6877 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6878 \include "gregorian-init.ly"
6881 % Porrectus Auctus Descendens
6882 \[ a \flexa g \pes \auctum \descendens b \]
6885 \paper { \neumeDemoPaper }}
6888 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6889 \include "gregorian-init.ly"
6892 % Porrectus Deminutus
6893 \[ a \flexa g \pes \deminutum b \]
6896 \paper { \neumeDemoPaper }}
6902 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6903 \include "gregorian-init.ly"
6907 \[ \virga b \inclinatum a \inclinatum g \]
6910 \paper { \neumeDemoPaper }
6914 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6915 \include "gregorian-init.ly"
6919 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6922 \paper { \neumeDemoPaper }}
6925 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6926 \include "gregorian-init.ly"
6929 % Climacus Deminutus
6930 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6933 \paper { \neumeDemoPaper }}
6937 @code{14. Scandicus}
6939 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6940 \include "gregorian-init.ly"
6944 \[ g \pes a \virga b \]
6947 \paper { \neumeDemoPaper }}
6950 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6951 \include "gregorian-init.ly"
6954 % Scandicus Auctus Descendens
6955 \[ g \pes a \pes \auctum \descendens b \]
6958 \paper { \neumeDemoPaper }}
6961 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6962 \include "gregorian-init.ly"
6965 % Scandicus Deminutus
6966 \[ g \pes a \pes \deminutum b \]
6969 \paper { \neumeDemoPaper }}
6975 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6976 \include "gregorian-init.ly"
6980 \[ g \oriscus a \pes \virga b \]
6983 \paper { \neumeDemoPaper }}
6986 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6987 \include "gregorian-init.ly"
6990 % Salicus Auctus Descendens
6991 \[ g \oriscus a \pes \auctum \descendens b \]
6994 \paper { \neumeDemoPaper }}
7001 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
7002 \include "gregorian-init.ly"
7006 \[ \stropha b \stropha b \stropha a \]
7009 \paper { \neumeDemoPaper }
7018 Unlike most other neumes notation systems, the input language for
7019 neumes does not reflect the typographical appearance, but is designed
7020 to focus on musical meaning. For example, @code{\[ a \pes b
7021 \flexa g \]} produces a Torculus consisting of three Punctum heads,
7022 while @code{\[ a \flexa g \pes b \]} produces a Porrectus with a
7023 curved flexa shape and only a single Punctum head. There is no
7024 command to explicitly typeset the curved flexa shape; the decision of
7025 when to typeset a curved flexa shape is based on the musical
7026 input. The idea of this approach is to separate the musical aspects
7027 of the input from the notation style of the output. This way, the
7028 same input can be reused to typeset the same music in a different
7029 style of Gregorian chant notation.
7031 The following table shows the code fragments that produce the
7032 ligatures in the above neumes table. The letter in the first column
7033 in each line of the below table indicates to which ligature in the
7034 above table it refers. The second column gives the name of the
7035 ligature. The third column shows the code fragment that produces this
7036 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
7038 @multitable @columnfractions .1 .4 .5
7052 Punctum Inclinatum @tab
7053 @code{\[ \inclinatum b \]}
7057 Punctum Auctum Ascendens @tab
7058 @code{\[ \auctum \ascendens b \]}
7062 Punctum Auctum Descendens @tab
7063 @code{\[ \auctum \descendens b \]}
7067 Punctum Inclinatum Auctum @tab
7068 @code{\[ \inclinatum \auctum b \]}
7072 Punctum Inclinatum Parvum @tab
7073 @code{\[ \inclinatum \deminutum b \]}
7078 @code{\[ \virga b \]}
7083 @code{\[ \stropha b \]}
7088 @code{\[ \stropha \auctum b \]}
7093 @code{\[ \oriscus b \]}
7097 Clivis vel Flexa @tab
7098 @code{\[ b \flexa g \]}
7102 Clivis Aucta Descendens @tab
7103 @code{\[ b \flexa \auctum \descendens g \]}
7107 Clivis Aucta Ascendens @tab
7108 @code{\[ b \flexa \auctum \ascendens g \]}
7113 @code{\[ b \flexa \deminutum g \]}
7117 Podatus vel Pes @tab
7118 @code{\[ g \pes b \]}
7122 Pes Auctus Descendens @tab
7123 @code{\[ g \pes \auctum \descendens b \]}
7127 Pes Auctus Ascendens @tab
7128 @code{\[ g \pes \auctum \ascendens b \]}
7133 @code{\[ g \pes \deminutum b \]}
7138 @code{\[ \oriscus g \pes \virga b \]}
7142 Pes Quassus Auctus Descendens @tab
7143 @code{\[ \oriscus g \pes \auctum \descendens b \]}
7148 @code{\[ \quilisma g \pes b \]}
7152 Quilisma Pes Auctus Descendens @tab
7153 @code{\[ \quilisma g \pes \auctum \descendens b \]}
7157 Pes Initio Debilis @tab
7158 @code{\[ \deminutum g \pes b \]}
7162 Pes Auctus Descendens Initio Debilis @tab
7163 @code{\[ \deminutum g \pes \auctum \descendens b \]}
7168 @code{\[ a \pes b \flexa g \]}
7172 Torculus Auctus Descendens @tab
7173 @code{\[ a \pes b \flexa \auctum \descendens g \]}
7177 Torculus Deminutus @tab
7178 @code{\[ a \pes b \flexa \deminutum g \]}
7182 Torculus Initio Debilis @tab
7183 @code{\[ \deminutum a \pes b \flexa g \]}
7187 Torculus Auctus Descendens Initio Debilis @tab
7188 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
7192 Torculus Deminutus Initio Debilis @tab
7193 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
7198 @code{\[ a \flexa g \pes b \]}
7202 Porrectus Auctus Descendens @tab
7203 @code{\[ a \flexa g \pes \auctum \descendens b \]}
7207 Porrectus Deminutus @tab
7208 @code{\[ a \flexa g \pes \deminutum b \]}
7213 @code{\[ \virga b \inclinatum a \inclinatum g \]}
7217 Climacus Auctus @tab
7218 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
7222 Climacus Deminutus @tab
7223 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
7228 @code{\[ g \pes a \virga b \]}
7232 Scandicus Auctus Descendens @tab
7233 @code{\[ g \pes a \pes \auctum \descendens b \]}
7237 Scandicus Deminutus @tab
7238 @code{\[ g \pes a \pes \deminutum b \]}
7243 @code{\[ g \oriscus a \pes \virga b \]}
7247 Salicus Auctus Descendens @tab
7248 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
7253 @code{\[ \stropha b \stropha b \stropha a \]}
7259 The following head prefixes are supported
7261 @cindex @code{\virga}
7263 @cindex @code{\stropha}
7265 @cindex @code{\inclinatum}
7267 @cindex @code{\auctum}
7269 @cindex @code{\descendens}
7271 @cindex @code{\ascendens}
7273 @cindex @code{\oriscus}
7275 @cindex @code{\quilisma}
7277 @cindex @code{\deminutum}
7280 Head prefixes can be accumulated, though restrictions apply. For
7281 example, either @code{\descendens} or @code{\ascendens} can be applied
7282 to a head, but not both to the same head.
7285 @cindex @code{\flexa}
7286 Two adjacent heads can be tied together with the @code{\pes} and
7287 @code{\flexa} infix commands for a rising and falling line of melody,
7292 @node Gregorian Chant contexts
7293 @subsection Gregorian Chant contexts
7295 @cindex VaticanaVoiceContext
7296 @cindex VaticanaStaffContext
7298 The predefined @code{VaticanaVoiceContext} and
7299 @code{VaticanaStaffContext} can be used to engrave a piece of
7300 Gregorian Chant in the style of the Editio Vaticana. These contexts
7301 initialize all relevant context properties and grob properties to
7302 proper values, so you can immediately go ahead entering the chant, as
7303 the following excerpt demonstrates
7305 @lilypond[quote,raggedright,verbatim,noindent]
7306 \include "gregorian-init.ly"
7309 \context VaticanaVoice = "cantus" {
7310 \override Score.BarNumber #'transparent = ##t {
7311 \[ c'\melisma c' \flexa a \]
7312 \[ a \flexa \deminutum g\melismaEnd \]
7314 \[ f\melisma \pes a c' c' \pes d'\melismaEnd \]
7315 c' \divisioMinima \break
7316 \[ c'\melisma c' \flexa a \]
7317 \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
7320 \lyricsto "cantus" \new Lyrics {
7321 San- ctus, San- ctus, San- ctus
7328 @node Mensural contexts
7329 @subsection Mensural contexts
7331 @cindex MensuralVoiceContext
7332 @cindex MensuralStaffContext
7334 The predefined @code{MensuralVoiceContext} and
7335 @code{MensuralStaffContext} can be used to engrave a piece in mensural
7336 style. These contexts initialize all relevant context properties and
7337 grob properties to proper values, so you can immediately go ahead
7338 entering the chant, as the following excerpt demonstrates
7340 @lilypond[quote,raggedright,verbatim,noindent]
7343 \context MensuralVoice = "discantus" \transpose c c' {
7344 \override Score.BarNumber #'transparent = ##t {
7345 c'1\melisma bes a g\melismaEnd
7347 \[ f1\melisma a c'\breve d'\melismaEnd \]
7349 c'\breve\melisma a1 g1\melismaEnd
7350 fis\longa^\signumcongruentiae
7353 \lyricsto "discantus" \new Lyrics {
7354 San -- ctus, San -- ctus, San -- ctus
7362 @subsection Figured bass
7364 @cindex Basso continuo
7366 @c TODO: musicological blurb about FB
7369 LilyPond has limited support for figured bass
7371 @lilypond[quote,verbatim,fragment]
7373 \context Voice { \clef bass dis4 c d ais }
7374 \context FiguredBass \figuremode {
7375 < 6 >4 < 7 >8 < 6+ [_!] >
7381 The support for figured bass consists of two parts: there is an input
7382 mode, introduced by @code{\figuremode}, where you can enter bass figures
7383 as numbers, and there is a context called @internalsref{FiguredBass} that
7384 takes care of making @internalsref{BassFigure} objects.
7386 In figures input mode, a group of bass figures is delimited by
7387 @code{<} and @code{>}. The duration is entered after the @code{>}
7391 @lilypond[quote,fragment]
7392 \context FiguredBass
7393 \figuremode { <4 6> }
7396 Accidentals are added when you append @code{-}, @code{!} and @code{+}
7402 @lilypond[quote,fragment]
7403 \context FiguredBass
7404 \figuremode { <4- 6+ 7!> }
7407 Spaces or dashes may be inserted by using @code{_}. Brackets are
7408 introduced with @code{[} and @code{]}
7413 @lilypond[quote,fragment]
7414 \context FiguredBass
7415 \figuremode { < [4 6] 8 [_! 12]> }
7418 Although the support for figured bass may superficially resemble chord
7419 support, it works much simpler. The @code{\figuremode} mode simply
7420 stores the numbers , and @internalsref{FiguredBass} context prints
7421 them as entered. There is no conversion to pitches, and no
7422 realizations of the bass are played in the MIDI file.
7424 Internally, the code produces markup texts. You can use any of the
7425 markup text properties to override formatting. For example, the
7426 vertical spacing of the figures may be set with @code{baseline-skip}.
7430 Program reference: @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
7431 and @internalsref{FiguredBass} context.
7435 Slash notation for alterations is not supported.
7437 @node Contemporary notation
7438 @section Contemporary notation
7440 In the 20th century, composers have greatly expanded the musical
7441 vocabulary. With this expansion, many innovations in musical notation
7442 have been tried. The book ``Music Notation in the 20th century'' by
7443 Kurt Stone gives a comprehensive overview (see @ref{Literature
7444 list}). In general, the use of new, innovative notation makes a piece
7445 harder to understand and perform and its use should therefore be
7446 avoided. For this reason, support for contemporary notation in
7447 LilyPond is limited.
7451 * Polymetric notation::
7453 * Special fermatas::
7457 @node Polymetric notation
7458 @subsection Polymetric notation
7460 Double time signatures are not supported explicitly, but they can be
7461 faked. In the next example, the markup for the time signature is
7462 created with a markup text. This markup text is inserted in the
7463 @internalsref{TimeSignature} grob.
7465 @lilypond[verbatim,raggedright]
7471 \musicglyph #"scripts-stopped"
7472 \bracket \column < "5" "8" >
7477 \override Staff.TimeSignature #'print-function = #Text_interface::print
7478 \override Staff.TimeSignature #'text = #tsMarkup
7480 c'2 \bar ":" c'4 c'4.
7484 Each staff can also have its own time signature. This is done by
7485 moving the @internalsref{Timing_engraver} to @internalsref{Staff}
7490 \context{ \Score \remove "Timing_engraver" }
7491 \context{ \Staff \consists "Timing_engraver" }
7496 Now, each staff has its own time signature.
7509 c4. c8 c c c4. c8 c c
7514 @lilypond[raggedright]
7516 \context{ \Score \remove "Timing_engraver" }
7517 \context{ \Staff \consists "Timing_engraver" }
7531 c4. c8 c c c4. c8 c c
7537 A different form of polymetric notation is where note lengths have
7538 different values across staves.
7540 This notation can be created by setting a common time signature for
7541 each staff but replacing it manually using
7542 @code{timeSignatureFraction} to the desired fraction. Then the printed
7543 durations in each staff are scaled to the common time signature.
7544 The latter is done with @code{\compressmusic}, which is similar to
7545 @code{\times}, but does not create a tuplet bracket.
7548 In this example, music with the time signatures of 3/4, 9/8 and 10/8 are
7549 used in parallel. In the second staff, shown durations are multiplied by
7550 2/3, so that 2/3 * 9/8 = 3/4, and in the third staff, shown durations are
7551 multiplied by 3/5, so that 3/5 * 10/8 = 3/4.
7553 @lilypond[raggedright,verbatim,fragment]
7561 \set Staff.timeSignatureFraction = #'(9 . 8)
7562 \compressmusic #'(2 . 3)
7563 \repeat unfold 6 { c8[ c c] }
7567 \set Staff.timeSignatureFraction = #'(10 . 8)
7568 \compressmusic #'(3 . 5) {
7569 \repeat unfold 2 { c8[ c c] }
7570 \repeat unfold 2 { c8[ c] }
7571 | c4. c4. \times 2/3 { c8 c c } c4
7582 When using different time signatures in parallel, the spacing is
7583 aligned vertically, but bar lines distort the regular spacing.
7588 @subsection Clusters
7592 A cluster indicates a continuous range of pitches to be played. They
7593 can be denoted as the envelope of a set of notes. They are entered by
7594 applying the function @code{makeClusters} to a sequence of
7597 @lilypond[quote,relative=2,fragment,verbatim]
7598 \makeClusters { <c e > <b f'> }
7601 The following example (from
7602 @inputfileref{input/regression,cluster.ly}) shows what the result
7605 @lilypondfile[quote]{cluster.ly}
7607 Ordinary notes and clusters can be put together in the same staff,
7608 even simultaneously. In such a case no attempt is made to
7609 automatically avoid collisions between ordinary notes and clusters.
7613 Program reference: @internalsref{ClusterSpanner},
7614 @internalsref{ClusterSpannerBeacon},
7615 @internalsref{Cluster_spanner_engraver}, and
7616 @internalsref{ClusterNoteEvent}.
7618 Examples: @inputfileref{input/regression,cluster.ly}.
7622 Music expressions like @code{<< @{ g8 e8 @} a4 >>} are not printed
7623 accurately. Use @code{<g a>8 <e a>8} instead.
7627 @node Special fermatas
7628 @subsection Special fermatas
7630 @cindex fermatas, special
7632 In contemporary music notation, special fermata symbols denote breaks
7633 of differing lengths. The following fermatas are supported
7635 @lilypond[quote,raggedright]
7658 \context Lyrics \lyricmode {
7659 \override LyricText #'font-family = #'typewriter
7660 "shortfermata" "fermata" "longfermata" "verylongfermata"
7665 See @ref{Articulations} for general instructions how to apply scripts
7666 such as fermatas to notes.
7668 @node Feathered beams
7669 @subsection Feathered beams
7671 Feathered beams are not supported natively, but they can be faked by
7672 forcing two beams to overlap. Here is an example,
7674 @lilypond[raggedright,relative=2,fragment,verbatim]
7679 \once \override Voice.Beam #'positions = #'(0 . 0.5)
7684 \once \override Voice.Beam #'positions = #'(0 . -0.5)
7692 @node Educational use
7693 @section Educational use
7695 With the amount of control that LilyPond offers, one can make great
7696 teaching tools in addition to great musical scores.
7700 * Blank music paper::
7702 * Easy Notation note heads::
7706 @subsection Balloon help
7708 Elements of notation can be marked and named with the help of a square
7709 balloon. The primary purpose of this feature is to explain notation.
7711 The following example demonstrates its use.
7713 @lilypond[quote,verbatim,fragment,raggedright,relative=2]
7716 #(add-balloon-text 'NoteHead "heads, or tails?"
7723 The function @code{add-balloon-text} takes the name of a grob, the
7724 label to print, and the position where to put the label relative to
7725 the object. In the above example, the text ``heads or tails?'' ends
7726 3 spaces below and 1 space to the right of the marked head.
7729 @cindex notation, explaining
7733 Program reference: @internalsref{text-balloon-interface}.
7735 Examples: @inputfileref{input/regression,balloon.ly}.
7740 @node Blank music paper
7741 @subsection Blank music paper
7743 A blank music paper can be produced also by using invisible notes, and
7744 removing @code{Bar_number_engraver}.
7749 \repeat unfold 2 % Change this for more lines.
7754 \override TimeSignature #'transparent = ##t
7755 defaultBarType = #""
7756 \remove Bar_number_engraver
7758 \context Staff \emptymusic
7759 \context TabStaff \emptymusic
7765 @subsection Hidden notes
7767 @cindex Hidden notes
7768 @cindex Invisible notes
7769 @cindex Transparent notes
7771 Hidden (or invisible or transparent) notes can be useful in preparing theory
7772 or composition exercises.
7774 @lilypond[quote,verbatim,relative=2,fragment]
7782 Hidden notes are also great for performing weird tricks. For example,
7783 slurs cannot be attached to rests or spacer rests, but you may with
7784 to include that in your score -- string instruments use this notation
7785 when doing pizzicato to indicate that the note should ring for as long
7788 @lilypond[quote,verbatim,relative=0,fragment]
7791 c4^"pizz"( \hideNotes c)
7792 \unHideNotes c( \hideNotes c)
7799 @node Easy Notation note heads
7800 @subsection Easy Notation note heads
7802 @cindex easy notation
7805 The `easy play' note head includes a note name inside the head. It is
7806 used in music for beginners
7808 @lilypond[quote,raggedright,verbatim,fragment,staffsize=26]
7813 The command @code{\setEasyHeads} overrides settings for the
7814 @internalsref{NoteHead} object. To make the letters readable, it has
7815 to be printed in a large font size. To print with a larger font, see
7816 @ref{Setting global staff size}.
7820 @cindex @code{\setEasyHeads}
7821 @code{\setEasyHeads}