2 @c This file is part of lilypond.tely
4 @c A menu is needed before every deeper *section nesting of @node's; run
5 @c M-x texinfo-all-menus-update
6 @c to automatically fill in these menus before saving changes
9 @chapter Notation manual
11 This chapter describes all the different types of notation supported
12 by LilyPond. It is intended as a reference for users that are already
13 somewhat familiar with LilyPond.
17 * Easier music entry::
27 * Other instrument specific notation::
31 * Formatting cue notes::
33 * Contemporary notation::
37 @c FIXME: Note entry vs Music entry at top level menu is confusing.
43 This section is about basic notation elements notes, rests and
44 related constructs, such as stems, tuplets and ties.
49 * Chromatic alterations::
67 A note is printed by specifying its pitch and then its duration,
69 @lilypond[quote,verbatim]
70 { cis'4 d'8 e'16 c'16 }
78 @cindex Note specification
80 @cindex entering notes
82 The most common syntax for pitch entry is used for standard notes and
83 @code{\chordmode} modes. In these modes, pitches may be designated by
84 names. The notes are specified by the letters @code{a} through
85 @code{g}. The octave is formed with notes ranging from @code{c}
86 to @code{b}. The pitch @code{c} is an octave below middle C and the
87 letters span the octave above that C
89 @lilypond[fragment,verbatim,noindent]
91 a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
94 @cindex note names, Dutch
96 A sharp is formed by adding @code{-is} to the end of a pitch name and
97 a flat is formed by adding @code{-es}. Double sharps and double flats
98 are obtained by adding @code{-isis} or @code{-eses}. These
99 names are the Dutch note names. In Dutch, @code{aes} is contracted to
100 @code{as}, but both forms are accepted. Similarly, both
101 @code{es} and @code{ees} are accepted
103 @lilypond[fragment,quote,verbatim,relative=2]
111 There are predefined sets of note names for various other languages.
112 To use them, include the language specific init file. For
113 example: @code{\include "english.ly"}. The available language files
114 and the note names they define are
119 Note Names sharp flat
120 nederlands.ly c d e f g a bes b -is -es
121 english.ly c d e f g a bf b -s/-sharp -f/-flat
123 deutsch.ly c d e f g a b h -is -es
124 norsk.ly c d e f g a b h -iss/-is -ess/-es
125 svenska.ly c d e f g a b h -iss -ess
126 italiano.ly do re mi fa sol la sib si -d -b
127 catalan.ly do re mi fa sol la sib si -d/-s -b
128 espanol.ly do re mi fa sol la sib si -s -b
137 The optional octave specification takes the form of a series of
138 single quote (`@code{'}') characters or a series of comma
139 (`@code{,}') characters. Each @code{'} raises the pitch by one
140 octave; each @code{,} lowers the pitch by an octave
142 @lilypond[quote,fragment,verbatim]
143 c' c'' es' g' as' gisis' ais'
146 @c FIXME: we need this info (hide/unhide) somewhere in the manual, but this ain't the place. -gp
148 Notes can be hidden and unhidden with the following commands
150 cindex @code{\hideNotes}
152 @cindex @code{\unHideNotes}
158 Program reference: @internalsref{NoteEvent}, and @internalsref{NoteHead}.
162 @node Chromatic alterations
163 @subsection Chromatic alterations
165 Normally accidentals are printed automatically, but you may also
166 print them manually. A reminder accidental
167 @cindex reminder accidental
169 can be forced by adding an exclamation mark @code{!}
170 after the pitch. A cautionary accidental
171 @cindex cautionary accidental
172 @cindex parenthesized accidental
173 (i.e. an accidental within parentheses) can be obtained by adding the
174 question mark `@code{?}' after the pitch.
176 @lilypond[quote,fragment,verbatim]
177 cis' cis' cis'! cis'?
183 The automatic production of accidentals can be tuned in many
184 ways. For more information, refer to @ref{Automatic accidentals}.
189 @subsection Micro tones
191 Half-flats and half-sharps are formed by adding @code{-eh} and
192 @code{-ih}; the following is a series of Cs with increasing pitches
194 @cindex quarter tones
195 @cindex semi-flats, semi-sharps
197 @lilypond[verbatim,quote,relative=2,fragment]
198 { ceseh ceh cih cisih }
201 Micro tones are also exported to the MIDI file
206 There are no generally accepted standards for denoting three quarter
207 flats, so LilyPond's symbol does not conform to any standard.
212 A chord is formed by a enclosing a set of pitches in @code{<} and
213 @code{>}. A chord may be followed by a duration, and a set of
214 articulations, just like simple notes
216 @lilypond[verbatim,fragment,quote,relative=1]
228 Rests are entered like notes, with the note name @code{r}
230 @lilypond[fragment,quote,raggedright,verbatim]
234 Whole bar rests, centered in middle of the bar,
235 must be done with multi-measure rests. They are discussed in
236 @ref{Multi measure rests}.
239 A rest's vertical position may be explicitly specified by entering a
240 note with the @code{\rest} keyword appended. This makes manual
241 formatting in polyphonic music easier. Automatic rest collision
242 formatting will leave these rests alone
244 @lilypond[fragment,quote,raggedright,verbatim]
250 Program reference: @internalsref{RestEvent}, and @internalsref{Rest}.
257 @cindex Invisible rest
262 An invisible rest (also called a `skip') can be entered like a note
263 with note name `@code{s}' or with @code{\skip @var{duration}}
265 @lilypond[fragment,quote,raggedright,verbatim,relative=2]
266 a4 a4 s4 a4 \skip 1 a4
269 The @code{s} syntax is only available in note mode and chord mode. In
270 other situations, for example, when entering lyrics, you should use
271 the @code{\skip} command
273 @lilypond[quote,raggedright,verbatim]
276 \new Lyrics \lyricmode { \skip 2 bla1 }
280 The skip command is merely an empty musical placeholder. It does not
281 produce any output, not even transparent output.
283 The @code{s} skip command does create @internalsref{Staff} and
284 @internalsref{Voice} when necessary, similar to note and rest
285 commands. For example, the following results in an empty staff.
287 @lilypond[quote,raggedright,verbatim]
291 The fragment @code{@{ \skip 4 @} } would produce an empty page.
295 Program reference: @internalsref{SkipEvent}, @internalsref{SkipMusic}.
300 @subsection Durations
304 @cindex @code{\longa}
305 @cindex @code{\breve}
306 @cindex @code{\maxima}
309 In Note, Chord, and Lyrics mode, durations are designated by numbers
310 and dots: durations are entered as their reciprocal values. For example,
311 a quarter note is entered using a @code{4} (since it is a 1/4 note), while
312 a half note is entered using a @code{2} (since it is a 1/2 note). For notes
313 longer than a whole you must use variables
317 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
319 r1 r2 r4 r8 r16 r32 r64 r64
322 @lilypond[quote,noindent]
325 a\breve*1/2 \autoBeamOff
326 a1 a2 a4 a8 a16 a32 a64 a64
329 r\longa*1/4 r\breve *1/2
330 r1 r2 r4 r8 r16 r32 r64 r64
336 \remove "Clef_engraver"
337 \override StaffSymbol #'transparent = ##t
338 \override TimeSignature #'transparent = ##t
339 \override BarLine #'transparent = ##t
340 \consists "Pitch_squash_engraver"
346 If the duration is omitted then it is set to the previously entered
347 duration. The default for the first note is a quarter note.
349 @lilypond[quote,raggedright,verbatim,fragment]
357 @node Augmentation dots
358 @subsection Augmentation dots
361 To obtain dotted note lenghts, simply add a dot (`@code{.}') to
362 the number. Double-dotted notes are produced in a similar way.
364 @lilypond[quote,fragment,verbatim]
365 a'4 b' c''4. b'8 a'4. b'4.. c''8.
370 Dots are normally moved up to avoid staff lines, except in polyphonic
371 situations. The following commands may be used to force a particular
374 @cindex @code{\dotsUp}
376 @cindex @code{\dotsDown}
378 @cindex @code{\dotsNeutral}
383 Program reference: @internalsref{Dots}, and @internalsref{DotColumn}.
385 @node Scaling durations
386 @subsection Scaling durations
388 You can alter the length of duration by a fraction @var{N/M}
389 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
390 will not affect the appearance of the notes or rests produced.
392 In the following example, the first three notes take up exactly two
393 beats, but no triplet bracket is printed.
394 @lilypond[quote,fragment,relative=2,verbatim]
396 a4*2/3 gis4*2/3 a4*2/3
404 This manual: @ref{Tuplets}
407 @c TODO: I'm not certain that Stems belong here in the manual. -gp
411 Whenever a note is found, a @internalsref{Stem} object is created
412 automatically. For whole notes and rests, they are also created but
417 @cindex @code{\stemUp}
419 @cindex @code{\stemDown}
421 @cindex @code{\stemNeutral}
432 A tie connects two adjacent note heads of the same pitch. The tie in
433 effect extends the length of a note. Ties should not be confused with
434 slurs, which indicate articulation, or phrasing slurs, which indicate
435 musical phrasing. A tie is entered using the tilde symbol `@code{~}'
437 @lilypond[quote,fragment,verbatim]
438 e' ~ e' <c' e' g'> ~ <c' e' g'>
441 When a tie is applied to a chord, all note heads whose pitches match
442 are connected. When no note heads match, no ties will be created.
444 A tie is just a way of extending a note duration, similar to the
445 augmentation dot. The following example shows two ways of notating
446 exactly the same concept
448 @lilypond[quote,fragment,raggedright]
449 \time 3/4 c'2. c'2 ~ c'4
453 Ties are used either when the note crosses a bar line, or when dots
454 cannot be used to denote the rhythm. When using ties, larger note
455 values should be aligned to subdivisions of the measure, eg.
459 r8 c8 ~ c2 r4 | r8^"not" c2 ~ c8 r4
463 If you need to tie a lot of notes over bars, it may be easier to use
464 automatic note splitting (see @ref{Automatic note splitting}). This
465 mechanism automatically splits long notes, and ties them across bar
471 @cindex @code{\tieUp}
473 @cindex @code{\tieDown}
475 @cindex @code{\tieNeutral}
477 @cindex @code{\tieDotted}
479 @cindex @code{\tieSolid}
484 In this manual: @ref{Automatic note splitting}.
486 Program reference: @internalsref{TieEvent}, @internalsref{Tie}.
491 Switching staves when a tie is active will not produce a slanted tie.
493 Formatting of ties is a difficult subject. The results are often not
501 @cindex @code{\times}
503 Tuplets are made out of a music expression by multiplying all durations
506 @cindex @code{\times}
508 \times @var{fraction} @var{musicexpr}
512 The duration of @var{musicexpr} will be multiplied by the fraction.
513 The fraction's denominator will be printed over the notes, optionally
514 with a bracket. The most common tuplet is the triplet in which 3
515 notes have the length of 2, so the notes are 2/3 of their written
518 @lilypond[quote,fragment,verbatim]
519 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
522 The property @code{tupletSpannerDuration} specifies how long each
523 bracket should last. With this, you can make lots of tuplets while
524 typing @code{\times} only once, thus saving lots of typing. In the next
525 example, there are two triplets shown, while @code{\times} was only
528 @lilypond[quote,fragment,relative=1,raggedright,verbatim]
529 \set tupletSpannerDuration = #(ly:make-moment 1 4)
530 \times 2/3 { c'8 c c c c c }
533 The format of the number is determined by the property
534 @code{tupletNumberFormatFunction}. The default prints only the
535 denominator, but if it is set to the Scheme function
536 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
540 @cindex @code{tupletNumberFormatFunction}
541 @cindex tuplet formatting
546 @cindex @code{\tupletUp}
548 @cindex @code{\tupletDown}
550 @cindex @code{\tupletNeutral}
551 @code{\tupletNeutral}.
555 User manual: @ref{Changing context properties on the fly} for the
559 Program reference: @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
561 Examples: @inputfileref{input/regression,tuplet-nest.ly}.
565 Nested tuplets are not formatted automatically. In this case, outer
566 tuplet brackets should be moved manually, which is demonstrated in
567 @inputfileref{input/regression,tuplet-nest.ly}.
571 @node Easier music entry
572 @section Easier music entry
575 This section deals with tricks and features of the input language that
576 were added solely to help entering music and finding and correcting
577 mistakes. There are also external tools that make debugging easier.
578 See @ref{Point and click} for more information.
580 It is also possible to enter and edit music using other programs, such as
581 GUI interfaces or MIDI sequencers. Refer to the LilyPond
582 website for more information.
589 * Skipping corrected music::
590 * Automatic note splitting::
596 @node Relative octaves
597 @subsection Relative octaves
599 @cindex relative octave specification
601 Octaves are specified by adding @code{'} and @code{,} to pitch names.
602 When you copy existing music, it is easy to accidentally put a pitch
603 in the wrong octave and hard to find such an error. The relative
604 octave mode prevents these errors by making the mistakes much
605 larger: a single error puts the rest of the piece off by one octave
607 @cindex @code{\relative}
609 \relative @var{startpitch} @var{musicexpr}
613 \relative @var{musicexpr}
616 The octave of notes that appear in @var{musicexpr} are calculated as
617 follows: if no octave changing marks are used, the basic interval
618 between this and the last note is always taken to be a fourth or
619 less. This distance is determined without regarding alterations; a
620 @code{fisis} following a @code{ceses} will be put above the
621 @code{ceses}. In other words, a doubly-augmented fourth is considered
622 a smaller interval than a diminshed fifth, even though the fourth is
623 seven semitones while the fifth is only six semitones.
625 The octave changing marks @code{'} and @code{,} can be added to raise
626 or lower the pitch by an extra octave. Upon entering relative mode,
627 an absolute starting pitch can be specified that will act as the
628 predecessor of the first note of @var{musicexpr}. If no starting pitch
629 is specified, then middle C is used as a start.
631 Here is the relative mode shown in action
632 @lilypond[quote,fragment,raggedright,verbatim]
638 Octave changing marks are used for intervals greater than a fourth
639 @lilypond[quote,fragment,verbatim]
645 If the preceding item is a chord, the first note of the chord is used
646 to determine the first note of the next chord
648 @lilypond[quote,fragment,verbatim]
656 The pitch after the @code{\relative} contains a note name.
659 @c Perfect place for a "refwarning"! -gp
662 The relative conversion will not affect @code{\transpose},
663 @code{\chordmode} or @code{\relative} sections in its argument. To use
664 relative within transposed music, an additional @code{\relative} must
665 be placed inside @code{\transpose}.
668 @subsection Octave check
671 Octave checks make octave errors easier to correct: a note may be
672 followed by @code{=}@var{quotes} which indicates what its absolute
673 octave should be. In the following example,
675 \relative c'' @{ c='' b=' d,='' @}
679 @c take care with @code, adds confusing quotes.
680 the @code{d} will generate a warning, because a @code{d''} is expected
681 (because @code{b'} to @code{d''} is only a third), but a @code{d}' is
682 found. In the output, the octave is corrected to be a @code{d''} and
683 the next note is calculated relative to @code{d''} instead of @code{d'}.
687 There is also a syntax that is separate from the notes. The syntax
693 This checks that @var{pitch} (without quotes) yields @var{pitch} (with
694 quotes) in \relative mode. If not, a warning is printed, and the
697 In the example below, the first check passes without incident, since
698 the @code{e} (in relative mode) is within a fifth of @code{a'}. However,
699 the second check produces a warning, since the @code{e} is not within
700 a fifth of @code{b'}. The warning message is printed, and the octave
701 is adjusted so that the following notes are in the correct octave
713 The octave of a note following an octave check is determined with
714 respect to the note preceding it. In the next fragment, the last note
715 is a @code{a'}, above middle C. That means that the @code{\octave}
716 check passes successfully, so the check could be deleted without changing
717 the output of the piece.
719 @lilypond[quote,verbatim,fragment]
728 @subsection Bar check
732 @cindex @code{barCheckSynchronize}
735 Bar checks help detect errors in the durations. A bar check is
736 entered using the bar symbol, `@code{|}'. Whenever it is encountered
737 during interpretation, it should fall on a measure boundary. If it
738 does not, a warning is printed. In the next example, the second bar
739 check will signal an error
741 \time 3/4 c2 e4 | g2 |
744 Bar checks can also be used in lyrics, for example
749 Twin -- kle | Twin -- kle
754 @cindex @code{skipTypesetting}
756 Failed bar checks are caused by entering incorrect
757 durations. Incorrect durations often completely garble up the score,
758 especially if the score is polyphonic, so a good place to start correcting
759 input is by scanning for failed bar checks and incorrect durations. To
760 speed up this process, the @code{skipTypesetting} feature may be
761 used. It is described in the next section.
764 @cindex @code{pipeSymbol}
766 It is also possible to redefine the meaning of @code{|}. This is done
767 by assigning a music expression to @code{pipeSymbol},
769 @lilypond[quote,raggedright,verbatim]
770 pipeSymbol = \bar "||"
776 @node Skipping corrected music
777 @subsection Skipping corrected music
779 The property @code{Score.skipTypesetting} can be used to switch on and
780 off typesetting completely during the interpretation phase. When
781 typesetting is switched off, the music is processed much more
782 quickly. This can be used to skip over the parts of a score that
783 have already been checked for errors
785 @lilypond[quote,fragment,raggedright,verbatim]
788 \set Score.skipTypesetting = ##t
790 \set Score.skipTypesetting = ##f
794 In polyphonic music, @code{Score.skipTypesetting} will affect all
795 voices and staves, saving even more time.
797 @node Automatic note splitting
798 @subsection Automatic note splitting
800 Long notes can be converted automatically to tied notes. This is done
801 by replacing the @internalsref{Note_heads_engraver} by the
802 @internalsref{Completion_heads_engraver}.
803 In the following examples, notes crossing the bar line are split and tied.
806 @lilypond[quote,fragment,verbatim,relative=1,raggedright]
808 \remove "Note_heads_engraver"
809 \consists "Completion_heads_engraver"
811 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
815 This engraver splits all running notes at the bar line, and inserts
816 ties. One of its uses is to debug complex scores: if the measures are
817 not entirely filled, then the ties exactly show how much each measure
822 Not all durations (especially those containing tuplets) can be
823 represented exactly with normal notes and dots, but the engraver will
828 Examples: @inputfileref{input/regression,completion-heads.ly}.
832 Program reference: @internalsref{Completion_heads_engraver}.
836 @section Staff notation
838 This section describes music notation that occurs on staff level,
839 such as key signatures, clefs and time signatures.
841 @cindex Staff notation
852 * Time administration::
853 * Controlling formatting of prefatory matter::
857 @subsection Staff symbol
859 @cindex adjusting staff symbol
861 Notes, dynamic signs, etc. are grouped
862 with a set of horizontal lines, into a staff (plural `staves'). In our
863 system, these lines are drawn using a separate layout object called
867 @cindex staff lines, setting number of
868 @cindex staff lines, setting thickness of
869 @cindex thickness of staff lines, setting
870 @cindex number of staff lines, setting
874 Program reference: @internalsref{StaffSymbol}.
876 Examples: @inputfileref{input/test,staff-lines.ly},
877 @inputfileref{input/test,staff-size.ly}.
881 If a staff is ended halfway a piece, the staff symbol may not end
882 exactly on the bar line.
886 @subsection Key signature
887 @cindex Key signature
891 The key signature indicates the scale in which a piece is played. It
892 is denoted by a set of alterations (flats or sharps) at the start of
896 Setting or changing the key signature is done with the @code{\key}
899 @code{\key} @var{pitch} @var{type}
902 @cindex @code{\minor}
903 @cindex @code{\major}
904 @cindex @code{\minor}
905 @cindex @code{\ionian}
906 @cindex @code{\locrian}
907 @cindex @code{\aeolian}
908 @cindex @code{\mixolydian}
909 @cindex @code{\lydian}
910 @cindex @code{\phrygian}
911 @cindex @code{\dorian}
913 Here, @var{type} should be @code{\major} or @code{\minor} to get
914 @var{pitch}-major or @var{pitch}-minor, respectively.
915 The standard mode names @code{\ionian},
916 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
917 @code{\phrygian}, and @code{\dorian} are also defined.
919 This command sets the context property
920 @internalsref{Staff}.@code{keySignature}. Non-standard key signatures
921 can be specified by setting this property directly.
923 Accidentals and key signatures often confuse new users, because
924 unaltered notes get natural signs depending on the key signature. For
925 more information, see @ref{More about pitches}.
929 Program reference: @internalsref{KeyChangeEvent},
930 @internalsref{KeyCancellation} and @internalsref{KeySignature}.
932 @cindex @code{keySignature}
939 The clef indicates which lines of the staff correspond to which
943 The clef can be set with the @code{\clef} command
944 @lilypond[quote,fragment,verbatim]
945 { c''2 \clef alto g'2 }
948 Supported clef-names include
949 @c Moved standard clefs to the top /MB
953 @item treble, violin, G, G2
966 G clef on 1st line, so-called French violin clef
971 @cindex mezzosoprano clef
974 @cindex baritone clef
977 @cindex varbaritone clef
988 By adding @code{_8} or @code{^8} to the clef name, the clef is
989 transposed one octave down or up, respectively, and @code{_15} and
990 @code{^15} transposes by two octaves. The argument @var{clefname}
991 must be enclosed in quotes when it contains underscores or digits. For
995 @cindex choral tenor clef
996 @lilypond[quote,verbatim,fragment,relative=1]
1000 This command is equivalent to setting @code{clefGlyph},
1001 @code{clefPosition} (which controls the Y position of the clef),
1002 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
1003 when any of these properties are changed. The following example shows
1004 possibilities when setting properties manually.
1008 \set Staff.clefGlyph = #"clefs-F"
1009 \set Staff.clefPosition = #2
1011 \set Staff.clefGlyph = #"clefs-G"
1013 \set Staff.clefGlyph = #"clefs-C"
1015 \set Staff.clefOctavation = #7
1017 \set Staff.clefOctavation = #0
1018 \set Staff.clefPosition = #0
1028 Program reference: @internalsref{Clef}.
1032 @node Ottava brackets
1033 @subsection Ottava brackets
1035 `Ottava' brackets introduce an extra transposition of an octave for
1036 the staff. They are created by invoking the function
1037 @code{set-octavation}
1043 @lilypond[quote,verbatim,fragment]
1053 The @code{set-octavation} function also takes -1 (for 8va bassa) and 2
1054 (for 15ma) as arguments. Internally the function sets the properties
1055 @code{ottavation} (e.g. to @code{"8va"}) and
1056 @code{centralCPosition}. For overriding the text of the bracket, set
1057 @code{ottavation} after invoking @code{set-octavation}, i.e.,
1062 \set Staff.ottavation = #"8"
1069 Program reference: @internalsref{OttavaBracket}.
1071 Examples: @inputfileref{input/regression,ottava.ly},
1072 @inputfileref{input/regression,ottava-broken.ly}.
1076 @code{set-octavation} will get confused when clef changes happen
1077 during an octavation bracket.
1082 @node Time signature
1083 @subsection Time signature
1084 @cindex Time signature
1086 @cindex @code{\time}
1088 Time signature indicates the metrum of a piece: a regular pattern of
1089 strong and weak beats. It is denoted by a fraction at the start of the
1093 The time signature is set or changed by the @code{\time}
1095 @lilypond[quote,fragment,verbatim]
1096 \time 2/4 c'2 \time 3/4 c'2.
1099 The symbol that is printed can be customized with the @code{style}
1100 property. Setting it to @code{#'()} uses fraction style for 4/4 and
1103 @lilypond[fragment,verbatim]
1106 \override Staff.TimeSignature #'style = #'()
1113 There are many more options for its layout. See @ref{Ancient time
1114 signatures} for more examples.
1117 This command sets the property @code{timeSignatureFraction},
1118 @code{beatLength} and @code{measureLength} in the @code{Timing}
1119 context, which is normally aliased to @internalsref{Score}. The
1120 property @code{measureLength} determines where bar lines should be
1121 inserted, and how automatic beams should be generated. Changing the
1122 value of @code{timeSignatureFraction} also causes the symbol to be
1125 More options are available through the Scheme function
1126 @code{set-time-signature}. In combination with the
1127 @internalsref{Measure_grouping_engraver}, it will create
1128 @internalsref{MeasureGrouping} signs. Such signs ease reading
1129 rhythmically complex modern music. In the following example, the 9/8
1130 measure is subdivided in 2, 2, 2 and 3. This is passed to
1131 @code{set-time-signature} as the third argument @code{(2 2 2 3)}
1133 @lilypond[quote,raggedright,verbatim]
1136 #(set-time-signature 9 8 '(2 2 2 3))
1137 g8[ g] d[ d] g[ g] a8[( bes g]) |
1138 #(set-time-signature 5 8 '(3 2))
1144 \consists "Measure_grouping_engraver"
1152 Program reference: @internalsref{TimeSignature}, and @internalsref{Timing_engraver}.
1157 Automatic beaming does not use the measure grouping specified with
1158 @code{set-time-signature}.
1160 @node Partial measures
1161 @subsection Partial measures
1164 @cindex partial measure
1165 @cindex measure, partial
1166 @cindex shorten measures
1167 @cindex @code{\partial}
1169 Partial measures, for example in upsteps, are entered using the
1170 @code{\partial} command
1171 @lilypond[quote,fragment,verbatim,relative=2]
1172 \partial 16*5 c16 cis d dis e | a2. c,4 | b2
1175 The syntax for this command is
1177 \partial @var{duration}
1179 This is internally translated into
1181 \set Timing.measurePosition = -@var{length of duration}
1184 The property @code{measurePosition} contains a rational number
1185 indicating how much of the measure has passed at this point.
1189 This command does not take into account grace notes at the start of
1190 the music. When a piece starts with graces notes in the pickup, then
1191 the @code{\partial} should follow the grace notes
1193 @lilypond[verbatim,relative,fragment]
1203 @node Unmetered music
1204 @subsection Unmetered music
1208 Bar lines and bar numbers are calculated automatically. For unmetered
1209 music (e.g. cadenzas), this is not desirable. By setting
1210 @code{Score.timing} to false, this automatic timing can be switched
1211 off. Empty bar lines,
1218 indicate where line breaks can occur.
1222 @cindex @code{\cadenzaOn}
1224 @cindex @code{\cadenzaOff}
1231 @subsection Bar lines
1235 @cindex measure lines
1239 Bar lines delimit measures, but are also used to indicate repeats.
1240 Normally, they are inserted automatically. Line breaks may only
1241 happen on bar lines.
1243 Special types of bar lines can be forced with the @code{\bar} command
1245 @lilypond[quote,relative=2,fragment,verbatim]
1249 The following bar types are available
1250 @lilypondfile[]{bar-lines.ly}
1252 For allowing line breaks, there is a special command,
1256 This will insert an invisible bar line, and allow line breaks at this
1259 In scores with many staves, a @code{\bar} command in one staff is
1260 automatically applied to all staves. The resulting bar lines are
1261 connected between different staves of a @internalsref{StaffGroup}
1263 @lilypond[quote,fragment,verbatim]
1265 \context StaffGroup <<
1271 \new Staff { \clef bass c4 g e g }
1273 \new Staff { \clef bass c2 c2 }
1278 The command @code{\bar }@var{bartype} is a short cut for doing
1279 @code{\set Timing.whichBar = }@var{bartype}. Whenever @code{whichBar}
1280 is set to a string, a bar line of that type is created.
1282 A bar line is created whenever the @code{whichBar} property is set.
1283 At the start of a measure it is set to the contents of
1284 @code{defaultBarType}. The contents of @code{repeatCommands} are used
1285 to override default measure bars.
1287 @cindex @code{whichBar}
1288 @cindex @code{repeatCommands}
1289 @cindex @code{defaultBarType}
1291 You are encouraged to use @code{\repeat} for repetitions. See
1298 In this manual: @ref{Repeats}, @ref{System start delimiters}
1301 Program reference: @internalsref{BarLine} (created at
1302 @internalsref{Staff} level), @internalsref{SpanBar} (across staves).
1304 @cindex bar lines at start of system
1305 @cindex start of system
1309 Examples: @inputfileref{input/test,bar-lines.ly},
1312 @node Time administration
1313 @subsection Time administration
1315 Time is administered by the @internalsref{Time_signature_engraver},
1316 which usually lives in the @internalsref{Score} context.
1317 The bookkeeping deals with the following variables
1320 @item currentBarNumber
1323 the length of the measures in the current time signature. For a 4/4
1324 time this is 1, and for 6/8 it is 3/4.
1325 @item measurePosition
1326 the point within the measure where we currently are. This quantity
1327 is reset to 0 whenever it exceeds @code{measureLength}. When that happens,
1328 @code{currentBarNumber} is incremented.
1330 if set to true, the above variables are updated for every time
1331 step. When set to false, the engraver stays in the current measure
1335 Timing can be changed by setting any of these variables explicitly.
1336 In the next example, the 4/4 time signature is printed, but
1337 @code{measureLength} is set to 5/4. After a while, the measure is
1338 shortened by 1/8, by setting @code{measurePosition} to -3/8 at 2/4 in
1339 the measure, so the next bar line will fall at 2/4 + 3/8.
1343 \set Score.measureLength = #(ly:make-moment 5 4)
1347 \set Score.measurePosition = #(ly:make-moment -3 8)
1354 @node Controlling formatting of prefatory matter
1355 @subsection Controlling formatting of prefatory matter
1357 TODO Somebody needs to explain this example, but I don't know what
1358 they're trying to do, so it won't be me. -gp
1360 TODO part 2, build message: programming error: No spacing entry from KeyCancellation to `key-signature'
1364 \override Staff.Clef #'break-visibility = #end-of-line-visible
1365 \override Staff.KeySignature #'break-visibility = #end-of-line-visible
1366 \set Staff.explicitClefVisibility = #end-of-line-visible
1367 \set Staff.explicitKeySignatureVisibility = #end-of-line-visible
1369 % We want the time sig to take space, otherwise there is not
1370 % enough white at the start of the line.
1373 \override Staff.TimeSignature #'transparent = ##t
1374 \set Score.defaultBarType = #"empty"
1394 Polyphony in music refers to having more than one voice occuring in
1395 a piece of music. Polyphony in LilyPond refers to having more than
1396 one voice on the same staff.
1399 * Writing polyphonic music::
1402 @node Writing polyphonic music
1403 @subsection Writing polyphonic music
1406 The easiest way to enter fragments with more than one voice on a staff
1407 is to split chords using the separator @code{\\}. You can use it for
1408 small, short-lived voices or for single chords
1412 @lilypond[quote,verbatim,fragment]
1413 \context Staff \relative c'' {
1414 c4 << { f d e } \\ { b c2 } >>
1415 c4 << g' \\ b, \\ f' \\ d >>
1419 The separator causes @internalsref{Voice} contexts@footnote{Polyphonic
1420 voices are sometimes called ``layers'' in other notation packages}
1422 to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
1423 each of these contexts, vertical direction of slurs, stems, etc. is set
1426 @cindex @code{\voiceOne}
1427 @cindex @code{\voiceFour}
1429 This can also be done by instantiating @internalsref{Voice} contexts
1430 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1431 a stem directions and horizontal shift for each part
1434 @lilypond[quote,raggedright,verbatim]
1437 \new Voice { \voiceOne cis2 b }
1438 \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
1439 \new Voice { \voiceTwo fis4~ fis4 f ~ f } >>
1443 The command @code{\oneVoice} will revert back to the normal setting.
1444 @cindex @code{\oneVoice}
1447 Normally, note heads with a different number of dots are not merged, but
1448 when the object property @code{merge-differently-dotted} is set in
1449 the @internalsref{NoteCollision} object, they are merged
1450 @lilypond[quote,verbatim,fragment,raggedright,relative=2]
1453 \override Staff.NoteCollision
1454 #'merge-differently-dotted = ##t
1456 } \\ { g8.[ f16] g8.[ f16] } >>
1459 Similarly, you can merge half note heads with eighth notes, by setting
1460 @code{merge-differently-headed}
1461 @lilypond[quote,fragment,relative=2,verbatim]
1464 \override Staff.NoteCollision
1465 #'merge-differently-headed = ##t
1466 c8 c4. } \\ { c2 c2 } >>
1469 LilyPond also vertically shifts rests that are opposite of a stem,
1472 @lilypond[quote,raggedright,fragment,verbatim]
1473 \context Voice << c''4 \\ r4 >>
1481 @cindex @code{\oneVoice}
1483 @cindex @code{\voiceOne}
1485 @cindex @code{\voiceTwo}
1487 @cindex @code{\voiceThree}
1489 @cindex @code{\voiceFour}
1494 @cindex @code{\shiftOn}
1496 @cindex @code{\shiftOnn}
1498 @cindex @code{\shiftOnnn}
1500 @cindex @code{\shiftOff}
1501 @code{\shiftOff}: these commands specify in what chords of the current
1502 voice should be shifted. The outer voices (normally: voice one and
1503 two) have @code{\shiftOff}, while the inner voices (three and four)
1504 have @code{\shiftOn}. @code{\shiftOnn} and @code{\shiftOnnn} define
1505 further shift levels.
1508 When LilyPond cannot cope, the @code{force-hshift}
1509 property of the @internalsref{NoteColumn} object and pitched rests can
1510 be used to override typesetting decisions.
1512 @lilypond[verbatim,raggedright]
1519 \once \override NoteColumn #'force-hshift = #1.7
1528 Program reference: the objects responsible for resolving collisions are
1529 @internalsref{NoteCollision} and @internalsref{RestCollision}.
1532 @inputfileref{input/regression,collision-dots.ly},
1533 @inputfileref{input/regression,collision-head-chords.ly},
1534 @inputfileref{input/regression,collision-heads.ly},
1535 @inputfileref{input/regression,collision-mesh.ly}, and
1536 @inputfileref{input/regression,collisions.ly}.
1542 When using @code{merge-differently-headed} with an upstem eighth or a
1543 shorter note, and a downstem half note, the eighth note gets the wrong
1546 There is no support for clusters where the same note occurs with
1547 different accidentals in the same chord. In this case, it is
1548 recommended to use enharmonic transcription, or to use special cluster
1549 notation (see @ref{Clusters}).
1554 Beams are used to group short notes into chunks that are aligned with
1555 the metrum. LilyPond normally inserts beams automatically, but if you
1556 wish you may control them manually or changed how beams are automatically
1559 @cindex Automatic beams
1563 * Setting automatic beam behavior::
1567 @node Automatic beams
1568 @subsection Automatic beams
1570 LilyPond inserts beams automatically
1572 @lilypond[quote,fragment,verbatim,relative=2]
1573 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1576 When these automatic decisions are not good enough, beaming can be
1577 entered explicitly. It is also possible to define beaming patterns
1578 that differ from the defaults.
1580 Individual notes may be marked with @code{\noBeam}, to prevent them
1583 @lilypond[quote,fragment,verbatim,relative=2]
1584 \time 2/4 c8 c\noBeam c c
1590 Program reference: @internalsref{Beam}.
1594 @subsection Manual beams
1595 @cindex beams, manual
1599 In some cases it may be necessary to override the automatic beaming
1600 algorithm. For example, the autobeamer will not put beams over rests
1601 or bar lines. Such beams are specified manually by marking the begin
1602 and end point with @code{[} and @code{]}
1604 @lilypond[quote,fragment,relative=1,verbatim]
1606 r4 r8[ g' a r8] r8 g[ | a] r8
1610 @cindex @code{stemLeftBeamCount}
1612 Normally, beaming patterns within a beam are determined automatically.
1613 If necessary, the properties @code{stemLeftBeamCount} and
1614 @code{stemRightBeamCount} can be used to override the defaults. If
1615 either property is set, its value will be used only once, and then it
1618 @lilypond[quote,fragment,relative=1,verbatim]
1623 \set stemLeftBeamCount = #1
1627 @cindex @code{stemRightBeamCount}
1630 The property @code{subdivideBeams} can be set in order to subdivide
1631 all 16th or shorter beams at beat positions, as defined by the
1632 @code{beatLength} property.
1635 @lilypond[fragment,quote,relative=2,verbatim,noindent]
1637 \set subdivideBeams = ##t
1639 \set Score.beatLength = #(ly:make-moment 1 8)
1642 @cindex @code{subdivideBeams}
1644 Normally, line breaks are forbidden when beams cross bar lines. This
1645 behavior can be changed by setting @code{allowBeamBreak}.
1647 @cindex @code{allowBeamBreak}
1648 @cindex beams and line breaks
1650 @cindex beams, kneed
1652 @cindex auto-knee-gap
1657 User manual: @ref{Changing context properties on the fly} for the
1663 @cindex Frenched staves
1664 Kneed beams are inserted automatically, when a large gap is detected
1665 between the note heads. This behavior can be tuned through the object.
1668 Automatically kneed cross-staff beams cannot be used together with
1669 hidden staves. See @ref{Hiding staves}.
1671 Beams do not avoid collisions with symbols around the notes, such as
1672 texts and accidentals.
1677 @node Setting automatic beam behavior
1678 @subsection Setting automatic beam behavior
1680 @cindex @code{autoBeamSettings}
1681 @cindex @code{(end * * * *)}
1682 @cindex @code{(begin * * * *)}
1683 @cindex automatic beams, tuning
1684 @cindex tuning automatic beaming
1686 @c [TODO: use \applycontext]
1688 In normal time signatures, automatic beams can start on any note but can
1689 only end in a few positions within the measure: beams can end on a beat,
1690 or at durations specified by the properties in
1691 @code{autoBeamSettings}. The defaults for @code{autoBeamSettings}
1692 are defined in @file{scm/auto-beam.scm}.
1694 The value of @code{autoBeamSettings} is changed with two functions,
1696 #(override-auto-beam-setting
1697 '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b}
1699 #(revert-auto-beam-setting '(@var{be} @var{p} @var{q} @var{n} @var{m}))
1701 Here, @var{be} is the symbol @code{begin} or @code{end}, and
1702 @var{context} is an optional context (default: @code{'Voice}). It
1703 determines whether the rule applies to begin or end-points. The
1704 quantity @var{p}/@var{q} refers to the length of the beamed notes (and
1705 `@code{* *}' designates notes of any length), @var{n}/@var{M} refers
1706 to a time signature (wildcards `@code{* *}' may be entered to
1707 designate all time signatures), @var{a}/@var{b} is a duration. By
1708 default, this command changes settings for the current voice. It is
1709 also possible to adjust settings at higher contexts, by adding a
1710 @var{context} argument.
1712 For example, if automatic beams should end on every quarter note, use
1715 #(override-auto-beam-setting '(end * * * *) 1 4 'Staff)
1717 Since the duration of a quarter note is 1/4 of a whole note, it is
1718 entered as @code{(ly:make-moment 1 4)}.
1720 The same syntax can be used to specify beam starting points. In this
1721 example, automatic beams can only end on a dotted quarter note
1723 #(override-auto-beam-setting '(end * * * *) 3 8)
1725 In 4/4 time signature, this means that automatic beams could end only on
1726 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1727 3/8, has passed within the measure).
1729 Rules can also be restricted to specific time signatures. A rule that
1730 should only be applied in @var{N}/@var{M} time signature is formed by
1731 replacing the second asterisks by @var{N} and @var{M}. For example, a
1732 rule for 6/8 time exclusively looks like
1734 #(override-auto-beam-setting '(begin * * 6 8) @dots{})
1737 If a rule should be to applied only to certain types of beams, use the
1738 first pair of asterisks. Beams are classified according to the
1739 shortest note they contain. For a beam ending rule that only applies
1740 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1743 @cindex automatic beam generation
1745 @cindex @code{autoBeaming}
1748 If beams are used to indicate melismata in songs, then automatic
1749 beaming should be switched off. This is done by setting
1750 @code{autoBeaming} to @code{#f}.
1754 @cindex @code{\autoBeamOff}
1755 @code{\autoBeamOff},
1756 @cindex @code{\autoBeamOn}
1762 If a score ends while an automatic beam has not been ended and is
1763 still accepting notes, this last beam will not be typeset at all. The
1764 same holds polyphonic voices, entered with @code{<< @dots{} \\ @dots{}
1765 >>}. If a polyphonic voice ends while an automatic beam is still
1766 accepting notes, it is not typeset.
1768 The rules for ending a beam depend on the shortest note in a beam.
1769 So, while it is possible to have different ending rules for eight
1770 beams and sixteenth beams, a beam that contains both eight and
1771 sixteenth notes will use the rules for the sixteenth beam.
1773 In the example below, the autobeamer makes eighth beams and sixteenth
1774 end at three eighths. The third beam can only be corrected by
1775 specifying manual beaming.
1777 @lilypond[quote,raggedright,fragment,relative=1]
1778 #(override-auto-beam-setting '(end * * * *) 3 8)
1779 % rather show case where it goes wrong
1780 %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
1781 \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
1783 It is not possible to specify beaming parameters that act differently in
1784 different parts of a measure. This means that it is not possible to use
1785 automatic beaming in irregular meters such as @code{5/8}.
1787 @node Beam formatting
1788 @subsection Beam formatting
1791 When a beam falls in the middle of the staff, the beams point normally
1792 down. However, this behaviour can be altered with the
1793 @code{neutral-direction} property.
1796 @lilypond[quote,raggedright,relative=2,fragment,verbatim]
1799 \override Beam #'neutral-direction = #-1
1801 \override Beam #'neutral-direction = #1
1807 @section Accidentals
1809 This section describes how to change the way that accidentals are
1810 inserted automatically before notes.
1813 * Automatic accidentals::
1816 @node Automatic accidentals
1817 @subsection Automatic accidentals
1818 @cindex Automatic accidentals
1820 Common rules for typesetting accidents have been placed in a
1821 function. This function is called as follows
1823 @cindex @code{set-accidental-style}
1825 #(set-accidental-style 'STYLE #('CONTEXT#))
1828 The function can take two arguments: the name of the accidental style,
1829 and an optional argument that denotes the context which should be
1830 changed. If no context name is supplied, @code{Staff} is the default,
1831 but you may wish to apply the accidental style to a single @code{Voice}
1834 The following accidental styles are supported
1837 This is the default typesetting behavior. It corresponds
1838 to 18th century common practice: Accidentals are
1839 remembered to the end of the measure in which they occur and
1840 only on their own octave.
1843 The normal behavior is to remember the accidentals on
1844 Staff-level. This variable, however, typesets accidentals
1845 individually for each voice. Apart from that, the rule is similar to
1848 As a result, accidentals from one voice do not get canceled in other
1849 voices, which is often an unwanted result
1851 @lilypond[quote,raggedright,relative=1,fragment,verbatim]
1853 #(set-accidental-style 'voice)
1860 The @code{voice} option should be used if the voices
1861 are to be read solely by individual musicians. If the staff is to be
1862 used by one musician (e.g. a conductor) then
1863 @code{modern} or @code{modern-cautionary}
1864 should be used instead.
1867 @cindex @code{modern} style accidentals
1868 This rule corresponds to the common practice in the 20th century. This rule
1869 prints the same accidentals as @code{default}, but temporary
1870 accidentals also are canceled in other octaves. Furthermore,
1871 in the same octave, they also get canceled in the following
1874 @lilypond[quote,raggedright,fragment,verbatim]
1875 #(set-accidental-style 'modern)
1876 cis' c'' cis'2 | c'' c'
1879 @item @code{modern-cautionary}
1880 @cindex @code{modern-cautionary}
1881 This rule is similar to @code{modern}, but the ``extra'' accidentals
1882 (the ones not typeset by @code{default}) are typeset as cautionary
1883 accidentals. They are printed in reduced size or with parentheses
1884 @lilypond[quote,raggedright,fragment,verbatim]
1885 #(set-accidental-style 'modern-cautionary)
1886 cis' c'' cis'2 | c'' c'
1889 @cindex @code{modern-voice}
1891 This rule is used for multivoice accidentals to be read both by musicians
1892 playing one voice and musicians playing all voices. Accidentals are
1893 typeset for each voice, but they @emph{are} canceled across voices in
1894 the same @internalsref{Staff}.
1896 @cindex @code{modern-voice-cautionary}
1897 @item modern-voice-cautionary
1898 This rule is the same as @code{modern-voice}, but with the extra
1899 accidentals (the ones not typeset by @code{voice}) typeset
1900 as cautionaries. Even though all accidentals typeset by
1901 @code{default} @emph{are} typeset by this variable then
1902 some of them are typeset as cautionaries.
1905 @cindex @code{piano} accidentals
1906 This rule reflects 20th century practice for piano notation. Very similar to
1907 @code{modern} but accidentals also get canceled
1908 across the staves in the same @internalsref{GrandStaff} or
1909 @internalsref{PianoStaff}.
1911 @item piano-cautionary
1912 @cindex @code{#(set-accidental-style 'piano-cautionary)}
1913 As @code{#(set-accidental-style 'piano)} but with the extra accidentals
1914 typeset as cautionaries.
1917 @cindex @code{no-reset} accidental style
1918 This is the same as @code{default} but with accidentals lasting
1919 ``forever'' and not only until the next measure
1920 @lilypond[quote,raggedright,fragment,verbatim,relative=1]
1921 #(set-accidental-style 'no-reset)
1926 This is sort of the opposite of @code{no-reset}: Accidentals
1927 are not remembered at all---and hence all accidentals are
1928 typeset relative to the key signature, regardless of what was
1931 @lilypond[quote,raggedright,fragment,verbatim,relative=1]
1932 #(set-accidental-style 'forget)
1933 \key d\major c4 c cis cis d d dis dis
1940 Program reference: @internalsref{Accidental_engraver},
1941 @internalsref{Accidental}, and @internalsref{AccidentalPlacement}.
1946 Simultaneous notes are considered to be entered in sequential
1947 mode. This means that in a chord the accidentals are typeset as if the
1948 notes in the chord happened once at a time - in the order in which
1949 they appear in the input file.
1951 This is a problem when accidentals in a chord depend on each other,
1952 which does not happen for the default accidental style. The problem
1953 can be solved by manually inserting @code{!} and @code{?} for the
1957 @node Expressive marks
1958 @section Expressive marks
1961 @c todo: should change ordering
1962 @c where to put text spanners, metronome marks,
1971 * Analysis brackets::
1974 * Fingering instructions::
1985 A slur indicates that notes are to be played bound or @emph{legato}.
1987 They are entered using parentheses
1988 @lilypond[quote,relative=2,fragment,verbatim]
1989 f( g a) a8 b( a4 g2 f4)
1993 The direction of a slur can be set with the
1997 \override Slur #'direction = #UP
1998 \slurUp % shortcut for the previous line
2002 However, there is a convenient shorthand for forcing slur
2003 directions. By adding @code{_} or @code{^} before the opening
2004 parentheses, the direction is also set. For example,
2006 @lilypond[relative=2,verbatim,fragment]
2010 Some composers write two slurs when they want legato chords. This can
2011 be achieved in LilyPond, by setting @code{doubleSlurs},
2013 @lilypond[verbatim,raggedright]
2015 \set doubleSlurs = ##t
2016 <c e>4 ( <d f> <c e> <d f> )
2024 @cindex @code{\slurUp}
2026 @cindex @code{\slurDown}
2028 @cindex @code{\slurNeutral}
2029 @code{\slurNeutral},
2030 @cindex @code{\slurDotted}
2032 @cindex @code{\slurSolid}
2037 Program reference: @seeinternals{Slur}, and @internalsref{SlurEvent}.
2040 @node Phrasing slurs
2041 @subsection Phrasing slurs
2043 @cindex phrasing slurs
2044 @cindex phrasing marks
2046 A phrasing slur (or phrasing mark) connects chords and is used to
2047 indicate a musical sentence. It is started using @code{\(} and @code{\)}
2050 @lilypond[quote,fragment,verbatim,relative=1]
2051 \time 6/4 c'\( d( e) f( e) d\)
2054 Typographically, the phrasing slur behaves almost exactly like a
2055 normal slur. However, they are treated as different objects. A
2056 @code{\slurUp} will have no effect on a phrasing slur; instead, use
2057 @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
2058 @code{\phrasingSlurNeutral}.
2060 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurNeutral}
2061 will only affect normal slurs and not phrasing slurs.
2065 @cindex @code{\phrasingSlurUp}
2066 @code{\phrasingSlurUp},
2067 @cindex @code{\phrasingSlurDown}
2068 @code{\phrasingSlurDown},
2069 @cindex @code{\phrasingSlurNeutral}
2070 @code{\phrasingSlurNeutral}.
2074 Program reference: see also @internalsref{PhrasingSlur}, and
2075 @internalsref{PhrasingSlurEvent}.
2079 Putting phrasing slurs over rests leads to spurious warnings.
2082 @subsection Breath marks
2084 Breath marks are entered using @code{\breathe}
2087 @lilypond[quote,fragment,relative=1,verbatim]
2091 The glyph of the breath mark can be tuned by overriding the
2092 @code{text} property of the @code{BreathingSign} layout object with
2093 any markup text. For example,
2094 @lilypond[quote,fragment,verbatim,relative=1]
2096 \override BreathingSign #'text
2097 = #(make-musicglyph-markup "scripts-rvarcomma")
2104 Program reference: @internalsref{BreathingSign},
2105 @internalsref{BreathingSignEvent}.
2107 Examples: @inputfileref{input/regression,breathing-sign.ly}.
2110 @node Metronome marks
2111 @subsection Metronome marks
2114 @cindex beats per minute
2115 @cindex metronome marking
2117 Metronome settings can be entered as follows
2119 i \tempo @var{duration} = @var{per-minute}
2122 In the MIDI output, they are interpreted as a tempo change, and in the
2123 paper output, a metronome marking is printed
2124 @cindex @code{\tempo}
2125 @lilypond[quote,fragment,verbatim]
2131 Program reference: @internalsref{MetronomeChangeEvent}.
2136 @subsection Text spanners
2137 @cindex Text spanners
2139 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
2140 are written as texts, and extended over many measures with dotted
2141 lines. Such texts are created using text spanners: attach
2142 @code{\startTextSpan} and @code{\stopTextSpan} to the start and ending
2143 note of the spanner.
2145 The string to be printed, as well as the style, is set through object
2148 @lilypond[quote,fragment,relative=1,verbatim]
2151 \override TextSpanner #'direction = #-1
2152 \override TextSpanner #'edge-text = #'("rall " . "")
2153 c2\startTextSpan b c\stopTextSpan a
2160 Internals @internalsref{TextSpanEvent},
2161 @internalsref{TextSpanner}.
2163 Examples: @inputfileref{input/regression,text-spanner.ly}.
2166 @node Analysis brackets
2167 @subsection Analysis brackets
2169 @cindex phrasing brackets
2170 @cindex musicological analysis
2171 @cindex note grouping bracket
2173 Brackets are used in musical analysis to indicate structure in musical
2174 pieces. LilyPond supports a simple form of nested horizontal brackets.
2175 To use this, add the @internalsref{Horizontal_bracket_engraver} to
2176 @internalsref{Staff} context. A bracket is started with
2177 @code{\startGroup} and closed with @code{\stopGroup}
2179 @lilypond[quote,raggedright,verbatim]
2182 c4\startGroup\startGroup
2185 c4\stopGroup\stopGroup
2189 \Staff \consists "Horizontal_bracket_engraver"
2195 Program reference: @internalsref{HorizontalBracket},
2196 @internalsref{NoteGroupingEvent}.
2198 Examples: @inputfileref{input/regression,note-group-bracket.ly}.
2202 @subsection Articulations
2203 @cindex Articulations
2205 @cindex articulations
2209 A variety of symbols can appear above and below notes to indicate
2210 different characteristics of the performance. They are added to a note
2211 by adding a dash and the character signifying the
2212 articulation. They are demonstrated here
2214 @lilypondfile[quote,raggedright]{script-abbreviations.ly}
2216 The meanings of these shorthands can be changed. See
2217 @file{ly/script-init.ly} for examples.
2220 The script is automatically placed, but the direction can be forced as
2221 well. @code{_} will put them down, and @code{^} will put them up,
2224 @lilypond[quote,fragment,verbatim]
2228 Other symbols can be added using the syntax
2229 @var{note}@code{\}@var{name}, e.g. @code{c4\fermata}. Again, they
2230 can be forced up or down using @code{^} and @code{_},
2233 @lilypond[quote,verbatim,fragment,relative=2]
2234 c\fermata c^\fermata c_\fermata
2241 @cindex staccatissimo
2250 @cindex organ pedal marks
2259 @cindex prallmordent
2263 @cindex thumb marking
2268 Here is a chart showing all scripts available,
2270 @lilypondfile[quote]{script-chart.ly}
2273 The vertical ordering of scripts is controlled with the
2274 @code{script-priority} property. The lower this number, the closer it
2275 will be put to the note. In this example, the
2276 @internalsref{TextScript} (the sharp symbol) first has the lowest
2277 priority, so it is put lowest in the first example. In the second, the
2278 prall trill (the @internalsref{Script}) has the lowest, so it on the
2279 inside. When two objects have the same priority, the order in which
2280 they are entered decides which one comes first.
2283 @lilypond[verbatim,raggedright]
2285 \once \override TextScript #'script-priority = #-100
2286 a4^\prall^\markup { \sharp }
2288 \once \override Script #'script-priority = #-100
2289 a4^\prall^\markup { \sharp }
2298 Program reference: @internalsref{ScriptEvent}, and @internalsref{Script}.
2302 These signs appear in the printed output but have no effect on the
2303 MIDI rendering of the music.
2307 @node Running trills
2308 @subsection Running trills
2310 Long running trills are made with @code{\startTrillSpan} and
2311 @code{\stopTrillSpan},
2314 @lilypond[verbatim,raggedright]
2315 \relative \new Voice {
2316 << { c1 \startTrillSpan }
2317 { s2. \grace { d16[\stopTrillSpan e] } } >>
2323 @code{\startTrillSpan},
2324 @cindex @code{\startTrillSpan}
2325 @code{\stopTrillSpan}.
2326 @cindex @code{\stopTrillSpan}
2330 Program reference: @internalsref{TrillSpanner},
2331 @internalsref{TrillSpanEvent}.
2333 @node Fingering instructions
2334 @subsection Fingering instructions
2338 Fingering instructions can be entered using
2340 @var{note}-@var{digit}
2342 For finger changes, use markup texts
2344 @lilypond[quote,verbatim,raggedright,fragment]
2345 c'4-1 c'4-2 c'4-3 c'4-4
2346 c'^\markup { \finger "2-3" }
2349 @cindex finger change
2354 You can use the thumb-script to indicate that a note should be
2355 played with the thumb (e.g. in cello music)
2357 @lilypond[quote,verbatim,raggedright,fragment]
2358 <a'_\thumb a''-3>8 <b'_\thumb b''-3>
2361 Fingerings for chords can also be added to individual notes
2362 of the chord by adding them after the pitches
2363 @lilypond[quote,verbatim,raggedright,fragment,relative=2]
2364 < c-1 e-2 g-3 b-5 >4
2368 In this case, setting @code{fingeringOrientations} will put fingerings next
2371 @lilypond[quote,verbatim,raggedright,fragment,relative=1]
2372 \set fingeringOrientations = #'(left down)
2373 <c-1 es-2 g-4 bes-5 > 4
2374 \set fingeringOrientations = #'(up right down)
2375 <c-1 es-2 g-4 bes-5 > 4
2378 Using this feature, it is also possible to put fingering instructions
2379 very close to note heads in monophonic music,
2381 @lilypond[verbatim,raggedright]
2383 \set fingeringOrientations = #'(right)
2391 Program reference: @internalsref{FingerEvent}, and @internalsref{Fingering}.
2393 Examples: @inputfileref{input/regression,finger-chords.ly}.
2396 @subsection Text scripts
2397 @cindex Text scripts
2399 @cindex text items, non-empty
2400 @cindex non-empty texts
2402 It is possible to place arbitrary strings of text or markup text (see
2403 @ref{Text markup}) above or below notes by using a string
2404 @code{c^"text"}. By default, these indications do not influence the
2405 note spacing, but by using the command @code{\fatText}, the widths
2406 will be taken into account
2408 @lilypond[quote,fragment,raggedright,verbatim]
2410 c4^"longtext" \fatText c4_"longlongtext" c4
2414 More complex formatting may also be added to a note by using the
2416 @lilypond[fragment,raggedright,verbatim]
2418 c'4^\markup { bla \bold bla }
2422 The @code{\markup} is described in more detail in
2428 @cindex @code{\fatText}
2430 @cindex @code{\emptyText}
2435 In this manual: @ref{Text markup}.
2437 Program reference: @internalsref{TextScriptEvent}, @internalsref{TextScript}.
2443 @subsection Grace notes
2446 @c should have blurb about accaciatura / appogiatura
2448 @cindex @code{\grace}
2452 Grace notes are ornaments that are written out. The most common ones
2453 are acciaccatura, which should be played as very short. It is denoted
2454 by a slurred small note with a slashed stem. The appoggiatura is a
2455 grace note that takes a fixed fraction of the main note, is and
2456 denoted as a slurred note in small print without a slash.
2457 They are entered with the commands @code{\acciaccatura} and
2458 @code{\appoggiatura}, as demonstrated in the following example
2461 @cindex appoggiatura
2462 @cindex acciaccatura
2464 @lilypond[quote,relative=2,verbatim,fragment]
2465 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
2466 \acciaccatura { g16[ f] } e4
2469 Both are special forms of the @code{\grace} command. By prefixing this
2470 keyword to a music expression, a new one is formed, which will be
2471 printed in a smaller font and takes up no logical time in a measure.
2473 @lilypond[quote,relative=2,verbatim,fragment]
2475 \grace { c16[ d16] } c2 c4
2479 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
2480 @code{\grace} command does not start a slur.
2482 Internally, timing for grace notes is done using a second, `grace'
2483 time. Every point in time consists of two rational numbers: one
2484 denotes the logical time, one denotes the grace timing. The above
2485 example is shown here with timing tuples
2487 @lilypond[quote,raggedright]
2490 c4 \grace c16 c4 \grace {
2493 \new Lyrics \lyricmode {
2494 \override LyricText #'font-family = #'typewriter
2498 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
2499 \markup { (\fraction 1 4 , 0 ) } 4
2501 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2502 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2504 \markup { ( \fraction 2 4 , 0 ) }
2510 The placement of grace notes is synchronized between different staves.
2511 In the following example, there are two sixteenth graces notes for
2512 every eighth grace note
2514 @lilypond[quote,relative=2,verbatim,fragment]
2515 << \new Staff { e4 \grace { c16[ d e f] } e4 }
2516 \new Staff { c4 \grace { g8[ b] } c4 } >>
2521 If you want to end a note with a grace, the standard trick is to put
2522 the grace notes after a ``space note''
2524 @lilypond[quote,fragment,verbatim,relative=2]
2527 { s2 \grace { c16[ d] } } >>
2533 By adjusting the duration of the skip note (here it is a half-note),
2534 the space between the main-note and the grace is adjusted.
2537 A @code{\grace} section will introduce special typesetting settings,
2538 for example, to produce smaller type, and set directions. Hence, when
2539 introducing layout tweaks, they should be inside the grace section,
2541 @lilypond[quote,fragment,verbatim,relative=2]
2544 \override Stem #'direction = #-1
2546 \revert Stem #'direction
2553 The overrides should also be reverted inside the grace section.
2555 The layout of grace sections can be changed throughout the music using
2556 the function @code{add-grace-property}. The following example
2557 undefines the Stem direction for this grace, so stems do not always
2562 #(add-grace-property 'Voice 'Stem 'direction '())
2568 Another option is to change the variables @code{startGraceMusic},
2569 @code{stopGraceMusic}, @code{startAcciaccaturaMusic},
2570 @code{stopAcciaccaturaMusic}, @code{startAppoggiaturaMusic},
2571 @code{stopAppoggiaturaMusic}. More information is in the file
2572 @file{ly/grace-init.ly}.
2577 Program reference: @internalsref{GraceMusic}.
2581 A score that starts with a @code{\grace} section needs an explicit
2582 @code{\context Voice} declaration, otherwise the main note and grace
2583 note end up on different staves.
2585 Grace note synchronization can also lead to surprises. Staff notation,
2586 such as key signatures, bar lines, etc. are also synchronized. Take
2587 care when you mix staves with grace notes and staves without, for example,
2589 @lilypond[quote,relative=2,verbatim,fragment]
2590 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2591 \new Staff { c4 \bar "|:" d4 } >>
2595 This can be remedied by inserting grace skips, for the above example
2598 \new Staff @{ c4 \bar "|:" \grace s16 d4 @}
2601 Grace sections should only be used within sequential music
2602 expressions. Nesting or juxtaposing grace sections is not supported,
2603 and might produce crashes or other errors.
2607 @subsection Glissando
2610 @cindex @code{\glissando}
2612 A glissando is a smooth change in pitch. It is denoted by a line or a
2613 wavy line between two notes. It is requested by attaching
2614 @code{\glissando} to a note
2616 @lilypond[quote,fragment,relative=1,verbatim]
2622 Program reference: @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2624 Example files: @file{input/regression,glissando.ly}
2630 Printing text over the line (such as @emph{gliss.}) is not supported.
2634 @subsection Dynamics
2647 @cindex @code{\ffff}
2657 Absolute dynamic marks are specified using a command after a note
2658 @code{c4\ff}. The available dynamic marks are @code{\ppp},
2659 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2660 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2661 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}
2663 @lilypond[quote,verbatim,raggedright,fragment,relative=1]
2664 c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2674 A crescendo mark is started with @code{\<} and terminated with
2675 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2676 with @code{\!}. Because these marks are bound to notes, if you must
2677 use spacer notes if multiple marks are needed during one note
2679 @lilypond[quote,fragment,verbatim]
2680 c''\< c''\! d''\> e''\!
2681 << f''1 { s4 s4\< s4\! \> s4\! } >>
2683 This may give rise to very short hairpins. Use @code{minimum-length}
2684 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2688 \override Staff.Hairpin #'minimum-length = #5
2691 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2692 is an example how to do it
2694 @lilypond[quote,fragment,relative=2,verbatim]
2704 You can also supply your own texts
2705 @lilypond[quote,fragment,relative=1,verbatim]
2707 \set crescendoText = \markup { \italic "cresc. poco" }
2708 \set crescendoSpanner = #'dashed-line
2718 @cindex @code{\dynamicUp}
2720 @cindex @code{\dynamicDown}
2721 @code{\dynamicDown},
2722 @cindex @code{\dynamicNeutral}
2723 @code{\dynamicNeutral}.
2725 @cindex direction, of dynamics
2729 Program reference: @internalsref{CrescendoEvent},
2730 @internalsref{DecrescendoEvent}, and
2731 @internalsref{AbsoluteDynamicEvent}.
2733 Dynamics are @internalsref{DynamicText} and @internalsref{Hairpin}
2734 objects. Vertical positioning of these symbols is handled by the
2735 @internalsref{DynamicLineSpanner} object.
2743 @cindex @code{\repeat}
2746 Repetition is a central concept in music, and multiple notations exist
2747 for repetitions. In LilyPond, most of these notations can be captured
2748 in a uniform syntax. One of the advantages is that repeats entered in
2749 this way can be rendered in MIDI accurately.
2751 The following types of repetition are supported
2755 Repeated music is fully written (played) out. Useful for MIDI
2756 output, and entering repetitive music.
2759 Repeats are not written out, but alternative endings (volte) are
2760 printed, left to right with brackets. This is the standard notation
2761 for repeats with alternatives.
2765 Alternative endings are written stacked. This has limited use but may be
2766 used to typeset two lines of lyrics in songs with repeats, see
2767 @inputfileref{input,star-spangled-banner.ly}.
2775 Make beat or measure repeats. These look like percent signs.
2781 * Repeats and MIDI::
2782 * Manual repeat commands::
2784 * Tremolo subdivisions::
2789 @subsection Repeat syntax
2792 LilyPond has one syntactic construct for specifying different types of
2793 repeats. The syntax is
2796 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2799 If you have alternative endings, you may add
2800 @cindex @code{\alternative}
2802 \alternative @code{@{} @var{alternative1}
2804 @var{alternative3} @dots{} @code{@}}
2806 where each @var{alternative} is a music expression. If you do not
2807 give enough alternatives for all of the repeats, the first alternative
2808 is assumed to be played more than once.
2810 Standard repeats are used like this
2811 @lilypond[quote,fragment,verbatim,relative=2]
2813 \repeat volta 2 { c4 d e f }
2814 \repeat volta 2 { f e d c }
2817 With alternative endings
2818 @lilypond[quote,fragment,verbatim,relative=2]
2820 \repeat volta 2 {c4 d e f}
2821 \alternative { {d2 d} {f f,} }
2825 @lilypond[quote,fragment,verbatim,relative=2]
2828 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2829 \alternative { { g4 g g } { a | a a a a | b2. } }
2833 It is possible to shorten volta brackets
2834 by setting @code{voltaSpannerDuration}. In the next example, the
2835 bracket only lasts one measure, which is a duration of 3/4.
2839 @lilypond[verbatim,raggedright]
2843 \set Staff.voltaSpannerDuration = #(ly:make-moment 3 4)
2844 \repeat "volta" 5 { d d d }
2845 \alternative { { e e e f f f }
2855 Brackets for the repeat are normally only printed over the topmost
2856 staff. This can be adjusted by setting the @code{voltaOnThisStaff}
2857 property @inputfileref{input/regression,volta-multi-staff.ly},
2858 @inputfileref{input/regression,volta-chord-names.ly}
2863 A nested repeat like
2872 is ambiguous, since it is is not clear to which @code{\repeat} the
2873 @code{\alternative} belongs. This ambiguity is resolved by always
2874 having the @code{\alternative} belong to the inner @code{\repeat}.
2875 For clarity, it is advisable to use braces in such situations.
2880 Timing information is not remembered at the start of an alternative,
2881 so after a repeat timing information must be reset by hand, for
2882 example by setting @code{Score.measurePosition} or entering
2883 @code{\partial}. Similarly, slurs or ties are also not repeated.
2888 @node Repeats and MIDI
2889 @subsection Repeats and MIDI
2891 @cindex expanding repeats
2893 An advantage of the unified syntax for repeats, is that all repeats
2894 may be played out for the MIDI output. This is achieved by
2895 applying the @code{\unfoldrepeats} music function.
2897 @lilypond[verbatim,raggedright]
2900 \repeat tremolo 8 {c'32 e' }
2901 \repeat percent 2 { c''8 d'' }
2902 \repeat volta 2 {c'4 d' e' f'}
2911 When creating a score file using @code{\unfoldrepeats} for midi, then
2912 it is necessary to make two @code{\score} blocks. One for MIDI, with
2913 unfolded repeats, and one for notation, eg.
2921 \unfoldrepeats @var{..music..}
2926 @node Manual repeat commands
2927 @subsection Manual repeat commands
2929 @cindex @code{repeatCommands}
2931 The property @code{repeatCommands} can be used to control the layout of
2932 repeats. Its value is a Scheme list of repeat commands, where each repeat
2936 @item @code{start-repeat},
2937 which prints a @code{|:} bar line;
2938 @item @code{end-repeat},
2939 which prints a @code{:|} bar line;
2940 @item @code{(volta @var{text})},
2941 which prints a volta bracket saying @var{text}: The text can be specified as
2942 a text string or as a markup text, see @ref{Text markup}. Do not
2943 forget to change the font, as the default number font does not contain
2944 alphabetic characters;
2945 @item @code{(volta #f)}, which
2946 stops a running volta bracket.
2949 @lilypond[quote,verbatim,fragment,relative=2]
2951 \set Score.repeatCommands = #'((volta "93") end-repeat)
2953 \set Score.repeatCommands = #'((volta #f))
2961 Program reference: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2962 @internalsref{VoltaRepeatedMusic},
2963 @internalsref{UnfoldedRepeatedMusic}, and
2964 @internalsref{FoldedRepeatedMusic}.
2966 @node Tremolo repeats
2967 @subsection Tremolo repeats
2968 @cindex tremolo beams
2970 To place tremolo marks between notes, use @code{\repeat} with tremolo
2972 @lilypond[quote,verbatim,raggedright]
2973 \context Voice \relative c' {
2974 \repeat "tremolo" 8 { c16 d16 }
2975 \repeat "tremolo" 4 { c16 d16 }
2976 \repeat "tremolo" 2 { c16 d16 }
2980 Tremolo marks can also be put on a single note. In this case, the
2981 note should not be surrounded by braces.
2982 @lilypond[quote,verbatim,raggedright]
2983 \repeat "tremolo" 4 c'16
2986 Similar output is obtained using the tremolo subdivision, described in
2987 @ref{Tremolo subdivisions}.
2991 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
2993 Program reference: tremolo beams are @internalsref{Beam} objects. Single stem
2994 tremolos are @internalsref{StemTremolo} objects. The music expression is
2995 @internalsref{TremoloEvent}.
2997 Example files: @inputfileref{input/regression,chord-tremolo.ly},
2998 @inputfileref{input/regression,stem-tremolo.ly}.
3000 @node Tremolo subdivisions
3001 @subsection Tremolo subdivisions
3002 @cindex tremolo marks
3003 @cindex @code{tremoloFlags}
3005 Tremolo marks can be printed on a single note by adding
3006 `@code{:}[@var{number}]' after the note. The number indicates the
3007 duration of the subdivision, and it must be at least 8. A
3008 @var{length} value of 8 gives one line across the note stem. If the
3009 length is omitted, the last value (stored in @code{tremoloFlags}) is
3012 @lilypond[quote,verbatim,fragment]
3013 c'2:8 c':32 | c': c': |
3016 @c [TODO : stok is te kort bij 32en]
3020 Tremolos entered in this way do not carry over into the MIDI output.
3024 In this manual: @ref{Tremolo repeats}.
3026 Elsewhere: @internalsref{StemTremolo}, @internalsref{TremoloEvent}.
3028 @node Measure repeats
3029 @subsection Measure repeats
3031 @cindex percent repeats
3032 @cindex measure repeats
3034 In the @code{percent} style, a note pattern can be repeated. It is
3035 printed once, and then the pattern is replaced with a special sign.
3036 Patterns of one and two measures are replaced by percent-like signs,
3037 patterns that divide the measure length are replaced by slashes
3039 @lilypond[quote,verbatim,raggedright]
3041 \repeat "percent" 4 { c'4 }
3042 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
3048 Program reference: @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
3049 @internalsref{PercentRepeatedMusic}, and
3050 @internalsref{DoublePercentRepeat}.
3054 @node Rhythmic music
3055 @section Rhythmic music
3059 * Showing melody rhythms::
3060 * Entering percussion::
3061 * Percussion staves::
3065 @node Showing melody rhythms
3066 @subsection Showing melody rhythms
3068 Sometimes you might want to show only the rhythm of a melody. This
3069 can be done with the rhythmic staff. All pitches of notes on such a
3070 staff are squashed, and the staff itself has a single line
3072 @lilypond[quote,fragment,relative=1,verbatim]
3073 \context RhythmicStaff {
3075 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
3081 Program reference: @internalsref{RhythmicStaff}.
3083 Examples: @inputfileref{input/regression,rhythmic-staff.ly}.
3086 @node Entering percussion
3087 @subsection Entering percussion
3093 Percussion notes may be entered in @code{\drummode} mode, which is
3094 similar to the standard mode for entering notes. Each piece of
3095 percussion has a full name and an abbreviated name, and both can be used
3098 @lilypond[quote,raggedright,verbatim]
3100 hihat hh bassdrum bd
3104 The complete list of drum names is in the init file
3105 @file{ly/drumpitch-init.ly}.
3106 @c TODO: properly document this.
3110 Program reference: @internalsref{DrumNoteEvent}.
3112 @node Percussion staves
3113 @subsection Percussion staves
3117 A percussion part for more than one instrument typically uses a
3118 multi line staff where each position in the staff refers to one piece
3122 To typeset the music, the notes must be interpreted in a
3123 @internalsref{DrumStaff} and @internalsref{DrumVoice} contexts
3126 @lilypond[quote,raggedright,verbatim]
3127 up = \drummode { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
3128 down = \drummode { bassdrum4 snare8 bd r bd sn4 }
3130 \new DrumVoice { \voiceOne \up }
3131 \new DrumVoice { \voiceTwo \down }
3135 The above example shows verbose polyphonic notation. The short
3136 polyphonic notation, described in @ref{Polyphony}, can also be used if
3137 the @internalsref{DrumVoices} are instantiated by hand first. For example,
3139 @lilypond[quote,fragment,verbatim]
3141 \context DrumVoice = "1" { s1 *2 }
3142 \context DrumVoice = "2" { s1 *2 }
3146 { \repeat unfold 16 hh16 }
3155 There are also other layout possibilities. To use these, set the
3156 property @code{drumStyleTable} in context @internalsref{DrumVoice}.
3157 The following variables have been predefined
3161 This is the default. It typesets a typical drum kit on a five-line staff
3163 @lilypond[quote,noindent]
3164 nam = \lyricmode { cymc cyms cymr hh hhc hho hhho hhp cb hc
3165 bd sn ss tomh tommh tomml toml tomfh tomfl }
3166 mus = \drummode { cymc cyms cymr hh | hhc hho hhho hhp | \break cb hc
3167 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
3169 << \new DrumStaff\with {
3170 \remove Bar_engraver
3171 \remove Time_signature_engraver
3172 \override Stem #'transparent = ##t
3173 \override Stem #'Y-extent-callback = ##f
3174 minimumVerticalExtent = #'(-4.0 . 5.0)
3176 \context Lyrics \nam
3179 %% need to do this, because of indented @itemize
3182 \override LyricText #'font-family = #'typewriter
3183 \override BarNumber #'transparent =##T
3187 The drum scheme supports six different toms. When there fewer toms, simply
3188 select the toms that produce the desired result, i.e. to get toms on
3189 the three middle lines you use @code{tommh}, @code{tomml} and
3192 @item timbales-style
3193 This typesets timbales on a two line staff
3195 @lilypond[quote,raggedright]
3196 nam = \lyricmode { timh ssh timl ssl cb }
3197 mus = \drummode { timh ssh timl ssl cb s16 }
3200 \context DrumStaff \with {
3201 \remove Bar_engraver
3202 \remove Time_signature_engraver
3203 \override Stem #'transparent = ##t
3204 \override Stem #'Y-extent-callback = ##f
3205 \override StaffSymbol #'line-count = #2
3206 \override StaffSymbol #'staff-space = #2
3207 minimumVerticalExtent = #'(-3.0 . 4.0)
3208 drumStyleTable = #timbales-style
3211 \override LyricText #'font-family = #'typewriter
3217 This typesets congas on a two line staff
3219 @lilypond[quote,raggedright]
3220 nam = \lyricmode { cgh cgho cghm ssh cgl cglo cglm ssl }
3221 mus = \drummode { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
3223 \context DrumStaff\with {
3224 \remove Bar_engraver
3225 \remove Time_signature_engraver
3226 drumStyleTable = #congas-style
3227 \override StaffSymbol #'line-count = #2
3229 %% this sucks; it will lengthen stems.
3230 \override StaffSymbol #'staff-space = #2
3231 \override Stem #'transparent = ##t
3232 \override Stem #'Y-extent-callback = ##f
3235 \override LyricText #'font-family = #'typewriter
3240 This typesets bongos on a two line staff
3242 @lilypond[quote,raggedright]
3243 nam = \lyricmode { boh boho bohm ssh bol bolo bolm ssl }
3244 mus = \drummode { boh boho bohm ssh bol bolo bolm ssl s16 }
3246 \context DrumStaff\with {
3247 \remove Bar_engraver
3248 \remove Time_signature_engraver
3249 \override StaffSymbol #'line-count = #2
3250 drumStyleTable = #bongos-style
3252 %% this sucks; it will lengthen stems.
3253 \override StaffSymbol #'staff-space = #2
3254 \override Stem #'transparent = ##t
3255 \override Stem #'Y-extent-callback = ##f
3258 \override LyricText #'font-family = #'typewriter
3263 @item percussion-style
3264 to typeset all kinds of simple percussion on one line staves
3265 @lilypond[quote,raggedright]
3266 nam = \lyricmode { tri trio trim gui guis guil cb cl tamb cab mar hc }
3267 mus = \drummode { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
3269 \context DrumStaff\with{
3270 \remove Bar_engraver
3271 drumStyleTable = #percussion-style
3272 \override StaffSymbol #'line-count = #1
3273 \remove Time_signature_engraver
3274 \override Stem #'transparent = ##t
3275 \override Stem #'Y-extent-callback = ##f
3278 \override LyricText #'font-family = #'typewriter
3285 If you do not like any of the predefined lists you can define your own
3286 list at the top of your file
3288 @lilypond[quote,raggedright,verbatim]
3290 (bassdrum default #f -1)
3291 (snare default #f 0)
3293 (pedalhihat xcircle "stopped" 2)
3294 (lowtom diamond #f 3)))
3295 up = \drummode { hh8 hh hh hh hhp4 hhp }
3296 down = \drummode { bd4 sn bd toml8 toml }
3299 \set DrumStaff.drumStyleTable
3300 = #(alist->hash-table mydrums)
3301 \new DrumVoice { \voiceOne \up }
3302 \new DrumVoice { \voiceTwo \down }
3309 Init files: @file{ly/drumpitch-init.ly}.
3311 Program reference: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
3315 Because general MIDI does not contain rim shots, the sidestick is used
3316 for this purpose instead.
3319 @section Piano music
3321 Piano staves are two normal staves coupled with a brace. The staves
3322 are largely independent, but sometimes voices can cross between the
3323 two staves. The same notation is also used for harps and other key
3324 instruments. The @internalsref{PianoStaff} is especially built to
3325 handle this cross-staffing behavior. In this section we discuss the
3326 @internalsref{PianoStaff} and some other pianistic peculiarities.
3330 * Automatic staff changes::
3331 * Manual staff switches::
3334 * Staff switch lines::
3335 * Cross staff stems::
3340 Dynamics are not centered, but workarounds do exist. See
3341 @inputfileref{input/template,piano-dynamics.ly}.
3343 @cindex cross staff stem
3344 @cindex stem, cross staff
3345 @cindex distance between staves in piano music
3347 The distance between the two staves is the same for all systems in the
3348 score. It is possible to override this per system, but it does require
3349 an arcane command incantation. See
3350 @inputfileref{input/test,piano-staff-distance.ly}.
3353 @node Automatic staff changes
3354 @subsection Automatic staff changes
3355 @cindex Automatic staff changes
3357 Voices can be made to switch automatically between the top and the bottom
3358 staff. The syntax for this is
3362 \autochange @dots{}@var{music}@dots{}
3367 This will create two staves inside the current PianoStaff, called
3368 @code{up} and @code{down}. The lower staff will be in bass clef by
3371 A @code{\relative} section that is outside of @code{\autochange} has
3372 no effect on the pitches of @var{music}, so, if necessary, put
3373 @code{\relative} inside @code{\autochange} like
3377 \autochange \relative @dots{} @dots{}
3382 The autochanger switches on basis of pitch (middle C is the turning
3383 point), and it looks ahead skipping over rests to switch in
3384 advance. Here is a practical example
3386 @lilypond[quote,verbatim,raggedright]
3388 \autochange \relative c'
3397 In this manual: @ref{Manual staff switches}.
3399 Program reference: @internalsref{AutoChangeMusic}.
3405 The staff switches may not end up in optimal places. For high
3406 quality output, staff switches should be specified manually.
3409 @code{\autochange} cannot be inside @code{\times}.
3411 Internally, the @code{\partcombine} interprets both arguments as
3412 @code{Voice}s named @code{one} and @code{two}, and then decides when
3413 the parts can be combined. Consequently, if the arguments switch to
3414 differently named @internalsref{Voice} contexts, the events in those
3418 @node Manual staff switches
3419 @subsection Manual staff switches
3421 @cindex manual staff switches
3422 @cindex staff switch, manual
3424 Voices can be switched between staves manually, using the command
3426 \change Staff = @var{staffname} @var{music}
3430 The string @var{staffname} is the name of the staff. It switches the
3431 current voice from its current staff to the Staff called
3432 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3433 @code{"down"}. The @context{Staff} referred to must already exist, so
3434 usually the setup for a score will start with a setup of the staves,
3438 \context Staff = up @{
3439 \skip 1 * 10 %@emph{ keep staff alive}
3441 \context Staff = down @{
3442 \skip 1 * 10 %@emph{idem}
3448 and the @context{Voice} is inserted afterwards
3451 \context Staff = down
3452 \new Voice @{ @dots{} \change Staff = up @dots{} @}
3460 Pianos have pedals that alter the way sound is produced. Generally, a
3461 piano has three pedals, sustain, una corda, and sostenuto.
3464 Piano pedal instruction can be expressed by attaching
3465 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3466 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3469 @lilypond[quote,fragment,verbatim]
3470 c'4\sustainDown c'4\sustainUp
3473 What is printed can be modified by setting @code{pedal@var{X}Strings},
3474 where @var{X} is one of the pedal types: @code{Sustain},
3475 @code{Sostenuto} or @code{UnaCorda}. Refer to
3476 @internalsref{SustainPedal} in the program reference for more
3479 Pedals can also be indicated by a sequence of brackets, by setting the
3480 @code{pedalSustainStyle} property to bracket objects
3482 @lilypond[quote,fragment,verbatim,relative=2]
3483 \set Staff.pedalSustainStyle = #'bracket
3485 b\sustainUp\sustainDown
3486 b g \sustainUp a \sustainDown \bar "|."
3489 A third style of pedal notation is a mixture of text and brackets,
3490 obtained by setting the @code{pedalSustainStyle} style property to
3493 @lilypond[quote,fragment,verbatim,relative=2]
3494 \set Staff.pedalSustainStyle = #'mixed
3496 b\sustainUp\sustainDown
3497 b g \sustainUp a \sustainDown \bar "|."
3500 The default `*Ped.' style for sustain and damper pedals corresponds to
3501 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
3504 @lilypond[quote,fragment,verbatim,relative=2]
3505 c\sostenutoDown d e c, f g a\sostenutoUp
3508 For fine-tuning of the appearance of a pedal bracket, the properties
3509 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3510 @code{PianoPedalBracket} objects (see
3511 @internalsref{PianoPedalBracket} in the Program reference) can be modified. For example, the
3512 bracket may be extended to the right edge of the note head
3514 @lilypond[quote,fragment,verbatim,relative=2]
3515 \override Staff.PianoPedalBracket
3516 #'shorten-pair = #'(0 . -1.0)
3517 c\sostenutoDown d e c, f g a\sostenutoUp
3521 @subsection Arpeggio
3524 @cindex broken arpeggio
3525 @cindex @code{\arpeggio}
3527 You can specify an arpeggio sign on a chord by attaching an
3528 @code{\arpeggio} to a chord
3531 @lilypond[quote,fragment,relative=1,verbatim]
3535 When an arpeggio crosses staves, you attach an arpeggio to the chords
3536 in both staves, and set
3537 @internalsref{PianoStaff}.@code{connectArpeggios}
3539 @lilypond[quote,fragment,relative=1,verbatim]
3540 \context PianoStaff <<
3541 \set PianoStaff.connectArpeggios = ##t
3542 \new Staff { <c' e g c>\arpeggio }
3543 \new Staff { \clef bass <c,, e g>\arpeggio }
3547 The direction of the arpeggio is sometimes denoted by adding an
3548 arrowhead to the wiggly line
3550 @lilypond[quote,fragment,relative=1,verbatim]
3559 A square bracket on the left indicates that the player should not
3560 arpeggiate the chord
3562 @c todo: ugh, lousy typography. Look for real example. --hwn
3564 @lilypond[quote,fragment,relative=1,verbatim]
3571 @cindex @code{\arpeggio}
3573 @cindex @code{\arpeggioUp}
3575 @cindex @code{\arpeggioDown}
3576 @code{\arpeggioDown},
3577 @cindex @code{\arpeggioNeutral}
3578 @code{\arpeggioNeutral},
3579 @cindex @code{\arpeggioBracket}
3580 @code{\arpeggioBracket}.
3584 Program reference: @internalsref{ArpeggioEvent},
3585 @internalsref{Arpeggio}.
3589 It is not possible to mix connected arpeggios and unconnected
3590 arpeggios in one @internalsref{PianoStaff} at the same point in time.
3592 @node Staff switch lines
3593 @subsection Staff switch lines
3596 @cindex follow voice
3597 @cindex staff switching
3600 @cindex @code{followVoice}
3602 Whenever a voice switches to another staff a line connecting the notes
3603 can be printed automatically. This is switched on by setting
3604 @code{PianoStaff.followVoice} to true
3606 @lilypond[quote,fragment,relative=1,verbatim]
3607 \context PianoStaff <<
3608 \set PianoStaff.followVoice = ##t
3609 \context Staff \context Voice {
3614 \context Staff=two { \clef bass \skip 1*2 }
3620 Program reference: @internalsref{VoiceFollower}.
3624 @cindex @code{\showStaffSwitch}
3625 @code{\showStaffSwitch},
3626 @cindex @code{\hideStaffSwitch}
3627 @code{\hideStaffSwitch}.
3630 @node Cross staff stems
3631 @subsection Cross staff stems
3633 The chords which cross staves may be produced by increasing the length
3634 of the stem in the lower stave, so it reaches the stem in the upper
3635 stave, or vice versa.
3637 @lilypond[raggedright,verbatim]
3638 stemExtend = \once \override Stem #'length = #22
3639 noFlag = \once \override Stem #'flag-style = #'no-flag
3640 \context PianoStaff <<
3642 \stemDown \stemExtend
3656 @section Vocal music
3658 There are three different issues when printing vocal music
3662 Song texts must be entered as texts, not notes. For example, for
3663 lyrics, the input @code{a} should be interpreted as
3664 a one letter text, and not the note A.
3666 Song texts must be printed as text, and not as notes.
3668 Song texts must be aligned with the notes of their melody
3671 The simplest solution to printing music uses the @code{\addlyrics}
3672 function to deal with these three problems in one go. However, these
3673 three functions can be controlled separately, which is necessary
3674 for complex vocal music.
3678 * Setting simple songs::
3680 * Hyphens and extenders::
3681 * The Lyrics context::
3682 * Flexibility in alignment::
3687 @node Setting simple songs
3688 @subsection Setting simple songs
3690 The easiest way to add lyrics to a melody is to append
3693 \addlyrics @{ @var{the lyrics} @}
3697 to a melody. Here is an example,
3699 @lilypond[raggedright,verbatim]
3702 \relative { c2 e4 g2. }
3703 \addlyrics { play the game }
3707 More stanzas can be added by adding more
3708 @code{\addlyrics} sections
3710 @lilypond[raggedright,verbatim]
3713 \relative { c2 e4 g2. }
3714 \addlyrics { play the game }
3715 \addlyrics { speel het spel }
3716 \addlyrics { joue le jeu }
3720 @node Entering lyrics
3721 @subsection Entering lyrics
3725 @cindex @code{\lyricmode}
3728 Lyrics are entered in a special input mode. This mode is is introduced
3729 by the keyword @code{\lyricmode}. In this mode you can enter lyrics,
3730 with punctuation and accents, and the input @code{a} is not parsed as
3731 a pitch, but rather as a one letter syllable. Syllables are entered
3732 like notes, but with pitches replaced by text. For example,
3734 \lyricmode @{ Twin-4 kle4 twin- kle litt- le star2 @}
3738 A word lyrics mode begins with an alphabetic character, and ends with
3739 any space or digit. The following characters can be any character
3740 that is not a digit or white space. One important consequence of this
3741 is that a word can end with @code{@}}. The following example is
3742 usually a bug. The syllable includes a @code{@}}, so the
3743 opening brace is not balanced
3745 \lyricmode @{ twinkle@}
3748 @cindex @code{\property}, in @code{\lyricmode}
3750 Similarly, a period following an alphabetic sequence, is included in
3751 the resulting string. As a consequence, spaces must be inserted around
3754 \override Score . LyricText #'font-shape = #'italic
3758 @cindex spaces, in lyrics
3759 @cindex quotes, in lyrics
3761 Any @code{_} character which appears in an unquoted word is converted
3762 to a space. This provides a mechanism for introducing spaces into words
3763 without using quotes. Quoted words can also be used in Lyrics mode to
3764 specify words that cannot be written with the above rules. The
3765 following example incorporates double quotes
3768 \lyricmode @{ He said: "\"Let" my peo ple "go\"" @}
3771 This example is slightly academic, since it gives better looking
3772 results to use single quotes, @code{``} and @code{''}
3774 \lyricmode @{ He said: ``Let my peo ple go'' @}
3778 The full definition of a word start in Lyrics mode is somewhat more
3781 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3782 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3783 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3784 any 8-bit character with ASCII code over 127, or a two-character
3785 combination of a backslash followed by one of @code{`}, @code{'},
3786 @code{"}, or @code{^}.
3792 Program reference: events @internalsref{LyricEvent}, and
3793 @internalsref{LyricText}.
3797 The definition of lyrics mode is too complex.
3799 @node Hyphens and extenders
3800 @subsection Hyphens and extenders
3804 Centered hyphens are entered as `@code{-}@code{-}' between syllables.
3805 The hyphen will have variable length depending on the space between
3806 the syllables and it will be centered between the syllables.
3811 When a lyric is sung over many notes (this is called a melisma), this is
3812 indicated with a horizontal line centered between a syllable and the
3813 next one. Such a line is called an extender line, and it is entered as
3819 Program reference: @internalsref{HyphenEvent},
3820 @internalsref{ExtenderEvent}, @internalsref{LyricHyphen}, and
3821 @internalsref{LyricExtender}
3823 Examples: @inputfileref{input/test,lyric-hyphen-retain.ly}.
3827 @node The Lyrics context
3828 @subsection The Lyrics context
3831 Lyrics are printed by interpreting them in a @internalsref{Lyrics} context
3833 \context Lyrics \lyricmode @dots{}
3836 @cindex automatic syllable durations
3837 @cindex @code{\lyricsto}
3838 @cindex lyrics and melodies
3840 This will place the lyrics according to the durations that were
3841 entered. The lyrics can also be aligned under a given melody
3842 automatically. In this case, it is no longer necessary to enter the
3843 correct duration for each syllable. This is achieved by combining the
3844 melody and the lyrics with the @code{\lyricsto} expression
3846 \lyricsto @var{name} \new Lyrics @dots{}
3849 This aligns the lyrics to the
3851 notes of the @internalsref{Voice} context called @var{name}, which has
3852 to exist. Therefore, normally the @code{Voice} is specified first, and
3853 then the lyrics are specified with @code{\lyricsto}. The command
3854 @code{\lyricsto} switches to @code{\lyricmode} mode automatically, so the
3855 @code{\lyricmode} keyword may be omitted.
3857 For different or more complex orderings, the best way is to setup the
3858 hierarchy of staves and lyrics first, e.g.
3860 \context ChoirStaff <<
3861 \context Lyrics = sopranoLyrics @{ s1 @}
3862 \context Voice = soprano @{ @emph{music} @}
3863 \context Lyrics = tenorLyrics @{ s1 @}
3864 \context Voice = tenor @{ @emph{music} @}
3867 and then combine the appropriate melodies and lyric lines
3869 \lyricsto "soprano" \context Lyrics = sopranoLyrics
3874 The final input would resemble
3877 << \context ChoirStaff << @emph{setup the music} >>
3878 \lyricsto "soprano" @emph{etc}
3879 \lyricsto "alto" @emph{etc}
3885 The @code{\lyricsto} command detects melismata: it only puts one
3886 syllable under a tied or slurred group of notes. If you want to force
3887 an unslurred group of notes to be a melisma, insert @code{\melisma}
3888 after the first note of the group, and @code{\melismaEnd} after the
3891 @lilypond[quote,relative=2,raggedright,fragment,verbatim]
3893 \context Voice = "lala" {
3901 \lyricsto "lala" \new Lyrics {
3907 In addition, notes are considered a melisma if they are manually
3908 beamed, and automatic beaming (see @ref{Setting automatic beam
3909 behavior}) is switched off.
3915 The criteria for deciding melismata can
3916 be tuned with the property @code{melismaBusyProperties}. See
3917 @internalsref{Melisma_translator} in the program reference for more
3922 Lyrics can also be entered without @code{\lyricsto}. In this case the
3923 durations of each syllable must be entered explicitly, for example,
3930 The alignment to a melody can be specified with the
3931 @code{associatedVoice} property,
3934 \set associatedVoice = #"lala"
3938 The value of the property (here: @code{"lala"}) should be the name of
3939 a @internalsref{Voice} context. Without this setting, extender lines
3940 will not be formatted properly.
3942 Here is an example demonstrating manual lyric durations,
3944 @lilypond[relative=1,verbatim,fragment]
3945 << \context Voice = melody {
3949 \new Lyrics \lyricmode {
3950 \set associatedVoice = #"melody"
3956 @cindex choral score
3958 A complete example of a SATB score setup is in the file
3959 @inputfileref{input/template,satb.ly}.
3964 @code{\melisma}, @code{\melismaEnd}
3965 @cindex @code{\melismaEnd}
3966 @cindex @code{\melisma}
3970 Program reference: @internalsref{LyricCombineMusic},
3971 @internalsref{Lyrics}, @internalsref{Melisma_translator}.
3973 Examples: @inputfileref{input/template,satb.ly},
3974 @inputfileref{input/regression,lyric-combine-new.ly},
3975 @c TODO: make separate section for melismata
3976 @inputfileref{input/test,lyrics-melisma-variants.ly}.
3977 @inputfileref{input/test,lyrics-melisma-faster.ly}.
3981 Melismata are not detected automatically, and extender lines must be
3985 @c TODO: document \new Staff << Voice \lyricsto >> bug
3987 @node Flexibility in alignment
3988 @subsection Flexibility in alignment
3991 Often, different stanzas of one song are put to one melody in slightly
3992 differing ways. Such variations can still be captured with
3995 One possibility is that the text has a melisma in one stanza, but
3996 multiple syllables in another one. One solution is to make the faster
3997 voice ignore the melisma. This is done by setting
3998 @code{ignoreMelismata} in the Lyrics context.
4000 There has one tricky aspect. The setting for @code{ignoreMelismata}
4001 must be set one syllable @emph{before} the non-melismatic syllable
4002 in the text, as shown here,
4004 @lilypond[verbatim,raggedright]
4006 \relative \context Voice = "lahlah" {
4007 \set Staff.autoBeaming = ##f
4013 \new Lyrics \lyricsto "lahlah" {
4016 \new Lyrics \lyricsto "lahlah" {
4017 \set ignoreMelismata = ##t % applies to "fas"
4019 \unset ignoreMelismata
4026 The @code{ignoreMelismata} applies to the syllable ``fas'', so it
4027 should bev entered before ``go''.
4029 The reverse is also possible: making a lyric line slower than the
4030 standard. This can be achieved by insert @code{\skip}s into the
4031 lyrics. For every @code{\skip}, the text will be delayed another note.
4034 @lilypond[verbatim,raggedright]
4035 \relative { c c g' }
4042 More complex variations in text underlay are possible. It is possible
4043 to switch the melody for a line of lyrics during the text. This is
4044 done by setting the @code{associatedVoice} property. In the example
4046 @lilypond[raggedright]
4048 \relative \context Voice = "lahlah" {
4049 \set Staff.autoBeaming = ##f
4052 \context Voice = alternative {
4056 % show associations clearly.
4057 \override NoteColumn #'force-hshift = #-3
4069 \new Lyrics \lyricsto "lahlah" {
4070 Ju -- ras -- sic Park
4072 \new Lyrics \lyricsto "lahlah" {
4074 % Tricky: need to set associatedVoice
4075 % one syllable too soon!
4076 \set associatedVoice = alternative % applies to "ran"
4080 \set associatedVoice = lahlah % applies to "rus"
4086 the text for the first stanza is set to a melody called ``lahlah'',
4089 \new Lyrics \lyricsto "lahlah" {
4090 Ju -- ras -- sic Park
4095 The second stanza initially is set to the @code{lahlah} context, but
4096 for the syllable ``ran'', it switches to a different melody.
4097 This is achieved with
4099 \set associatedVoice = alternative
4103 Here, @code{alternative} is the name of the @code{Voice} context
4104 containing the triplet.
4106 Again, the command must be one syllable too early, before ``Ty'' in
4110 \new Lyrics \lyricsto "lahlah" {
4111 \set associatedVoice = alternative % applies to "ran"
4115 \set associatedVoice = lahlah % applies to "rus"
4121 The underlay is switched back to the starting situation by assigning
4122 @code{lahlah} to @code{associatedVoice}.
4128 @subsection More stanzas
4130 @cindex phrasing, in lyrics
4133 @cindex stanza number
4134 @cindex singer's names
4135 @cindex name of singer
4137 Stanza numbers can be added by setting @code{stanza}, e.g.
4139 @lilypond[quote,verbatim,relative=2,fragment]
4141 \time 3/4 g2 e4 a2 f4 g2.
4144 Hi, my name is Bert.
4147 Oh, che -- ri, je t'aime
4151 These numbers are put just before the start of first syllable.
4153 Names of singers can also be added. They are printed at the start of
4154 the line, just like instrument names. They are created by setting
4155 @code{vocalName}. A short version may be entered as @code{vocNam}.
4158 @lilypond[fragment,quote,verbatim,relative=2]
4160 \time 3/4 g2 e4 a2 f4 g2.
4162 \set vocalName = "Bert "
4163 Hi, my name is Bert.
4165 \set vocalName = "Ernie "
4166 Oh, che -- ri, je t'aime
4172 Program reference: Layout objects @internalsref{LyricText} and
4173 @internalsref{VocalName}. Music expressions
4174 @internalsref{LyricEvent}.
4182 The term @emph{ambitus} denotes a range of pitches for a given voice
4183 in a part of music. It also may denote the pitch range that a musical
4184 instrument is capable of playing. Ambits are printed on vocal parts,
4185 so performers can easily determine it meets their capabilities.
4187 It denoted at the beginning of a piece near the initial clef. The
4188 range is graphically specified by two note heads, that represent the
4189 minimum and maximum pitch. To print such ambits, add the
4190 @internalsref{Ambitus_engraver} to the @internalsref{Voice} context,
4197 \consists Ambitus_engraver
4202 This results in the following output
4204 @lilypond[quote,raggedright]
4208 \consists Ambitus_engraver
4212 \relative \new Staff {
4217 If you have multiple voices in a single staff, and you want a single
4218 ambitus per staff rather than per each voice, add the
4219 @internalsref{Ambitus_engraver} to the @internalsref{Staff} context
4220 rather than to the @internalsref{Voice} context. Here is an example,
4222 @lilypond[verbatim,raggedright]
4225 \consists "Ambitus_engraver"
4227 \override Ambitus #'X-offset-callbacks
4228 = #(list (lambda (grob axis) -1.0))
4233 \consists "Ambitus_engraver"
4242 This example uses one advanced feature,
4245 \override Ambitus #'X-offset-callbacks
4246 = #(list (lambda (grob axis) -1.0))
4250 This code moves the ambitus to the left. The same effect could have
4251 been achieved with @code{extra-offset}, but then the formatting system
4252 would not reserve space for the moved object.
4256 Program reference: @internalsref{Ambitus},
4257 @internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
4258 @internalsref{AmbitusAccidental}.
4260 Examples: @inputfileref{input/regression,ambitus.ly}.
4264 There is no collision handling in the case of multiple per-voice
4267 @node Other instrument specific notation, Tablatures, Vocal music, Notation manual
4268 @section Other instrument specific notation
4274 @node Harmonic notes, , Other instrument specific notation, Other instrument specific notation
4275 @subsection Harmonic notes
4277 @cindex artificial harmonics
4280 Artificial harmonics are notated with a different notehead style. They
4282 marking the harmonic pitch with @code{\harmonic}.
4284 @lilypond[raggedright,verbatim]
4291 @node Tablatures, Popular music, Other instrument specific notation, Notation manual
4295 @cindex guitar tablature
4297 Tablature notation is used for notating music for plucked string
4298 instruments. Pitches are not denoted with note heads, but by
4299 indicating on which string and fret a note must be played. LilyPond
4300 offers limited support for tablature.
4303 * Tablatures basic::
4304 * Non-guitar tablatures::
4307 @node Tablatures basic, Non-guitar tablatures, Tablatures, Tablatures
4308 @subsection Tablatures basic
4309 @cindex Tablatures basic
4311 The string number associated to a note is given as a backslash
4312 followed by a number, e.g. @code{c4\3} for a C quarter on the third
4313 string. By default, string 1 is the highest one, and the tuning
4314 defaults to the standard guitar tuning (with 6 strings). The notes
4315 are printed as tablature, by using @internalsref{TabStaff} and
4316 @internalsref{TabVoice} contexts
4318 @lilypond[quote,fragment,verbatim]
4325 @cindex @code{minimumFret}
4328 When no string is specified, the first string that does not give a
4329 fret number less than @code{minimumFret} is selected. The default
4330 value for @code{minimumFret} is 0
4335 \set TabStaff.minimumFret = #8
4338 @lilypond[quote,noindent,raggedright]
4342 \set TabStaff.minimumFret = #8
4345 \context StaffGroup <<
4346 \context Staff { \clef "G_8" \frag }
4347 \context TabStaff { \frag }
4353 Program reference: @internalsref{TabStaff}, @internalsref{TabVoice}, and
4354 @internalsref{StringNumberEvent}.
4358 Chords are not handled in a special way, and hence the automatic
4359 string selector may easily select the same string to two notes in a
4363 @node Non-guitar tablatures, , Tablatures basic, Tablatures
4364 @subsection Non-guitar tablatures
4365 @cindex Non-guitar tablatures
4367 You can change the number of strings, by setting the number of lines
4368 in the @internalsref{TabStaff}.
4370 You can change the tuning of the strings. A string tuning is given as
4371 a Scheme list with one integer number for each string, the number
4372 being the pitch (measured in semitones relative to middle C) of an
4373 open string. The numbers specified for @code{stringTuning} are the
4374 numbers of semitones to subtract or add, starting the specified pitch
4375 by default middle C, in string order. In the next example,
4376 @code{stringTunings} is set for the pitches e, a, d, and g
4378 @lilypond[quote,fragment,verbatim]
4379 \context TabStaff <<
4380 \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
4383 a,4 c' a e' e c' a e'
4390 No guitar special effects have been implemented.
4394 Program reference: @internalsref{Tab_note_heads_engraver}.
4397 @node Popular music, Orchestral music, Tablatures, Notation manual
4398 @section Popular music
4405 * Printing chord names::
4409 @node Chord names, Chords mode, Popular music, Popular music
4410 @subsection Chord names
4413 LilyPond has support for both printing chord names. Chords may be
4414 entered in musical chord notation, i.e. @code{< .. >}, but they can
4415 also be entered by name. Internally, the chords are represented as a
4416 set of pitches, so they can be transposed
4419 @lilypond[quote,verbatim,raggedright]
4420 twoWays = \transpose c c' {
4429 << \context ChordNames \twoWays
4430 \context Voice \twoWays >>
4433 This example also shows that the chord printing routines do not try to
4434 be intelligent. The last chord (@code{f bes d}) is not interpreted as
4440 * Printing chord names::
4445 @subsection Chords mode
4448 In chord mode sets of pitches (chords) are entered with common names.
4449 A chord is entered by the root, which is entered like a common pitch
4451 @lilypond[quote,fragment,verbatim,relative=2]
4452 \chordmode { es4. d8 c2 }
4456 The mode is introduced by the keyword @code{\chordmode}.
4461 Other chords may be entered by suffixing a colon, and introducing a
4462 modifier, and optionally, a number
4464 @lilypond[quote,fragment,verbatim]
4465 \chordmode { e1:m e1:7 e1:m7 }
4467 The first number following the root is taken to be the `type' of the
4468 chord, thirds are added to the root until it reaches the specified
4470 @lilypond[quote,fragment,verbatim]
4471 \chordmode { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
4474 @cindex root of chord
4475 @cindex additions, in chords
4476 @cindex removals, in chords
4478 More complex chords may also be constructed adding separate steps
4479 to a chord. Additions are added after the number following
4480 the colon, and are separated by dots
4482 @lilypond[quote,verbatim,fragment]
4483 \chordmode { c:5.6 c:3.7.8 c:3.6.13 }
4485 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
4487 @lilypond[quote,verbatim,fragment]
4488 \chordmode { c:7+ c:5+.3- c:3-.5-.7- }
4490 Removals are specified similarly, and are introduced by a caret. They
4491 must come after the additions
4492 @lilypond[quote,verbatim,fragment]
4493 \chordmode { c^3 c:7^5 c:9^3.5 }
4496 Modifiers can be used to change pitches. The following modifiers are
4500 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
4502 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
4505 is the augmented chord. This modifier raises the 5th step.
4507 is the major 7th chord. This modifier raises the 7th step if present.
4509 is the suspended 4th or 2nd. This modifier removes the 3rd
4510 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
4513 Modifiers can be mixed with additions
4514 @lilypond[quote,verbatim,fragment]
4515 \chordmode { c:sus4 c:7sus4 c:dim7 c:m6 }
4518 @cindex modifiers, in chords.
4525 Since an unaltered 11 does not sound good when combined with an
4526 unaltered 3, the 11 is removed in this case (unless it is added
4529 @lilypond[quote,fragment,verbatim]
4530 \chordmode { c:13 c:13.11 c:m13 }
4535 An inversion (putting one pitch of the chord on the bottom), as well
4536 as bass notes, can be specified by appending
4537 @code{/}@var{pitch} to the chord
4538 @lilypond[quote,fragment,verbatim]
4539 \chordmode { c1 c/g c/f }
4543 A bass note can be added instead of transposed out of the chord,
4544 by using @code{/+}@var{pitch}.
4546 @lilypond[quote,fragment,verbatim]
4547 \chordmode { c1 c/+g c/+f }
4550 Chords is a mode similar to @code{\lyricmode} etc. Most
4551 of the commands continue to work, for example, @code{r} and
4552 @code{\skip} can be used to insert rests and spaces, and property
4553 commands may be used to change various settings.
4559 Each step can only be present in a chord once. The following
4560 simply produces the augmented chord, since @code{5+} is interpreted
4563 @lilypond[quote,verbatim,fragment]
4564 \chordmode { c:5.5-.5+ }
4568 @node Printing chord names
4569 @subsection Printing chord names
4571 @cindex printing chord names
4575 For displaying printed chord names, use the @internalsref{ChordNames} context.
4576 The chords may be entered either using the notation
4577 described above, or directly using @code{<} and @code{>}
4579 @lilypond[quote,verbatim,raggedright]
4581 \chordmode {a1 b c} <d' f' a'> <e' g' b'>
4585 \context ChordNames \scheme
4586 \context Staff \scheme
4590 You can make the chord changes stand out by setting
4591 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
4592 display chord names when there is a change in the chords scheme and at
4593 the start of a new line
4595 @lilypond[quote,verbatim,linewidth=9\cm]
4596 scheme = \chordmode {
4597 c1:m c:m \break c:m c:m d
4600 \context ChordNames {
4601 \set chordChanges = ##t
4603 \context Staff \transpose c c' \scheme
4607 The previous examples all show chords over a staff. This is not
4608 necessary. Chords may also be printed separately. It may be necessary
4609 to add @internalsref{Volta_engraver} and @internalsref{Bar_engraver}
4610 for showing repeats.
4612 @lilypond[raggedright,verbatim]
4613 \new ChordNames \with {
4614 \override BarLine #'bar-size = #4
4615 voltaOnThisStaff = ##t
4616 \consists Bar_engraver
4617 \consists "Volta_engraver"
4619 \repeat volta 2 \chordmode {
4628 The default chord name layout is a system for Jazz music, proposed by
4629 Klaus Ignatzek (see @ref{Literature list}). It can be tuned through the
4630 following properties
4633 @cindex @code{chordNameExceptions}
4634 @item chordNameExceptions
4635 This is a list that contains the chords that have special formatting.
4636 For an example of tuning this property, see
4637 @inputfileref{input/regression,chord-name-exceptions.ly}.
4638 @cindex exceptions, chord names.
4641 @cindex @code{majorSevenSymbol}
4642 @item majorSevenSymbol
4643 This property contains the markup object used for the 7th step, when
4644 it is major. Predefined options are @code{whiteTriangleMarkup} and
4645 @code{blackTriangleMarkup}. See
4646 @inputfileref{input/regression,chord-name-major7.ly} for an example.
4648 @cindex @code{chordNameSeparator}
4649 @item chordNameSeparator
4650 Different parts of a chord name are normally separated by a
4651 slash. By setting @code{chordNameSeparator}, you can specify other
4653 @lilypond[quote,fragment,verbatim]
4654 \context ChordNames \chordmode {
4656 \set chordNameSeparator
4657 = \markup { \typewriter "|" }
4662 @cindex @code{chordRootNamer}
4663 @item chordRootNamer
4664 The root of a chord is usually printed as a letter with an optional
4665 alteration. The transformation from pitch to letter is done by this
4666 function. Special note names (for example, the German ``H'' for a
4667 B-chord) can be produced by storing a new function in this property.
4669 @cindex @code{chordNoteNamer}
4670 @item chordNoteNamer
4671 The default is to print single pitch, e.g. the bass note, using the
4672 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
4673 to a specialized function to change this behavior. For example, the
4674 base can be printed in lower case.
4678 The predefined variables @code{\germanChords},
4679 @code{\semiGermanChords} set these variables. The effect is
4682 @lilypondfile[]{chord-names-german.ly}
4684 There are also two other chord name schemes implemented: an alternate
4685 Jazz chord notation, and a systematic scheme called Banter chords. The
4686 alternate jazz notation is also shown on the chart in @ref{Chord name
4687 chart}. Turning on these styles is described in the input file
4688 @inputfileref{input/test,chord-names-jazz.ly}.
4692 @cindex chords, jazz
4697 @cindex @code{\germanChords}
4698 @code{\germanChords},
4699 @cindex @code{\semiGermanChords}
4700 @code{\semiGermanChords}.
4707 Examples: @inputfileref{input/regression,chord-name-major7.ly},
4708 @inputfileref{input/regression,chord-name-exceptions.ly},
4709 @inputfileref{input/test,chord-names-jazz.ly},
4710 @inputfileref{input/test,chords-without-melody.ly}.
4713 Init files: @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
4718 Chord names are determined solely from the list of pitches. Chord
4719 inversions are not identified, and neither are added bass notes. This
4720 may result in strange chord names when chords are entered with the
4721 @code{< .. >} syntax.
4725 @subsection Improvisation
4727 Improvisation is sometimes denoted with slashed note heads. Such note
4728 heads can be created by adding a @internalsref{Pitch_squash_engraver}
4729 to the @internalsref{Staff} or @internalsref{Voice} context. Then, the
4733 \set squashedPosition = #0
4734 \override NoteHead #'style = #'slash
4738 switches on the slashes.
4740 There are shortcuts @code{\improvisationOn} (and an accompanying
4741 @code{\improvisationOff}) for this command sequence. They are used in
4742 the following example
4744 @lilypond[verbatim,raggedright]
4746 \consists Pitch_squash_engraver
4748 e8 e g a a16(bes)(a8) g \improvisationOn
4751 ~fis2 \improvisationOff a16(bes) a8 g e
4757 @node Orchestral music
4758 @section Orchestral music
4760 @cindex Writing parts
4762 Orchestral music involves some special notation, both in the full
4763 score and the individual parts. This section explains how to tackle
4764 some common problems in orchestral music.
4769 * System start delimiters::
4770 * Aligning to cadenzas::
4773 * Instrument names::
4775 * Instrument transpositions::
4776 * Multi measure rests::
4777 * Automatic part combining::
4779 * Different editions from one source::
4780 * Quoting other voices::
4783 @node System start delimiters
4784 @subsection System start delimiters
4786 Polyphonic scores consist of many staves. These staves can be
4787 constructed in three different ways
4789 @item The group is started with a brace at the left, and bar lines are
4790 connected. This is done with the @internalsref{GrandStaff} context.
4801 @item The group is started with a bracket, and bar lines are connected. This is done with the
4802 @internalsref{StaffGroup} context
4813 @item The group is started with a vertical line. Bar lines are not
4814 connected. This is the default for the score.
4825 @cindex Staff, multiple
4826 @cindex bracket, vertical
4827 @cindex brace, vertical
4834 The bar lines at the start of each system are
4835 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
4836 @internalsref{SystemStartBracket}. Only one of these types is created
4837 in every context, and that type is determined by the property
4838 @code{systemStartDelimiter}.
4840 @node Aligning to cadenzas
4841 @subsection Aligning to cadenzas
4844 In an orchestral context, cadenzas present a special problem:
4845 when constructing a score that includes a cadenza, all other
4846 instruments should skip just as many notes as the length of the
4847 cadenza, otherwise they will start too soon or too late.
4849 A solution to this problem are the functions @code{mmrest-of-length}
4850 and @code{skip-of-length}. These Scheme functions take a piece music
4851 as argument, and generate a @code{\skip} or multi rest, exactly as
4852 long as the piece. The use of @code{mmrest-of-length} is demonstrated
4853 in the following example.
4855 @lilypond[verbatim,raggedright]
4856 cadenza = \relative c' {
4857 c4 d8 << { e f g } \\ { d4. } >>
4862 \new Staff { \cadenza c'4 }
4864 #(ly:export (mmrest-of-length cadenza))
4874 @node Rehearsal marks
4875 @subsection Rehearsal marks
4876 @cindex Rehearsal marks
4878 @cindex @code{\mark}
4880 To print a rehearsal mark, use the @code{\mark} command
4882 @lilypond[quote,fragment,verbatim,relative=1]
4893 (The letter I is skipped in accordance with engraving traditions.)
4895 @c FIXME - should make that tunable.
4897 The mark is incremented automatically if you use @code{\mark
4898 \default}, but you can also use an integer argument to set the mark
4899 manually. The value to use is stored in the property
4900 @code{rehearsalMark}.
4902 The style is defined by the property @code{markFormatter}. It is a
4903 function taking the current mark (an integer) and the current context
4904 as argument. It should return a markup object. In the following
4905 example, @code{markFormatter} is set to a canned procedure. After a
4906 few measures, it is set to function that produces a boxed number.
4908 @lilypond[quote,verbatim,fragment,relative=2]
4909 \set Score.markFormatter = #format-mark-numbers
4912 \set Score.markFormatter
4913 = #(lambda (mark context)
4915 (make-box-markup (number->string mark))))
4920 The file @file{scm/translation-functions.scm} contains the definitions
4921 of @code{format-mark-numbers} (the default format) and
4922 @code{format-mark-letters}. These can be used as inspiration for other
4923 formatting functions.
4926 @cindex coda on bar line
4927 @cindex segno on bar line
4928 @cindex fermata on bar line
4929 @cindex bar lines, symbols on
4931 The @code{\mark} command can also be used to put signs like coda,
4932 segno and fermatas on a bar line. Use @code{\markup} to
4933 to access the appropriate symbol
4935 @lilypond[quote,fragment,verbatim,relative=2]
4936 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4940 In the case of a line break, marks must also be printed at the end of
4941 the line, and not at the beginning. Use the following to force that
4944 \override Score.RehearsalMark
4945 #'break-visibility = #begin-of-line-invisible
4951 @cindex bar lines, putting symbols on
4955 Program reference: @internalsref{MarkEvent}, @internalsref{RehearsalMark}.
4957 Init files: @file{scm/translation-functions.scm} contains the
4958 definition of @code{format-mark-numbers} and
4959 @code{format-mark-letters}. They can be used as inspiration for other
4960 formatting functions.
4962 Examples: @inputfileref{input/regression,rehearsal-mark-letter.ly},
4964 @inputfileref{input/regression,rehearsal-mark-number.ly}.
4968 @subsection Bar numbers
4972 @cindex measure numbers
4973 @cindex @code{currentBarNumber}
4975 Bar numbers are printed by default at the start of the line. The
4976 number itself is stored in the @code{currentBarNumber} property, which
4977 is normally updated automatically for every measure.
4979 Bar numbers can be typeset at regular intervals instead of at the
4980 beginning of each line. This is illustrated in the following example,
4981 whose source is available as
4982 @inputfileref{input/test,bar-number-regular-interval.ly}
4984 @lilypondfile[quote]{bar-number-regular-interval.ly}
4988 Program reference: @internalsref{BarNumber}.
4990 Examples: @inputfileref{input/test,bar-number-every-five-reset.ly},
4991 and @inputfileref{input/test,bar-number-regular-interval.ly}.
4995 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4996 there is one at the top. To solve this, the
4997 @code{padding} property of @internalsref{BarNumber} can be
4998 used to position the number correctly.
5000 @node Instrument names
5001 @subsection Instrument names
5003 In an orchestral score, instrument names are printed left side of the
5006 This can be achieved by setting @internalsref{Staff}.@code{instrument}
5007 and @internalsref{Staff}.@code{instr}. This will print a string before
5008 the start of the staff. For the first start, @code{instrument} is
5009 used, for the next ones @code{instr} is used.
5011 @lilypond[quote,verbatim,raggedright,relative=1,fragment]
5012 \set Staff.instrument = "Ploink "
5013 \set Staff.instr = "Plk "
5019 You can also use markup texts to construct more complicated instrument
5022 @lilypond[quote,fragment,verbatim,raggedright]
5024 \set Staff.instrument = \markup {
5025 \column < "Clarinetti" { "in B"
5026 \smaller \flat } > }
5031 For longer instrument names, it may be useful to increase the
5032 @code{indent} setting in the @code{\paper} block.
5036 Program reference: @internalsref{InstrumentName}.
5040 When you put a name on a grand staff or piano staff the width of the
5041 brace is not taken into account. You must add extra spaces to the end of
5042 the name to avoid a collision.
5045 @subsection Transpose
5047 @cindex transposition of pitches
5048 @cindex @code{\transpose}
5050 A music expression can be transposed with @code{\transpose}. The
5053 \transpose @var{from} @var{to} @var{musicexpr}
5056 This means that @var{musicexpr} is transposed by the interval between
5057 the pitches @var{from} and @var{to}: any note with pitch @code{from}
5058 is changed to @code{to}.
5061 For example, consider a piece written in the key of D major. If
5062 this piece is a little too low for its performer, it can be
5063 transposed up to E major with
5065 \transpose d e @dots{}
5068 Consider a part written for violin (a C instrument). If
5069 this part is to be played on the A clarinet, the following
5070 transposition will produce the appropriate part
5073 \transpose a c @dots{}
5076 @code{\transpose} distinguishes between enharmonic pitches: both
5077 @code{\transpose c cis} or @code{\transpose c des} will transpose up
5078 half a tone. The first version will print sharps and the second
5079 version will print flats
5081 @lilypond[quote,raggedright,verbatim]
5082 mus = { \key d \major cis d fis g }
5086 \transpose c g' \mus
5087 \transpose c f' \mus
5094 Program reference: @internalsref{TransposedMusic}, and
5095 @internalsref{UntransposableMusic}.
5099 If you want to use both @code{\transpose} and @code{\relative},
5100 you must put @code{\transpose} outside of @code{\relative}, since
5101 @code{\relative} will have no effect music that appears inside a
5104 @node Instrument transpositions
5105 @subsection Instrument transpositions
5107 The key of a transposing instrument can also be specified. This
5108 applies to many wind instruments, for example, clarinets (B-flat, A and
5109 E-flat), horn (F) and trumpet (B-flat, C, D and E-flat).
5112 The transposition is entered after the keyword @code{\transposition}
5115 \transposition bes %% B-flat clarinet
5118 This command sets the property @code{instrumentTransposition}. The value of
5119 this property is used for MIDI output and quotations. It does not
5120 affect how notes are printed in the current staff.
5122 @cindex transposition, MIDI
5123 @cindex transposition, instrument
5126 @node Multi measure rests
5127 @subsection Multi measure rests
5128 @cindex multi measure rests
5129 @cindex Rests, multi measure
5133 Multi measure rests are entered using `@code{R}'. It is specifically
5134 meant for full bar rests and for entering parts: the rest can expand
5135 to fill a score with rests, or it can be printed as a single
5136 multimeasure rest. This expansion is controlled by the property
5137 @code{Score.skipBars}. If this is set to true, empty measures will not
5138 be expanded, and the appropriate number is added automatically
5140 @lilypond[quote,fragment,verbatim]
5141 \time 4/4 r1 | R1 | R1*2
5142 \set Score.skipBars = ##t R1*17 R1*4
5145 The @code{1} in @code{R1} is similar to the duration notation used for
5146 notes. Hence, for time signatures other than 4/4, you must enter other
5147 durations. This can be done with augmentation dots or fractions
5149 @lilypond[quote,fragment,verbatim]
5150 \set Score.skipBars = ##t
5159 An @code{R} spanning a single measure is printed as either a whole rest
5160 or a breve, centered in the measure regardless of the time signature.
5162 @cindex text on multi-measure rest
5163 @cindex script on multi-measure rest
5164 @cindex fermata on multi-measure rest
5166 Texts can be added to multi-measure rests by using the
5167 @var{note}-@code{markup} syntax (see @ref{Text markup}). In this case, the number is
5168 replaced. If you need both texts and the number, you must add the
5169 number by hand. A variable (@code{\fermataMarkup}) is provided for
5173 @lilypond[quote,verbatim,fragment]
5175 R2._\markup { "Ad lib" }
5179 If you want to have a text on the left end of a multi-measure rest,
5180 attach the text to a zero-length skip note, i.e.
5188 @cindex whole rests for a full measure
5192 Program reference: @internalsref{MultiMeasureRestEvent},
5193 @internalsref{MultiMeasureTextEvent},
5194 @internalsref{MultiMeasureRestMusicGroup}, and
5195 @internalsref{MultiMeasureRest}.
5197 The layout object @internalsref{MultiMeasureRestNumber} is for the
5198 default number, and @internalsref{MultiMeasureRestText} for user
5203 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
5204 over multi-measure rests.
5206 @cindex condensing rests
5208 There is no way to automatically condense multiple rests into a single
5209 multimeasure rest. Multi measure rests do not take part in rest
5212 Be careful when entering multimeasure rests followed by whole
5213 notes. The following will enter two notes lasting four measures each
5217 When @code{skipBars} is set, the result will look OK, but the bar
5218 numbering will be off.
5220 @node Automatic part combining
5221 @subsection Automatic part combining
5222 @cindex automatic part combining
5223 @cindex part combiner
5226 Automatic part combining is used to merge two parts of music onto a
5227 staff. It is aimed at typesetting orchestral scores. When the two
5228 parts are identical for a period of time, only one is shown. In
5229 places where the two parts differ, they are typeset as separate
5230 voices, and stem directions are set automatically. Also, solo and
5231 @emph{a due} parts are identified and can be marked.
5233 The syntax for part combining is
5236 \partcombine @var{musicexpr1} @var{musicexpr2}
5241 The following example demonstrates the basic functionality of the part
5242 combiner: putting parts on one staff, and setting stem directions and
5245 @lilypond[quote,verbatim,raggedright,fragment]
5246 \new Staff \partcombine
5247 \relative g' { g g a( b) c c r r }
5248 \relative g' { g g r4 r e e g g }
5251 The first @code{g} appears only once, although it was
5252 specified twice (once in each part). Stem, slur and tie directions are
5253 set automatically, depending whether there is a solo or unisono. The
5254 first part (with context called @code{one}) always gets up stems, and
5255 `solo', while the second (called @code{two}) always gets down stems and
5258 If you just want the merging parts, and not the textual markings, you
5259 may set the property @code{printPartCombineTexts} to false
5261 @lilypond[quote,verbatim,raggedright,fragment,relative=2]
5263 \set Staff.printPartCombineTexts = ##f
5265 \relative g' { g a( b) r }
5266 \relative g' { g r4 r f }
5271 Both arguments to @code{\partcombine} will be interpreted as
5272 @internalsref{Voice} contexts. If using relative octaves,
5273 @code{\relative} should be specified for both music expressions, i.e.
5277 \relative @dots{} @var{musicexpr1}
5278 \relative @dots{} @var{musicexpr2}
5282 A @code{\relative} section that is outside of @code{\partcombine} has
5283 no effect on the pitches of @var{musicexpr1} and @var{musicexpr2}.
5287 Program reference: @internalsref{PartCombineMusic},
5288 @internalsref{SoloOneEvent}, and
5289 @internalsref{SoloTwoEvent}, and
5290 @internalsref{UnisonoEvent}.
5294 When @code{printPartCombineTexts} is set, when the two voices play the
5295 same notes on and off, the part combiner may typeset @code{a2} more
5296 than once in a measure.
5298 @code{\partcombine} cannot be inside @code{\times}.
5300 @code{\partcombine} cannot be inside @code{\relative}.
5302 Internally, the @code{\partcombine} interprets both arguments as
5303 @code{Voice}s named @code{one} and @code{two}, and then decides when
5304 the parts can be combined. Consequently, if the arguments switch to
5305 differently named @internalsref{Voice} contexts, the events in those
5309 @subsection Hiding staves
5311 @cindex Frenched scores
5312 @cindex Hiding staves
5314 In orchestral scores, staff lines that only have rests are usually
5315 removed. This saves some space. This style is called `French Score'.
5316 For @internalsref{Lyrics},
5317 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
5318 switched on by default. When these line of these contexts turn out
5319 empty after the line-breaking process, they are removed.
5321 For normal staves, a specialized @internalsref{Staff} context is
5322 available, which does the same: staves containing nothing (or only
5323 multi measure rests) are removed. The context definition is stored in
5324 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
5325 in this example disappears in the second line
5328 @lilypond[quote,verbatim]
5330 \context { \RemoveEmptyStaffContext }
5335 \new Staff { e4 f g a \break c1 }
5336 \new Staff { c4 d e f \break R1 }
5341 The first system shows all staves in full. If empty staves should be
5342 removed from the first system too, set @code{remove-first} to false in
5343 @internalsref{RemoveEmptyVerticalGroup}.
5345 Another application is making ossia sections, i.e. alternative
5346 melodies on a separate piece of staff, with help of a Frenched
5347 staff. See @inputfileref{input/test,ossia.ly} for an example.
5350 @node Different editions from one source
5351 @subsection Different editions from one source
5353 The @code{\tag} command marks music expressions with a name. These
5354 tagged expressions can be filtered out later. With this mechanism it
5355 is possible to make different versions of the same music source.
5357 In the following example, we see two versions of a piece of music, one
5358 for the full score, and one with cue notes for the instrumental part
5374 The same can be applied to articulations, texts, etc.: they are
5377 -\tag #@var{your-tag}
5379 to an articulation, for example,
5384 This defines a note with a conditional fingering indication.
5386 By applying the @code{remove-tag} function, tagged expressions can be
5387 filtered. For example,
5391 \applymusic #(remove-tag 'score) @var{the music}
5392 \applymusic #(remove-tag 'part) @var{the music}
5397 @lilypondfile[quote]{tag-filter.ly}
5399 The argument of the @code{\tag} command should be a symbol, or a list
5400 of symbols, for example,
5402 \tag #'(original-part transposed-part) @dots{}
5407 Examples: @inputfileref{input/regression,tag-filter.ly}.
5410 @node Quoting other voices
5411 @subsection Quoting other voices
5413 With quotations, fragments of other parts can be inserted into a part
5414 directly. Before a part can be quoted, it must be marked especially as
5415 quotable. This is done with code @code{\addquote} command.
5418 \addquote @var{name} @var{music}
5423 Here, @var{name} is an identifying string. The @var{music} is any kind
5424 of music. This is an example of @code{\addquote}
5427 \addquote clarinet \relative c' {
5432 This command must be entered at toplevel, i.e. outside any music
5435 After calling @code{\addquote}, the quotation may then be done with
5439 \quote @var{name} @var{duration}
5442 During a part, a piece of music can be quoted with the @code{\quote}
5449 This would cite three quarter notes (@code{2.} is a dotted half note)
5450 of the previously added @code{clarinet} voice.
5452 More precisely, it takes the current time-step of the part being
5453 printed, and extracts the notes at the corresponding point of the
5454 @code{\addquote}d voice. Therefore, the argument to @code{\addquote}
5455 should be the entire part of the voice to be quoted, including any
5456 rests at the beginning.
5458 Quotations take into account the transposition of both source and target
5459 instruments, if they are specified using the @code{\transposition} command.
5461 @lilypond[quote,raggedright,verbatim]
5462 \addquote clarinet \relative c' {
5468 e'8 f'8 \quote clarinet 2
5472 The type of events that are present in cue notes can be trimmed with
5473 the @code{quotedEventTypes} property. The default value is
5474 @code{(note-event rest-event)}, which means that only notes of and
5475 rests of the cued voice end up in the @code{\quote}.
5479 \set Staff.quotedEventTypes = #'(note-event articulation-event dynamic-event)
5483 will quote notes (but no rests), together with scripts and dynamics.
5487 Only the contents of the first @internalsref{Voice} occurring in an
5488 @code{\addquote} command will be considered for quotation, so
5489 @var{music} can not contain @code{\new} and @code{\context Voice}
5490 statements that would switch to a different Voice.
5495 In this manual: @ref{Instrument transpositions}.
5497 Examples: @inputfileref{input/regression,quote.ly}
5498 @inputfileref{input/regression,quote-transposition.ly}
5500 Program reference: @internalsref{QuoteMusic}.
5502 @node Formatting cue notes
5503 @section Formatting cue notes
5506 The previous section deals with inserting notes from another
5507 voice. When making a part, these notes need to be specially formatted.
5508 Here is an example of formatted cue notes
5513 \override Stem #'length = #5.5
5514 \override Beam #'thickness = #0.384
5515 \override Beam #'space-function =
5516 #(lambda (beam mult) (* 0.8 (Beam::space_function beam mult)))
5520 \set Staff.instrument = #"Horn in F"
5521 \set Score.skipBars = ##t
5524 \once \override Staff.MultiMeasureRest #'staff-position = #-6
5531 r8^"Bsn." c'8 f'8[ f'8]
5541 There are a couple of points to take care of:
5545 The multi rest of the original part should be moved up or down during
5548 Cue notes have smaller font sizes.
5550 When cued notes have a clef change relative to the original part, the
5551 clef should be restored after the cue section. This minimizes
5552 confusion for the reader,
5554 When the original part starts, this should be marked with the name of
5555 the instrument, in this case ``Horn.'' Of course, the cue part is
5556 marked with the instrument playing the cue.
5561 @node Ancient notation
5562 @section Ancient notation
5564 @cindex Vaticana, Editio
5565 @cindex Medicaea, Editio
5570 Support for ancient notation includes features for mensural notation
5571 and Gregorian Chant notation. There is also limited support for
5572 figured bass notation.
5574 Many graphical objects provide a @code{style} property, see
5577 @ref{Ancient note heads},
5579 @ref{Ancient accidentals},
5581 @ref{Ancient rests},
5583 @ref{Ancient clefs},
5585 @ref{Ancient flags},
5587 @ref{Ancient time signatures}.
5590 By manipulating such a grob property, the typographical appearance of
5591 the affected graphical objects can be accommodated for a specific
5592 notation flavor without need for introducing any new notational
5595 In addition to the standard articulation signs described in section
5596 @ref{Articulations}, specific articulation signs for ancient notation
5601 @ref{Ancient articulations}
5604 Other aspects of ancient notation can not that easily be expressed as
5605 in terms of just changing a style property of a graphical object or
5606 adding articulation signs. Some notational concepts are introduced
5607 specifically for ancient notation,
5618 If this all is too much of documentation for you, and you just want to
5619 dive into typesetting without worrying too much about the details on
5620 how to customize a context, you may have a look at the predefined
5621 contexts. Use them to set up predefined style-specific voice and
5622 staff contexts, and directly go ahead with the note entry,
5626 @ref{Gregorian Chant contexts},
5628 @ref{Mensural contexts}.
5631 There is limited support for figured bass notation which came
5632 up during the baroque period.
5639 Here are all suptopics at a glance:
5642 * Ancient note heads::
5643 * Ancient accidentals::
5647 * Ancient time signatures::
5648 * Ancient articulations::
5652 * Gregorian Chant contexts::
5653 * Mensural contexts::
5658 @node Ancient note heads
5659 @subsection Ancient note heads
5664 For ancient notation, a note head style other than the @code{default}
5665 style may be chosen. This is accomplished by setting the @code{style}
5666 property of the NoteHead object to @code{baroque}, @code{neomensural}
5667 or @code{mensural}. The @code{baroque} style differs from the
5668 @code{default} style only in using a square shape for @code{\breve}
5669 note heads. The @code{neomensural} style differs from the
5670 @code{baroque} style in that it uses rhomboidal heads for whole notes
5671 and all smaller durations. Stems are centered on the note heads.
5672 This style is in particular useful when transcribing mensural music,
5673 e.g. for the incipit. The @code{mensural} style finally produces note
5674 heads that mimic the look of note heads in historic printings of the
5677 The following example demonstrates the @code{neomensural} style
5679 @lilypond[quote,fragment,raggedright]
5680 \set Score.skipBars = ##T
5681 \override NoteHead #'style = #'neomensural
5682 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
5685 When typesetting a piece in Gregorian Chant notation, the
5686 @internalsref{Gregorian_ligature_engraver} will automatically select
5687 the proper note heads, such there is no need to explicitly set the
5688 note head style. Still, the note head style can be set e.g.@: to
5689 @code{vaticana_punctum} to produce punctum neumes. Similarly, a
5690 @internalsref{Mensural_ligature_engraver} is used to automatically
5691 assemble mensural ligatures. See @ref{Ligatures} for how ligature
5696 Examples: @inputfileref{input/regression,note-head-style.ly} gives an
5697 overview over all available note head styles.
5700 @node Ancient accidentals
5701 @subsection Ancient accidentals
5706 Use the @code{style} property of grob @internalsref{Accidental} to
5707 select ancient accidentals. Supported styles are
5708 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
5710 @lilypond[quote,raggedright,staffsize=26]
5718 { " " \musicglyph #"accidentals-vaticana-1"
5719 " " \musicglyph #"accidentals-vaticana0" }
5723 { " " \musicglyph #"accidentals-medicaea-1" }
5727 { " " \musicglyph #"accidentals-hufnagel-1" }
5731 { " " \musicglyph #"accidentals-mensural-1"
5732 " " \musicglyph #"accidentals-mensural1" }
5741 \remove "Bar_number_engraver"
5745 \remove "Clef_engraver"
5746 \remove "Key_engraver"
5747 \remove "Time_signature_engraver"
5748 \remove "Staff_symbol_engraver"
5749 minimumVerticalExtent = ##f
5755 As shown, not all accidentals are supported by each style. When
5756 trying to access an unsupported accidental, LilyPond will switch to a
5757 different style, as demonstrated in
5758 @inputfileref{input/test,ancient-accidentals.ly}.
5760 Similarly to local accidentals, the style of the key signature can be
5761 controlled by the @code{style} property of the
5762 @internalsref{KeySignature} grob.
5766 In this manual: @ref{Pitches}, @ref{Chromatic alterations} and
5767 @ref{Accidentals} give a general introduction into the use of
5768 accidentals. @ref{Key signature} gives a general introduction into
5769 the use of key signatures.
5771 Program reference: @internalsref{KeySignature}.
5773 Examples: @inputfileref{input/test,ancient-accidentals.ly}.
5776 @subsection Ancient rests
5781 Use the @code{style} property of grob @internalsref{Rest} to select
5782 ancient accidentals. Supported styles are @code{classical},
5783 @code{neomensural} and @code{mensural}. @code{classical} differs
5784 from the @code{default} style only in that the quarter rest looks like
5785 a horizontally mirrored 8th rest. The @code{neomensural} style suits
5786 well for e.g. the incipit of a transcribed mensural piece of music.
5787 The @code{mensural} style finally mimics the appearance of rests as
5788 in historic prints of the 16th century.
5790 The following example demonstrates the @code{neomensural} style
5792 @lilypond[quote,fragment,raggedright]
5793 \override Rest #'style = #'neomensural
5794 \set Score.skipBars = ##t
5795 r\longa r\breve r1 r2 r4 r8 r16
5798 There are no 32th and 64th rests specifically for the mensural or
5799 neo-mensural style. Instead, the rests from the default style will be
5800 taken. See @inputfileref{input/test,rests.ly} for a chart of all
5803 There are no rests in Gregorian Chant notation; instead, it uses
5808 In this manual: @ref{Rests} gives a general introduction into the use of rests.
5812 @subsection Ancient clefs
5817 LilyPond supports a variety of clefs, many of them ancient.
5819 The following table shows all ancient clefs that are supported via the
5820 @code{\clef} command. Some of the clefs use the same glyph, but
5821 differ only with respect to the line they are printed on. In such
5822 cases, a trailing number in the name is used to enumerate these clefs.
5823 Still, you can manually force a clef glyph to be typeset on an
5824 arbitrary line, as described in @ref{Clef}. The note printed to the
5825 right side of each clef in the example column denotes the @code{c'}
5826 with respect to that clef.
5828 @multitable @columnfractions .4 .4 .2
5831 @b{Description} @tab
5832 @b{Supported Clefs} @tab
5836 modern style mensural C clef @tab
5837 @code{neomensural-c1}, @code{neomensural-c2},
5838 @code{neomensural-c3}, @code{neomensural-c4} @tab
5839 @lilypond[fragment,quote,relative=1,notime]
5841 \clef "neomensural-c2" c
5845 petrucci style mensural C clefs, for use on different staff lines
5846 (the examples shows the 2nd staff line C clef).
5856 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5858 \clef "petrucci-c2" c
5862 petrucci style mensural F clef @tab
5863 @code{petrucci-f} @tab
5864 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5866 \clef "petrucci-f" c
5870 petrucci style mensural G clef @tab
5871 @code{petrucci-g} @tab
5872 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5874 \clef "petrucci-g" c
5878 historic style mensural C clef @tab
5879 @code{mensural-c1}, @code{mensural-c2}, @code{mensural-c3},
5880 @code{mensural-c4} @tab
5881 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5883 \clef "mensural-c2" c
5887 historic style mensural F clef @tab
5888 @code{mensural-f} @tab
5889 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5891 \clef "mensural-f" c
5895 historic style mensural G clef @tab
5896 @code{mensural-g} @tab
5897 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5899 \clef "mensural-g" c
5903 Editio Vaticana style do clef @tab
5904 @code{vaticana-do1}, @code{vaticana-do2}, @code{vaticana-do3} @tab
5905 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5906 \override Staff.StaffSymbol #'line-count = #4
5908 \clef "vaticana-do2" c
5912 Editio Vaticana style fa clef @tab
5913 @code{vaticana-fa1}, @code{vaticana-fa2} @tab
5914 @lilypond[quote,relative=1,notime,indent=0.0\mm,fragment]
5915 \override Staff.StaffSymbol #'line-count = #4
5917 \clef "vaticana-fa2" c
5921 Editio Medicaea style do clef @tab
5922 @code{medicaea-do1}, @code{medicaea-do2}, @code{medicaea-do3} @tab
5923 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5924 \override Staff.StaffSymbol #'line-count = #4
5926 \clef "medicaea-do2" c
5930 Editio Medicaea style fa clef @tab
5931 @code{medicaea-fa1}, @code{medicaea-fa2} @tab
5932 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5933 \override Staff.StaffSymbol #'line-count = #4
5935 \clef "medicaea-fa2" c
5939 historic style hufnagel do clef @tab
5940 @code{hufnagel-do1}, @code{hufnagel-do2}, @code{hufnagel-do3} @tab
5941 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5942 \override Staff.StaffSymbol #'line-count = #4
5944 \clef "hufnagel-do2" c
5948 historic style hufnagel fa clef @tab
5949 @code{hufnagel-fa1}, @code{hufnagel-fa2} @tab
5950 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5951 \override Staff.StaffSymbol #'line-count = #4
5953 \clef "hufnagel-fa2" c
5957 historic style hufnagel combined do/fa clef @tab
5958 @code{hufnagel-do-fa} @tab
5959 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5960 \clef "hufnagel-do-fa" c
5967 @emph{Modern style} means ``as is typeset in contemporary editions of
5968 transcribed mensural music''.
5970 @emph{Petrucci style} means ``inspired by printings published by the
5971 famous engraver Petrucci (1466-1539)''.
5973 @emph{Historic style} means ``as was typeset or written in historic
5974 editions (other than those of Petrucci)''.
5976 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
5978 Petrucci used C clefs with differently balanced left-side vertical
5979 beams, depending on which staff line it is printed.
5983 In this manual: see @ref{Clef}.
5987 The mensural g clef is mapped to the Petrucci g clef.
5992 @subsection Ancient flags
5997 Use the @code{flag-style} property of grob @internalsref{Stem} to
5998 select ancient flags. Besides the @code{default} flag style,
5999 only @code{mensural} style is supported
6001 @lilypond[quote,fragment,raggedright,verbatim]
6002 \override Stem #'flag-style = #'mensural
6003 \override Stem #'thickness = #1.0
6004 \override NoteHead #'style = #'mensural
6006 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
6007 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
6010 Note that the innermost flare of each mensural flag always is
6011 vertically aligned with a staff line.
6013 There is no particular flag style for neo-mensural notation. Hence,
6014 when typesetting the incipit of a transcribed piece of mensural
6015 music, the default flag style should be used. There are no flags in
6016 Gregorian Chant notation.
6019 @node Ancient time signatures
6020 @subsection Ancient time signatures
6022 @cindex time signatures
6025 There is limited support for mensural time signatures. The
6026 glyphs are hard-wired to particular time fractions. In other words,
6027 to get a particular mensural signature glyph with the @code{\time n/m}
6028 command, @code{n} and @code{m} have to be chosen according to the
6037 \remove Staff_symbol_engraver
6038 \remove Clef_engraver
6039 \remove Time_signature_engraver
6042 \set Score.timing = ##f
6043 \set Score.barAlways = ##t
6044 s_\markup { "$\\backslash$time 4/4" }
6045 ^\markup { " " \musicglyph #"timesig-neomensural4/4" }
6047 s_\markup { "$\\backslash$time 2/2" }
6048 ^\markup { " " \musicglyph #"timesig-neomensural2/2" }
6050 s_\markup { "$\\backslash$time 6/4" }
6051 ^\markup { " " \musicglyph #"timesig-neomensural6/4" }
6053 s_\markup { "$\\backslash$time 6/8" }
6054 ^\markup { " " \musicglyph #"timesig-neomensural6/8" }
6056 s_\markup { "$\\backslash$time 3/2" }
6057 ^\markup { " " \musicglyph #"timesig-neomensural3/2" }
6059 s_\markup { "$\\backslash$time 3/4" }
6060 ^\markup { " " \musicglyph #"timesig-neomensural3/4" }
6062 s_\markup { "$\\backslash$time 9/4" }
6063 ^\markup { " " \musicglyph #"timesig-neomensural9/4" }
6065 s_\markup { "$\\backslash$time 9/8" }
6066 ^\markup { " " \musicglyph #"timesig-neomensural9/8" }
6068 s_\markup { "$\\backslash$time 4/8" }
6069 ^\markup { " " \musicglyph #"timesig-neomensural4/8" }
6071 s_\markup { "$\\backslash$time 2/4" }
6072 ^\markup { " " \musicglyph #"timesig-neomensural2/4" }
6077 Use the @code{style} property of grob @internalsref{TimeSignature} to
6078 select ancient time signatures. Supported styles are
6079 @code{neomensural} and @code{mensural}. The above table uses the
6080 @code{neomensural} style. This style is appropriate for the
6081 incipit of transcriptions of mensural pieces. The @code{mensural}
6082 style mimics the look of historical printings of the 16th century.
6084 The following examples shows the differences in style,
6086 @lilypond[raggedright]
6089 c1^\markup { \hspace #-2.0 \typewriter default }
6091 \override Staff.TimeSignature #'style = #'numbered
6093 c1^\markup { \hspace #-2.0 \typewriter numbered }
6095 \override Staff.TimeSignature #'style = #'mensural
6097 c1^\markup { \hspace #-2.0 \typewriter mensural }
6099 \override Staff.TimeSignature #'style = #'neomensural
6101 c1^\markup { \hspace #-2.0 \typewriter neomensural }
6102 \override Staff.TimeSignature #'style = #'single-digit
6104 c1^\markup { \hspace #-2.0 \typewriter single-digit }
6110 This manual: @ref{Time signature} gives a general introduction into
6111 the use of time signatures.
6115 Ratios of note durations do not change with the time signature. For
6116 example, the ratio of 1 brevis = 3 semibrevis (tempus perfectum) must
6117 be made by hand, by setting
6120 breveTP = #(ly:make-duration -1 0 3 2)
6126 This sets @code{breveTP} to 3/2 times 2 = 3 times a whole note.
6128 The @code{old6/8alt} symbol (an alternate symbol for 6/8) is not
6129 addressable with @code{\time}. Use a @code{\markup} instead
6131 @node Ancient articulations
6132 @subsection Ancient articulations
6134 @cindex articulations
6136 In addition to the standard articulation signs described in section
6137 @ref{Articulations}, articulation signs for ancient notation are
6138 provided. These are specifically designed for use with notation in
6139 Editio Vaticana style.
6141 @lilypond[quote,raggedright,verbatim,noindent]
6142 \include "gregorian-init.ly"
6144 \context VaticanaVoice {
6145 \override TextScript #'font-family = #'typewriter
6146 \override TextScript #'font-shape = #'upright
6147 \override Script #'padding = #-0.1
6149 a4\circulus_"circulus" s1
6150 a4\semicirculus_"semicirculus" s1 s
6151 a4\accentus_"accentus" s1
6152 \[ a4_"episem" \episemInitium \pes b \flexa a \episemFinis \]
6157 % Prepare TextSpanner for \episem{Initium|Finis} use.
6158 \override TextSpanner #'style = #'line
6159 \override TextSpanner #'edge-height = #'(0 . 0)
6160 \override TextSpanner #'padding = #0.5
6161 \override TextSpanner #'enclose-bounds = #1
6162 \override TextSpanner #'edge-text = #'("" . "")
6170 The line @code{\override Script #'padding = #-0.1} is required to
6171 force the articulation signs being placed vertically tightly to the
6172 correpsonding note heads.
6174 episem is currently broken due to a bug related with TextSpanner.
6178 @subsection Custodes
6183 A @emph{custos} (plural: @emph{custodes}; Latin word for `guard') is a
6184 symbol that appears at the end of a staff. It anticipates the pitch
6185 of the first note(s) of the following line thus helping the performer
6186 to manage line breaks during performance.
6188 Custodes were frequently used in music notation until the 17th
6189 century. Nowadays, they have survived only in a few particular forms
6190 of musical notation such as contemporary editions of Gregorian chant
6191 like the @emph{editio vaticana}. There are different custos glyphs
6192 used in different flavors of notational style.
6194 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
6195 @internalsref{Staff} context when declaring the @code{\paper} block,
6196 as shown in the following example
6202 \consists Custos_engraver
6203 Custos \override #'style = #'mensural
6208 The result looks like this
6210 @lilypond[quote,raggedright]
6214 \override Staff.Custos #'style = #'mensural
6221 \consists Custos_engraver
6227 The custos glyph is selected by the @code{style} property. The styles
6228 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
6229 @code{mensural}. They are demonstrated in the following fragment
6233 \new Lyrics \lyricmode {
6236 \typewriter "vaticana"
6237 { " " \musicglyph #"custodes-vaticana-u0" }
6240 \typewriter "medicaea"
6241 { " " \musicglyph #"custodes-medicaea-u0" }
6245 \typewriter "hufnagel"
6246 { " " \musicglyph #"custodes-hufnagel-u0" }
6250 \typewriter "mensural"
6251 { " " \musicglyph #"custodes-mensural-u0" }
6263 Program reference: @internalsref{Custos}.
6265 Examples: @inputfileref{input/regression,custos.ly}.
6269 @subsection Divisiones
6275 A @emph{divisio} (plural: @emph{divisiones}; Latin word for
6276 `division') is a staff context symbol that is used to structure
6277 Gregorian music into phrases and sections. The musical meaning of
6278 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
6279 can be characterized as short, medium and long pause, somewhat like
6280 the breathmarks from @ref{Breath marks}. The @emph{finalis} sign not
6281 only marks the end of a chant, but is also frequently used within a
6282 single antiphonal/responsorial chant to mark the end of each section.
6285 To use divisiones, include the file @code{gregorian-init.ly}. It
6286 contains definitions that you can apply by just inserting
6287 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
6288 and @code{\finalis} at proper places in the input. Some editions use
6289 @emph{virgula} or @emph{caesura} instead of divisio minima.
6290 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
6293 @lilypondfile[quote,raggedright]{divisiones.ly}
6297 @cindex @code{\virgula}
6299 @cindex @code{\caesura}
6301 @cindex @code{\divisioMinima}
6302 @code{\divisioMinima},
6303 @cindex @code{\divisioMaior}
6304 @code{\divisioMaior},
6305 @cindex @code{\divisioMaxima}
6306 @code{\divisioMaxima},
6307 @cindex @code{\finalis}
6312 In this manual: @ref{Breath marks}.
6314 Program reference: @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}.
6316 Examples: @inputfileref{input/test,divisiones.ly}.
6319 @subsection Ligatures
6323 @c TODO: Should double check if I recalled things correctly when I wrote
6324 @c down the following paragraph by heart.
6326 A ligature is a graphical symbol that represents at least two distinct
6327 notes. Ligatures originally appeared in the manuscripts of Gregorian
6328 chant notation to denote ascending or descending sequences of notes.
6330 Ligatures are entered by enclosing them in @code{\[} and @code{\]}.
6331 Some ligature styles may need additional input syntax specific for
6332 this particular type of ligature. By default, the
6333 @internalsref{LigatureBracket} engraver just puts a square bracket
6336 @lilypond[quote,raggedright,verbatim]
6344 To select a specific style of ligatures, a proper ligature engraver
6345 has to be added to the @internalsref{Voice} context, as explained in
6346 the following subsections. Only white mensural ligatures
6347 are supported with certain limitations.
6353 Ligatures need special spacing that has not yet been implemented. As
6354 a result, there is too much space between ligatures most of the time,
6355 and line breaking often is unsatisfactory. Also, lyrics do not
6356 correctly align with ligatures.
6358 Accidentals must not be printed within a ligature, but instead need to
6359 be collected and printed in front of it.
6361 Augmentum dots within ligatures are not handled correctly.
6365 * White mensural ligatures::
6366 * Gregorian square neumes ligatures::
6369 @node White mensural ligatures
6370 @subsubsection White mensural ligatures
6372 @cindex Mensural ligatures
6373 @cindex White mensural ligatures
6375 There is limited support for white mensural ligatures.
6377 To engrave white mensural ligatures, in the paper block the
6378 @internalsref{Mensural_ligature_engraver} has to be put into the
6379 @internalsref{Voice} context, and remove the
6380 @internalsref{Ligature_bracket_engraver}
6386 \remove Ligature_bracket_engraver
6387 \consists Mensural_ligature_engraver
6392 There is no additional input language to describe the shape of a
6393 white mensural ligature. The shape is rather determined solely from
6394 the pitch and duration of the enclosed notes. While this approach may
6395 take a new user a while to get accustomed, it has the great advantage
6396 that the full musical information of the ligature is known internally.
6397 This is not only required for correct MIDI output, but also allows for
6398 automatic transcription of the ligatures.
6403 \set Score.timing = ##f
6404 \set Score.defaultBarType = "empty"
6405 \override NoteHead #'style = #'neomensural
6406 \override Staff.TimeSignature #'style = #'neomensural
6408 \[ g\longa c\breve a\breve f\breve d'\longa \]
6410 \[ e1 f1 a\breve g\longa \]
6412 @lilypond[quote,raggedright]
6415 \set Score.timing = ##f
6416 \set Score.defaultBarType = "empty"
6417 \override NoteHead #'style = #'neomensural
6418 \override Staff.TimeSignature #'style = #'neomensural
6420 \[ g\longa c\breve a\breve f\breve d'\longa \]
6422 \[ e1 f1 a\breve g\longa \]
6427 \remove Ligature_bracket_engraver
6428 \consists Mensural_ligature_engraver
6434 Without replacing @internalsref{Ligature_bracket_engraver} with
6435 @internalsref{Mensural_ligature_engraver}, the same music transcribes
6438 @lilypond[quote,raggedright]
6440 \set Score.timing = ##f
6441 \set Score.defaultBarType = "empty"
6442 \override NoteHead #'style = #'neomensural
6443 \override Staff.TimeSignature #'style = #'neomensural
6445 \[ g\longa c\breve a\breve f\breve d'\longa \]
6447 \[ e1 f1 a\breve g\longa \]
6453 The implementation is experimental. It may output strange warnings,
6454 incorrect results, and might even crash on more complex ligatures.
6456 @node Gregorian square neumes ligatures
6457 @subsubsection Gregorian square neumes ligatures
6459 @cindex Square neumes ligatures
6460 @cindex Gregorian square neumes ligatures
6462 There is limited support for Gregorian square neumes notation
6463 (following the style of the Editio Vaticana). Core ligatures can
6464 already be typeset, but essential issues for serious typesetting are
6465 still lacking, such as (among others) horizontal alignment of multiple
6466 ligatures, lyrics alignment and proper accidentals handling.
6469 The following table contains the extended neumes table of the 2nd
6470 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
6471 1983 by the monks of Solesmes.
6473 @multitable @columnfractions .4 .2 .2 .2
6476 @b{Neuma aut@*Neumarum Elementa} @tab
6477 @b{Figurae@*Rectae} @tab
6478 @b{Figurae@*Liquescentes Auctae} @tab
6479 @b{Figurae@*Liquescentes Deminutae}
6481 @c TODO: \paper block is identical in all of the below examples.
6482 @c Therefore, it should somehow be included rather than duplicated all
6485 @c why not make identifiers in ly/engraver-init.ly? --hwn
6487 @c Because it's just used to typeset plain notes without
6488 @c a staff for demonstration purposes rather than something
6489 @c special of Gregorian chant notation. --jr
6494 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.5\cm]
6495 \include "gregorian-init.ly"
6500 \noBreak s^\markup {"a"} \noBreak
6502 % Punctum Inclinatum
6504 \noBreak s^\markup {"b"}
6506 \paper { \neumeDemoPaper }}
6509 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.5\cm]
6510 \include "gregorian-init.ly"
6513 % Punctum Auctum Ascendens
6514 \[ \auctum \ascendens b \]
6515 \noBreak s^\markup {"c"} \noBreak
6517 % Punctum Auctum Descendens
6518 \[ \auctum \descendens b \]
6519 \noBreak s^\markup {"d"} \noBreak
6521 % Punctum Inclinatum Auctum
6522 \[ \inclinatum \auctum b \]
6523 \noBreak s^\markup {"e"}
6525 \paper { \neumeDemoPaper }}
6528 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6529 \include "gregorian-init.ly"
6532 % Punctum Inclinatum Parvum
6533 \[ \inclinatum \deminutum b \]
6534 \noBreak s^\markup {"f"}
6536 \paper { \neumeDemoPaper }}
6542 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6543 \include "gregorian-init.ly"
6548 \noBreak s^\markup {"g"}
6550 \paper { \neumeDemoPaper }}
6556 @code{3. Apostropha vel Stropha}
6558 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6559 \include "gregorian-init.ly"
6564 \noBreak s^\markup {"h"}
6566 \paper { \neumeDemoPaper }}
6569 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6570 \include "gregorian-init.ly"
6574 \[ \stropha \auctum b \]
6575 \noBreak s^\markup {"i"}
6577 \paper { \neumeDemoPaper }}
6584 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6585 \include "gregorian-init.ly"
6590 \noBreak s^\markup {"j"}
6592 \paper { \neumeDemoPaper }}
6598 @code{5. Clivis vel Flexa}
6600 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6601 \include "gregorian-init.ly"
6608 \paper { \neumeDemoPaper }}
6611 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6612 \include "gregorian-init.ly"
6615 % Clivis Aucta Descendens
6616 \[ b \flexa \auctum \descendens g \]
6617 \noBreak s^\markup {"l"} \noBreak
6619 % Clivis Aucta Ascendens
6620 \[ b \flexa \auctum \ascendens g \]
6621 \noBreak s^\markup {"m"}
6623 \paper { \neumeDemoPaper }}
6626 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6627 \include "gregorian-init.ly"
6631 \[ b \flexa \deminutum g \]
6634 \paper { \neumeDemoPaper }}
6638 @code{6. Podatus vel Pes}
6640 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6641 \include "gregorian-init.ly"
6648 \paper { \neumeDemoPaper }}
6651 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6652 \include "gregorian-init.ly"
6655 % Pes Auctus Descendens
6656 \[ g \pes \auctum \descendens b \]
6657 \noBreak s^\markup {"p"} \noBreak
6659 % Pes Auctus Ascendens
6660 \[ g \pes \auctum \ascendens b \]
6661 \noBreak s^\markup {"q"}
6663 \paper { \neumeDemoPaper }}
6666 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6667 \include "gregorian-init.ly"
6671 \[ g \pes \deminutum b \]
6674 \paper { \neumeDemoPaper }}
6678 @code{7. Pes Quassus}
6680 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6681 \include "gregorian-init.ly"
6685 \[ \oriscus g \pes \virga b \]
6688 \paper { \neumeDemoPaper }}
6691 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6692 \include "gregorian-init.ly"
6695 % Pes Quassus Auctus Descendens
6696 \[ \oriscus g \pes \auctum \descendens b \]
6699 \paper { \neumeDemoPaper }}
6704 @code{8. Quilisma Pes}
6706 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6707 \include "gregorian-init.ly"
6711 \[ \quilisma g \pes b \]
6714 \paper { \neumeDemoPaper }}
6717 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6718 \include "gregorian-init.ly"
6721 % Quilisma Pes Auctus Descendens
6722 \[ \quilisma g \pes \auctum \descendens b \]
6725 \paper { \neumeDemoPaper }}
6730 @code{9. Podatus Initio Debilis}
6732 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6733 \include "gregorian-init.ly"
6736 % Pes Initio Debilis
6737 \[ \deminutum g \pes b \]
6740 \paper { \neumeDemoPaper }}
6743 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6744 \include "gregorian-init.ly"
6747 % Pes Auctus Descendens Initio Debilis
6748 \[ \deminutum g \pes \auctum \descendens b \]
6751 \paper { \neumeDemoPaper }}
6758 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6759 \include "gregorian-init.ly"
6763 \[ a \pes b \flexa g \]
6766 \paper { \neumeDemoPaper }}
6769 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6770 \include "gregorian-init.ly"
6773 % Torculus Auctus Descendens
6774 \[ a \pes b \flexa \auctum \descendens g \]
6777 \paper { \neumeDemoPaper }}
6780 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6781 \include "gregorian-init.ly"
6784 % Torculus Deminutus
6785 \[ a \pes b \flexa \deminutum g \]
6788 \paper { \neumeDemoPaper }}
6792 @code{11. Torculus Initio Debilis}
6794 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6795 \include "gregorian-init.ly"
6798 % Torculus Initio Debilis
6799 \[ \deminutum 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 Initio Debilis
6810 \[ \deminutum 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 Initio Debilis
6821 \[ \deminutum a \pes b \flexa \deminutum g \]
6824 \paper { \neumeDemoPaper }}
6828 @code{12. Porrectus}
6830 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6831 \include "gregorian-init.ly"
6835 \[ a \flexa g \pes b \]
6838 \paper { \neumeDemoPaper }}
6841 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6842 \include "gregorian-init.ly"
6845 % Porrectus Auctus Descendens
6846 \[ a \flexa g \pes \auctum \descendens b \]
6849 \paper { \neumeDemoPaper }}
6852 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6853 \include "gregorian-init.ly"
6856 % Porrectus Deminutus
6857 \[ a \flexa g \pes \deminutum b \]
6860 \paper { \neumeDemoPaper }}
6866 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6867 \include "gregorian-init.ly"
6871 \[ \virga b \inclinatum a \inclinatum g \]
6874 \paper { \neumeDemoPaper }
6878 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6879 \include "gregorian-init.ly"
6883 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6886 \paper { \neumeDemoPaper }}
6889 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6890 \include "gregorian-init.ly"
6893 % Climacus Deminutus
6894 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6897 \paper { \neumeDemoPaper }}
6901 @code{14. Scandicus}
6903 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6904 \include "gregorian-init.ly"
6908 \[ g \pes a \virga b \]
6911 \paper { \neumeDemoPaper }}
6914 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6915 \include "gregorian-init.ly"
6918 % Scandicus Auctus Descendens
6919 \[ g \pes a \pes \auctum \descendens b \]
6922 \paper { \neumeDemoPaper }}
6925 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6926 \include "gregorian-init.ly"
6929 % Scandicus Deminutus
6930 \[ g \pes a \pes \deminutum b \]
6933 \paper { \neumeDemoPaper }}
6939 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6940 \include "gregorian-init.ly"
6944 \[ g \oriscus a \pes \virga b \]
6947 \paper { \neumeDemoPaper }}
6950 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6951 \include "gregorian-init.ly"
6954 % Salicus Auctus Descendens
6955 \[ g \oriscus a \pes \auctum \descendens b \]
6958 \paper { \neumeDemoPaper }}
6965 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6966 \include "gregorian-init.ly"
6970 \[ \stropha b \stropha b \stropha a \]
6973 \paper { \neumeDemoPaper }
6982 Unlike most other neumes notation systems, the input language for
6983 neumes does not reflect the typographical appearance, but is designed
6984 to focus on musical meaning. For example, @code{\[ a \pes b
6985 \flexa g \]} produces a Torculus consisting of three Punctum heads,
6986 while @code{\[ a \flexa g \pes b \]} produces a Porrectus with a
6987 curved flexa shape and only a single Punctum head. There is no
6988 command to explicitly typeset the curved flexa shape; the decision of
6989 when to typeset a curved flexa shape is based on the musical
6990 input. The idea of this approach is to separate the musical aspects
6991 of the input from the notation style of the output. This way, the
6992 same input can be reused to typeset the same music in a different
6993 style of Gregorian chant notation.
6995 The following table shows the code fragments that produce the
6996 ligatures in the above neumes table. The letter in the first column
6997 in each line of the below table indicates to which ligature in the
6998 above table it refers. The second column gives the name of the
6999 ligature. The third column shows the code fragment that produces this
7000 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
7002 @multitable @columnfractions .1 .4 .5
7016 Punctum Inclinatum @tab
7017 @code{\[ \inclinatum b \]}
7021 Punctum Auctum Ascendens @tab
7022 @code{\[ \auctum \ascendens b \]}
7026 Punctum Auctum Descendens @tab
7027 @code{\[ \auctum \descendens b \]}
7031 Punctum Inclinatum Auctum @tab
7032 @code{\[ \inclinatum \auctum b \]}
7036 Punctum Inclinatum Parvum @tab
7037 @code{\[ \inclinatum \deminutum b \]}
7042 @code{\[ \virga b \]}
7047 @code{\[ \stropha b \]}
7052 @code{\[ \stropha \auctum b \]}
7057 @code{\[ \oriscus b \]}
7061 Clivis vel Flexa @tab
7062 @code{\[ b \flexa g \]}
7066 Clivis Aucta Descendens @tab
7067 @code{\[ b \flexa \auctum \descendens g \]}
7071 Clivis Aucta Ascendens @tab
7072 @code{\[ b \flexa \auctum \ascendens g \]}
7077 @code{\[ b \flexa \deminutum g \]}
7081 Podatus vel Pes @tab
7082 @code{\[ g \pes b \]}
7086 Pes Auctus Descendens @tab
7087 @code{\[ g \pes \auctum \descendens b \]}
7091 Pes Auctus Ascendens @tab
7092 @code{\[ g \pes \auctum \ascendens b \]}
7097 @code{\[ g \pes \deminutum b \]}
7102 @code{\[ \oriscus g \pes \virga b \]}
7106 Pes Quassus Auctus Descendens @tab
7107 @code{\[ \oriscus g \pes \auctum \descendens b \]}
7112 @code{\[ \quilisma g \pes b \]}
7116 Quilisma Pes Auctus Descendens @tab
7117 @code{\[ \quilisma g \pes \auctum \descendens b \]}
7121 Pes Initio Debilis @tab
7122 @code{\[ \deminutum g \pes b \]}
7126 Pes Auctus Descendens Initio Debilis @tab
7127 @code{\[ \deminutum g \pes \auctum \descendens b \]}
7132 @code{\[ a \pes b \flexa g \]}
7136 Torculus Auctus Descendens @tab
7137 @code{\[ a \pes b \flexa \auctum \descendens g \]}
7141 Torculus Deminutus @tab
7142 @code{\[ a \pes b \flexa \deminutum g \]}
7146 Torculus Initio Debilis @tab
7147 @code{\[ \deminutum a \pes b \flexa g \]}
7151 Torculus Auctus Descendens Initio Debilis @tab
7152 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
7156 Torculus Deminutus Initio Debilis @tab
7157 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
7162 @code{\[ a \flexa g \pes b \]}
7166 Porrectus Auctus Descendens @tab
7167 @code{\[ a \flexa g \pes \auctum \descendens b \]}
7171 Porrectus Deminutus @tab
7172 @code{\[ a \flexa g \pes \deminutum b \]}
7177 @code{\[ \virga b \inclinatum a \inclinatum g \]}
7181 Climacus Auctus @tab
7182 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
7186 Climacus Deminutus @tab
7187 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
7192 @code{\[ g \pes a \virga b \]}
7196 Scandicus Auctus Descendens @tab
7197 @code{\[ g \pes a \pes \auctum \descendens b \]}
7201 Scandicus Deminutus @tab
7202 @code{\[ g \pes a \pes \deminutum b \]}
7207 @code{\[ g \oriscus a \pes \virga b \]}
7211 Salicus Auctus Descendens @tab
7212 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
7217 @code{\[ \stropha b \stropha b \stropha a \]}
7223 The following head prefixes are supported
7225 @cindex @code{\virga}
7227 @cindex @code{\stropha}
7229 @cindex @code{\inclinatum}
7231 @cindex @code{\auctum}
7233 @cindex @code{\descendens}
7235 @cindex @code{\ascendens}
7237 @cindex @code{\oriscus}
7239 @cindex @code{\quilisma}
7241 @cindex @code{\deminutum}
7244 Head prefixes can be accumulated, though restrictions apply. For
7245 example, either @code{\descendens} or @code{\ascendens} can be applied
7246 to a head, but not both to the same head.
7249 @cindex @code{\flexa}
7250 Two adjacent heads can be tied together with the @code{\pes} and
7251 @code{\flexa} infix commands for a rising and falling line of melody,
7256 @node Gregorian Chant contexts
7257 @subsection Gregorian Chant contexts
7259 @cindex VaticanaVoiceContext
7260 @cindex VaticanaStaffContext
7262 The predefined @code{VaticanaVoiceContext} and
7263 @code{VaticanaStaffContext} can be used to engrave a piece of
7264 Gregorian Chant in the style of the Editio Vaticana. These contexts
7265 initialize all relevant context properties and grob properties to
7266 proper values, so you can immediately go ahead entering the chant, as
7267 the following excerpt demonstrates
7269 @lilypond[quote,raggedright,verbatim,noindent]
7270 \include "gregorian-init.ly"
7273 \context VaticanaVoice = "cantus" {
7274 \override Score.BarNumber #'transparent = ##t {
7275 \[ c'\melisma c' \flexa a \]
7276 \[ a \flexa \deminutum g\melismaEnd \]
7278 \[ f\melisma \pes a c' c' \pes d'\melismaEnd \]
7279 c' \divisioMinima \break
7280 \[ c'\melisma c' \flexa a \]
7281 \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
7284 \lyricsto "cantus" \new Lyrics {
7285 San- ctus, San- ctus, San- ctus
7292 @node Mensural contexts
7293 @subsection Mensural contexts
7295 @cindex MensuralVoiceContext
7296 @cindex MensuralStaffContext
7298 The predefined @code{MensuralVoiceContext} and
7299 @code{MensuralStaffContext} can be used to engrave a piece in mensural
7300 style. These contexts initialize all relevant context properties and
7301 grob properties to proper values, so you can immediately go ahead
7302 entering the chant, as the following excerpt demonstrates
7304 @lilypond[quote,raggedright,verbatim,noindent]
7307 \context MensuralVoice = "discantus" \transpose c c' {
7308 \override Score.BarNumber #'transparent = ##t {
7309 c'1\melisma bes a g\melismaEnd
7311 \[ f1\melisma a c'\breve d'\melismaEnd \]
7313 c'\breve\melisma a1 g1\melismaEnd
7314 fis\longa^\signumcongruentiae
7317 \lyricsto "discantus" \new Lyrics {
7318 San -- ctus, San -- ctus, San -- ctus
7326 @subsection Figured bass
7328 @cindex Basso continuo
7330 @c TODO: musicological blurb about FB
7333 LilyPond has limited support for figured bass
7335 @lilypond[quote,verbatim,fragment]
7337 \context Voice { \clef bass dis4 c d ais }
7338 \context FiguredBass \figuremode {
7339 < 6 >4 < 7 >8 < 6+ [_!] >
7345 The support for figured bass consists of two parts: there is an input
7346 mode, introduced by @code{\figuremode}, where you can enter bass figures
7347 as numbers, and there is a context called @internalsref{FiguredBass} that
7348 takes care of making @internalsref{BassFigure} objects.
7350 In figures input mode, a group of bass figures is delimited by
7351 @code{<} and @code{>}. The duration is entered after the @code{>}
7355 @lilypond[quote,fragment]
7356 \context FiguredBass
7357 \figuremode { <4 6> }
7360 Accidentals are added when you append @code{-}, @code{!} and @code{+}
7366 @lilypond[quote,fragment]
7367 \context FiguredBass
7368 \figuremode { <4- 6+ 7!> }
7371 Spaces or dashes may be inserted by using @code{_}. Brackets are
7372 introduced with @code{[} and @code{]}
7377 @lilypond[quote,fragment]
7378 \context FiguredBass
7379 \figuremode { < [4 6] 8 [_! 12]> }
7382 Although the support for figured bass may superficially resemble chord
7383 support, it works much simpler. The @code{\figuremode} mode simply
7384 stores the numbers , and @internalsref{FiguredBass} context prints
7385 them as entered. There is no conversion to pitches, and no
7386 realizations of the bass are played in the MIDI file.
7388 Internally, the code produces markup texts. You can use any of the
7389 markup text properties to override formatting. For example, the
7390 vertical spacing of the figures may be set with @code{baseline-skip}.
7394 Program reference: @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
7395 and @internalsref{FiguredBass} context.
7399 Slash notation for alterations is not supported.
7401 @node Contemporary notation
7402 @section Contemporary notation
7404 In the 20th century, composers have greatly expanded the musical
7405 vocabulary. With this expansion, many innovations in musical notation
7406 have been tried. The book ``Music Notation in the 20th century'' by
7407 Kurt Stone gives a comprehensive overview (see @ref{Literature
7408 list}). In general, the use of new, innovative notation makes a piece
7409 harder to understand and perform and its use should therefore be
7410 avoided. For this reason, support for contemporary notation in
7411 LilyPond is limited.
7415 * Polymetric notation::
7417 * Special fermatas::
7421 @node Polymetric notation
7422 @subsection Polymetric notation
7424 Double time signatures are not supported explicitly, but they can be
7425 faked. In the next example, the markup for the time signature is
7426 created with a markup text. This markup text is inserted in the
7427 @internalsref{TimeSignature} grob.
7429 @lilypond[verbatim,raggedright]
7435 \musicglyph #"scripts-stopped"
7436 \bracket \column < "5" "8" >
7441 \override Staff.TimeSignature #'print-function = #Text_item::print
7442 \override Staff.TimeSignature #'text = #tsMarkup
7444 c'2 \bar ":" c'4 c'4.
7448 Each staff can also have its own time signature. This is done by
7449 moving the @internalsref{Timing_engraver} to @internalsref{Staff}
7456 \remove "Timing_engraver"
7460 \consists "Timing_engraver"
7466 Now, each staff has its own time signature.
7480 c4. c8 c c c4. c8 c c
7485 @lilypond[raggedright]
7489 \remove "Timing_engraver"
7493 \consists "Timing_engraver"
7509 c4. c8 c c c4. c8 c c
7515 A different form of polymetric notation is where note lengths have
7516 different values across staves.
7518 This notation can be created by setting a common time signature for
7519 each staff but replacing it manually using
7520 @code{timeSignatureFraction} to the desired fraction. Then the printed
7521 durations in each staff are scaled to the common time signature.
7522 The latter is done with @code{\compressmusic}, which is similar to
7523 @code{\times}, but does not create a tuplet bracket.
7526 In this example, music with the time signatures of 3/4, 9/8 and 10/8 are
7527 used in parallel. In the second staff, shown durations are multiplied by
7528 2/3, so that 2/3 * 9/8 = 3/4, and in the third staff, shown durations are
7529 multiplied by 3/5, so that 3/5 * 10/8 = 3/4.
7531 @lilypond[raggedright,verbatim]
7539 \set Staff.timeSignatureFraction = #'(9 . 8)
7540 \compressmusic #'(2 . 3)
7541 \repeat unfold 6 { c8[ c c] }
7545 \set Staff.timeSignatureFraction = #'(10 . 8)
7546 \compressmusic #'(3 . 5)
7547 { \repeat unfold 2 { c8[ c c] }
7548 \repeat unfold 2 { c8[ c] }
7549 | c4. c4. \times 2/3 { c8 c c } c4 }
7559 When using different time signatures in parallel, the spacing is
7560 aligned vertically, but bar lines distort the regular spacing.
7565 @subsection Clusters
7569 A cluster indicates a continuous range of pitches to be played. They
7570 can be denoted as the envelope of a set of notes. They are entered by
7571 applying the function @code{makeClusters} to a sequence of
7574 @lilypond[quote,verbatim]
7576 \makeClusters { <c e > <b f'> }
7579 The following example (from
7580 @inputfileref{input/regression,cluster.ly}) shows what the result
7583 @lilypondfile[quote]{cluster.ly}
7585 Ordinary notes and clusters can be put together in the same staff,
7586 even simultaneously. In such a case no attempt is made to
7587 automatically avoid collisions between ordinary notes and clusters.
7591 Program reference: @internalsref{ClusterSpanner},
7592 @internalsref{ClusterSpannerBeacon},
7593 @internalsref{Cluster_spanner_engraver}, and
7594 @internalsref{ClusterNoteEvent}.
7596 Examples: @inputfileref{input/regression,cluster.ly}.
7600 Music expressions like @code{<< @{ g8 e8 @} a4 >>} are not printed
7601 accurately. Use @code{<g a>8 <e a>8} instead.
7605 @node Special fermatas
7606 @subsection Special fermatas
7608 @cindex fermatas, special
7610 In contemporary music notation, special fermata symbols denote breaks
7611 of differing lengths. The following fermatas are supported
7613 @lilypond[quote,raggedright]
7635 \context Lyrics \lyricmode {
7636 \override LyricText #'font-family = #'typewriter
7637 "shortfermata" "fermata" "longfermata" "verylongfermata"
7642 See @ref{Articulations} for general instructions how to apply scripts
7643 such as fermatas to notes.
7645 @node Feathered beams
7646 @subsection Feathered beams
7648 Feathered beams are not supported natively, but they can be faked by
7649 forcing two beams to overlap. Here is an example,
7651 @lilypond[raggedright]
7652 \relative \new Staff <<
7656 \once \override Voice.Beam #'positions = #'(0 . 0.5)
7661 \once \override Voice.Beam #'positions = #'(0 . -0.5)
7669 @node Educational use
7670 @section Educational use
7674 * Blank music paper::
7675 * Notation for excercises::
7676 * Easy Notation note heads::
7680 @subsection Balloon help
7682 Elements of notation can be marked and named with the help of a square
7683 balloon. The primary purpose of this feature is to explain notation.
7685 The following example demonstrates its use.
7687 @lilypond[quote,verbatim,fragment,raggedright,relative=2]
7690 #(add-balloon-text 'NoteHead "heads, or tails?"
7696 The function @code{add-balloon-text} takes the name of a grob, the
7697 label to print, and the position where to put the label relative to
7698 the object. In the above example, the text ``heads or tails?'' ends
7699 3 spaces below and 1 space to the right of the marked head.
7702 @cindex notation, explaining
7706 Program reference: @internalsref{text-balloon-interface}.
7708 Examples: @inputfileref{input/regression,balloon.ly}.
7713 @node Blank music paper
7714 @subsection Blank music paper
7716 A blank music paper can be produced also by using invisible notes, and
7717 removing @code{Bar_number_engraver}.
7722 \repeat unfold 2 % Change this for more lines.
7727 \override TimeSignature #'transparent = ##t
7728 defaultBarType = #""
7729 \remove Bar_number_engraver
7731 \context Staff \emptymusic
7732 \context TabStaff \emptymusic
7737 @node Notation for excercises
7738 @subsection Notation for excercises
7742 Invisible (or transparent) notes can be useful, when weird tricks are
7743 needed; especially, a slur cannot be attach to a rest or spacer rest.
7747 blanknotes = { \override NoteHead #'transparent = ##t
7748 \override Stem #'transparent = ##t }
7749 unblanknotes = { \revert NoteHead #'transparent
7750 \revert Stem #'transparent }
7755 \blanknotes e4 f4 \unblanknotes
7761 @node Easy Notation note heads
7762 @subsection Easy Notation note heads
7764 @cindex easy notation
7767 The `easy play' note head includes a note name inside the head. It is
7768 used in music for beginners
7770 @lilypond[quote,raggedright,verbatim,fragment,staffsize=26]
7775 The command @code{\setEasyHeads} overrides settings for the
7776 @internalsref{NoteHead} object. To make the letters readable, it has
7777 to be printed in a large font size. To print with a larger font, see
7778 @ref{Setting global staff size}.
7782 @cindex @code{\setEasyHeads}
7783 @code{\setEasyHeads}