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{removeTag} music function, tagged expressions
5387 can be filtered. For example,
5391 \onlyWithTag #'score @var{the music}
5392 \onlyWithTag #'part @var{the music}
5397 @lilypondfile[quote]{tag-filter.ly}
5400 The argument of the @code{\tag} command should be a symbol, or a list
5401 of symbols, for example,
5403 \tag #'(original-part transposed-part) @dots{}
5408 Examples: @inputfileref{input/regression,tag-filter.ly}.
5411 @node Quoting other voices
5412 @subsection Quoting other voices
5414 With quotations, fragments of other parts can be inserted into a part
5415 directly. Before a part can be quoted, it must be marked especially as
5416 quotable. This is done with code @code{\addquote} command.
5419 \addquote @var{name} @var{music}
5424 Here, @var{name} is an identifying string. The @var{music} is any kind
5425 of music. This is an example of @code{\addquote}
5428 \addquote clarinet \relative c' {
5433 This command must be entered at toplevel, i.e. outside any music
5436 After calling @code{\addquote}, the quotation may then be done with
5440 \quote @var{name} @var{duration}
5443 During a part, a piece of music can be quoted with the @code{\quote}
5450 This would cite three quarter notes (@code{2.} is a dotted half note)
5451 of the previously added @code{clarinet} voice.
5453 More precisely, it takes the current time-step of the part being
5454 printed, and extracts the notes at the corresponding point of the
5455 @code{\addquote}d voice. Therefore, the argument to @code{\addquote}
5456 should be the entire part of the voice to be quoted, including any
5457 rests at the beginning.
5459 Quotations take into account the transposition of both source and target
5460 instruments, if they are specified using the @code{\transposition} command.
5462 @lilypond[quote,raggedright,verbatim]
5463 \addquote clarinet \relative c' {
5469 e'8 f'8 \quote clarinet 2
5473 The type of events that are present in cue notes can be trimmed with
5474 the @code{quotedEventTypes} property. The default value is
5475 @code{(note-event rest-event)}, which means that only notes of and
5476 rests of the cued voice end up in the @code{\quote}.
5480 \set Staff.quotedEventTypes = #'(note-event articulation-event dynamic-event)
5484 will quote notes (but no rests), together with scripts and dynamics.
5488 Only the contents of the first @internalsref{Voice} occurring in an
5489 @code{\addquote} command will be considered for quotation, so
5490 @var{music} can not contain @code{\new} and @code{\context Voice}
5491 statements that would switch to a different Voice.
5496 In this manual: @ref{Instrument transpositions}.
5498 Examples: @inputfileref{input/regression,quote.ly}
5499 @inputfileref{input/regression,quote-transposition.ly}
5501 Program reference: @internalsref{QuoteMusic}.
5503 @node Formatting cue notes
5504 @section Formatting cue notes
5507 The previous section deals with inserting notes from another
5508 voice. When making a part, these notes need to be specially formatted.
5509 Here is an example of formatted cue notes
5514 \override Stem #'length = #5.5
5515 \override Beam #'thickness = #0.384
5516 \override Beam #'space-function =
5517 #(lambda (beam mult) (* 0.8 (Beam::space_function beam mult)))
5521 \set Staff.instrument = #"Horn in F"
5522 \set Score.skipBars = ##t
5525 \once \override Staff.MultiMeasureRest #'staff-position = #-6
5532 r8^"Bsn." c'8 f'8[ f'8]
5542 There are a couple of points to take care of:
5546 The multi rest of the original part should be moved up or down during
5549 Cue notes have smaller font sizes.
5551 When cued notes have a clef change relative to the original part, the
5552 clef should be restored after the cue section. This minimizes
5553 confusion for the reader,
5555 When the original part starts, this should be marked with the name of
5556 the instrument, in this case ``Horn.'' Of course, the cue part is
5557 marked with the instrument playing the cue.
5562 @node Ancient notation
5563 @section Ancient notation
5565 @cindex Vaticana, Editio
5566 @cindex Medicaea, Editio
5571 Support for ancient notation includes features for mensural notation
5572 and Gregorian Chant notation. There is also limited support for
5573 figured bass notation.
5575 Many graphical objects provide a @code{style} property, see
5578 @ref{Ancient note heads},
5580 @ref{Ancient accidentals},
5582 @ref{Ancient rests},
5584 @ref{Ancient clefs},
5586 @ref{Ancient flags},
5588 @ref{Ancient time signatures}.
5591 By manipulating such a grob property, the typographical appearance of
5592 the affected graphical objects can be accommodated for a specific
5593 notation flavor without need for introducing any new notational
5596 In addition to the standard articulation signs described in section
5597 @ref{Articulations}, specific articulation signs for ancient notation
5602 @ref{Ancient articulations}
5605 Other aspects of ancient notation can not that easily be expressed as
5606 in terms of just changing a style property of a graphical object or
5607 adding articulation signs. Some notational concepts are introduced
5608 specifically for ancient notation,
5619 If this all is too much of documentation for you, and you just want to
5620 dive into typesetting without worrying too much about the details on
5621 how to customize a context, you may have a look at the predefined
5622 contexts. Use them to set up predefined style-specific voice and
5623 staff contexts, and directly go ahead with the note entry,
5627 @ref{Gregorian Chant contexts},
5629 @ref{Mensural contexts}.
5632 There is limited support for figured bass notation which came
5633 up during the baroque period.
5640 Here are all suptopics at a glance:
5643 * Ancient note heads::
5644 * Ancient accidentals::
5648 * Ancient time signatures::
5649 * Ancient articulations::
5653 * Gregorian Chant contexts::
5654 * Mensural contexts::
5659 @node Ancient note heads
5660 @subsection Ancient note heads
5665 For ancient notation, a note head style other than the @code{default}
5666 style may be chosen. This is accomplished by setting the @code{style}
5667 property of the NoteHead object to @code{baroque}, @code{neomensural}
5668 or @code{mensural}. The @code{baroque} style differs from the
5669 @code{default} style only in using a square shape for @code{\breve}
5670 note heads. The @code{neomensural} style differs from the
5671 @code{baroque} style in that it uses rhomboidal heads for whole notes
5672 and all smaller durations. Stems are centered on the note heads.
5673 This style is in particular useful when transcribing mensural music,
5674 e.g. for the incipit. The @code{mensural} style finally produces note
5675 heads that mimic the look of note heads in historic printings of the
5678 The following example demonstrates the @code{neomensural} style
5680 @lilypond[quote,fragment,raggedright]
5681 \set Score.skipBars = ##T
5682 \override NoteHead #'style = #'neomensural
5683 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
5686 When typesetting a piece in Gregorian Chant notation, the
5687 @internalsref{Gregorian_ligature_engraver} will automatically select
5688 the proper note heads, such there is no need to explicitly set the
5689 note head style. Still, the note head style can be set e.g.@: to
5690 @code{vaticana_punctum} to produce punctum neumes. Similarly, a
5691 @internalsref{Mensural_ligature_engraver} is used to automatically
5692 assemble mensural ligatures. See @ref{Ligatures} for how ligature
5697 Examples: @inputfileref{input/regression,note-head-style.ly} gives an
5698 overview over all available note head styles.
5701 @node Ancient accidentals
5702 @subsection Ancient accidentals
5707 Use the @code{style} property of grob @internalsref{Accidental} to
5708 select ancient accidentals. Supported styles are
5709 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
5711 @lilypond[quote,raggedright,staffsize=26]
5719 { " " \musicglyph #"accidentals-vaticana-1"
5720 " " \musicglyph #"accidentals-vaticana0" }
5724 { " " \musicglyph #"accidentals-medicaea-1" }
5728 { " " \musicglyph #"accidentals-hufnagel-1" }
5732 { " " \musicglyph #"accidentals-mensural-1"
5733 " " \musicglyph #"accidentals-mensural1" }
5742 \remove "Bar_number_engraver"
5746 \remove "Clef_engraver"
5747 \remove "Key_engraver"
5748 \remove "Time_signature_engraver"
5749 \remove "Staff_symbol_engraver"
5750 minimumVerticalExtent = ##f
5756 As shown, not all accidentals are supported by each style. When
5757 trying to access an unsupported accidental, LilyPond will switch to a
5758 different style, as demonstrated in
5759 @inputfileref{input/test,ancient-accidentals.ly}.
5761 Similarly to local accidentals, the style of the key signature can be
5762 controlled by the @code{style} property of the
5763 @internalsref{KeySignature} grob.
5767 In this manual: @ref{Pitches}, @ref{Chromatic alterations} and
5768 @ref{Accidentals} give a general introduction into the use of
5769 accidentals. @ref{Key signature} gives a general introduction into
5770 the use of key signatures.
5772 Program reference: @internalsref{KeySignature}.
5774 Examples: @inputfileref{input/test,ancient-accidentals.ly}.
5777 @subsection Ancient rests
5782 Use the @code{style} property of grob @internalsref{Rest} to select
5783 ancient accidentals. Supported styles are @code{classical},
5784 @code{neomensural} and @code{mensural}. @code{classical} differs
5785 from the @code{default} style only in that the quarter rest looks like
5786 a horizontally mirrored 8th rest. The @code{neomensural} style suits
5787 well for e.g. the incipit of a transcribed mensural piece of music.
5788 The @code{mensural} style finally mimics the appearance of rests as
5789 in historic prints of the 16th century.
5791 The following example demonstrates the @code{neomensural} style
5793 @lilypond[quote,fragment,raggedright]
5794 \override Rest #'style = #'neomensural
5795 \set Score.skipBars = ##t
5796 r\longa r\breve r1 r2 r4 r8 r16
5799 There are no 32th and 64th rests specifically for the mensural or
5800 neo-mensural style. Instead, the rests from the default style will be
5801 taken. See @inputfileref{input/test,rests.ly} for a chart of all
5804 There are no rests in Gregorian Chant notation; instead, it uses
5809 In this manual: @ref{Rests} gives a general introduction into the use of rests.
5813 @subsection Ancient clefs
5818 LilyPond supports a variety of clefs, many of them ancient.
5820 The following table shows all ancient clefs that are supported via the
5821 @code{\clef} command. Some of the clefs use the same glyph, but
5822 differ only with respect to the line they are printed on. In such
5823 cases, a trailing number in the name is used to enumerate these clefs.
5824 Still, you can manually force a clef glyph to be typeset on an
5825 arbitrary line, as described in @ref{Clef}. The note printed to the
5826 right side of each clef in the example column denotes the @code{c'}
5827 with respect to that clef.
5829 @multitable @columnfractions .4 .4 .2
5832 @b{Description} @tab
5833 @b{Supported Clefs} @tab
5837 modern style mensural C clef @tab
5838 @code{neomensural-c1}, @code{neomensural-c2},
5839 @code{neomensural-c3}, @code{neomensural-c4} @tab
5840 @lilypond[fragment,quote,relative=1,notime]
5842 \clef "neomensural-c2" c
5846 petrucci style mensural C clefs, for use on different staff lines
5847 (the examples shows the 2nd staff line C clef).
5857 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5859 \clef "petrucci-c2" c
5863 petrucci style mensural F clef @tab
5864 @code{petrucci-f} @tab
5865 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5867 \clef "petrucci-f" c
5871 petrucci style mensural G clef @tab
5872 @code{petrucci-g} @tab
5873 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5875 \clef "petrucci-g" c
5879 historic style mensural C clef @tab
5880 @code{mensural-c1}, @code{mensural-c2}, @code{mensural-c3},
5881 @code{mensural-c4} @tab
5882 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5884 \clef "mensural-c2" c
5888 historic style mensural F clef @tab
5889 @code{mensural-f} @tab
5890 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5892 \clef "mensural-f" c
5896 historic style mensural G clef @tab
5897 @code{mensural-g} @tab
5898 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5900 \clef "mensural-g" c
5904 Editio Vaticana style do clef @tab
5905 @code{vaticana-do1}, @code{vaticana-do2}, @code{vaticana-do3} @tab
5906 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5907 \override Staff.StaffSymbol #'line-count = #4
5909 \clef "vaticana-do2" c
5913 Editio Vaticana style fa clef @tab
5914 @code{vaticana-fa1}, @code{vaticana-fa2} @tab
5915 @lilypond[quote,relative=1,notime,indent=0.0\mm,fragment]
5916 \override Staff.StaffSymbol #'line-count = #4
5918 \clef "vaticana-fa2" c
5922 Editio Medicaea style do clef @tab
5923 @code{medicaea-do1}, @code{medicaea-do2}, @code{medicaea-do3} @tab
5924 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5925 \override Staff.StaffSymbol #'line-count = #4
5927 \clef "medicaea-do2" c
5931 Editio Medicaea style fa clef @tab
5932 @code{medicaea-fa1}, @code{medicaea-fa2} @tab
5933 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5934 \override Staff.StaffSymbol #'line-count = #4
5936 \clef "medicaea-fa2" c
5940 historic style hufnagel do clef @tab
5941 @code{hufnagel-do1}, @code{hufnagel-do2}, @code{hufnagel-do3} @tab
5942 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5943 \override Staff.StaffSymbol #'line-count = #4
5945 \clef "hufnagel-do2" c
5949 historic style hufnagel fa clef @tab
5950 @code{hufnagel-fa1}, @code{hufnagel-fa2} @tab
5951 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5952 \override Staff.StaffSymbol #'line-count = #4
5954 \clef "hufnagel-fa2" c
5958 historic style hufnagel combined do/fa clef @tab
5959 @code{hufnagel-do-fa} @tab
5960 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5961 \clef "hufnagel-do-fa" c
5968 @emph{Modern style} means ``as is typeset in contemporary editions of
5969 transcribed mensural music''.
5971 @emph{Petrucci style} means ``inspired by printings published by the
5972 famous engraver Petrucci (1466-1539)''.
5974 @emph{Historic style} means ``as was typeset or written in historic
5975 editions (other than those of Petrucci)''.
5977 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
5979 Petrucci used C clefs with differently balanced left-side vertical
5980 beams, depending on which staff line it is printed.
5984 In this manual: see @ref{Clef}.
5988 The mensural g clef is mapped to the Petrucci g clef.
5993 @subsection Ancient flags
5998 Use the @code{flag-style} property of grob @internalsref{Stem} to
5999 select ancient flags. Besides the @code{default} flag style,
6000 only @code{mensural} style is supported
6002 @lilypond[quote,fragment,raggedright,verbatim]
6003 \override Stem #'flag-style = #'mensural
6004 \override Stem #'thickness = #1.0
6005 \override NoteHead #'style = #'mensural
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 s8
6008 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
6011 Note that the innermost flare of each mensural flag always is
6012 vertically aligned with a staff line.
6014 There is no particular flag style for neo-mensural notation. Hence,
6015 when typesetting the incipit of a transcribed piece of mensural
6016 music, the default flag style should be used. There are no flags in
6017 Gregorian Chant notation.
6020 @node Ancient time signatures
6021 @subsection Ancient time signatures
6023 @cindex time signatures
6026 There is limited support for mensural time signatures. The
6027 glyphs are hard-wired to particular time fractions. In other words,
6028 to get a particular mensural signature glyph with the @code{\time n/m}
6029 command, @code{n} and @code{m} have to be chosen according to the
6038 \remove Staff_symbol_engraver
6039 \remove Clef_engraver
6040 \remove Time_signature_engraver
6043 \set Score.timing = ##f
6044 \set Score.barAlways = ##t
6045 s_\markup { "$\\backslash$time 4/4" }
6046 ^\markup { " " \musicglyph #"timesig-neomensural4/4" }
6048 s_\markup { "$\\backslash$time 2/2" }
6049 ^\markup { " " \musicglyph #"timesig-neomensural2/2" }
6051 s_\markup { "$\\backslash$time 6/4" }
6052 ^\markup { " " \musicglyph #"timesig-neomensural6/4" }
6054 s_\markup { "$\\backslash$time 6/8" }
6055 ^\markup { " " \musicglyph #"timesig-neomensural6/8" }
6057 s_\markup { "$\\backslash$time 3/2" }
6058 ^\markup { " " \musicglyph #"timesig-neomensural3/2" }
6060 s_\markup { "$\\backslash$time 3/4" }
6061 ^\markup { " " \musicglyph #"timesig-neomensural3/4" }
6063 s_\markup { "$\\backslash$time 9/4" }
6064 ^\markup { " " \musicglyph #"timesig-neomensural9/4" }
6066 s_\markup { "$\\backslash$time 9/8" }
6067 ^\markup { " " \musicglyph #"timesig-neomensural9/8" }
6069 s_\markup { "$\\backslash$time 4/8" }
6070 ^\markup { " " \musicglyph #"timesig-neomensural4/8" }
6072 s_\markup { "$\\backslash$time 2/4" }
6073 ^\markup { " " \musicglyph #"timesig-neomensural2/4" }
6078 Use the @code{style} property of grob @internalsref{TimeSignature} to
6079 select ancient time signatures. Supported styles are
6080 @code{neomensural} and @code{mensural}. The above table uses the
6081 @code{neomensural} style. This style is appropriate for the
6082 incipit of transcriptions of mensural pieces. The @code{mensural}
6083 style mimics the look of historical printings of the 16th century.
6085 The following examples shows the differences in style,
6087 @lilypond[raggedright]
6090 c1^\markup { \hspace #-2.0 \typewriter default }
6092 \override Staff.TimeSignature #'style = #'numbered
6094 c1^\markup { \hspace #-2.0 \typewriter numbered }
6096 \override Staff.TimeSignature #'style = #'mensural
6098 c1^\markup { \hspace #-2.0 \typewriter mensural }
6100 \override Staff.TimeSignature #'style = #'neomensural
6102 c1^\markup { \hspace #-2.0 \typewriter neomensural }
6103 \override Staff.TimeSignature #'style = #'single-digit
6105 c1^\markup { \hspace #-2.0 \typewriter single-digit }
6111 This manual: @ref{Time signature} gives a general introduction into
6112 the use of time signatures.
6116 Ratios of note durations do not change with the time signature. For
6117 example, the ratio of 1 brevis = 3 semibrevis (tempus perfectum) must
6118 be made by hand, by setting
6121 breveTP = #(ly:make-duration -1 0 3 2)
6127 This sets @code{breveTP} to 3/2 times 2 = 3 times a whole note.
6129 The @code{old6/8alt} symbol (an alternate symbol for 6/8) is not
6130 addressable with @code{\time}. Use a @code{\markup} instead
6132 @node Ancient articulations
6133 @subsection Ancient articulations
6135 @cindex articulations
6137 In addition to the standard articulation signs described in section
6138 @ref{Articulations}, articulation signs for ancient notation are
6139 provided. These are specifically designed for use with notation in
6140 Editio Vaticana style.
6142 @lilypond[quote,raggedright,verbatim,noindent]
6143 \include "gregorian-init.ly"
6145 \context VaticanaVoice {
6146 \override TextScript #'font-family = #'typewriter
6147 \override TextScript #'font-shape = #'upright
6148 \override Script #'padding = #-0.1
6150 a4\circulus_"circulus" s1
6151 a4\semicirculus_"semicirculus" s1 s
6152 a4\accentus_"accentus" s1
6153 \[ a4_"episem" \episemInitium \pes b \flexa a \episemFinis \]
6158 % Prepare TextSpanner for \episem{Initium|Finis} use.
6159 \override TextSpanner #'style = #'line
6160 \override TextSpanner #'edge-height = #'(0 . 0)
6161 \override TextSpanner #'padding = #0.5
6162 \override TextSpanner #'enclose-bounds = #1
6163 \override TextSpanner #'edge-text = #'("" . "")
6171 The line @code{\override Script #'padding = #-0.1} is required to
6172 force the articulation signs being placed vertically tightly to the
6173 correpsonding note heads.
6175 episem is currently broken due to a bug related with TextSpanner.
6179 @subsection Custodes
6184 A @emph{custos} (plural: @emph{custodes}; Latin word for `guard') is a
6185 symbol that appears at the end of a staff. It anticipates the pitch
6186 of the first note(s) of the following line thus helping the performer
6187 to manage line breaks during performance.
6189 Custodes were frequently used in music notation until the 17th
6190 century. Nowadays, they have survived only in a few particular forms
6191 of musical notation such as contemporary editions of Gregorian chant
6192 like the @emph{editio vaticana}. There are different custos glyphs
6193 used in different flavors of notational style.
6195 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
6196 @internalsref{Staff} context when declaring the @code{\paper} block,
6197 as shown in the following example
6203 \consists Custos_engraver
6204 Custos \override #'style = #'mensural
6209 The result looks like this
6211 @lilypond[quote,raggedright]
6215 \override Staff.Custos #'style = #'mensural
6222 \consists Custos_engraver
6228 The custos glyph is selected by the @code{style} property. The styles
6229 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
6230 @code{mensural}. They are demonstrated in the following fragment
6234 \new Lyrics \lyricmode {
6237 \typewriter "vaticana"
6238 { " " \musicglyph #"custodes-vaticana-u0" }
6241 \typewriter "medicaea"
6242 { " " \musicglyph #"custodes-medicaea-u0" }
6246 \typewriter "hufnagel"
6247 { " " \musicglyph #"custodes-hufnagel-u0" }
6251 \typewriter "mensural"
6252 { " " \musicglyph #"custodes-mensural-u0" }
6264 Program reference: @internalsref{Custos}.
6266 Examples: @inputfileref{input/regression,custos.ly}.
6270 @subsection Divisiones
6276 A @emph{divisio} (plural: @emph{divisiones}; Latin word for
6277 `division') is a staff context symbol that is used to structure
6278 Gregorian music into phrases and sections. The musical meaning of
6279 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
6280 can be characterized as short, medium and long pause, somewhat like
6281 the breathmarks from @ref{Breath marks}. The @emph{finalis} sign not
6282 only marks the end of a chant, but is also frequently used within a
6283 single antiphonal/responsorial chant to mark the end of each section.
6286 To use divisiones, include the file @code{gregorian-init.ly}. It
6287 contains definitions that you can apply by just inserting
6288 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
6289 and @code{\finalis} at proper places in the input. Some editions use
6290 @emph{virgula} or @emph{caesura} instead of divisio minima.
6291 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
6294 @lilypondfile[quote,raggedright]{divisiones.ly}
6298 @cindex @code{\virgula}
6300 @cindex @code{\caesura}
6302 @cindex @code{\divisioMinima}
6303 @code{\divisioMinima},
6304 @cindex @code{\divisioMaior}
6305 @code{\divisioMaior},
6306 @cindex @code{\divisioMaxima}
6307 @code{\divisioMaxima},
6308 @cindex @code{\finalis}
6313 In this manual: @ref{Breath marks}.
6315 Program reference: @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}.
6317 Examples: @inputfileref{input/test,divisiones.ly}.
6320 @subsection Ligatures
6324 @c TODO: Should double check if I recalled things correctly when I wrote
6325 @c down the following paragraph by heart.
6327 A ligature is a graphical symbol that represents at least two distinct
6328 notes. Ligatures originally appeared in the manuscripts of Gregorian
6329 chant notation to denote ascending or descending sequences of notes.
6331 Ligatures are entered by enclosing them in @code{\[} and @code{\]}.
6332 Some ligature styles may need additional input syntax specific for
6333 this particular type of ligature. By default, the
6334 @internalsref{LigatureBracket} engraver just puts a square bracket
6337 @lilypond[quote,raggedright,verbatim]
6345 To select a specific style of ligatures, a proper ligature engraver
6346 has to be added to the @internalsref{Voice} context, as explained in
6347 the following subsections. Only white mensural ligatures
6348 are supported with certain limitations.
6354 Ligatures need special spacing that has not yet been implemented. As
6355 a result, there is too much space between ligatures most of the time,
6356 and line breaking often is unsatisfactory. Also, lyrics do not
6357 correctly align with ligatures.
6359 Accidentals must not be printed within a ligature, but instead need to
6360 be collected and printed in front of it.
6362 Augmentum dots within ligatures are not handled correctly.
6366 * White mensural ligatures::
6367 * Gregorian square neumes ligatures::
6370 @node White mensural ligatures
6371 @subsubsection White mensural ligatures
6373 @cindex Mensural ligatures
6374 @cindex White mensural ligatures
6376 There is limited support for white mensural ligatures.
6378 To engrave white mensural ligatures, in the paper block the
6379 @internalsref{Mensural_ligature_engraver} has to be put into the
6380 @internalsref{Voice} context, and remove the
6381 @internalsref{Ligature_bracket_engraver}
6387 \remove Ligature_bracket_engraver
6388 \consists Mensural_ligature_engraver
6393 There is no additional input language to describe the shape of a
6394 white mensural ligature. The shape is rather determined solely from
6395 the pitch and duration of the enclosed notes. While this approach may
6396 take a new user a while to get accustomed, it has the great advantage
6397 that the full musical information of the ligature is known internally.
6398 This is not only required for correct MIDI output, but also allows for
6399 automatic transcription of the ligatures.
6404 \set Score.timing = ##f
6405 \set Score.defaultBarType = "empty"
6406 \override NoteHead #'style = #'neomensural
6407 \override Staff.TimeSignature #'style = #'neomensural
6409 \[ g\longa c\breve a\breve f\breve d'\longa \]
6411 \[ e1 f1 a\breve g\longa \]
6413 @lilypond[quote,raggedright]
6416 \set Score.timing = ##f
6417 \set Score.defaultBarType = "empty"
6418 \override NoteHead #'style = #'neomensural
6419 \override Staff.TimeSignature #'style = #'neomensural
6421 \[ g\longa c\breve a\breve f\breve d'\longa \]
6423 \[ e1 f1 a\breve g\longa \]
6428 \remove Ligature_bracket_engraver
6429 \consists Mensural_ligature_engraver
6435 Without replacing @internalsref{Ligature_bracket_engraver} with
6436 @internalsref{Mensural_ligature_engraver}, the same music transcribes
6439 @lilypond[quote,raggedright]
6441 \set Score.timing = ##f
6442 \set Score.defaultBarType = "empty"
6443 \override NoteHead #'style = #'neomensural
6444 \override Staff.TimeSignature #'style = #'neomensural
6446 \[ g\longa c\breve a\breve f\breve d'\longa \]
6448 \[ e1 f1 a\breve g\longa \]
6454 The implementation is experimental. It may output strange warnings,
6455 incorrect results, and might even crash on more complex ligatures.
6457 @node Gregorian square neumes ligatures
6458 @subsubsection Gregorian square neumes ligatures
6460 @cindex Square neumes ligatures
6461 @cindex Gregorian square neumes ligatures
6463 There is limited support for Gregorian square neumes notation
6464 (following the style of the Editio Vaticana). Core ligatures can
6465 already be typeset, but essential issues for serious typesetting are
6466 still lacking, such as (among others) horizontal alignment of multiple
6467 ligatures, lyrics alignment and proper accidentals handling.
6470 The following table contains the extended neumes table of the 2nd
6471 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
6472 1983 by the monks of Solesmes.
6474 @multitable @columnfractions .4 .2 .2 .2
6477 @b{Neuma aut@*Neumarum Elementa} @tab
6478 @b{Figurae@*Rectae} @tab
6479 @b{Figurae@*Liquescentes Auctae} @tab
6480 @b{Figurae@*Liquescentes Deminutae}
6482 @c TODO: \paper block is identical in all of the below examples.
6483 @c Therefore, it should somehow be included rather than duplicated all
6486 @c why not make identifiers in ly/engraver-init.ly? --hwn
6488 @c Because it's just used to typeset plain notes without
6489 @c a staff for demonstration purposes rather than something
6490 @c special of Gregorian chant notation. --jr
6495 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.5\cm]
6496 \include "gregorian-init.ly"
6501 \noBreak s^\markup {"a"} \noBreak
6503 % Punctum Inclinatum
6505 \noBreak s^\markup {"b"}
6507 \paper { \neumeDemoPaper }}
6510 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.5\cm]
6511 \include "gregorian-init.ly"
6514 % Punctum Auctum Ascendens
6515 \[ \auctum \ascendens b \]
6516 \noBreak s^\markup {"c"} \noBreak
6518 % Punctum Auctum Descendens
6519 \[ \auctum \descendens b \]
6520 \noBreak s^\markup {"d"} \noBreak
6522 % Punctum Inclinatum Auctum
6523 \[ \inclinatum \auctum b \]
6524 \noBreak s^\markup {"e"}
6526 \paper { \neumeDemoPaper }}
6529 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6530 \include "gregorian-init.ly"
6533 % Punctum Inclinatum Parvum
6534 \[ \inclinatum \deminutum b \]
6535 \noBreak s^\markup {"f"}
6537 \paper { \neumeDemoPaper }}
6543 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6544 \include "gregorian-init.ly"
6549 \noBreak s^\markup {"g"}
6551 \paper { \neumeDemoPaper }}
6557 @code{3. Apostropha vel Stropha}
6559 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6560 \include "gregorian-init.ly"
6565 \noBreak s^\markup {"h"}
6567 \paper { \neumeDemoPaper }}
6570 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6571 \include "gregorian-init.ly"
6575 \[ \stropha \auctum b \]
6576 \noBreak s^\markup {"i"}
6578 \paper { \neumeDemoPaper }}
6585 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6586 \include "gregorian-init.ly"
6591 \noBreak s^\markup {"j"}
6593 \paper { \neumeDemoPaper }}
6599 @code{5. Clivis vel Flexa}
6601 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6602 \include "gregorian-init.ly"
6609 \paper { \neumeDemoPaper }}
6612 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6613 \include "gregorian-init.ly"
6616 % Clivis Aucta Descendens
6617 \[ b \flexa \auctum \descendens g \]
6618 \noBreak s^\markup {"l"} \noBreak
6620 % Clivis Aucta Ascendens
6621 \[ b \flexa \auctum \ascendens g \]
6622 \noBreak s^\markup {"m"}
6624 \paper { \neumeDemoPaper }}
6627 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6628 \include "gregorian-init.ly"
6632 \[ b \flexa \deminutum g \]
6635 \paper { \neumeDemoPaper }}
6639 @code{6. Podatus vel Pes}
6641 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6642 \include "gregorian-init.ly"
6649 \paper { \neumeDemoPaper }}
6652 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6653 \include "gregorian-init.ly"
6656 % Pes Auctus Descendens
6657 \[ g \pes \auctum \descendens b \]
6658 \noBreak s^\markup {"p"} \noBreak
6660 % Pes Auctus Ascendens
6661 \[ g \pes \auctum \ascendens b \]
6662 \noBreak s^\markup {"q"}
6664 \paper { \neumeDemoPaper }}
6667 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6668 \include "gregorian-init.ly"
6672 \[ g \pes \deminutum b \]
6675 \paper { \neumeDemoPaper }}
6679 @code{7. Pes Quassus}
6681 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6682 \include "gregorian-init.ly"
6686 \[ \oriscus g \pes \virga b \]
6689 \paper { \neumeDemoPaper }}
6692 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6693 \include "gregorian-init.ly"
6696 % Pes Quassus Auctus Descendens
6697 \[ \oriscus g \pes \auctum \descendens b \]
6700 \paper { \neumeDemoPaper }}
6705 @code{8. Quilisma Pes}
6707 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6708 \include "gregorian-init.ly"
6712 \[ \quilisma g \pes b \]
6715 \paper { \neumeDemoPaper }}
6718 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6719 \include "gregorian-init.ly"
6722 % Quilisma Pes Auctus Descendens
6723 \[ \quilisma g \pes \auctum \descendens b \]
6726 \paper { \neumeDemoPaper }}
6731 @code{9. Podatus Initio Debilis}
6733 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6734 \include "gregorian-init.ly"
6737 % Pes Initio Debilis
6738 \[ \deminutum g \pes b \]
6741 \paper { \neumeDemoPaper }}
6744 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6745 \include "gregorian-init.ly"
6748 % Pes Auctus Descendens Initio Debilis
6749 \[ \deminutum g \pes \auctum \descendens b \]
6752 \paper { \neumeDemoPaper }}
6759 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6760 \include "gregorian-init.ly"
6764 \[ a \pes b \flexa g \]
6767 \paper { \neumeDemoPaper }}
6770 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6771 \include "gregorian-init.ly"
6774 % Torculus Auctus Descendens
6775 \[ a \pes b \flexa \auctum \descendens g \]
6778 \paper { \neumeDemoPaper }}
6781 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6782 \include "gregorian-init.ly"
6785 % Torculus Deminutus
6786 \[ a \pes b \flexa \deminutum g \]
6789 \paper { \neumeDemoPaper }}
6793 @code{11. Torculus Initio Debilis}
6795 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6796 \include "gregorian-init.ly"
6799 % Torculus Initio Debilis
6800 \[ \deminutum a \pes b \flexa g \]
6803 \paper { \neumeDemoPaper }}
6806 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6807 \include "gregorian-init.ly"
6810 % Torculus Auctus Descendens Initio Debilis
6811 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6814 \paper { \neumeDemoPaper }}
6817 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6818 \include "gregorian-init.ly"
6821 % Torculus Deminutus Initio Debilis
6822 \[ \deminutum a \pes b \flexa \deminutum g \]
6825 \paper { \neumeDemoPaper }}
6829 @code{12. Porrectus}
6831 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6832 \include "gregorian-init.ly"
6836 \[ a \flexa g \pes b \]
6839 \paper { \neumeDemoPaper }}
6842 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6843 \include "gregorian-init.ly"
6846 % Porrectus Auctus Descendens
6847 \[ a \flexa g \pes \auctum \descendens b \]
6850 \paper { \neumeDemoPaper }}
6853 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6854 \include "gregorian-init.ly"
6857 % Porrectus Deminutus
6858 \[ a \flexa g \pes \deminutum b \]
6861 \paper { \neumeDemoPaper }}
6867 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6868 \include "gregorian-init.ly"
6872 \[ \virga b \inclinatum a \inclinatum g \]
6875 \paper { \neumeDemoPaper }
6879 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6880 \include "gregorian-init.ly"
6884 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6887 \paper { \neumeDemoPaper }}
6890 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6891 \include "gregorian-init.ly"
6894 % Climacus Deminutus
6895 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6898 \paper { \neumeDemoPaper }}
6902 @code{14. Scandicus}
6904 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6905 \include "gregorian-init.ly"
6909 \[ g \pes a \virga b \]
6912 \paper { \neumeDemoPaper }}
6915 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6916 \include "gregorian-init.ly"
6919 % Scandicus Auctus Descendens
6920 \[ g \pes a \pes \auctum \descendens b \]
6923 \paper { \neumeDemoPaper }}
6926 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6927 \include "gregorian-init.ly"
6930 % Scandicus Deminutus
6931 \[ g \pes a \pes \deminutum b \]
6934 \paper { \neumeDemoPaper }}
6940 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6941 \include "gregorian-init.ly"
6945 \[ g \oriscus a \pes \virga b \]
6948 \paper { \neumeDemoPaper }}
6951 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6952 \include "gregorian-init.ly"
6955 % Salicus Auctus Descendens
6956 \[ g \oriscus a \pes \auctum \descendens b \]
6959 \paper { \neumeDemoPaper }}
6966 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6967 \include "gregorian-init.ly"
6971 \[ \stropha b \stropha b \stropha a \]
6974 \paper { \neumeDemoPaper }
6983 Unlike most other neumes notation systems, the input language for
6984 neumes does not reflect the typographical appearance, but is designed
6985 to focus on musical meaning. For example, @code{\[ a \pes b
6986 \flexa g \]} produces a Torculus consisting of three Punctum heads,
6987 while @code{\[ a \flexa g \pes b \]} produces a Porrectus with a
6988 curved flexa shape and only a single Punctum head. There is no
6989 command to explicitly typeset the curved flexa shape; the decision of
6990 when to typeset a curved flexa shape is based on the musical
6991 input. The idea of this approach is to separate the musical aspects
6992 of the input from the notation style of the output. This way, the
6993 same input can be reused to typeset the same music in a different
6994 style of Gregorian chant notation.
6996 The following table shows the code fragments that produce the
6997 ligatures in the above neumes table. The letter in the first column
6998 in each line of the below table indicates to which ligature in the
6999 above table it refers. The second column gives the name of the
7000 ligature. The third column shows the code fragment that produces this
7001 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
7003 @multitable @columnfractions .1 .4 .5
7017 Punctum Inclinatum @tab
7018 @code{\[ \inclinatum b \]}
7022 Punctum Auctum Ascendens @tab
7023 @code{\[ \auctum \ascendens b \]}
7027 Punctum Auctum Descendens @tab
7028 @code{\[ \auctum \descendens b \]}
7032 Punctum Inclinatum Auctum @tab
7033 @code{\[ \inclinatum \auctum b \]}
7037 Punctum Inclinatum Parvum @tab
7038 @code{\[ \inclinatum \deminutum b \]}
7043 @code{\[ \virga b \]}
7048 @code{\[ \stropha b \]}
7053 @code{\[ \stropha \auctum b \]}
7058 @code{\[ \oriscus b \]}
7062 Clivis vel Flexa @tab
7063 @code{\[ b \flexa g \]}
7067 Clivis Aucta Descendens @tab
7068 @code{\[ b \flexa \auctum \descendens g \]}
7072 Clivis Aucta Ascendens @tab
7073 @code{\[ b \flexa \auctum \ascendens g \]}
7078 @code{\[ b \flexa \deminutum g \]}
7082 Podatus vel Pes @tab
7083 @code{\[ g \pes b \]}
7087 Pes Auctus Descendens @tab
7088 @code{\[ g \pes \auctum \descendens b \]}
7092 Pes Auctus Ascendens @tab
7093 @code{\[ g \pes \auctum \ascendens b \]}
7098 @code{\[ g \pes \deminutum b \]}
7103 @code{\[ \oriscus g \pes \virga b \]}
7107 Pes Quassus Auctus Descendens @tab
7108 @code{\[ \oriscus g \pes \auctum \descendens b \]}
7113 @code{\[ \quilisma g \pes b \]}
7117 Quilisma Pes Auctus Descendens @tab
7118 @code{\[ \quilisma g \pes \auctum \descendens b \]}
7122 Pes Initio Debilis @tab
7123 @code{\[ \deminutum g \pes b \]}
7127 Pes Auctus Descendens Initio Debilis @tab
7128 @code{\[ \deminutum g \pes \auctum \descendens b \]}
7133 @code{\[ a \pes b \flexa g \]}
7137 Torculus Auctus Descendens @tab
7138 @code{\[ a \pes b \flexa \auctum \descendens g \]}
7142 Torculus Deminutus @tab
7143 @code{\[ a \pes b \flexa \deminutum g \]}
7147 Torculus Initio Debilis @tab
7148 @code{\[ \deminutum a \pes b \flexa g \]}
7152 Torculus Auctus Descendens Initio Debilis @tab
7153 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
7157 Torculus Deminutus Initio Debilis @tab
7158 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
7163 @code{\[ a \flexa g \pes b \]}
7167 Porrectus Auctus Descendens @tab
7168 @code{\[ a \flexa g \pes \auctum \descendens b \]}
7172 Porrectus Deminutus @tab
7173 @code{\[ a \flexa g \pes \deminutum b \]}
7178 @code{\[ \virga b \inclinatum a \inclinatum g \]}
7182 Climacus Auctus @tab
7183 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
7187 Climacus Deminutus @tab
7188 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
7193 @code{\[ g \pes a \virga b \]}
7197 Scandicus Auctus Descendens @tab
7198 @code{\[ g \pes a \pes \auctum \descendens b \]}
7202 Scandicus Deminutus @tab
7203 @code{\[ g \pes a \pes \deminutum b \]}
7208 @code{\[ g \oriscus a \pes \virga b \]}
7212 Salicus Auctus Descendens @tab
7213 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
7218 @code{\[ \stropha b \stropha b \stropha a \]}
7224 The following head prefixes are supported
7226 @cindex @code{\virga}
7228 @cindex @code{\stropha}
7230 @cindex @code{\inclinatum}
7232 @cindex @code{\auctum}
7234 @cindex @code{\descendens}
7236 @cindex @code{\ascendens}
7238 @cindex @code{\oriscus}
7240 @cindex @code{\quilisma}
7242 @cindex @code{\deminutum}
7245 Head prefixes can be accumulated, though restrictions apply. For
7246 example, either @code{\descendens} or @code{\ascendens} can be applied
7247 to a head, but not both to the same head.
7250 @cindex @code{\flexa}
7251 Two adjacent heads can be tied together with the @code{\pes} and
7252 @code{\flexa} infix commands for a rising and falling line of melody,
7257 @node Gregorian Chant contexts
7258 @subsection Gregorian Chant contexts
7260 @cindex VaticanaVoiceContext
7261 @cindex VaticanaStaffContext
7263 The predefined @code{VaticanaVoiceContext} and
7264 @code{VaticanaStaffContext} can be used to engrave a piece of
7265 Gregorian Chant in the style of the Editio Vaticana. These contexts
7266 initialize all relevant context properties and grob properties to
7267 proper values, so you can immediately go ahead entering the chant, as
7268 the following excerpt demonstrates
7270 @lilypond[quote,raggedright,verbatim,noindent]
7271 \include "gregorian-init.ly"
7274 \context VaticanaVoice = "cantus" {
7275 \override Score.BarNumber #'transparent = ##t {
7276 \[ c'\melisma c' \flexa a \]
7277 \[ a \flexa \deminutum g\melismaEnd \]
7279 \[ f\melisma \pes a c' c' \pes d'\melismaEnd \]
7280 c' \divisioMinima \break
7281 \[ c'\melisma c' \flexa a \]
7282 \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
7285 \lyricsto "cantus" \new Lyrics {
7286 San- ctus, San- ctus, San- ctus
7293 @node Mensural contexts
7294 @subsection Mensural contexts
7296 @cindex MensuralVoiceContext
7297 @cindex MensuralStaffContext
7299 The predefined @code{MensuralVoiceContext} and
7300 @code{MensuralStaffContext} can be used to engrave a piece in mensural
7301 style. These contexts initialize all relevant context properties and
7302 grob properties to proper values, so you can immediately go ahead
7303 entering the chant, as the following excerpt demonstrates
7305 @lilypond[quote,raggedright,verbatim,noindent]
7308 \context MensuralVoice = "discantus" \transpose c c' {
7309 \override Score.BarNumber #'transparent = ##t {
7310 c'1\melisma bes a g\melismaEnd
7312 \[ f1\melisma a c'\breve d'\melismaEnd \]
7314 c'\breve\melisma a1 g1\melismaEnd
7315 fis\longa^\signumcongruentiae
7318 \lyricsto "discantus" \new Lyrics {
7319 San -- ctus, San -- ctus, San -- ctus
7327 @subsection Figured bass
7329 @cindex Basso continuo
7331 @c TODO: musicological blurb about FB
7334 LilyPond has limited support for figured bass
7336 @lilypond[quote,verbatim,fragment]
7338 \context Voice { \clef bass dis4 c d ais }
7339 \context FiguredBass \figuremode {
7340 < 6 >4 < 7 >8 < 6+ [_!] >
7346 The support for figured bass consists of two parts: there is an input
7347 mode, introduced by @code{\figuremode}, where you can enter bass figures
7348 as numbers, and there is a context called @internalsref{FiguredBass} that
7349 takes care of making @internalsref{BassFigure} objects.
7351 In figures input mode, a group of bass figures is delimited by
7352 @code{<} and @code{>}. The duration is entered after the @code{>}
7356 @lilypond[quote,fragment]
7357 \context FiguredBass
7358 \figuremode { <4 6> }
7361 Accidentals are added when you append @code{-}, @code{!} and @code{+}
7367 @lilypond[quote,fragment]
7368 \context FiguredBass
7369 \figuremode { <4- 6+ 7!> }
7372 Spaces or dashes may be inserted by using @code{_}. Brackets are
7373 introduced with @code{[} and @code{]}
7378 @lilypond[quote,fragment]
7379 \context FiguredBass
7380 \figuremode { < [4 6] 8 [_! 12]> }
7383 Although the support for figured bass may superficially resemble chord
7384 support, it works much simpler. The @code{\figuremode} mode simply
7385 stores the numbers , and @internalsref{FiguredBass} context prints
7386 them as entered. There is no conversion to pitches, and no
7387 realizations of the bass are played in the MIDI file.
7389 Internally, the code produces markup texts. You can use any of the
7390 markup text properties to override formatting. For example, the
7391 vertical spacing of the figures may be set with @code{baseline-skip}.
7395 Program reference: @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
7396 and @internalsref{FiguredBass} context.
7400 Slash notation for alterations is not supported.
7402 @node Contemporary notation
7403 @section Contemporary notation
7405 In the 20th century, composers have greatly expanded the musical
7406 vocabulary. With this expansion, many innovations in musical notation
7407 have been tried. The book ``Music Notation in the 20th century'' by
7408 Kurt Stone gives a comprehensive overview (see @ref{Literature
7409 list}). In general, the use of new, innovative notation makes a piece
7410 harder to understand and perform and its use should therefore be
7411 avoided. For this reason, support for contemporary notation in
7412 LilyPond is limited.
7416 * Polymetric notation::
7418 * Special fermatas::
7422 @node Polymetric notation
7423 @subsection Polymetric notation
7425 Double time signatures are not supported explicitly, but they can be
7426 faked. In the next example, the markup for the time signature is
7427 created with a markup text. This markup text is inserted in the
7428 @internalsref{TimeSignature} grob.
7430 @lilypond[verbatim,raggedright]
7436 \musicglyph #"scripts-stopped"
7437 \bracket \column < "5" "8" >
7442 \override Staff.TimeSignature #'print-function = #Text_item::print
7443 \override Staff.TimeSignature #'text = #tsMarkup
7445 c'2 \bar ":" c'4 c'4.
7449 Each staff can also have its own time signature. This is done by
7450 moving the @internalsref{Timing_engraver} to @internalsref{Staff}
7457 \remove "Timing_engraver"
7461 \consists "Timing_engraver"
7467 Now, each staff has its own time signature.
7481 c4. c8 c c c4. c8 c c
7486 @lilypond[raggedright]
7490 \remove "Timing_engraver"
7494 \consists "Timing_engraver"
7510 c4. c8 c c c4. c8 c c
7516 A different form of polymetric notation is where note lengths have
7517 different values across staves.
7519 This notation can be created by setting a common time signature for
7520 each staff but replacing it manually using
7521 @code{timeSignatureFraction} to the desired fraction. Then the printed
7522 durations in each staff are scaled to the common time signature.
7523 The latter is done with @code{\compressmusic}, which is similar to
7524 @code{\times}, but does not create a tuplet bracket.
7527 In this example, music with the time signatures of 3/4, 9/8 and 10/8 are
7528 used in parallel. In the second staff, shown durations are multiplied by
7529 2/3, so that 2/3 * 9/8 = 3/4, and in the third staff, shown durations are
7530 multiplied by 3/5, so that 3/5 * 10/8 = 3/4.
7532 @lilypond[raggedright,verbatim]
7540 \set Staff.timeSignatureFraction = #'(9 . 8)
7541 \compressmusic #'(2 . 3)
7542 \repeat unfold 6 { c8[ c c] }
7546 \set Staff.timeSignatureFraction = #'(10 . 8)
7547 \compressmusic #'(3 . 5)
7548 { \repeat unfold 2 { c8[ c c] }
7549 \repeat unfold 2 { c8[ c] }
7550 | c4. c4. \times 2/3 { c8 c c } c4 }
7560 When using different time signatures in parallel, the spacing is
7561 aligned vertically, but bar lines distort the regular spacing.
7566 @subsection Clusters
7570 A cluster indicates a continuous range of pitches to be played. They
7571 can be denoted as the envelope of a set of notes. They are entered by
7572 applying the function @code{makeClusters} to a sequence of
7575 @lilypond[quote,verbatim]
7577 \makeClusters { <c e > <b f'> }
7580 The following example (from
7581 @inputfileref{input/regression,cluster.ly}) shows what the result
7584 @lilypondfile[quote]{cluster.ly}
7586 Ordinary notes and clusters can be put together in the same staff,
7587 even simultaneously. In such a case no attempt is made to
7588 automatically avoid collisions between ordinary notes and clusters.
7592 Program reference: @internalsref{ClusterSpanner},
7593 @internalsref{ClusterSpannerBeacon},
7594 @internalsref{Cluster_spanner_engraver}, and
7595 @internalsref{ClusterNoteEvent}.
7597 Examples: @inputfileref{input/regression,cluster.ly}.
7601 Music expressions like @code{<< @{ g8 e8 @} a4 >>} are not printed
7602 accurately. Use @code{<g a>8 <e a>8} instead.
7606 @node Special fermatas
7607 @subsection Special fermatas
7609 @cindex fermatas, special
7611 In contemporary music notation, special fermata symbols denote breaks
7612 of differing lengths. The following fermatas are supported
7614 @lilypond[quote,raggedright]
7636 \context Lyrics \lyricmode {
7637 \override LyricText #'font-family = #'typewriter
7638 "shortfermata" "fermata" "longfermata" "verylongfermata"
7643 See @ref{Articulations} for general instructions how to apply scripts
7644 such as fermatas to notes.
7646 @node Feathered beams
7647 @subsection Feathered beams
7649 Feathered beams are not supported natively, but they can be faked by
7650 forcing two beams to overlap. Here is an example,
7652 @lilypond[raggedright]
7653 \relative \new Staff <<
7657 \once \override Voice.Beam #'positions = #'(0 . 0.5)
7662 \once \override Voice.Beam #'positions = #'(0 . -0.5)
7670 @node Educational use
7671 @section Educational use
7675 * Blank music paper::
7676 * Notation for excercises::
7677 * Easy Notation note heads::
7681 @subsection Balloon help
7683 Elements of notation can be marked and named with the help of a square
7684 balloon. The primary purpose of this feature is to explain notation.
7686 The following example demonstrates its use.
7688 @lilypond[quote,verbatim,fragment,raggedright,relative=2]
7691 #(add-balloon-text 'NoteHead "heads, or tails?"
7697 The function @code{add-balloon-text} takes the name of a grob, the
7698 label to print, and the position where to put the label relative to
7699 the object. In the above example, the text ``heads or tails?'' ends
7700 3 spaces below and 1 space to the right of the marked head.
7703 @cindex notation, explaining
7707 Program reference: @internalsref{text-balloon-interface}.
7709 Examples: @inputfileref{input/regression,balloon.ly}.
7714 @node Blank music paper
7715 @subsection Blank music paper
7717 A blank music paper can be produced also by using invisible notes, and
7718 removing @code{Bar_number_engraver}.
7723 \repeat unfold 2 % Change this for more lines.
7728 \override TimeSignature #'transparent = ##t
7729 defaultBarType = #""
7730 \remove Bar_number_engraver
7732 \context Staff \emptymusic
7733 \context TabStaff \emptymusic
7738 @node Notation for excercises
7739 @subsection Notation for excercises
7743 Invisible (or transparent) notes can be useful, when weird tricks are
7744 needed; especially, a slur cannot be attach to a rest or spacer rest.
7748 blanknotes = { \override NoteHead #'transparent = ##t
7749 \override Stem #'transparent = ##t }
7750 unblanknotes = { \revert NoteHead #'transparent
7751 \revert Stem #'transparent }
7756 \blanknotes e4 f4 \unblanknotes
7762 @node Easy Notation note heads
7763 @subsection Easy Notation note heads
7765 @cindex easy notation
7768 The `easy play' note head includes a note name inside the head. It is
7769 used in music for beginners
7771 @lilypond[quote,raggedright,verbatim,fragment,staffsize=26]
7776 The command @code{\setEasyHeads} overrides settings for the
7777 @internalsref{NoteHead} object. To make the letters readable, it has
7778 to be printed in a large font size. To print with a larger font, see
7779 @ref{Setting global staff size}.
7783 @cindex @code{\setEasyHeads}
7784 @code{\setEasyHeads}