2 @c This file is part of lilypond.tely
4 @c A menu is needed before every deeper *section nesting of @node's; run
5 @c M-x texinfo-all-menus-update
6 @c to automatically fill in these menus before saving changes
9 @chapter Notation manual
11 This chapter describes all the different types of notation supported
12 by LilyPond. It is intended as a reference for users that are already
13 somewhat familiar with LilyPond.
17 * Easier music entry::
31 * Contemporary notation::
36 @c FIXME: Note entry vs Music entry at top level menu is confusing.
42 This section is about basic notation elements notes, rests and
43 related constructs, such as stems, tuplets and ties.
48 * Chromatic alterations::
63 A note is printed by specifying its pitch and then its duration
64 @footnote{Notes constitute the most basic elements of LilyPond input,
65 but they do not form valid input on their own without a @code{\score}
66 block. However, for the sake of brevity and simplicity we will
67 generally omit @code{\score} blocks and @code{\paper} declarations in
70 @lilypond[quote,fragment,verbatim]
79 @cindex Note specification
81 @cindex entering notes
83 The most common syntax for pitch entry is used in standard notes and
84 @code{\chords} mode. In these modes, pitches may be designated by
85 names. The notes are specified by the letters @code{a} through
86 @code{g}, while the octave is formed with notes ranging from @code{c}
87 to @code{b}. The pitch @code{c} is an octave below middle C and the
88 letters span the octave above that C
90 @lilypond[quote,fragment,verbatim]
92 a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
95 @cindex note names, Dutch
97 A sharp is formed by adding @code{-is} to the end of a pitch name and
98 a flat is formed by adding @code{-es}. Double sharps and double flats
99 are obtained by adding @code{-isis} or @code{-eses}. These
100 names are the Dutch note names. In Dutch, @code{aes} is contracted to
101 @code{as}, but both forms are accepted. Similarly, both
102 @code{es} and @code{ees} are accepted.
104 Half-flats and half-sharps are formed by adding @code{-eh} and
105 @code{-ih}; the following is a series of Cs with increasing pitches
107 @cindex quarter tones
108 @cindex semi-flats, semi-sharps
110 @lilypond[fragment,quote,verbatim,relative=3]
122 There are predefined sets of note names for various other languages.
123 To use them, include the language specific init file. For
124 example: @code{\include "english.ly"}. The available language files
125 and the note names they define are
130 Note Names sharp flat
131 nederlands.ly c d e f g a bes b -is -es
132 english.ly c d e f g a bf b -s/-sharp -f/-flat
134 deutsch.ly c d e f g a b h -is -es
135 norsk.ly c d e f g a b h -iss/-is -ess/-es
136 svenska.ly c d e f g a b h -iss -ess
137 italiano.ly do re mi fa sol la sib si -d -b
138 catalan.ly do re mi fa sol la sib si -d/-s -b
139 espanol.ly do re mi fa sol la sib si -s -b
148 The optional octave specification takes the form of a series of
149 single quote (`@code{'}') characters or a series of comma
150 (`@code{,}') characters. Each @code{'} raises the pitch by one
151 octave; each @code{,} lowers the pitch by an octave
153 @lilypond[quote,fragment,verbatim]
154 c' c'' es' g' as' gisis' ais'
160 Notes can be hidden and unhidden with the following commands
162 @cindex @code{\hideNotes}
164 @cindex @code{\unHideNotes}
170 Program reference: @internalsref{NoteEvent}, and @internalsref{NoteHead}.
172 @node Chromatic alterations
173 @subsection Chromatic alterations
175 Normally accidentals are printed automatically, but you may also
176 print them manually. A reminder accidental
177 @cindex reminder accidental
179 can be forced by adding an exclamation mark @code{!}
180 after the pitch. A cautionary accidental
181 @cindex cautionary accidental
182 @cindex parenthesized accidental
183 (i.e. an accidental within parentheses) can be obtained by adding the
184 question mark `@code{?}' after the pitch
186 @lilypond[quote,fragment,verbatim]
187 cis' cis' cis'! cis'?
193 The automatic production of accidentals can be tuned in many
194 ways. For more information, refer to @ref{Accidentals}.
199 There are no generally accepted standards for denoting three quarter
200 flats, so LilyPond's symbol does not conform to any standard.
205 A chord is formed by a enclosing a set of pitches in @code{<} and
206 @code{>}. A chord may be followed by a duration, and a set of
207 articulations, just like simple notes.
209 @lilypond[fragment,quote,relative=1]
220 Rests are entered like notes, with the note name @code{r}
222 @lilypond[fragment,quote,raggedright,verbatim]
226 Whole bar rests, centered in middle of the bar,
227 must be done with multi-measure rests. They are discussed in
228 @ref{Multi measure rests}.
231 A rest's vertical position may be explicitly specified by entering a
232 note with the @code{\rest} keyword appended. This makes manual
233 formatting in polyphonic music easier. Rest collision testing will
234 leave these rests alone
238 @lilypond[fragment,quote,raggedright,verbatim]
244 Program reference: @internalsref{RestEvent}, and @internalsref{Rest}.
251 @cindex Invisible rest
254 An invisible rest (also called a `skip') can be entered like a note
255 with note name `@code{s}' or with @code{\skip @var{duration}}
257 @lilypond[fragment,quote,raggedright,verbatim]
261 The @code{s} syntax is only available in note mode and chord mode. In
262 other situations, you should use the @code{\skip} command
264 @lilypond[quote,raggedright,verbatim]
266 { \time 4/8 \skip 2 \time 4/4 }
267 \relative c'' { a2 a1 }
271 The skip command is merely an empty musical placeholder. It does not
272 produce any output, not even transparent output.
274 The @code{s} skip command does create @internalsref{Staff} and
275 @internalsref{Voice} when necessary, similar to note and rest
276 commands. For example, the following results in an empty staff.
278 @lilypond[quote,raggedright,verbatim]
282 The same fragment using @code{\skip} results in an empty page.
286 Program reference: @internalsref{SkipEvent}, @internalsref{SkipMusic}.
291 @subsection Durations
295 @cindex @code{\longa}
296 @cindex @code{\breve}
297 @cindex @code{\maxima}
300 In Note, Chord, and Lyrics mode, durations are designated by numbers
301 and dots: durations are entered as their reciprocal values. For example,
302 a quarter note is entered using a @code{4} (since it is a 1/4 note), while
303 a half note is entered using a @code{2} (since it is a 1/2 note). For notes
304 longer than a whole you must use variables
308 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
310 r1 r2 r4 r8 r16 r32 r64 r64
316 a\breve*1/2 \autoBeamOff
317 a1 a2 a4 a8 a16 a32 a64 a64
318 r\longa*1/4 r\breve *1/2
319 r1 r2 r4 r8 r16 r32 r64 r64
325 \remove "Clef_engraver"
326 \override StaffSymbol #'transparent = ##t
327 \override TimeSignature #'transparent = ##t
328 \override BarLine #'transparent = ##t
329 \consists "Pitch_squash_engraver"
336 If the duration is omitted then it is set to the previously entered
337 duration. The default for the first note is a quarter note. The duration
338 can be followed by dots (`@code{.}') in order to obtain dotted note
342 @lilypond[quote,fragment,verbatim]
343 a' b' c''8 b' a'4 a'4. b'4.. c'8.
348 You can alter the length of duration by a fraction @var{N/M}
349 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
350 will not affect the appearance of the notes or rests produced.
352 In the following example, the first three notes take up exactly two
353 beats, but no triplet bracket is printed.
354 @lilypond[quote,fragment,relative=3,verbatim]
356 a4*2/3 gis4*2/3 a4*2/3
362 Dots are normally moved up to avoid staff lines, except in polyphonic
363 situations. The following commands may be used to force a particular
366 @cindex @code{\dotsUp}
368 @cindex @code{\dotsDown}
370 @cindex @code{\dotsBoth}
375 This manual: @ref{Tuplets}
377 Program reference: @internalsref{Dots}, and @internalsref{DotColumn}.
382 Whenever a note is found, a @internalsref{Stem} object is created
383 automatically. For whole notes and rests, they are also created but
388 @cindex @code{\stemUp}
390 @cindex @code{\stemDown}
392 @cindex @code{\stemBoth}
403 A tie connects two adjacent note heads of the same pitch. The tie in
404 effect extends the length of a note. Ties should not be confused with
405 slurs, which indicate articulation, or phrasing slurs, which indicate
406 musical phrasing. A tie is entered using the tilde symbol `@code{~}'
408 @lilypond[quote,fragment,verbatim]
409 e' ~ e' <c' e' g'> ~ <c' e' g'>
412 When a tie is applied to a chord, all note heads whose pitches match
413 are connected. When no note heads match, no ties will be created.
415 In its meaning a tie is just a way of extending a note duration, similar
416 to the augmentation dot; in the following example there are two ways of
417 notating exactly the same concept
419 @lilypond[quote,fragment,raggedright]
420 \time 3/4 c'2. c'2 ~ c'4
422 If you need to tie a lot of notes over bars, it may be easier to use automatic
423 note splitting (see @ref{Automatic note splitting}).
428 @cindex @code{\tieUp}
430 @cindex @code{\tieDown}
432 @cindex @code{\tieBoth}
434 @cindex @code{\tieDotted}
436 @cindex @code{\tieSolid}
441 In this manual: @ref{Automatic note splitting}.
443 Program reference: @internalsref{TieEvent}, @internalsref{Tie}.
445 For tying only a subset of the note heads of a pair of chords, see
446 @inputfileref{input/regression,tie-chord-partial.ly}.
451 Switching staves when a tie is active will not produce a slanted tie.
453 Formatting of ties is a difficult subject. The results are often not
463 @cindex @code{\times}
465 Tuplets are made out of a music expression by multiplying all durations
468 @cindex @code{\times}
470 \times @var{fraction} @var{musicexpr}
474 The duration of @var{musicexpr} will be multiplied by the fraction.
475 The fraction's denominator will be printed over the notes, optionally
476 with a bracket. The most common tuplet is the triplet in which 3
477 notes have the length of 2, so the notes are 2/3 of their written
480 @lilypond[quote,fragment,verbatim]
481 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
484 The property @code{tupletSpannerDuration} specifies how long each
485 bracket should last. With this, you can make lots of tuplets while
486 typing @code{\times} only once, saving lots of typing. In the next
487 example, there are two triplets shown, while @code{\times} was only
490 @lilypond[quote,fragment,relative=1,raggedright,verbatim]
491 \set tupletSpannerDuration = #(ly:make-moment 1 4)
492 \times 2/3 { c'8 c c c c c }
495 The format of the number is determined by the property
496 @code{tupletNumberFormatFunction}. The default prints only the
497 denominator, but if it is set to the Scheme function
498 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
502 @cindex @code{tupletNumberFormatFunction}
503 @cindex tuplet formatting
508 @cindex @code{\tupletUp}
510 @cindex @code{\tupletDown}
512 @cindex @code{\tupletBoth}
517 User manual: @ref{Changing context properties on the fly} for the
521 Program reference: @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
523 Examples: @inputfileref{input/regression,tuplet-nest.ly}.
527 Nested tuplets are not formatted automatically. In this case, outer
528 tuplet brackets should be moved manually, which is demonstrated in
529 @inputfileref{input/regression,tuplet-nest.ly}.
533 @node Easier music entry
534 @section Easier music entry
537 This section deals with tricks and features of the input language that
538 were added solely to help entering music, finding and correcting
539 mistakes. There are also external tools that make debugging easier.
540 See @ref{Point and click} for more information.
542 It is also possible to enter and edit music using other programs. For
543 example, GUI interfaces, or MIDI sequencers. Refer to the LilyPond
544 website for more information.
551 * Skipping corrected music::
552 * Automatic note splitting::
558 @node Relative octaves
559 @subsection Relative octaves
561 @cindex relative octave specification
563 Octaves are specified by adding @code{'} and @code{,} to pitch names.
564 When you copy existing music, it is easy to accidentally put a pitch
565 in the wrong octave and hard to find such an error. The relative
566 octave mode prevents these errors: a single error puts the rest of the
567 piece off by one octave
569 @cindex @code{\relative}
571 \relative @var{startpitch} @var{musicexpr}
574 The octave of notes that appear in @var{musicexpr} are calculated as
575 follows: If no octave changing marks are used, the basic interval
576 between this and the last note is always taken to be a fourth or
577 less. This distance is determined without regarding alterations; a
578 @code{fisis} following a @code{ceses} will be put above the
581 The octave changing marks @code{'} and @code{,} can be added to raise
582 or lower the pitch by an extra octave. Upon entering relative mode,
583 an absolute starting pitch must be specified that will act as the
584 predecessor of the first note of @var{musicexpr}.
586 Here is the relative mode shown in action
587 @lilypond[quote,fragment,raggedright,verbatim]
593 Octave changing marks are used for intervals greater than a fourth
594 @lilypond[quote,fragment,verbatim]
600 If the preceding item is a chord, the first note of the chord is used
601 to determine the first note of the next chord
603 @lilypond[quote,fragment,verbatim]
611 The pitch after the @code{\relative} contains a note name.
614 The relative conversion will not affect @code{\transpose},
615 @code{\chords} or @code{\relative} sections in its argument. If you
616 want to use relative within transposed music, you must place an
617 additional @code{\relative} inside the @code{\transpose}.
620 @subsection Octave check
623 Octave checks make octave errors easier to correct: a note may be
624 followed by @code{=}@var{quotes} which indicates what its absolute
625 octave should be. In the following example,
627 \relative c'' @{ c='' b=' d,='' @}
631 @c take care with @code, adds confusing quotes.
632 the d will generate a warning, because a d'' is expected, but a d' is
633 found. In the output, the octave is corrected for this and the
638 There is also a syntax that is separate from the notes. The syntax
644 This checks that @var{pitch} (without quotes) yields @var{pitch} (with
645 quotes) in \relative mode. If not, a warning is printed, and the
646 octave is corrected, for example, the first check is passed
647 successfully. The second check fails with an error message. The
648 octave is adjusted so the following notes are in the correct octave
659 The octave of a note following an octave check is determined with
660 respect to the note preceding it. In the next fragment, the last note
661 is a @code{a'}, above middle C. Hence, the @code{\octave} check may
662 be deleted without changing the meaning of the piece.
664 @lilypond[quote,verbatim,fragment]
673 @subsection Bar check
677 @cindex @code{barCheckSynchronize}
680 Bar checks help detect errors in the durations. A bar check is
681 entered using the bar symbol, `@code{|}'. Whenever it is encountered
682 during interpretation, it should fall on a measure boundary. If it
683 does not, a warning is printed. In the next example, the second bar
684 check will signal an error
686 \time 3/4 c2 e4 | g2 |
689 Bar checks can also be used in lyrics, for example
694 Twin -- kle | Twin -- kle
699 @cindex @code{skipTypesetting}
701 Failed bar checks are caused by entering incorrect
702 durations. Incorrect durations often completely garble up the score,
703 especially if it is polyphonic, so you should start correcting the
704 score by scanning for failed bar checks and incorrect durations. To
705 speed up this process, you can use @code{skipTypesetting}, described
708 It is also possible to redefine the meaning of @code{|}. This is done
709 by assigning a music expression to @code{pipeSymbol},
712 pipeSymbol = \bar "||"
714 { c'2 c'2 | c'2 c'2 | }
718 @node Skipping corrected music
719 @subsection Skipping corrected music
721 The property @code{Score.skipTypesetting} can be used to switch on and
722 off typesetting completely during the interpretation phase. When
723 typesetting is switched off, the music is processed much more quickly.
724 This can be used to skip over the parts of a score that have already
725 been checked for errors
727 @lilypond[quote,fragment,raggedright,verbatim]
730 \set Score.skipTypesetting = ##t
732 \set Score.skipTypesetting = ##f
736 @node Automatic note splitting
737 @subsection Automatic note splitting
739 Long notes can be converted automatically to tied notes. This is done
740 by replacing the @internalsref{Note_heads_engraver} by the
741 @internalsref{Completion_heads_engraver}.
742 In the following examples, notes crossing the bar line are split and tied.
745 @lilypond[quote,fragment,verbatim,relative=1,raggedright]
747 \remove "Note_heads_engraver"
748 \consists "Completion_heads_engraver"
750 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
754 This engraver splits all running notes at the bar line, and inserts
755 ties. One of its uses is to debug complex scores: if the measures are
756 not entirely filled, then the ties exactly show how much each measure
761 Not all durations (especially those containing tuplets) can be
762 represented exactly; the engraver will not insert tuplets.
766 Examples: @inputfileref{input/regression,completion-heads.ly}.
768 Program reference: @internalsref{Completion_heads_engraver}.
772 @section Staff notation
774 This section describes music notation that occurs on staff level,
775 such as keys, clefs and time signatures.
777 @cindex Staff notation
791 @subsection Staff symbol
793 @cindex adjusting staff symbol
795 Notes, dynamic signs, etc. are grouped
796 with a set of horizontal lines, into a staff (plural `staves'). In our
797 system, these lines are drawn using a separate layout object called
801 @cindex staff lines, setting number of
802 @cindex staff lines, setting thickness of
803 @cindex thickness of staff lines, setting
804 @cindex number of staff lines, setting
808 Program reference: @internalsref{StaffSymbol}.
810 Examples: @inputfileref{input/test,staff-lines.ly},
811 @inputfileref{input/test,staff-size.ly}.
815 If a staff is ended halfway a piece, the staff symbol may not end
816 exactly on the bar line.
820 @subsection Key signature
821 @cindex Key signature
825 The key signature indicates the scale in which a piece is played. It
826 is denoted by a set of alterations (flats or sharps) at the start of
830 Setting or changing the key signature is done with the @code{\key}
833 @code{\key} @var{pitch} @var{type}
836 @cindex @code{\minor}
837 @cindex @code{\major}
838 @cindex @code{\minor}
839 @cindex @code{\ionian}
840 @cindex @code{\locrian}
841 @cindex @code{\aeolian}
842 @cindex @code{\mixolydian}
843 @cindex @code{\lydian}
844 @cindex @code{\phrygian}
845 @cindex @code{\dorian}
847 Here, @var{type} should be @code{\major} or @code{\minor} to get
848 @var{pitch}-major or @var{pitch}-minor, respectively.
849 The standard mode names @code{\ionian},
850 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
851 @code{\phrygian}, and @code{\dorian} are also defined.
853 This command sets the context property
854 @internalsref{Staff}.@code{keySignature}. Non-standard key signatures
855 can be specified by setting this property directly.
857 Accidentals and key signatures often confuse new users, because
858 unaltered notes get natural signs depending on the key signature. For
859 more information, see @ref{More about pitches}.
863 The ordering of a key cancellation is wrong when it is combined with
864 repeat bar lines. The cancellation is also printed after a line break.
868 Program reference: @internalsref{KeyChangeEvent}, and @internalsref{KeySignature}.
870 @cindex @code{keySignature}
877 The clef indicates which lines of the staff correspond to which
881 The clef can be set or changed with the @code{\clef} command
882 @lilypond[quote,fragment,verbatim]
883 \key f\major c''2 \clef alto g'2
886 Supported clef-names include
887 @c Moved standard clefs to the top /MB
891 @item treble, violin, G, G2
904 G clef on 1st line, so-called French violin clef
909 @cindex mezzosoprano clef
912 @cindex baritone clef
915 @cindex varbaritone clef
926 By adding @code{_8} or @code{^8} to the clef name, the clef is
927 transposed one octave down or up, respectively, and @code{_15} and
928 @code{^15} transposes by two octaves. The argument @var{clefname}
929 must be enclosed in quotes when it contains underscores or digits. For
933 @cindex choral tenor clef
934 @lilypond[quote,verbatim,fragment,relative=1]
938 This command is equivalent to setting @code{clefGlyph},
939 @code{clefPosition} (which controls the Y position of the clef),
940 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
941 when any of these properties are changed.
945 Program reference: the object for this symbol is @internalsref{Clef}.
949 @node Ottava brackets
950 @subsection Ottava brackets
952 ``Ottava'' brackets introduce an extra transposition of an octave for
953 the staff. They are created by invoking the function
954 @code{set-octavation}
960 @lilypond[quote,verbatim,fragment]
970 The @code{set-octavation} function also takes -1 (for 8va bassa) and 2
971 (for 15ma) as arguments. Internally the function sets the properties
972 @code{ottavation} (e.g. to @code{"8va"}) and
973 @code{centralCPosition}. For overriding the text of the bracket, set
974 @code{ottavation} after invoking @code{set-octavation}, i.e.,
978 \set Staff.ottavation = #"8"
983 Program reference: @internalsref{OttavaBracket}.
985 Examples: @inputfileref{input/regression,ottava.ly},
986 @inputfileref{input/regression,ottava-broken.ly}.
990 @code{set-octavation} will get confused when clef changes happen
991 during an octavation bracket.
994 @subsection Time signature
995 @cindex Time signature
999 Time signature indicates the metrum of a piece: a regular pattern of
1000 strong and weak beats. It is denoted by a fraction at the start of the
1004 The time signature is set or changed by the @code{\time}
1006 @lilypond[quote,fragment,verbatim]
1007 \time 2/4 c'2 \time 3/4 c'2.
1010 The symbol that is printed can be customized with the @code{style}
1011 property. Setting it to @code{#'()} uses fraction style for 4/4 and
1012 2/2 time. There are many more options for its layout. See
1013 @inputfileref{input/test,time.ly} for more examples.
1016 This command sets the property @code{timeSignatureFraction},
1017 @code{beatLength} and @code{measureLength} in the @code{Timing}
1018 context, which is normally aliased to @internalsref{Score}. The
1019 property @code{measureLength} determines where bar lines should be
1020 inserted, and how automatic beams should be generated. Changing the
1021 value of @code{timeSignatureFraction} also causes the symbol to be
1024 More options are available through the Scheme function
1025 @code{set-time-signature}. In combination with the
1026 @internalsref{Measure_grouping_engraver}, it will create
1027 @internalsref{MeasureGrouping} signs. Such signs ease reading
1028 rhythmically complex modern music. In the following example, the 9/8
1029 measure is subdivided in 2, 2, 2 and 3. This is passed to
1030 @code{set-time-signature} as the third argument @code{(2 2 2 3)}
1032 @lilypond[quote,raggedright,verbatim]
1035 #(set-time-signature 9 8 '(2 2 2 3))
1036 g8[ g] d[ d] g[ g] a8[( bes g]) |
1037 #(set-time-signature 5 8 '(3 2))
1043 \consists "Measure_grouping_engraver"
1051 Program reference: @internalsref{TimeSignature}, and @internalsref{Timing_engraver}.
1056 Automatic beaming does not use the measure grouping specified with
1057 @code{set-time-signature}.
1059 @node Partial measures
1060 @subsection Partial measures
1063 @cindex partial measure
1064 @cindex measure, partial
1065 @cindex shorten measures
1066 @cindex @code{\partial}
1068 Partial measures, for example in upsteps, are entered using the
1069 @code{\partial} command
1070 @lilypond[quote,fragment,verbatim,relative=2]
1071 \partial 16*5 c16 cis d dis e | a2. c,4 | b2
1074 The syntax for this command is
1076 \partial @var{duration}
1078 This is internally translated into
1080 \set Timing.measurePosition = -@var{length of duration}
1083 The property @code{measurePosition} contains a rational number
1084 indicating how much of the measure has passed at this point.
1086 @node Unmetered music
1087 @subsection Unmetered music
1091 Bar lines and bar numbers are calculated automatically. For unmetered
1092 music (e.g. cadenzas), this is not desirable. By setting
1093 @code{Score.timing} to false, this automatic timing can be switched
1094 off. Empty bar lines,
1101 indicate where line breaks can occur.
1106 @cindex @code{\cadenzaOn}
1108 @cindex @code{\cadenzaOff}
1112 @subsection Bar lines
1116 @cindex measure lines
1120 Bar lines delimit measures, but are also used to indicate repeats.
1121 Normally, they are inserted automatically. Line breaks may only
1122 happen on bar lines.
1124 Special types of bar lines can be forced with the @code{\bar} command
1126 @lilypond[quote,relative=2,fragment,verbatim]
1130 The following bar types are available
1131 @lilypond[quote,fragment,relative=1,raggedright,verbatim]
1144 For allowing line breaks, there is a special command,
1148 This will insert an invisible bar line, and allow line breaks at this
1151 In scores with many staves, a @code{\bar} command in one staff is
1152 automatically applied to all staves. The resulting bar lines are
1153 connected between different staves of a @internalsref{StaffGroup}
1155 @lilypond[quote,fragment,verbatim]
1157 \context StaffGroup <<
1163 \new Staff { \clef bass c4 g e g }
1165 \new Staff { \clef bass c2 c2 }
1169 A bar line is created whenever the @code{whichBar} property is set.
1170 At the start of a measure it is set to the contents of
1171 @code{defaultBarType}. The contents of @code{repeatCommands} are used
1172 to override default measure bars.
1174 The command @code{\bar }@var{bartype} is a short cut for doing
1175 @code{\set Timing.whichBar = }@var{bartype}. Whenever @code{whichBar}
1176 is set to a string, a bar line of that type is created.
1178 @cindex @code{whichBar}
1179 @cindex @code{repeatCommands}
1180 @cindex @code{defaultBarType}
1182 You are encouraged to use @code{\repeat} for repetitions. See
1189 In this manual: @ref{Repeats}.
1192 Program reference: the bar line objects that are created at
1193 @internalsref{Staff} level are called @internalsref{BarLine}, the bar
1194 lines that span staves are @internalsref{SpanBar} objects.
1196 @cindex bar lines at start of system
1197 @cindex start of system
1199 The bar lines at the start of each system are
1200 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
1201 @internalsref{SystemStartBracket}. Only one of these types is created
1202 in every context, and that type is determined by the property
1203 @code{systemStartDelimiter}.
1205 Examples: @inputfileref{input/test,bar-lines.ly},
1211 The easiest way to enter fragments with more than one voice on a staff
1212 is to split chords using the separator @code{\\}. You can use it for
1213 small, short-lived voices or for single chords
1217 @lilypond[quote,verbatim,fragment]
1218 \context Staff \relative c'' {
1219 c4 << { f d e } \\ { b c2 } >>
1220 c4 << g' \\ b, \\ f' \\ d >>
1224 The separator causes @internalsref{Voice} contexts@footnote{Polyphonic
1225 voices are sometimes called "layers" other notation packages}
1227 to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
1228 each of these contexts, vertical direction of slurs, stems, etc. is set
1231 @cindex @code{\voiceOne}
1232 @cindex @code{\voiceFour}
1234 This can also be done by instantiating @internalsref{Voice} contexts
1235 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1236 a stem directions and horizontal shift for each part
1239 @lilypond[quote,raggedright,verbatim]
1242 \new Voice { \voiceOne cis2 b }
1243 \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
1244 \new Voice { \voiceTwo fis4~ fis4 f ~ f } >>
1248 The command @code{\oneVoice} will revert back to the normal setting.
1249 @cindex @code{\oneVoice}
1252 Normally, note heads with a different number of dots are not merged, but
1253 when the object property @code{merge-differently-dotted} is set in
1254 the @internalsref{NoteCollision} object, they are merged
1255 @lilypond[quote,verbatim,fragment,raggedright,relative=2]
1258 \override Staff.NoteCollision
1259 #'merge-differently-dotted = ##t
1261 } \\ { g8.[ f16] g8.[ f16] } >>
1264 Similarly, you can merge half note heads with eighth notes, by setting
1265 @code{merge-differently-headed}
1266 @lilypond[quote,fragment,relative=2,verbatim]
1269 \override Staff.NoteCollision
1270 #'merge-differently-headed = ##t
1271 c8 c4. } \\ { c2 c2 } >>
1274 LilyPond also vertically shifts rests that are opposite of a stem,
1277 @lilypond[quote,raggedright,fragment,verbatim]
1278 \context Voice << c''4 \\ r4 >>
1286 @cindex @code{\oneVoice}
1288 @cindex @code{\voiceOne}
1290 @cindex @code{\voiceTwo}
1292 @cindex @code{\voiceThree}
1294 @cindex @code{\voiceFour}
1298 The following commands specify in what chords of the current voice
1299 should be shifted: the outer voice has @code{\shiftOff}, and the inner
1300 voices have @code{\shiftOn}, @code{\shiftOnn}, etc.
1303 @cindex @code{\shiftOn}
1305 @cindex @code{\shiftOnn}
1307 @cindex @code{\shiftOnnn}
1309 @cindex @code{\shiftOff}
1316 Program reference: the objects responsible for resolving collisions are
1317 @internalsref{NoteCollision} and @internalsref{RestCollision}.
1319 Examples: See also example files
1320 @inputfileref{input/regression,collision-dots.ly},
1321 @inputfileref{input/regression,collision-head-chords.ly},
1322 @inputfileref{input/regression,collision-heads.ly},
1323 @inputfileref{input/regression,collision-mesh.ly}, and
1324 @inputfileref{input/regression,collisions.ly}.
1329 Resolving collisions is a intricate subject, and only a few situations
1330 are handled. When LilyPond cannot cope, the @code{force-hshift}
1331 property of the @internalsref{NoteColumn} object and pitched rests can
1332 be used to override typesetting decisions.
1334 When using @code{merge-differently-headed} with an upstem eighth or a
1335 shorter note, and a downstem half note, the eighth note gets the wrong
1338 There is no support for clusters where the same note occurs with
1339 different accidentals in the same chord. In this case, it is
1340 recommended to use enharmonic transcription, or to use special cluster
1341 notation (see @ref{Clusters}).
1346 Beams are used to group short notes into chunks that are aligned with
1347 the metrum. They are inserted automatically
1349 @lilypond[quote,fragment,verbatim,relative=2]
1350 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1353 When these automatic decisions are not good enough, beaming can be
1354 entered explicitly. It is also possible to define beaming patterns
1355 that differ from the defaults.
1357 Individual notes may be marked with @code{\noBeam}, to prevent them
1360 @lilypond[quote,fragment,verbatim,relative=2]
1361 \time 2/4 c8 c\noBeam c c
1367 Program reference: @internalsref{Beam}.
1370 @cindex Automatic beams
1373 * Setting automatic beam behavior::
1377 @subsection Manual beams
1378 @cindex beams, manual
1382 In some cases it may be necessary to override the automatic beaming
1383 algorithm. For example, the autobeamer will not put beams over rests
1384 or bar lines. Such beams are specified by manually: the begin and end
1385 point are marked with @code{[} and @code{]}
1387 @lilypond[quote,fragment,relative=1,verbatim]
1389 r4 r8[ g' a r8] r8 g[ | a] r8
1393 @cindex @code{stemLeftBeamCount}
1395 Normally, beaming patterns within a beam are determined automatically.
1396 If necessary, the properties @code{stemLeftBeamCount} and
1397 @code{stemRightBeamCount} can be used to override the defaults. If
1398 either property is set, its value will be used only once, and then it
1401 @lilypond[quote,fragment,relative=1,verbatim]
1404 f8[ r16 \set stemLeftBeamCount = #1 f g a]
1407 @cindex @code{stemRightBeamCount}
1410 The property @code{subdivideBeams} can be set in order to subdivide
1411 all 16th or shorter beams at beat positions, as defined by the
1412 @code{beatLength} property.
1415 @lilypond[fragment,quote,relative=2,verbatim,noindent]
1417 \set subdivideBeams = ##t
1419 \set Score.beatLength = #(ly:make-moment 1 8)
1422 @cindex @code{subdivideBeams}
1424 Kneed beams are inserted automatically, when a large gap is detected
1425 between the note heads. This behavior can be tuned through the object
1426 property @code{auto-knee-gap}.
1428 Normally, line breaks are forbidden when beams cross bar lines. This
1429 behavior can be changed by setting @code{allowBeamBreak}.
1431 @cindex @code{allowBeamBreak}
1432 @cindex beams and line breaks
1434 @cindex beams, kneed
1436 @cindex auto-knee-gap
1441 User manual: @ref{Changing context properties on the fly} for the
1447 @cindex Frenched staves
1449 Automatically kneed cross-staff beams cannot be used together with
1452 Beams do not avoid collisions with symbols around the notes, such as
1453 texts and accidentals.
1457 @node Setting automatic beam behavior
1458 @subsection Setting automatic beam behavior
1460 @cindex @code{autoBeamSettings}
1461 @cindex @code{(end * * * *)}
1462 @cindex @code{(begin * * * *)}
1463 @cindex automatic beams, tuning
1464 @cindex tuning automatic beaming
1466 @c [TODO: use \applycontext]
1468 In normal time signatures, automatic beams can start on any note but can
1469 only end in a few positions within the measure: beams can end on a beat,
1470 or at durations specified by the properties in
1471 @code{autoBeamSettings}. The defaults for @code{autoBeamSettings}
1472 are defined in @file{scm/auto-beam.scm}.
1474 The value of @code{autoBeamSettings} is changed with two functions,
1476 #(override-auto-beam-setting
1477 '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b}
1479 #(revert-auto-beam-setting '(@var{be} @var{p} @var{q} @var{n} @var{m}))
1481 Here, @var{be} is the symbol @code{begin} or @code{end}, and
1482 @var{context} is an optional context (default: @code{'Voice}). It
1483 determines whether the rule applies to begin or end-points. The
1484 quantity @var{p}/@var{q} refers to the length of the beamed notes (and
1485 `@code{* *}' designates notes of any length), @var{n}/@var{M} refers
1486 to a time signature (wildcards `@code{* *}' may be entered to
1487 designate all time signatures), @var{a}/@var{b} is a duration. By
1488 default, this command changes settings for the current voice. It is
1489 also possible to adjust settings at higher contexts, by adding a
1490 @var{context} argument.
1492 For example, if automatic beams should end on every quarter note, use
1495 #(override-auto-beam-setting '(end * * * *) 1 4 'Staff)
1497 Since the duration of a quarter note is 1/4 of a whole note, it is
1498 entered as @code{(ly:make-moment 1 4)}.
1500 The same syntax can be used to specify beam starting points. In this
1501 example, automatic beams can only end on a dotted quarter note
1503 #(override-auto-beam-setting '(end * * * *) 3 8)
1505 In 4/4 time signature, this means that automatic beams could end only on
1506 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1507 3/8, has passed within the measure).
1509 Rules can also be restricted to specific time signatures. A rule that
1510 should only be applied in @var{N}/@var{M} time signature is formed by
1511 replacing the second asterisks by @var{N} and @var{M}. For example, a
1512 rule for 6/8 time exclusively looks like
1514 #(override-auto-beam-setting '(begin * * 6 8) @dots{})
1517 If a rule should be to applied only to certain types of beams, use the
1518 first pair of asterisks. Beams are classified according to the
1519 shortest note they contain. For a beam ending rule that only applies
1520 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1523 @cindex automatic beam generation
1525 @cindex @code{autoBeaming}
1528 If beams are used to indicate melismata in songs, then automatic
1529 beaming should be switched off. This is done by setting
1530 @code{autoBeaming} to @code{#f}.
1534 @cindex @code{\autoBeamOff}
1535 @code{\autoBeamOff},
1536 @cindex @code{\autoBeamOn}
1542 If a score ends while an automatic beam has not been ended and is
1543 still accepting notes, this last beam will not be typeset at all. The
1544 same holds polyphonic voices, entered with @code{<< @dots{} \\ @dots{}
1545 >>}. If a polyphonic voice ends while an automatic beam is still
1546 accepting notes, it is not typeset.
1548 The rules for ending a beam depend on the shortest note in a beam.
1549 So, while it is possible to have different ending rules for eight
1550 beams and sixteenth beams, a beam that contains both eight and
1551 sixteenth notes will use the rules for the sixteenth beam.
1553 In the example below, the autobeamer makes eight beams and sixteenth
1554 end at 3 eights; the third beam can only be corrected by specifying
1557 @lilypond[quote,raggedright,fragment,relative=1]
1558 #(override-auto-beam-setting '(end * * * *) 3 8)
1559 % rather show case where it goes wrong
1560 %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
1561 \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
1563 It is not possible to specify beaming parameters that act differently in
1564 different parts of a measure. This means that it is not possible to use
1565 automatic beaming in irregular meters such as @code{5/8}.
1568 @section Accidentals
1571 This section describes how to change the way that accidentals are
1572 inserted automatically before the running notes.
1574 Common rules for typesetting accidentals have been canned in a
1575 function. This function is called as follows
1577 @cindex @code{set-accidental-style}
1579 #(set-accidental-style 'modern 'Voice)
1582 The function takes two arguments: a symbol that denotes the style (in
1583 the example, @code{modern}), and another symbol that denotes the
1584 context name (in this example, @code{Voice}). If no context name is
1585 supplied, @code{Staff} is the default.
1587 The following styles are supported
1590 This is the default typesetting behavior. It should correspond
1591 to 18th century common practice: Accidentals are
1592 remembered to the end of the measure in which they occur and
1593 only on their own octave.
1597 The normal behavior is to remember the accidentals on
1598 Staff-level. This variable, however, typesets accidentals
1599 individually for each voice. Apart from that, the rule is similar to
1602 This leads to some weird and often unwanted results
1603 because accidentals from one voice do not get canceled in other
1605 @lilypond[quote,raggedright,relative=1,fragment,verbatim]
1607 #(set-accidental-style 'voice)
1613 Hence you should only use @code{voice} if the voices
1614 are to be read solely by individual musicians. If the staff is to be
1615 used by one musician (e.g. a conductor) then you use
1616 @code{modern} or @code{modern-cautionary}
1620 @cindex @code{modern} style accidentals
1621 This rule corresponds to the common practice in the 20th
1623 This rule prints the same accidentals as @code{default}, but temporary
1624 accidentals also are canceled in other octaves. Furthermore,
1625 in the same octave, they also get canceled in the following
1628 @lilypond[quote,raggedright,fragment,verbatim]
1629 #(set-accidental-style 'modern)
1630 cis' c'' cis'2 | c'' c'
1633 @item @code{modern-cautionary}
1634 @cindex @code{modern-cautionary}
1635 This rule is similar to @code{modern}, but the
1636 ``extra'' accidentals (the ones not typeset by
1637 @code{default}) are typeset as cautionary accidentals.
1638 They are printed in reduced size or with parentheses
1639 @lilypond[quote,raggedright,fragment,verbatim]
1640 #(set-accidental-style 'modern-cautionary)
1641 cis' c'' cis'2 | c'' c'
1644 @cindex @code{modern-voice}
1646 This rule is used for multivoice accidentals to be read both by musicians
1647 playing one voice and musicians playing all voices. Accidentals are
1648 typeset for each voice, but they @emph{are} canceled across voices in
1649 the same @internalsref{Staff}.
1651 @cindex @code{modern-voice-cautionary}
1652 @item modern-voice-cautionary
1653 This rule is the same as @code{modern-voice}, but with the extra
1654 accidentals (the ones not typeset by @code{voice}) typeset
1655 as cautionaries. Even though all accidentals typeset by
1656 @code{default} @emph{are} typeset by this variable then
1657 some of them are typeset as cautionaries.
1660 @cindex @code{piano} accidentals
1661 This rule reflects 20th century practice for piano notation. Very similar to
1662 @code{modern} but accidentals also get canceled
1663 across the staves in the same @internalsref{GrandStaff} or
1664 @internalsref{PianoStaff}.
1666 @item piano-cautionary
1667 @cindex @code{#(set-accidental-style 'piano-cautionary)}
1668 As @code{#(set-accidental-style 'piano)' , str)} but with the extra accidentals
1669 typeset as cautionaries.
1672 @cindex @code{no-reset} accidental style
1674 This is the same as @code{default} but with accidentals lasting
1675 ``forever'' and not only until the next measure
1676 @lilypond[quote,raggedright,fragment,verbatim,relative=1]
1677 #(set-accidental-style 'no-reset)
1682 This is sort of the opposite of @code{no-reset}: Accidentals
1683 are not remembered at all---and hence all accidentals are
1684 typeset relative to the key signature, regardless of what was
1687 @lilypond[quote,raggedright,fragment,verbatim,relative=1]
1688 #(set-accidental-style 'forget)
1689 \key d\major c4 c cis cis d d dis dis
1696 Program reference: @internalsref{Accidental_engraver},
1697 @internalsref{Accidental}, and @internalsref{AccidentalPlacement}.
1702 Simultaneous notes are considered to be entered in sequential
1703 mode. This means that in a chord the accidentals are typeset as if the
1704 notes in the chord happened once at a time - in the order in which
1705 they appear in the input file.
1707 This is only a problem when accidentals in a chord depend on each
1708 other. This problem can be solved by manually inserting @code{!} and
1709 @code{?} for the problematic notes.
1711 In the default scheme, accidentals only depend on other
1712 accidentals with the same pitch on the same staff, so no conflicts are
1715 @node Expressive marks
1716 @section Expressive marks
1719 @c todo: should change ordering
1720 @c where to put text spanners, metronome marks,
1729 * Analysis brackets::
1731 * Fingering instructions::
1742 A slur indicates that notes are to be played bound or @emph{legato}.
1745 They are entered using parentheses
1746 @lilypond[quote,relative=2,fragment,verbatim]
1747 f( g)( a) a8 b( a4 g2 f4)
1751 The direction of a slur can be set with the
1755 \override Slur #'direction = #UP
1756 \slurUp % shortcut for the previous line
1760 However, there is a convenient shorthand for forcing slur
1761 directions. By adding @code{_} or @code{^} before the opening
1762 parentheses, the direction is also set. For example,
1764 @lilypond[relative=2,fragment]
1771 @cindex @code{\slurUp}
1773 @cindex @code{\slurDown}
1775 @cindex @code{\slurBoth}
1777 @cindex @code{\slurDotted}
1779 @cindex @code{\slurSolid}
1784 Program reference: @seeinternals{Slur}, and @internalsref{SlurEvent}.
1788 @cindex Adjusting slurs
1790 @node Phrasing slurs
1791 @subsection Phrasing slurs
1793 @cindex phrasing slurs
1794 @cindex phrasing marks
1796 A phrasing slur (or phrasing mark) connects chords and is used to
1797 indicate a musical sentence. It is started using @code{\(} and @code{\)}
1800 @lilypond[quote,fragment,verbatim,relative=1]
1801 \time 6/4 c'\( d( e) f( e) d\)
1804 Typographically, the phrasing slur behaves almost exactly like a
1805 normal slur. However, they are treated as different objects. A
1806 @code{\slurUp} will have no effect on a phrasing slur; instead, you
1807 should use @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
1808 @code{\phrasingSlurBoth}.
1810 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth}
1811 will only affect normal slurs and not phrasing slurs.
1815 @cindex @code{\phrasingSlurUp}
1816 @code{\phrasingSlurUp},
1817 @cindex @code{\phrasingSlurDown}
1818 @code{\phrasingSlurDown},
1819 @cindex @code{\phrasingSlurBoth}
1820 @code{\phrasingSlurBoth}.
1824 Program reference: see also @internalsref{PhrasingSlur}, and
1825 @internalsref{PhrasingSlurEvent}.
1829 Putting phrasing slurs over rests leads to spurious warnings.
1832 @subsection Breath marks
1834 Breath marks are entered using @code{\breathe}
1837 @lilypond[quote,fragment,relative=1,verbatim]
1841 The glyph of the breath mark can be tuned by overriding the
1842 @code{text} property of the @code{BreathingSign} layout object with
1843 any markup text. For example,
1844 @lilypond[quote,fragment,verbatim,relative=1]
1846 \override BreathingSign #'text
1847 = #(make-musicglyph-markup "scripts-rvarcomma")
1854 Program reference: @internalsref{BreathingSign},
1855 @internalsref{BreathingSignEvent}.
1857 Examples: @inputfileref{input/regression,breathing-sign.ly}.
1860 @node Metronome marks
1861 @subsection Metronome marks
1864 @cindex beats per minute
1865 @cindex metronome marking
1867 Metronome settings can be entered as follows
1869 \tempo @var{duration} = @var{per-minute}
1872 In the MIDI output, they are interpreted as a tempo change, and in the
1873 paper output, a metronome marking is printed
1874 @cindex @code{\tempo}
1875 @lilypond[quote,fragment,verbatim]
1881 Program reference: @internalsref{MetronomeChangeEvent}.
1886 @subsection Text spanners
1887 @cindex Text spanners
1889 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
1890 are written as texts, and extended over many measures with dotted
1891 lines. You can create such texts using text spanners: attach
1892 @code{\startTextSpan} and @code{\stopTextSpan} to the
1893 start and ending note of the spanner.
1895 The string to be printed, as well as the style, is set through object
1898 @lilypond[quote,fragment,relative=1,verbatim]
1901 \override TextSpanner #'direction = #-1
1902 \override TextSpanner #'edge-text = #'("rall " . "")
1903 c2\startTextSpan b c\stopTextSpan a
1910 Internals @internalsref{TextSpanEvent},
1911 @internalsref{TextSpanner}.
1913 Examples: @inputfileref{input/regression,text-spanner.ly}.
1916 @node Analysis brackets
1917 @subsection Analysis brackets
1919 @cindex phrasing brackets
1920 @cindex musicological analysis
1921 @cindex note grouping bracket
1923 Brackets are used in musical analysis to indicate structure in musical
1924 pieces. LilyPond supports a simple form of nested horizontal brackets.
1925 To use this, add the @internalsref{Horizontal_bracket_engraver} to
1926 @internalsref{Staff} context. A bracket is started with
1927 @code{\startGroup} and closed with @code{\stopGroup}
1929 @lilypond[quote,raggedright,verbatim]
1932 c4\startGroup\startGroup
1935 c4\stopGroup\stopGroup
1939 \Staff \consists "Horizontal_bracket_engraver"
1945 Program reference: @internalsref{HorizontalBracket},
1946 @internalsref{NoteGroupingEvent}.
1948 Examples: @inputfileref{input/regression,note-group-bracket.ly}.
1952 @subsection Articulations
1953 @cindex Articulations
1955 @cindex articulations
1959 A variety of symbols can appear above and below notes to indicate
1960 different characteristics of the performance. They are added to a note
1961 by adding a dash and the character signifying the
1962 articulation. They are demonstrated here
1964 @lilypondfile[quote,raggedright]{script-abbreviations.ly}
1966 The meanings of these shorthands can be changed. See
1967 @file{ly/script-init.ly} for examples.
1970 The script is automatically placed, but if you need to force
1971 directions, you can use @code{_} to force them down, or @code{^} to
1973 @lilypond[quote,fragment,verbatim]
1977 Other symbols can be added using the syntax
1978 @var{note}@code{\}@var{name}, e.g. @code{c4\fermata}. Again, they
1979 can be forced up or down using @code{^} and @code{_},
1982 @lilypond[quote,verbatim,fragment,relative=3]
1983 c\fermata c^\fermata c_\fermata
1990 @cindex staccatissimo
1999 @cindex organ pedal marks
2008 @cindex prallmordent
2012 @cindex thumb marking
2017 @lilypondfile[quote,raggedright]{script-chart.ly}
2021 @cindex @code{\scriptUp}
2023 @cindex @code{\scriptDown}
2025 @cindex @code{\scriptBoth}
2030 Program reference: @internalsref{ScriptEvent}, and @internalsref{Script}.
2034 These note ornaments appear in the printed output but have no
2035 effect on the MIDI rendering of the music.
2038 @node Fingering instructions
2039 @subsection Fingering instructions
2043 Fingering instructions can be entered using
2045 @var{note}-@var{digit}
2047 For finger changes, use markup texts
2049 @lilypond[quote,verbatim,raggedright,fragment]
2050 c'4-1 c'4-2 c'4-3 c'4-4
2051 c'^\markup { \finger "2-3" }
2054 @cindex finger change
2059 You can use the thumb-script to indicate that a note should be
2060 played with the thumb (e.g. in cello music)
2062 @lilypond[quote,verbatim,raggedright,fragment]
2063 <a' a''-3>8_\thumb <b' b''-3>_\thumb
2066 Fingerings for chords can also be added to individual notes
2067 of the chord by adding them after the pitches
2068 @lilypond[quote,verbatim,raggedright,fragment,relative=2]
2069 < c-1 e-2 g-3 b-5 >4
2073 iIn this case, setting @code{fingeringOrientations} will put fingerings next
2076 @lilypond[quote,verbatim,raggedright,fragment,relative=1]
2077 \set fingeringOrientations = #'(left down)
2078 <c-1 es-2 g-4 bes-5 > 4
2079 \set fingeringOrientations = #'(up right down)
2080 <c-1 es-2 g-4 bes-5 > 4
2081 \set fingeringOrientations = #'(right)
2085 The last note demonstrates how fingering instructions can be put close
2086 to note heads in monophonic music, using this feature.
2090 Program reference: @internalsref{FingerEvent}, and @internalsref{Fingering}.
2092 Examples: @inputfileref{input/regression,finger-chords.ly}.
2095 @subsection Text scripts
2096 @cindex Text scripts
2098 @cindex text items, non-empty
2099 @cindex non-empty texts
2101 It is possible to place arbitrary strings of text or markup text (see
2102 @ref{Text markup}) above or below notes by using a string
2103 @code{c^"text"}. By default, these indications do not influence the
2104 note spacing, but by using the command @code{\fatText}, the widths
2105 will be taken into account
2107 @lilypond[quote,fragment,raggedright,verbatim]
2109 c4^"longtext" \fatText c4_"longlongtext" c4
2113 It is possible to use @TeX{} commands in the strings, but this should
2114 be avoided because the exact dimensions of the string can then no
2119 @cindex @code{\fatText}
2121 @cindex @code{\emptyText}
2126 In this manual: @ref{Text markup}.
2128 Program reference: @internalsref{TextScriptEvent}, @internalsref{TextScript}.
2134 @subsection Grace notes
2137 @c should have blurb about accaciatura / appogiatura
2139 @cindex @code{\grace}
2143 Grace notes are ornaments that are written out. The most common ones
2144 are acciaccatura, which should be played as very short. It is denoted
2145 by a slurred small note with a slashed stem. The appoggiatura is a
2146 grace note that takes a fixed fraction of the main note, is and
2147 denoted as a slurred note in small print without a slash.
2148 They are entered with the commands @code{\acciaccatura} and
2149 @code{\appoggiatura}, as demonstrated in the following example
2152 @cindex appoggiatura
2153 @cindex acciaccatura
2155 @lilypond[quote,relative=2,verbatim,fragment]
2156 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
2157 \acciaccatura { g16[ f] } e4
2160 Both are special forms of the @code{\grace} command. By prefixing this
2161 keyword to a music expression, a new one is formed, which will be
2162 printed in a smaller font and takes up no logical time in a measure.
2164 @lilypond[quote,relative=2,verbatim,fragment]
2166 \grace { c16[ d16] } c2 c4
2170 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
2171 @code{\grace} command does not start a slur.
2173 Internally, timing for grace notes is done using a second, `grace'
2174 time. Every point in time consists of two rational numbers: one
2175 denotes the logical time, one denotes the grace timing. The above
2176 example is shown here with timing tuples
2178 @lilypond[quote,raggedright]
2181 c4 \grace c16 c4 \grace {
2184 \new Lyrics \lyrics {
2187 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
2188 \markup { (\fraction 1 4 , 0 ) } 4
2190 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2191 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2193 \markup { ( \fraction 2 4 , 0 ) }
2199 The placement of grace notes is synchronized between different staves.
2200 In the following example, there are two sixteenth graces notes for
2201 every eighth grace note
2203 @lilypond[quote,relative=2,verbatim,fragment]
2204 << \new Staff { e4 \grace { c16[ d e f] } e4 }
2205 \new Staff { c'4 \grace { g8[ b] } c4 } >>
2210 If you want to end a note with a grace, the standard trick is to put
2211 the grace notes after a ``space note''
2213 @lilypond[quote,fragment,verbatim,relative=2]
2216 { s2 \grace { c16[ d] } } >>
2222 By adjusting the duration of the skip note (here it is a half-note),
2223 the space between the main-note and the grace is adjusted.
2226 A @code{\grace} section will introduce special typesetting settings,
2227 for example, to produce smaller type, and set directions. Hence, when
2228 introducing layout tweaks, they should be inside the grace section,
2230 @lilypond[quote,fragment,verbatim,relative=2]
2233 \override Stem #'direction = #-1
2235 \revert Stem #'direction
2242 The overrides should also be reverted inside the grace section.
2244 If the layout of grace sections must be changed throughout the music,
2245 then this can be accomplished through the function
2246 @code{add-grace-property}. The following example undefines the Stem
2247 direction for this grace, so stems do not always point up.
2251 #(add-grace-property 'Voice 'Stem 'direction '())
2257 Another option is to change the variables @code{startGraceMusic},
2258 @code{stopGraceMusic}, @code{startAcciaccaturaMusic},
2259 @code{stopAcciaccaturaMusic}, @code{startAppoggiaturaMusic},
2260 @code{stopAppoggiaturaMusic}. More information is in the file
2261 @file{ly/grace-init.ly}.
2266 Program reference: @internalsref{GraceMusic}.
2270 A score that starts with an @code{\grace} section needs an explicit
2271 @code{\context Voice} declaration, otherwise the main note and grace
2272 note end up on different staves.
2274 Grace note synchronization can also lead to surprises. Staff notation,
2275 such as key signatures, bar lines, etc. are also synchronized. Take
2276 care when you mix staves with grace notes and staves without, for example,
2278 @lilypond[quote,relative=2,verbatim,fragment]
2279 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2280 \new Staff { c4 \bar "|:" d4 } >>
2284 This can be remedied by inserting grace skips, for the above example
2287 \new Staff @{ c4 \bar "|:" \grace s16 d4 @} >>
2290 Grace sections should only be used within sequential music
2291 expressions. Nesting or juxtaposing grace sections is not supported,
2292 and might produce crashes or other errors.
2296 @subsection Glissando
2299 @cindex @code{\glissando}
2301 A glissando is a smooth change in pitch. It is denoted by a line or a
2302 wavy line between two notes.
2305 A glissando line can be requested by attaching a @code{\glissando} to
2308 @lilypond[quote,fragment,relative=1,verbatim]
2314 Program reference: @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2316 Example files: @file{input/regression,glissando.ly}
2322 Printing text over the line (such as @emph{gliss.}) is not supported.
2326 @subsection Dynamics
2339 @cindex @code{\ffff}
2349 Absolute dynamic marks are specified using a command after a note
2350 @code{c4\ff}. The available dynamic marks are @code{\ppp},
2351 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2352 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2353 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}
2355 @lilypond[quote,verbatim,raggedright,fragment,relative=1]
2356 c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2366 A crescendo mark is started with @code{\<} and terminated with
2367 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2368 with @code{\!}. Because these marks are bound to notes, if you must
2369 use spacer notes if multiple marks during one note are needed
2371 @lilypond[quote,fragment,verbatim]
2372 c''\< c''\! d''\> e''\!
2373 << f''1 { s4 s4\< s4\! \> s4\! } >>
2375 This may give rise to very short hairpins. Use @code{minimum-length}
2376 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2380 \override Staff.Hairpin #'minimum-length = #5
2383 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2384 is an example how to do it
2386 @lilypond[quote,fragment,relative=2,verbatim]
2396 You can also supply your own texts
2397 @lilypond[quote,fragment,relative=1,verbatim]
2399 \set crescendoText = \markup { \italic "cresc. poco" }
2400 \set crescendoSpanner = #'dashed-line
2410 @cindex @code{\dynamicUp}
2412 @cindex @code{\dynamicDown}
2413 @code{\dynamicDown},
2414 @cindex @code{\dynamicBoth}
2415 @code{\dynamicBoth}.
2417 @cindex direction, of dynamics
2421 Program reference: @internalsref{CrescendoEvent},
2422 @internalsref{DecrescendoEvent}, and
2423 @internalsref{AbsoluteDynamicEvent}.
2425 Dynamics @internalsref{DynamicText} and @internalsref{Hairpin}
2426 objects. Vertical positioning of these symbols is handled by the
2427 @internalsref{DynamicLineSpanner} object.
2435 @cindex @code{\repeat}
2438 Repetition is a central concept in music, and multiple notations exist
2439 for repetitions. In LilyPond, most of these notations can be captured
2440 in a uniform syntax. One of the advantages is that they can be
2441 rendered in MIDI accurately.
2443 The following types of repetition are supported
2447 Repeated music is fully written (played) out. Useful for MIDI
2448 output, and entering repetitive music.
2451 This is the normal notation: Repeats are not written out, but
2452 alternative endings (volte) are printed, left to right.
2456 Alternative endings are written stacked. This has limited use but may be
2457 used to typeset two lines of lyrics in songs with repeats, see
2458 @inputfileref{input,star-spangled-banner.ly}.
2466 Make beat or measure repeats. These look like percent signs.
2472 * Repeats and MIDI::
2473 * Manual repeat commands::
2475 * Tremolo subdivisions::
2480 @subsection Repeat syntax
2483 LilyPond has one syntactic construct for specifying different types of
2484 repeats. The syntax is
2487 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2490 If you have alternative endings, you may add
2491 @cindex @code{\alternative}
2493 \alternative @code{@{} @var{alternative1}
2495 @var{alternative3} @dots{} @code{@}}
2497 where each @var{alternative} is a music expression. If you do not
2498 give enough alternatives for all of the repeats, the first alternative
2499 is assumed to be played more than once.
2501 Normal notation repeats are used like this
2502 @lilypond[quote,fragment,verbatim,relative=2]
2504 \repeat volta 2 { c4 d e f }
2505 \repeat volta 2 { f e d c }
2508 With alternative endings
2509 @lilypond[quote,fragment,verbatim,relative=2]
2511 \repeat volta 2 {c4 d e f}
2512 \alternative { {d2 d} {f f,} }
2516 @lilypond[quote,fragment,verbatim,relative=2]
2519 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2520 \alternative { { g4 g g } { a | a a a a | b2. } }
2526 Brackets for the repeat are normally only printed over the topmost
2527 staff. This can be adjusted by setting the @code{voltaOnThisStaff}
2528 property @inputfileref{input/regression,volta-multi-staff.ly},
2529 @inputfileref{input/regression,volta-chord-names.ly}
2533 A nested repeat like
2542 is ambiguous, since it is is not clear to which @code{\repeat} the
2543 @code{\alternative} belongs. This ambiguity is resolved by always
2544 having the @code{\alternative} belong to the inner @code{\repeat}.
2545 For clarity, it is advisable to use braces in such situations.
2550 Timing information is not remembered at the start of an alternative,
2551 so after a repeat timing information must be reset by hand, for
2552 example by setting @code{Score.measurePosition} or entering
2553 @code{\partial}. Similarly, slurs or ties are also not repeated.
2558 @node Repeats and MIDI
2559 @subsection Repeats and MIDI
2561 @cindex expanding repeats
2563 For instructions on how to expand repeats for MIDI output, see the
2564 example file @inputfileref{input/test,unfold-all-repeats.ly}.
2568 @node Manual repeat commands
2569 @subsection Manual repeat commands
2571 @cindex @code{repeatCommands}
2573 The property @code{repeatCommands} can be used to control the layout of
2574 repeats. Its value is a Scheme list of repeat commands, where each repeat
2578 @item the symbol @code{start-repeat},
2579 which prints a @code{|:} bar line,
2580 @item the symbol @code{end-repeat},
2581 which prints a @code{:|} bar line,
2582 @item the list @code{(volta @var{text})},
2583 which prints a volta bracket saying @var{text}: The text can be specified as
2584 a text string or as a markup text, see @ref{Text markup}. Do not
2585 forget to change the font, as the default number font does not contain
2586 alphabetic characters. Or,
2587 @item the list @code{(volta #f)}, which
2588 stops a running volta bracket
2591 @lilypond[quote,verbatim,fragment,relative=2]
2593 \set Score.repeatCommands = #'((volta "93") end-repeat)
2595 \set Score.repeatCommands = #'((volta #f))
2602 Program reference: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2603 @internalsref{VoltaRepeatedMusic},
2604 @internalsref{UnfoldedRepeatedMusic}, and
2605 @internalsref{FoldedRepeatedMusic}.
2607 @node Tremolo repeats
2608 @subsection Tremolo repeats
2609 @cindex tremolo beams
2611 To place tremolo marks between notes, use @code{\repeat} with tremolo
2613 @lilypond[quote,verbatim,raggedright]
2614 \context Voice \relative c' {
2615 \repeat "tremolo" 8 { c16 d16 }
2616 \repeat "tremolo" 4 { c16 d16 }
2617 \repeat "tremolo" 2 { c16 d16 }
2621 Tremolo marks can also be put on a single note. In this case, the
2622 note should not be surrounded by braces.
2623 @lilypond[quote,verbatim,raggedright]
2624 \repeat "tremolo" 4 c'16
2627 A similar mechanism is the tremolo subdivision, described in
2628 @ref{Tremolo subdivisions}.
2632 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
2634 Program reference: tremolo beams are @internalsref{Beam} objects. Single stem
2635 tremolos are @internalsref{StemTremolo} objects. The music expression is
2636 @internalsref{TremoloEvent}.
2638 Example files: @inputfileref{input/regression,chord-tremolo.ly},
2639 @inputfileref{input/regression,stem-tremolo.ly}.
2641 @node Tremolo subdivisions
2642 @subsection Tremolo subdivisions
2643 @cindex tremolo marks
2644 @cindex @code{tremoloFlags}
2646 Tremolo marks can be printed on a single note by adding
2647 `@code{:}[@var{length}]' after the note. The length must be at least
2648 8. A @var{length} value of 8 gives one line across the note stem. If
2649 the length is omitted, the last value (stored in @code{tremoloFlags})
2652 @lilypond[quote,verbatim,fragment]
2653 c'2:8 c':32 | c': c': |
2656 @c [TODO : stok is te kort bij 32en]
2660 Tremolos entered in this way do not carry over into the MIDI output.
2664 In this manual: @ref{Tremolo repeats}.
2666 Elsewhere: @internalsref{StemTremolo}, @internalsref{TremoloEvent}.
2668 @node Measure repeats
2669 @subsection Measure repeats
2671 @cindex percent repeats
2672 @cindex measure repeats
2674 In the @code{percent} style, a note pattern can be repeated. It is
2675 printed once, and then the pattern is replaced with a special sign.
2676 Patterns of a one and two measures are replaced by percent-like signs,
2677 patterns that divide the measure length are replaced by slashes
2679 @lilypond[quote,verbatim,raggedright]
2680 \repeat "percent" 4 { c'4 }
2681 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
2686 Program reference: @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
2687 @internalsref{PercentRepeatedMusic}, and
2688 @internalsref{DoublePercentRepeat}.
2692 @node Rhythmic music
2693 @section Rhythmic music
2697 * Showing melody rhythms::
2698 * Entering percussion::
2699 * Percussion staves::
2703 @node Showing melody rhythms
2704 @subsection Showing melody rhythms
2706 Sometimes you might want to show only the rhythm of a melody. This
2707 can be done with the rhythmic staff. All pitches of notes on such a
2708 staff are squashed, and the staff itself has a single line
2710 @lilypond[quote,fragment,relative=1,verbatim]
2711 \context RhythmicStaff {
2713 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
2719 Program reference: @internalsref{RhythmicStaff}.
2721 Examples: @inputfileref{input/regression,rhythmic-staff.ly}.
2724 @node Entering percussion
2725 @subsection Entering percussion
2731 Percussion notes may be entered in @code{\drums} mode, which is
2732 similar to @code{notes}. Each piece of percussion has a full name and
2733 an abbreviated name, and both be used in input files
2736 hihat hh bassdrum bd
2738 @lilypond[quote,raggedright]
2739 \new DrumStaff \drums { hihat hh bassdrum bd }
2742 The complete list of drum names is in the init file
2743 @file{ly/drumpitch-init.ly}.
2744 @c TODO: properly document this.
2748 Program reference: @internalsref{DrumNoteEvent}.
2750 @node Percussion staves
2751 @subsection Percussion staves
2755 A percussion part for more than one instrument typically uses a
2756 multiline staff where each position in the staff refers to one piece
2760 To typeset the music, the notes must be interpreted in a
2761 @internalsref{DrumStaff} and @internalsref{DrumVoice} contexts
2764 @lilypond[quote,raggedright,verbatim]
2765 up = \drums { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2766 down = \drums { bassdrum4 snare8 bd r bd sn4 }
2768 \new DrumVoice { \voiceOne \up }
2769 \new DrumVoice { \voiceTwo \down }
2773 The above example shows verbose polyphonic notation. The short
2774 polyphonic notation, described in @ref{Polyphony}, can also be used if
2775 the @internalsref{DrumVoices} are instantiated by hand first. For example,
2777 @lilypond[quote,fragment,verbatim]
2779 \context DrumVoice = "1" { s1 *2 }
2780 \context DrumVoice = "2" { s1 *2 }
2784 { \repeat unfold 16 hh16 }
2793 There are also other layout possibilities. To use these, set the
2794 property @code{drumStyleTable} in context @internalsref{DrumVoice}.
2795 The following variables have been predefined
2799 is the default. It typesets a typical drum kit on a five-line staff
2801 @lilypond[quote,noindent]
2802 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
2803 bd sn ss tomh tommh tomml toml tomfh tomfl }
2804 mus = \drums { cymc cyms cymr hh | hhc hho hhho hhp | \break cb hc
2805 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
2807 << \new DrumStaff\with {
2808 \remove Bar_engraver
2809 \remove Time_signature_engraver
2810 \override Stem #'transparent = ##t
2811 \override Stem #'Y-extent-callback = ##f
2812 minimumVerticalExtent = #'(-4.0 . 5.0)
2814 \context Lyrics \nam
2817 %% need to do this, because of indented @itemize
2820 \override LyricText #'font-family = #'typewriter
2821 \override BarNumber #'transparent =##T
2825 The drum scheme supports six different toms. When there fewer toms, simply
2826 select the toms that produce the desired result, i.e. to get toms on
2827 the three middle lines you use @code{tommh}, @code{tomml} and
2830 @item timbales-style
2831 to typeset timbales on a two line staff
2833 @lilypond[quote,raggedright]
2834 nam = \lyrics { timh ssh timl ssl cb }
2835 mus = \drums { timh ssh timl ssl cb s16 }
2838 \context DrumStaff \with {
2839 \remove Bar_engraver
2840 \remove Time_signature_engraver
2841 \override Stem #'transparent = ##t
2842 \override Stem #'Y-extent-callback = ##f
2843 \override StaffSymbol #'line-count = #2
2844 \override StaffSymbol #'staff-space = #2
2845 minimumVerticalExtent = #'(-3.0 . 4.0)
2846 drumStyleTable = #timbales-style
2849 \override LyricText #'font-family = #'typewriter
2855 to typeset congas on a two line staff
2857 @lilypond[quote,raggedright]
2858 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
2859 mus = \drums { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
2861 \context DrumStaff\with {
2862 \remove Bar_engraver
2863 \remove Time_signature_engraver
2864 drumStyleTable = #congas-style
2865 \override StaffSymbol #'line-count = #2
2867 %% this sucks; it will lengthen stems.
2868 \override StaffSymbol #'staff-space = #2
2869 \override Stem #'transparent = ##t
2870 \override Stem #'Y-extent-callback = ##f
2873 \override LyricText #'font-family = #'typewriter
2878 to typeset bongos on a two line staff
2880 @lilypond[quote,raggedright]
2881 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
2882 mus = \drums { boh boho bohm ssh bol bolo bolm ssl s16 }
2884 \context DrumStaff\with {
2885 \remove Bar_engraver
2886 \remove Time_signature_engraver
2887 \override StaffSymbol #'line-count = #2
2888 drumStyleTable = #bongos-style
2890 %% this sucks; it will lengthen stems.
2891 \override StaffSymbol #'staff-space = #2
2892 \override Stem #'transparent = ##t
2893 \override Stem #'Y-extent-callback = ##f
2896 \override LyricText #'font-family = #'typewriter
2901 @item percussion-style
2902 to typeset all kinds of simple percussion on one line staves
2903 @lilypond[quote,raggedright]
2904 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
2905 mus = \drums { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
2907 \context DrumStaff\with{
2908 \remove Bar_engraver
2909 drumStyleTable = #percussion-style
2910 \override StaffSymbol #'line-count = #1
2911 \remove Time_signature_engraver
2912 \override Stem #'transparent = ##t
2913 \override Stem #'Y-extent-callback = ##f
2917 \override LyricText #'font-family = #'typewriter
2923 If you do not like any of the predefined lists you can define your own
2924 list at the top of your file
2926 @lilypond[quote,raggedright,verbatim]
2928 (bassdrum default #f -1)
2929 (snare default #f 0)
2931 (pedalhihat xcircle "stopped" 2)
2932 (lowtom diamond #f 3)))
2933 up = \drums { hh8 hh hh hh hhp4 hhp }
2934 down = \drums { bd4 sn bd toml8 toml }
2937 \set DrumStaff.drumStyleTable
2938 = #(alist->hash-table mydrums)
2939 \new DrumVoice { \voiceOne \up }
2940 \new DrumVoice { \voiceTwo \down }
2947 Init files: @file{ly/drumpitch-init.ly}.
2949 Program reference: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
2953 Because general MIDI does not contain rim shots, the sidestick is used
2954 for this purpose instead.
2957 @section Piano music
2959 Piano staves are two normal staves coupled with a brace. The staves
2960 are largely independent, but sometimes voices can cross between the
2961 two staves. The same notation is also used for harps and other key
2962 instruments. The @internalsref{PianoStaff} is especially built to
2963 handle this cross-staffing behavior. In this section we discuss the
2964 @internalsref{PianoStaff} and some other pianistic peculiarities.
2968 * Automatic staff changes::
2969 * Manual staff switches::
2972 * Staff switch lines::
2977 There is no support for putting chords across staves. You can get
2978 this result by increasing the length of the stem in the lower stave so
2979 it reaches the stem in the upper stave, or vice versa. An example is
2980 included with the distribution as
2981 @inputfileref{input/test,stem-cross-staff.ly}.
2983 Dynamics are not centered, but kludges do exist. See
2984 @inputfileref{input/template,piano-dynamics.ly}.
2986 @cindex cross staff stem
2987 @cindex stem, cross staff
2988 @cindex distance between staves in piano music
2990 The distance between the two staves is normally fixed across the
2991 entire score. It is possible to tune this per system, but it does
2992 require arcane command incantations. See
2993 @inputfileref{input/test,piano-staff-distance.ly}.
2996 @node Automatic staff changes
2997 @subsection Automatic staff changes
2998 @cindex Automatic staff changes
3000 Voices can switch automatically between the top and the bottom
3001 staff. The syntax for this is
3005 \autochange \context Voice @{ @dots{}@var{music}@dots{} @}
3010 The two staves of the piano staff must be named @code{up} and
3013 A @code{\relative} section that is outside of @code{\autochange} has
3014 no effect on the pitches of @var{music}, so, if necessary, put
3015 @code{\relative} inside @code{\autochange} like
3019 \autochange \relative @dots{} \new Voice @dots{}
3024 The autochanger switches on basis of pitch (middle C is the turning
3025 point), and it looks ahead skipping over rests to switch in
3026 advance. Here is a practical example
3028 @lilypond[quote,verbatim,raggedright]
3029 \context PianoStaff <<
3030 \context Staff = "up" {
3031 \autochange \new Voice \relative c' {
3032 g4 a b c d r4 a g } }
3033 \context Staff = "down" {
3040 In this example, spacer rests are used to prevent the bottom staff from
3041 terminating too soon.
3046 In this manual: @ref{Manual staff switches}.
3048 Program reference: @internalsref{AutoChangeMusic}.
3054 The staff switches often do not end up in optimal places. For high
3055 quality output, staff switches should be specified manually.
3058 @code{\autochange} cannot be inside @code{\times}.
3060 Internally, the @code{\partcombine} interprets both arguments as
3061 @code{Voice}s named @code{one} and @code{two}, and then decides when
3062 the parts can be combined. Consequently, if the arguments switch to
3063 differently named @internalsref{Voice} contexts, the events in those
3067 @node Manual staff switches
3068 @subsection Manual staff switches
3070 @cindex manual staff switches
3071 @cindex staff switch, manual
3073 Voices can be switched between staves manually, using the following command
3075 \change Staff = @var{staffname} @var{music}
3079 The string @var{staffname} is the name of the staff. It switches the
3080 current voice from its current staff to the Staff called
3081 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3082 @code{"down"}. The @context{Staff} referred to must already exist, so
3083 usually the setup for a score will start with a setup of the staves,
3087 \context Staff = up @{
3088 \skip 1 * 10 %@emph{ keep staff alive}
3090 \context Staff = down @{
3091 \skip 1 * 10 %@emph{idem}
3097 and the @context{Voice} is inserted afterwards
3100 \context Staff = down
3101 \new Voice @{ @dots{} \change Staff = up @dots{} @}
3109 Pianos have pedals that alter the way sound are produced. Generally, a
3110 piano has three pedals, sustain, una corda, and sostenuto.
3113 Piano pedal instruction can be expressed by attaching
3114 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3115 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3118 @lilypond[quote,fragment,verbatim]
3119 c'4\sustainDown c'4\sustainUp
3122 What is printed can be modified by setting @code{pedal@var{X}Strings},
3123 where @var{X} is one of the pedal types: @code{Sustain},
3124 @code{Sostenuto} or @code{UnaCorda}. Refer to
3125 @internalsref{SustainPedal} in the program reference for more
3128 Pedals can also be indicated by a sequence of brackets, by setting the
3129 @code{pedalSustainStyle} property to @code{bracket} objects
3131 @lilypond[quote,fragment,verbatim,relative=2]
3132 \set Staff.pedalSustainStyle = #'bracket
3134 b\sustainUp\sustainDown
3135 b g \sustainUp a \sustainDown \bar "|."
3138 A third style of pedal notation is a mixture of text and brackets,
3139 obtained by setting the @code{pedalSustainStyle} style property to
3142 @lilypond[quote,fragment,verbatim,relative=2]
3143 \set Staff.pedalSustainStyle = #'mixed
3145 b\sustainUp\sustainDown
3146 b g \sustainUp a \sustainDown \bar "|."
3149 The default `*Ped.' style for sustain and damper pedals corresponds to
3150 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
3153 @lilypond[quote,fragment,verbatim,relative=2]
3154 c\sostenutoDown d e c, f g a\sostenutoUp
3157 For fine-tuning of the appearance of a pedal bracket, the properties
3158 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3159 @code{PianoPedalBracket} objects (see
3160 @internalsref{PianoPedalBracket} in the Program reference) can be modified. For example, the
3161 bracket may be extended to the end of the note head
3163 @lilypond[quote,fragment,verbatim,relative=2]
3164 \override Staff.PianoPedalBracket
3165 #'shorten-pair = #'(0 . -1.0)
3166 c\sostenutoDown d e c, f g a\sostenutoUp
3170 @subsection Arpeggio
3173 @cindex broken arpeggio
3174 @cindex @code{\arpeggio}
3176 You can specify an arpeggio sign on a chord by attaching an
3177 @code{\arpeggio} to a chord
3180 @lilypond[quote,fragment,relative=1,verbatim]
3184 When an arpeggio crosses staves, you attach an arpeggio to the chords
3185 in both staves, and set
3186 @internalsref{PianoStaff}.@code{connectArpeggios}
3188 @lilypond[quote,fragment,relative=1,verbatim]
3189 \context PianoStaff <<
3190 \set PianoStaff.connectArpeggios = ##t
3191 \new Staff { <c' e g c>\arpeggio }
3192 \new Staff { \clef bass <c,, e g>\arpeggio }
3196 The direction of the arpeggio is sometimes denoted by adding an
3197 arrowhead to the wiggly line
3199 @lilypond[quote,fragment,relative=1,verbatim]
3208 A square bracket on the left indicates that the player should not
3209 arpeggiate the chord
3211 @lilypond[quote,fragment,relative=1,verbatim]
3218 @cindex @code{\arpeggio}
3220 @cindex @code{\arpeggioUp}
3222 @cindex @code{\arpeggioDown}
3223 @code{\arpeggioDown},
3224 @cindex @code{\arpeggioBoth}
3225 @code{\arpeggioBoth},
3226 @cindex @code{\arpeggioBracket}
3227 @code{\arpeggioBracket}.
3231 Program reference: @internalsref{ArpeggioEvent} music expressions lead to
3232 @internalsref{Arpeggio} objects. Cross staff arpeggios are
3233 @internalsref{PianoStaff}.@internalsref{Arpeggio}.
3237 It is not possible to mix connected arpeggios and unconnected
3238 arpeggios in one @internalsref{PianoStaff} at the same time.
3240 @node Staff switch lines
3241 @subsection Staff switch lines
3244 @cindex follow voice
3245 @cindex staff switching
3248 @cindex @code{followVoice}
3250 Whenever a voice switches to another staff a line connecting the notes
3251 can be printed automatically. This is enabled if the property
3252 @code{PianoStaff.followVoice} is set to true
3254 @lilypond[quote,fragment,relative=1,verbatim]
3255 \context PianoStaff <<
3256 \set PianoStaff.followVoice = ##t
3257 \context Staff \context Voice {
3262 \context Staff=two { \clef bass \skip 1*2 }
3268 The associated object is @internalsref{VoiceFollower}.
3272 @cindex @code{\showStaffSwitch}
3273 @code{\showStaffSwitch},
3274 @cindex @code{\hideStaffSwitch}
3275 @code{\hideStaffSwitch}.
3279 @section Vocal music
3282 The easiest way to add lyrics to a melody, is by appending
3287 \newlyrics @{ @var{the lyrics} @}
3290 to a melody. Here is an example,
3292 @lilypond[raggedright,verbatim]
3293 \relative { \time 3/4 c2 e4 g2. }
3294 \newlyrics { play the game }
3297 More stanzas can be added by adding more
3298 @code{\newlyrics} sections
3300 @lilypond[raggedright,verbatim]
3301 \relative { \time 3/4 c2 e4 g2. }
3302 \newlyrics { play the game }
3303 \newlyrics { speel het spel }
3304 \newlyrics { joue le jeu }
3307 The @code{\newlyrics} keyword has three functions: it interprets the
3308 following words as texts instead of notes, it sets up a context for
3309 printing texts (the @code{Lyrics} context), and it couples the melody
3310 with the lyrics, so the durations of both are aligned.
3312 These three functions can be controlled separately, and that is what
3313 the following sections are about.
3318 * The Lyrics context::
3323 @node Entering lyrics
3324 @subsection Entering lyrics
3328 @cindex @code{\lyrics}
3331 Lyrics are entered in a special input mode. This mode is is introduced
3332 by the keyword @code{\lyrics}. In this mode you can enter lyrics,
3333 with punctuation and accents without any hassle. Syllables are
3334 entered like notes, but with pitches replaced by text. For example,
3336 \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
3339 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3340 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3341 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3342 any 8-bit character with ASCII code over 127, or a two-character
3343 combination of a backslash followed by one of @code{`}, @code{'},
3344 @code{"}, or @code{^}.
3346 Subsequent characters of a word can be any character that is not a digit
3347 and not white space. One important consequence of this is that a word
3348 can end with @code{@}}. The following example is usually a bug. The
3349 syllable includes a @code{@}}, and hence the opening brace is not balanced
3351 \lyrics @{ twinkle@}
3354 @cindex @code{\property}, in @code{\lyrics}
3355 Similarly, a period following a alphabetic sequence, is included in
3356 the resulting string. As a consequence, spaces must be inserted around
3359 \override Score . LyricText #'font-shape = #'italic
3363 @cindex spaces, in lyrics
3364 @cindex quotes, in lyrics
3366 Any @code{_} character which appears in an unquoted word is converted
3367 to a space. This provides a mechanism for introducing spaces into words
3368 without using quotes. Quoted words can also be used in Lyrics mode to
3369 specify words that cannot be written with the above rules. The
3370 following example incorporates double quotes
3373 \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3376 This example is slightly academic, since it gives better looking
3377 results to use matched single quotes, @code{``} and @code{''}
3379 \lyrics @{ He said: ``Let my peo ple go'' @}
3384 Centered hyphens are entered as `@code{-}@code{-}' between syllables.
3385 The hyphen will have variable length depending on the space between
3386 the syllables and it will be centered between the syllables.
3391 When a lyric is sung over many notes (this is called a melisma), this is
3392 indicated with a horizontal line centered between a syllable and the
3393 next one. Such a line is called an extender line, and it is entered as
3398 Program reference: events @internalsref{LyricEvent},
3399 @internalsref{HyphenEvent}, and @internalsref{ExtenderEvent}. Objects
3400 @internalsref{LyricHyphen}, @internalsref{LyricExtender} and
3401 @internalsref{LyricText}.
3403 Examples: @inputfileref{input/test,lyric-hyphen-retain.ly}.
3407 The definition of lyrics mode is too complex.
3411 @node The Lyrics context
3412 @subsection The Lyrics context
3415 Lyrics are printed by interpreting them in a @internalsref{Lyrics} context
3417 \context Lyrics \lyrics @dots{}
3420 @cindex automatic syllable durations
3421 @cindex @code{\lyricsto}
3422 @cindex lyrics and melodies
3424 This will place the lyrics according to the durations that were
3425 entered. The lyrics can also be aligned under a given melody
3426 automatically. In this case, it is no longer necessary to enter the
3427 correct duration for each syllable. This is achieved by combining the
3428 melody and the lyrics with the @code{\lyricsto} expression
3430 \lyricsto @var{name} \new Lyrics @dots{}
3433 This aligns the lyrics to the
3435 notes of the @internalsref{Voice} context called @var{name}, which has
3436 to exist. Therefore, normally the @code{Voice} is specified first, and
3437 then the lyrics are specified with @code{\lyricsto}. The command
3438 @code{\lyricsto} switches to @code{\lyrics} mode automatically, so
3439 @code{\lyrics} may be skipped.
3441 For different or more complex orderings, the best way is to setup the
3442 hierarchy of staves and lyrics first, e.g.
3444 \context ChoirStaff <<
3445 \context Lyrics = sopranoLyrics @{ s1 @}
3446 \context Voice = soprano @{ @emph{music} @}
3447 \context Lyrics = tenorLyrics @{ s1 @}
3448 \context Voice = tenor @{ @emph{music} @}
3451 and then combine the appropriate melodies and lyric lines
3453 \lyricsto "soprano" \context Lyrics = sopranoLyrics
3458 The final input would resemble
3461 << \context ChoirStaff << @emph{setup the music} >>
3462 \lyricsto "soprano" @emph{etc}
3463 \lyricsto "alto" @emph{etc}
3469 The @code{\lyricsto} command detects melismata: it only puts one
3470 syllable under a tied or slurred group of notes. If you want to force
3471 an unslurred group of notes to be a melisma, insert @code{\melisma}
3472 after the first note of the group, and @code{\melismaEnd} after the
3475 @lilypond[quote,relative=2,raggedright,fragment,verbatim]
3477 \context Voice = "lala" {
3485 \lyricsto "lala" \new Lyrics {
3491 In addition, notes are considered a melisma if they are manually
3492 beamed, and automatic beaming (see @ref{Setting automatic beam
3493 behavior}) is switched off. The criteria for deciding melismata can
3494 be tuned with the property @code{melismaBusyProperties}. See
3495 @internalsref{Melisma_translator} in the program reference for more
3498 Lyrics can also be entered without @code{\lyricsto}. In this case the
3499 durations of each syllable must be entered explicitly, for example,
3506 Alignment to a melody can be specified with the @code{associatedVoice}
3510 \set associatedVoice = #"melody"
3513 Here is an example demonstrating manual lyric durations,
3515 @lilypond[relative=1,verbatim,fragment]
3516 << \context Voice = melody {
3520 \new Lyrics \lyrics {
3521 \set associatedVoice = #"melody"
3529 When multiple stanzas are put on the same melody, it can happen that
3530 two stanzas have melismata in different locations. This can be
3531 remedied by switching off melismata for one
3532 @internalsref{Lyrics}. This is achieved by setting
3533 the @code{ignoreMelismata} property to @code{#t}. An example is shown
3534 in @inputfileref{input/regression,lyric-combine-new.ly}.
3537 @cindex choral score
3539 A complete example of a SATB score setup is in the file
3540 @inputfileref{input/template,satb.ly}.
3545 @code{\melisma}, @code{\melismaEnd}
3546 @cindex @code{\melismaEnd}
3547 @cindex @code{\melisma}
3551 Program reference: Music expressions: @internalsref{LyricCombineMusic},
3552 Contexts: @internalsref{Lyrics}, @internalsref{Melisma_translator}.
3554 Examples: @inputfileref{input/template,satb.ly},
3555 @inputfileref{input/regression,lyric-combine-new.ly},
3556 @c TODO: make separate section for melismata
3557 @inputfileref{input/test,lyrics-melisma-variants.ly}.
3558 @inputfileref{input/test,lyrics-melisma-faster.ly}.
3562 Melismata are not detected automatically, and extender lines must be
3566 For proper processing of extender lines, the
3567 @internalsref{Lyrics} and @internalsref{Voice} should be
3568 linked. This can be achieved either by using @code{\lyricsto} or by
3569 setting corresponding names for both contexts. The latter is explained
3570 in @ref{More stanzas}.
3572 @c TODO: document \new Staff << Voice \lyricsto >> bug
3575 @subsection More stanzas
3577 @cindex phrasing, in lyrics
3580 The lyrics should be aligned with the note heads of the melody. To
3581 achieve this, each line of lyrics should be marked to correspond with
3582 the melodic line. This is done automatically when @code{\lyricsto},
3583 but it can also be done manually.
3585 To this end, give the @internalsref{Voice} context an identity
3587 \context Voice = duet @{
3592 Then set the @internalsref{Lyrics} contexts to names starting with
3593 that identity followed by a dash. In the preceding example, the
3594 @internalsref{Voice} identity is @code{duet}, so the identities of the
3595 @internalsref{Lyrics}s are marked @code{duet-1} and @code{duet-2}
3597 \context Lyrics = "duet-1" @{
3598 Hi, my name is Bert. @}
3599 \context Lyrics = "duet-2" @{
3600 Ooooo, ch\'e -- ri, je t'aime. @}
3603 @c \lyricsto in the example below is pointless, given subject of the
3607 The complete example is shown here
3608 @lilypond[quote,raggedright,verbatim]
3610 \relative c'' \context Voice = duet {
3614 \lyricsto "duet" \new Lyrics {
3615 \set vocalName = "Bert"
3616 Hi, my name is Bert. }
3617 \lyricsto "duet" \new Lyrics {
3618 \set vocalName = "Ernie"
3619 Ooooo, ch\'e -- ri, je t'aime. }
3624 @cindex stanza number
3625 @cindex singer's names
3626 @cindex name of singer
3628 Stanza numbers can be added by setting @code{stanza}, e.g.
3630 @lilypond[quote,verbatim,relative=2]
3632 \context Voice = duet {
3633 \time 3/4 g2 e4 a2 f4 g2. }
3634 \lyricsto "duet" \new Lyrics {
3636 Hi, my name is Bert. }
3640 This example also demonstrates how names of the singers can be added
3641 using @code{vocalName} analogous to instrument annotations for staves.
3642 A short version may be entered as @code{vocNam}.
3644 To make empty spaces in lyrics, use @code{\skip}.
3649 Program reference: Layout objects @internalsref{LyricText} and
3650 @internalsref{VocalName}. Music expressions
3651 @internalsref{LyricEvent}.
3659 The term @emph{ambitus} denotes a range of pitches for a given voice
3660 in a part of music. It also may denote the pitch range that a musical
3661 instrument is capable of playing. Ambituses are printed on vocal
3662 parts, so singers can easily determine if it meets his or her
3665 It denoted at the beginning of a piece near the initial clef. The
3666 range is graphically specified by two note heads, that represent the
3667 minimum and maximum pitch. To print such ambituses, add the
3668 @internalsref{Ambitus_engraver} to the @internalsref{Voice} context,
3675 \consists Ambitus_engraver
3680 This results in the following output
3682 @lilypond[quote,raggedright]
3686 \consists Ambitus_engraver
3701 If you have multiple voices in a single staff, and you want a single
3702 ambitus per staff rather than per each voice, add the
3703 @internalsref{Ambitus_engraver} to the @internalsref{Staff} context
3704 rather than to the @internalsref{Voice} context.
3706 It is possible to tune individual ambituses for multiple voices on a
3707 single staff, for example by erasing or shifting them horizontally. An
3708 example is in @inputfileref{input/test,ambitus-mixed.ly}.
3712 Program reference: @internalsref{Ambitus},
3713 @internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
3714 @internalsref{AmbitusAccidental}.
3716 Examples: @inputfileref{input/regression,ambitus.ly},
3717 @inputfileref{input/test,ambitus-mixed.ly}.
3721 There is no collision handling in the case of multiple per-voice
3728 @cindex guitar tablature
3730 Tablature notation is used for notating music for plucked string
3731 instruments. It notates pitches not by using note heads, but by
3732 indicating on which string and fret a note must be played. LilyPond
3733 offers limited support for tablature.
3736 * Tablatures basic::
3737 * Non-guitar tablatures::
3740 @node Tablatures basic
3741 @subsection Tablatures basic
3742 @cindex Tablatures basic
3744 The string number associated to a note is given as a backslash
3745 followed by a number, e.g. @code{c4\3} for a C quarter on the third
3746 string. By default, string 1 is the highest one, and the tuning
3747 defaults to the standard guitar tuning (with 6 strings). The notes
3748 are printed as tablature, by using @internalsref{TabStaff} and
3749 @internalsref{TabVoice} contexts
3751 @lilypond[quote,fragment,verbatim]
3758 @cindex @code{minimumFret}
3761 When no string is specified, the first string that does not give a
3762 fret number less than @code{minimumFret} is selected. The default
3763 value for @code{minimumFret} is 0
3768 \set TabStaff.minimumFret = #8
3771 @lilypond[quote,noindent,raggedright]
3775 \set TabStaff.minimumFret = #8
3778 \context StaffGroup <<
3779 \context Staff { \clef "G_8" \frag }
3780 \context TabStaff { \frag }
3786 Program reference: @internalsref{TabStaff}, @internalsref{TabVoice}, and
3787 @internalsref{StringNumberEvent}.
3791 Chords are not handled in a special way, and hence the automatic
3792 string selector may easily select the same string to two notes in a
3796 @node Non-guitar tablatures
3797 @subsection Non-guitar tablatures
3798 @cindex Non-guitar tablatures
3800 You can change the number of strings, by setting the number of lines
3801 in the @internalsref{TabStaff}.
3803 You can change the tuning of the strings. A string tuning is given as
3804 a Scheme list with one integer number for each string, the number
3805 being the pitch (measured in semitones relative to middle C) of an
3806 open string. The numbers specified for @code{stringTuning} are the
3807 numbers of semitones to subtract or add, starting the specified pitch
3808 by default middle C, in string order. Thus, the notes are e, a, d, and
3811 @lilypond[quote,fragment,verbatim]
3812 \context TabStaff <<
3813 \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
3816 a,4 c' a e' e c' a e'
3823 No guitar special effects have been implemented.
3827 Program reference: @internalsref{Tab_note_heads_engraver}.
3831 @section Chord names
3834 LilyPond has support for both printing chord names. Chords may be
3835 entered in musical chord notation, i.e. @code{< .. >}, but they can
3836 also be entered by name. Internally, the chords are represented as a
3837 set of pitches, so they can be transposed
3840 @lilypond[quote,verbatim,raggedright]
3841 twoWays = \transpose c c' {
3850 << \context ChordNames \twoWays
3851 \context Voice \twoWays >>
3854 This example also shows that the chord printing routines do not try to
3855 be intelligent. The last chord (@code{f bes d}) is not interpreted as
3861 * Printing chord names::
3866 @subsection Chords mode
3869 Chord mode is a mode where you can input sets of pitches using common
3870 names. It is introduced by the keyword @code{\chords}.
3871 In chords mode, a chord is entered by the root, which is entered
3873 @lilypond[quote,fragment,verbatim,relative=2]
3874 \chords { es4. d8 c2 }
3879 Other chords may be entered by suffixing a colon, and introducing a
3880 modifier, and optionally, a number
3882 @lilypond[quote,fragment,verbatim]
3883 \chords { e1:m e1:7 e1:m7 }
3885 The first number following the root is taken to be the `type' of the
3886 chord, thirds are added to the root until it reaches the specified
3888 @lilypond[quote,fragment,verbatim]
3889 \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
3892 @cindex root of chord
3893 @cindex additions, in chords
3894 @cindex removals, in chords
3896 More complex chords may also be constructed adding separate steps
3897 to a chord. Additions are added after the number following
3898 the colon, and are separated by dots
3900 @lilypond[quote,verbatim,fragment]
3901 \chords { c:5.6 c:3.7.8 c:3.6.13 }
3903 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
3905 @lilypond[quote,verbatim,fragment]
3906 \chords { c:7+ c:5+.3- c:3-.5-.7- }
3908 Removals are specified similarly, and are introduced by a caret. They
3909 must come after the additions
3910 @lilypond[quote,verbatim,fragment]
3911 \chords { c^3 c:7^5 c:9^3.5 }
3914 Modifiers can be used to change pitches. The following modifiers are
3918 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
3920 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
3923 is the augmented chord. This modifier raises the 5th step.
3925 is the major 7th chord. This modifier raises the 7th step if present.
3927 is the suspended 4th or 2nd. This modifier removes the 3rd
3928 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
3931 Modifiers can be mixed with additions
3932 @lilypond[quote,verbatim,fragment]
3933 \chords { c:sus4 c:7sus4 c:dim7 c:m6 }
3936 @cindex modifiers, in chords.
3943 Since an unaltered 11 does not sound good when combined with an
3944 unaltered 3, the 11 is removed in this case (unless it is added
3947 @lilypond[quote,fragment,verbatim]
3948 \chords { c:13 c:13.11 c:m13 }
3953 An inversion (putting one pitch of the chord on the bottom), as well
3954 as bass notes, can be specified by appending
3955 @code{/}@var{pitch} to the chord
3956 @lilypond[quote,fragment,verbatim]
3957 \chords { c1 c/g c/f }
3961 A bass note can be added instead of transposed out of the chord,
3962 by using @code{/+}@var{pitch}.
3964 @lilypond[quote,fragment,verbatim]
3965 \chords { c1 c/+g c/+f }
3968 Chords is a mode similar to @code{\lyrics} etc. Most
3969 of the commands continue to work, for example, @code{r} and
3970 @code{\skip} can be used to insert rests and spaces, and property
3971 commands may be used to change various settings.
3977 Each step can only be present in a chord once. The following
3978 simply produces the augmented chord, since @code{5+} is interpreted
3981 @lilypond[quote,verbatim,fragment]
3982 \chords { c:5.5-.5+ }
3986 @node Printing chord names
3987 @subsection Printing chord names
3989 @cindex printing chord names
3993 For displaying printed chord names, use the @internalsref{ChordNames} context.
3994 The chords may be entered either using the notation
3995 described above, or directly using @code{<} and @code{>}
3997 @lilypond[quote,verbatim,raggedright]
3999 \chords {a1 b c} <d' f' a'> <e' g' b'>
4003 \context ChordNames \scheme
4004 \context Staff \scheme
4008 You can make the chord changes stand out by setting
4009 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
4010 display chord names when there is a change in the chords scheme and at
4011 the start of a new line
4013 @lilypond[quote,verbatim,linewidth=9\cm]
4015 c1:m c:m \break c:m c:m d
4018 \context ChordNames {
4019 \set chordChanges = ##t
4021 \context Staff \transpose c c' \scheme
4025 The default chord name layout is a system for Jazz music, proposed by
4026 Klaus Ignatzek (see @ref{Literature list}). It can be tuned through the
4027 following properties
4030 @cindex @code{chordNameExceptions}
4031 @item chordNameExceptions
4032 This is a list that contains the chords that have special formatting.
4034 @inputfileref{input/regression,chord-name-exceptions.ly}.
4035 @cindex exceptions, chord names.
4038 @cindex @code{majorSevenSymbol}
4039 @item majorSevenSymbol
4040 This property contains the markup object used for the 7th step, when
4041 it is major. Predefined options are @code{whiteTriangleMarkup} and
4042 @code{blackTriangleMarkup}. See
4043 @inputfileref{input/regression,chord-name-major7.ly} for an example.
4045 @cindex @code{chordNameSeparator}
4046 @item chordNameSeparator
4047 Different parts of a chord name are normally separated by a
4048 slash. By setting @code{chordNameSeparator}, you can specify other
4050 @lilypond[quote,fragment,verbatim]
4051 \context ChordNames \chords {
4053 \set chordNameSeparator
4054 = \markup { \typewriter "|" }
4059 @cindex @code{chordRootNamer}
4060 @item chordRootNamer
4061 The root of a chord is usually printed as a letter with an optional
4062 alteration. The transformation from pitch to letter is done by this
4063 function. Special note names (for example, the German ``H'' for a
4064 B-chord) can be produced by storing a new function in this property.
4066 The predefined variables @code{\germanChords},
4067 @code{\semiGermanChords} set these variables.
4070 @cindex @code{chordNoteNamer}
4071 @item chordNoteNamer
4072 The default is to print single pitch, e.g. the bass note, using the
4073 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
4074 to a specialized function to change this behavior. For example, the
4075 base can be printed in lower case.
4080 There are also two other chord name schemes implemented: an alternate
4081 Jazz chord notation, and a systematic scheme called Banter chords. The
4082 alternate jazz notation is also shown on the chart in @ref{Chord name
4083 chart}. Turning on these styles is described in the input file
4084 @inputfileref{input/test,chord-names-jazz.ly}.
4088 @cindex chords, jazz
4093 @cindex @code{\germanChords}
4094 @code{\germanChords},
4095 @cindex @code{\semiGermanChords}
4096 @code{\semiGermanChords}.
4103 Examples: @inputfileref{input/regression,chord-name-major7.ly},
4104 @inputfileref{input/regression,chord-name-exceptions.ly},
4105 @inputfileref{input/test,chord-names-jazz.ly},
4106 @inputfileref{input/test,chord-names-german.ly}.
4108 Init files: @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
4113 Chord names are determined solely from the list of pitches. Chord
4114 inversions are not identified, and neither are added bass notes. This
4115 may result in strange chord names when chords are entered with the
4116 @code{< .. >} syntax.
4121 @node Orchestral music
4122 @section Orchestral music
4124 @cindex Writing parts
4126 Orchestral music involves some special notation, both in the full
4127 score and the individual parts. This section explains how to tackle
4128 some common problems in orchestral music.
4133 * Multiple staff contexts::
4136 * Instrument names::
4138 * Instrument transpositions::
4139 * Multi measure rests::
4140 * Automatic part combining::
4142 * Different editions from one source::
4143 * Quoting other voices::
4146 @node Multiple staff contexts
4147 @subsection Multiple staff contexts
4149 Polyphonic scores consist of many staves. These staves can be
4150 constructed in three different ways
4152 @item The group is started with a brace at the left, and bar lines are
4153 connected. This is done with the @internalsref{GrandStaff} context.
4155 @item The group is started with a bracket, and bar lines are connected. This is done with the
4156 @internalsref{StaffGroup} context
4159 @item The group is started with a vertical line. Bar lines are not
4160 connected. This is the default for the score.
4164 @cindex Staff, multiple
4165 @cindex bracket, vertical
4166 @cindex brace, vertical
4173 @node Rehearsal marks
4174 @subsection Rehearsal marks
4175 @cindex Rehearsal marks
4177 @cindex @code{\mark}
4179 To print a rehearsal mark, use the @code{\mark} command
4180 @lilypond[quote,fragment,verbatim]
4191 (The letter I is skipped in accordance with engraving traditions.)
4193 The mark is incremented automatically if you use @code{\mark
4194 \default}, but you can also use an integer argument to set the mark
4195 manually. The value to use is stored in the property
4196 @code{rehearsalMark}.
4198 The style is defined by the property @code{markFormatter}. It is a
4199 function taking the current mark (an integer) and the current context
4200 as argument. It should return a markup object. In the following
4201 example, @code{markFormatter} is set to a canned procedure. After a
4202 few measures, it is set to function that produces a boxed number.
4204 @lilypond[quote,verbatim,fragment,relative=2]
4205 \set Score.markFormatter = #format-mark-numbers
4208 \set Score.markFormatter
4209 = #(lambda (mark context)
4210 (make-bold-markup (make-box-markup (number->string mark))))
4215 The file @file{scm/translation-functions.scm} contains the definitions
4216 of @code{format-mark-numbers} (the default format) and
4217 @code{format-mark-letters}. They can be used as inspiration for other
4218 formatting functions.
4221 @cindex coda on bar line
4222 @cindex segno on bar line
4223 @cindex fermata on bar line
4224 @cindex bar lines, symbols on
4226 The @code{\mark} command can also be used to put signs like coda,
4227 segno and fermatas on a bar line. Use @code{\markup} to
4228 to access the appropriate symbol
4230 @lilypond[quote,fragment,verbatim,relative=2]
4231 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4235 In the case of a line break, marks must also be printed at the end of
4236 the line, and not at the beginning. Use the following to force that
4239 \override Score.RehearsalMark
4240 #'break-visibility = #begin-of-line-invisible
4246 @cindex bar lines, putting symbols on
4250 Program reference: @internalsref{MarkEvent}, @internalsref{RehearsalMark}.
4252 Init files: @file{scm/translation-functions.scm} contains the
4253 definition of @code{format-mark-numbers} and
4254 @code{format-mark-letters}. They can be used as inspiration for other
4255 formatting functions.
4257 Examples: @inputfileref{input/regression,rehearsal-mark-letter.ly},
4258 @inputfileref{input/regression,rehearsal-mark-number.ly}.
4262 @subsection Bar numbers
4266 @cindex measure numbers
4267 @cindex @code{currentBarNumber}
4269 Bar numbers are printed by default at the start of the line. The
4270 number itself is stored in the @code{currentBarNumber} property, which
4271 is normally updated automatically for every measure.
4273 Bar numbers can be typeset at regular intervals instead of at the
4274 beginning of each line. This is illustrated in the following example,
4275 whose source is available as
4276 @inputfileref{input/test,bar-number-regular-interval.ly}
4278 @lilypondfile[quote]{bar-number-regular-interval.ly}
4282 Program reference: @internalsref{BarNumber}.
4284 Examples: @inputfileref{input/test,bar-number-every-five-reset.ly},
4285 and @inputfileref{input/test,bar-number-regular-interval.ly}.
4289 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4290 there is one at the top. To solve this, the
4291 @code{padding} property of @internalsref{BarNumber} can be
4292 used to position the number correctly.
4294 @node Instrument names
4295 @subsection Instrument names
4297 In an orchestral score, instrument names are printed left side of the
4300 This can be achieved by setting @internalsref{Staff}.@code{instrument}
4301 and @internalsref{Staff}.@code{instr}. This will print a string before
4302 the start of the staff. For the first start, @code{instrument} is
4303 used, for the next ones @code{instr} is used.
4305 @lilypond[quote,verbatim,raggedright,relative=1,fragment]
4306 \set Staff.instrument = "Ploink "
4307 \set Staff.instr = "Plk "
4313 You can also use markup texts to construct more complicated instrument
4316 @lilypond[quote,fragment,verbatim,raggedright]
4318 \set Staff.instrument = \markup {
4319 \column < "Clarinetti" { "in B"
4320 \smaller \flat } > }
4325 For longer instrument names, it may be useful to increase the
4326 @code{indent} setting in the @code{\paper} block.
4330 Program reference: @internalsref{InstrumentName}.
4334 When you put a name on a grand staff or piano staff the width of the
4335 brace is not taken into account. You must add extra spaces to the end of
4336 the name to avoid a collision.
4339 @subsection Transpose
4341 @cindex transposition of pitches
4342 @cindex @code{\transpose}
4344 A music expression can be transposed with @code{\transpose}. The
4347 \transpose @var{from} @var{to} @var{musicexpr}
4350 This means that @var{musicexpr} is transposed by the interval between
4351 the pitches @var{from} and @var{to}: any note with pitch @code{from}
4352 is changed to @code{to}.
4355 For example, consider a piece written in the key of D major. If
4356 this piece is a little too low for its performer, it can be
4357 transposed up to E major with
4359 \transpose d e @dots{}
4362 Consider a part written for violin (a C instrument). If
4363 this part is to be played on the A clarinet, the following
4364 transposition will produce the appropriate part
4367 \transpose a c @dots{}
4370 @code{\transpose} distinguishes between enharmonic pitches: both
4371 @code{\transpose c cis} or @code{\transpose c des} will transpose up
4372 half a tone. The first version will print sharps and the second
4373 version will print flats
4375 @lilypond[quote,raggedright,verbatim]
4376 mus = { \key d \major cis d fis g }
4380 \transpose c g' \mus
4381 \transpose c f' \mus
4388 Program reference: @internalsref{TransposedMusic}, and
4389 @internalsref{UntransposableMusic}.
4393 If you want to use both @code{\transpose} and @code{\relative},
4394 you must put @code{\transpose} outside of @code{\relative}, since
4395 @code{\relative} will have no effect music that appears inside a
4398 @node Instrument transpositions
4399 @subsection Instrument transpositions
4401 The key of a transposing instrument can also be specified. This
4402 applies to many wind instruments, for example, clarinets (B-flat, A and
4403 E-flat), horn (F) and trumpet (B-flat, C, D and E-flat).
4406 The transposition is entered after the keyword @code{\transposition}
4409 \transposition bes %% B-flat clarinet
4412 This command sets the property @code{instrumentTransposition}. The value of
4413 this property is used for MIDI output and quotations. It does not
4414 affect how notes are printed in the current staff.
4416 @cindex transposition, MIDI
4417 @cindex transposition, instrument
4420 @node Multi measure rests
4421 @subsection Multi measure rests
4422 @cindex multi measure rests
4423 @cindex Rests, multi measure
4427 Multi measure rests are entered using `@code{R}'. It is specifically
4428 meant for full bar rests and for entering parts: the rest can expand
4429 to fill a score with rests, or it can be printed as a single
4430 multimeasure rest. This expansion is controlled by the property
4431 @code{Score.skipBars}. If this is set to true, empty measures will not
4432 be expanded, and the appropriate number is added automatically
4434 @lilypond[quote,fragment,verbatim]
4435 \time 4/4 r1 | R1 | R1*2
4436 \set Score.skipBars = ##t R1*17 R1*4
4439 The @code{1} in @code{R1} is similar to the duration notation used for
4440 notes. Hence, for time signatures other than 4/4, you must enter other
4441 durations. This can be done with augmentation dots or fractions
4443 @lilypond[quote,fragment,verbatim]
4444 \set Score.skipBars = ##t
4452 An @code{R} spanning a single measure is printed as either a whole rest
4453 or a breve, centered in the measure regardless of the time signature.
4455 @cindex text on multi-measure rest
4456 @cindex script on multi-measure rest
4457 @cindex fermata on multi-measure rest
4459 Texts can be added to multi-measure rests by using the
4460 @var{note}-@code{markup} syntax (see @ref{Text markup}). In this case, the number is
4461 replaced. If you need both texts and the number, you must add the
4462 number by hand. A variable (@code{\fermataMarkup}) is provided for
4466 @lilypond[quote,verbatim,fragment]
4468 R2._\markup { "Ad lib" }
4472 If you want to have a text on the left end of a multi-measure rest,
4473 attach the text to a zero-length skip note, i.e.
4481 @cindex whole rests for a full measure
4485 Program reference: @internalsref{MultiMeasureRestEvent},
4486 @internalsref{MultiMeasureTextEvent},
4487 @internalsref{MultiMeasureRestMusicGroup}, and
4488 @internalsref{MultiMeasureRest}.
4490 The layout object @internalsref{MultiMeasureRestNumber} is for the
4491 default number, and @internalsref{MultiMeasureRestText} for user
4496 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
4497 over multi-measure rests.
4499 @cindex condensing rests
4501 There is no way to automatically condense multiple rests into a single
4502 multimeasure rest. Multi measure rests do not take part in rest
4505 Be careful when entering multimeasure rests followed by whole
4506 notes. The following will enter two notes lasting four measures each
4510 When @code{skipBars} is set, the result will look OK, but the bar
4511 numbering will be off.
4513 @node Automatic part combining
4514 @subsection Automatic part combining
4515 @cindex automatic part combining
4516 @cindex part combiner
4519 Automatic part combining is used to merge two parts of music onto a
4520 staff. It is aimed at typesetting orchestral scores. When the two
4521 parts are identical for a period of time, only one is shown. In
4522 places where the two parts differ, they are typeset as separate
4523 voices, and stem directions are set automatically. Also, solo and
4524 @emph{a due} parts are identified and can be marked.
4526 The syntax for part combining is
4529 \partcombine @var{musicexpr1} @var{musicexpr2}
4532 The music expressions will be interpreted as @internalsref{Voice}
4533 contexts. If using relative octaves, @code{\relative} should be
4534 specified for both music expressions, i.e.
4537 \partcombine \relative @dots{} @var{musicexpr1}
4538 \relative @dots{} @var{musicexpr2}
4542 A @code{\relative} section that is outside of @code{\partcombine} has
4543 no effect on the pitches of @var{musicexpr1} and @var{musicexpr2}.
4546 The following example demonstrates the basic functionality of the part
4547 combiner: putting parts on one staff, and setting stem directions and
4550 @lilypond[quote,verbatim,raggedright,fragment]
4551 \new Staff \partcombine
4552 \relative g' { g g a( b) c c r r }
4553 \relative g' { g g r4 r e e g g }
4556 The first @code{g} appears only once, although it was
4557 specified twice (once in each part). Stem, slur and tie directions are
4558 set automatically, depending whether there is a solo or unisono. The
4559 first part (with context called @code{one}) always gets up stems, and
4560 `solo', while the second (called @code{two}) always gets down stems and
4563 If you just want the merging parts, and not the textual markings, you
4564 may set the property @code{soloADue} to false
4566 @lilypond[quote,verbatim,raggedright,fragment,relative=2]
4568 \set Staff.soloADue = ##f
4570 \relative g' { g a( b) r }
4571 \relative g' { g r4 r f }
4577 Program reference: @internalsref{PartCombineMusic},
4578 @internalsref{SoloOneEvent}, and
4579 @internalsref{SoloTwoEvent}, and
4580 @internalsref{UnisonoEvent}.
4584 In @code{soloADue} mode, when the two voices play the same notes on and
4585 off, the part combiner may typeset @code{a2} more than once in a
4588 @code{\partcombine} cannot be inside @code{\times}.
4590 @code{\partcombine} cannot be inside @code{\relative}.
4592 Internally, the @code{\partcombine} interprets both arguments as
4593 @code{Voice}s named @code{one} and @code{two}, and then decides when
4594 the parts can be combined. Consequently, if the arguments switch to
4595 differently named @internalsref{Voice} contexts, the events in those
4599 @subsection Hiding staves
4601 @cindex Frenched scores
4602 @cindex Hiding staves
4604 In orchestral scores, staff lines that only have rests are usually
4605 removed. This saves some space. This style is called `French Score'.
4606 For @internalsref{Lyrics},
4607 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
4608 switched on by default. When these line of these contexts turn out
4609 empty after the line-breaking process, they are removed.
4611 For normal staves, a specialized @internalsref{Staff} context is
4612 available, which does the same: staves containing nothing (or only
4613 multi measure rests) are removed. The context definition is stored in
4614 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
4615 in this example disappears in the second line
4618 @lilypond[quote,verbatim]
4621 \context { \RemoveEmptyStaffContext }
4626 \new Staff { e4 f g a \break c1 }
4627 \new Staff { c4 d e f \break R1 }
4632 The first page shows all staves in full. If empty staves should be
4633 removed from the first page too, set @code{remove-first} to false in
4634 @internalsref{RemoveEmptyVerticalGroup}.
4636 Another application is making ossia sections, i.e. alternative
4637 melodies on a separate piece of staff, with help of a Frenched
4638 staff. See @inputfileref{input/test,ossia.ly} for an example.
4641 @node Different editions from one source
4642 @subsection Different editions from one source
4644 The @code{\tag} command marks music expressions with a name. These
4645 tagged expressions can be filtered out later. With this mechanism it
4646 is possible to make different versions of the same music source.
4648 In the following example, we see two versions of a piece of music, one
4649 for the full score, and one with cue notes for the instrumental part
4665 The same can be applied to articulations, texts, etc.: they are
4668 -\tag #@var{your-tag}
4670 to an articulation, for example,
4675 This defines a note with a conditional fingering indication.
4677 By applying the @code{remove-tag} function, tagged expressions can be
4678 filtered. For example,
4682 \applymusic #(remove-tag 'score) @var{the music}
4683 \applymusic #(remove-tag 'part) @var{the music}
4688 @lilypondfile[quote]{tag-filter.ly}
4690 The argument of the @code{\tag} command should be a symbol, or a list
4691 of symbols, for example,
4693 \tag #'(original-part transposed-part) @dots{}
4698 Examples: @inputfileref{input/regression,tag-filter.ly}.
4701 @node Quoting other voices
4702 @subsection Quoting other voices
4704 With quotations, fragments of other parts can be inserted into a part
4705 directly. Before a part can be quoted, it must be marked especially as
4706 quotable. This is done with code @code{\addquote} command. The
4707 quotation may then be done with @code{\quote}
4710 \addquote @var{name} @var{music}
4711 \quote @var{name} @var{duration}
4716 Here, @var{name} is an identifying string. The @var{music} is any kind
4717 of music. This is an example of @code{\addquote}
4720 \addquote clarinet \relative c' {
4725 During a part, a piece of music can be quoted with the @code{\quote}
4732 This would cite 3 quarter notes (a dotted half note) of the previously
4733 added clarinet voice.
4735 Quotations take into account the transposition both source and target
4736 instruments, if they are specified using the @code{\transposition} command.
4738 @lilypond[quote,raggedright,verbatim]
4739 \addquote clarinet \relative c' {
4745 e'8 f'8 \quote clarinet 2
4751 Only the contents of the first @internalsref{Voice} occurring in an
4752 @code{\addquote} command will be considered for quotation, so
4753 @var{music} can not contain @code{\new} and @code{\context Voice}
4754 statements that would switch to a different Voice.
4759 In this manual: @ref{Instrument transpositions}.
4761 Examples: @inputfileref{input/regression,quote.ly}
4762 @inputfileref{input/regression,quote-transposition.ly}
4764 Program reference: @internalsref{QuoteMusic}.
4766 @node Ancient notation
4767 @section Ancient notation
4769 @cindex Vaticana, Editio
4770 @cindex Medicaea, Editio
4775 Support for ancient notation includes features for mensural notation
4776 and Gregorian Chant notation. There is also limited support for
4777 figured bass notation.
4779 Many graphical objects provide a @code{style} property, see
4780 @ref{Ancient note heads}, @ref{Ancient accidentals}, @ref{Ancient
4781 rests}, @ref{Ancient clefs}, @ref{Ancient flags} and @ref{Ancient time
4782 signatures}. By manipulating such a grob property, the typographical
4783 appearance of the affected graphical objects can be accommodated for a
4784 specific notation flavor without need for introducing any new
4787 Other aspects of ancient notation can not that easily be expressed as
4788 in terms of just changing a style property of a graphical object.
4789 Therefore, some notational concepts are introduced specifically for
4790 ancient notation, see @ref{Custodes}, @ref{Divisiones},
4791 @ref{Ligatures}, and @ref{Figured bass}.
4795 * Ancient note heads::
4796 * Ancient accidentals::
4800 * Ancient time signatures::
4805 * Vaticana style contexts::
4808 If this all is way too much of documentation for you, and you just
4809 want to dive into typesetting without worrying too much about the
4810 details on how to customize a context, you may have a look at the
4811 predefined contexts (see @ref{Vaticana style contexts}). Use them to
4812 set up predefined style-specific voice and staff contexts, and
4813 directly go ahead with the note entry.
4817 Ligatures need special spacing that has not yet been implemented. As
4818 a result, there is too much space between ligatures most of the time,
4819 and line breaking often is unsatisfactory. Also, lyrics do not
4820 correctly align with ligatures.
4822 Accidentals must not be printed within a ligature, but instead need to
4823 be collected and printed in front of it.
4825 Augmentum dots within ligatures are not handled correctly.
4828 @node Ancient note heads
4829 @subsection Ancient note heads
4834 For ancient notation, a note head style other than the @code{default}
4835 style may be chosen. This is accomplished by setting the @code{style}
4836 property of the NoteHead object to the desired value (@code{baroque},
4837 @code{neo_mensural} or @code{mensural}). The @code{baroque} style
4838 differs from the @code{default} style only in using a square shape for
4839 @code{\breve} note heads. The @code{neo_mensural} style differs from
4840 the @code{baroque} style in that it uses rhomboidal heads for whole
4841 notes and all smaller durations. Stems are centered on the note
4842 heads. This style is in particular useful when transcribing mensural
4843 music, e.g. for the incipit. The @code{mensural} style finally
4844 produces note heads that mimic the look of note heads in historic
4845 printings of the 16th century.
4847 The following example demonstrates the @code{neo_mensural} style
4849 @lilypond[quote,fragment,raggedright,verbatim]
4850 \override NoteHead #'style = #'neo_mensural
4851 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
4854 When typesetting a piece in Gregorian Chant notation, a Gregorian
4855 ligature engraver will automatically select the proper note heads,
4856 such there is no need to explicitly set the note head style. Still,
4857 the note head style can be set e.g. to @code{vaticana_punctum} to
4858 produce punctum neumes. Similarly, a mensural ligature engraver is
4859 used to automatically assemble mensural ligatures. See
4860 @ref{Ligatures} for how ligature engravers work.
4865 @ref{Percussion staves} use note head styles of their own that are
4866 frequently used in contemporary music notation.
4868 Examples: @inputfileref{input/regression,note-head-style.ly} gives an
4869 overview over all available note head styles.
4872 @node Ancient accidentals
4873 @subsection Ancient accidentals
4878 Use the @code{style} property of grob @internalsref{Accidental} to
4879 select ancient accidentals. Supported styles are
4880 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
4882 @lilypond[quote,raggedright,staffsize=26]
4890 { " " \musicglyph #"accidentals-vaticana-1"
4891 " " \musicglyph #"accidentals-vaticana0" }
4895 { " " \musicglyph #"accidentals-medicaea-1" }
4899 { " " \musicglyph #"accidentals-hufnagel-1" }
4903 { " " \musicglyph #"accidentals-mensural-1"
4904 " " \musicglyph #"accidentals-mensural1" }
4913 \remove "Bar_number_engraver"
4917 \remove "Clef_engraver"
4918 \remove "Key_engraver"
4919 \remove "Time_signature_engraver"
4920 \remove "Staff_symbol_engraver"
4921 minimumVerticalExtent = ##f
4927 As shown, not all accidentals are supported by each style. When
4928 trying to access an unsupported accidental, LilyPond will switch to a
4929 different style, as demonstrated in
4930 @inputfileref{input/test,ancient-accidentals.ly}.
4932 Similarly to local accidentals, the style of the key signature can be
4933 controlled by the @code{style} property of the
4934 @internalsref{KeySignature} grob.
4938 In this manual: @ref{Pitches}, @ref{Chromatic alterations} and
4939 @ref{Accidentals} give a general introduction into the use of
4940 accidentals. @ref{Key signature} gives a general introduction into
4941 the use of key signatures.
4943 Program reference: @internalsref{KeySignature}.
4945 Examples: @inputfileref{input/test,ancient-accidentals.ly}.
4948 @subsection Ancient rests
4953 Use the @code{style} property of grob @internalsref{Rest} to select
4954 ancient accidentals. Supported styles are @code{classical},
4955 @code{neo_mensural} and @code{mensural}. @code{classical} differs
4956 from the @code{default} style only in that the quarter rest looks like
4957 a horizontally mirrored 8th rest. The @code{neo_mensural} style suits
4958 well for e.g. the incipit of a transcribed mensural piece of music.
4959 The @code{mensural} style finally mimics the appearance of rests as
4960 in historic prints of the 16th century.
4962 The following example demonstrates the @code{neo_mensural} style
4964 @lilypond[quote,fragment,raggedright,verbatim]
4965 \override Rest #'style = #'neo_mensural
4966 r\longa r\breve r1 r2 r4 r8 r16
4969 There are no 32th and 64th rests specifically for the mensural or
4970 neo-mensural style. Instead, the rests from the default style will be
4971 taken. See @inputfileref{input/test,rests.ly} for a chart of all
4974 There are no rests in Gregorian Chant notation; instead, it uses
4979 In this manual: @ref{Rests} gives a general introduction into the use of rests.
4983 @subsection Ancient clefs
4988 LilyPond supports a variety of clefs, many of them ancient.
4990 The following table shows all ancient clefs that are supported via the
4991 @code{\clef} command. Some of the clefs use the same glyph, but
4992 differ only with respect to the line they are printed on. In such
4993 cases, a trailing number in the name is used to enumerate these clefs.
4994 Still, you can manually force a clef glyph to be typeset on an
4995 arbitrary line, as described in @ref{Clef}. The note printed to the
4996 right side of each clef in the example column denotes the @code{c'}
4997 with respect to that clef.
4999 @multitable @columnfractions .3 .3 .3 .1
5003 @b{Description} @tab
5004 @b{Supported Clefs} @tab
5008 @code{clefs-neo_mensural_c} @tab
5009 modern style mensural C clef @tab
5010 @code{neo_mensural_c1}, @code{neo_mensural_c2},
5011 @code{neo_mensural_c3}, @code{neo_mensural_c4} @tab
5012 @lilypond[fragment,quote,relative=1,notime]
5013 \override Staff.TimeSignature #'transparent = ##t
5014 \clef "neo_mensural_c2" c
5018 @code{clefs-petrucci_c1}
5019 @code{clefs-petrucci_c2}
5020 @code{clefs-petrucci_c3}
5021 @code{clefs-petrucci_c4}
5022 @code{clefs-petrucci_c5}
5025 petrucci style mensural C clefs, for use on different staff lines
5026 (the examples shows the 2nd staff line C clef).
5036 @lilypond[fragment,quote,relative=1,notime]
5037 \override Staff.TimeSignature #'transparent = ##t
5038 \clef "petrucci_c2" c
5042 @code{clefs-petrucci_f} @tab
5043 petrucci style mensural F clef @tab
5044 @code{petrucci_f} @tab
5045 @lilypond[fragment,quote,relative=1,notime]
5046 \override Staff.TimeSignature #'transparent = ##t
5047 \clef "petrucci_f" c
5051 @code{clefs-petrucci_g} @tab
5052 petrucci style mensural G clef @tab
5053 @code{petrucci_g} @tab
5054 @lilypond[fragment,quote,relative=1,notime]
5055 \override Staff.TimeSignature #'transparent = ##t
5056 \clef "petrucci_g" c
5060 @code{clefs-mensural_c} @tab
5061 historic style mensural C clef @tab
5062 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
5063 @code{mensural_c4} @tab
5064 @lilypond[fragment,quote,relative=1,notime]
5065 \override Staff.TimeSignature #'transparent = ##t
5066 \clef "mensural_c2" c
5070 @code{clefs-mensural_f} @tab
5071 historic style mensural F clef @tab
5072 @code{mensural_f} @tab
5073 @lilypond[fragment,quote,relative=1,notime]
5074 \override Staff.TimeSignature #'transparent = ##t
5075 \clef "mensural_f" c
5079 @code{clefs-mensural_g} @tab
5080 historic style mensural G clef @tab
5081 @code{mensural_g} @tab
5082 @lilypond[fragment,quote,relative=1,notime]
5083 \override Staff.TimeSignature #'transparent = ##t
5084 \clef "mensural_g" c
5088 @code{clefs-vaticana_do} @tab
5089 Editio Vaticana style do clef @tab
5090 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
5091 @lilypond[fragment,quote,relative=1,notime]
5092 \override Staff.StaffSymbol #'line-count = #4
5093 \override Staff.TimeSignature #'transparent = ##t
5094 \clef "vaticana_do2" c
5098 @code{clefs-vaticana_fa} @tab
5099 Editio Vaticana style fa clef @tab
5100 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
5101 @lilypond[quote,relative=1,notime,fragment]
5102 \override Staff.StaffSymbol #'line-count = #4
5103 \override Staff.TimeSignature #'transparent = ##t
5104 \clef "vaticana_fa2" c
5108 @code{clefs-medicaea_do} @tab
5109 Editio Medicaea style do clef @tab
5110 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
5111 @lilypond[fragment,quote,relative=1,notime]
5112 \override Staff.StaffSymbol #'line-count = #4
5113 \override Staff.TimeSignature #'transparent = ##t
5114 \clef "medicaea_do2" c
5118 @code{clefs-medicaea_fa} @tab
5119 Editio Medicaea style fa clef @tab
5120 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
5121 @lilypond[fragment,quote,relative=1,notime]
5122 \override Staff.StaffSymbol #'line-count = #4
5123 \override Staff.TimeSignature #'transparent = ##t
5124 \clef "medicaea_fa2" c
5128 @code{clefs-hufnagel_do} @tab
5129 historic style hufnagel do clef @tab
5130 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
5131 @lilypond[fragment,quote,relative=1,notime]
5132 \override Staff.StaffSymbol #'line-count = #4
5133 \override Staff.TimeSignature #'transparent = ##t
5134 \clef "hufnagel_do2" c
5138 @code{clefs-hufnagel_fa} @tab
5139 historic style hufnagel fa clef @tab
5140 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
5141 @lilypond[fragment,quote,relative=1,notime]
5142 \override Staff.StaffSymbol #'line-count = #4
5143 \override Staff.TimeSignature #'transparent = ##t
5144 \clef "hufnagel_fa2" c
5148 @code{clefs-hufnagel_do_fa} @tab
5149 historic style hufnagel combined do/fa clef @tab
5150 @code{hufnagel_do_fa} @tab
5151 @lilypond[fragment,quote,relative=1,notime]
5152 \override Staff.TimeSignature #'transparent = ##t
5153 \clef "hufnagel_do_fa" c
5160 @emph{Modern style} means ``as is typeset in contemporary editions of
5161 transcribed mensural music''.
5163 @emph{Petrucci style} means ``inspired by printings published by the
5164 famous engraver Petrucci (1466-1539)''.
5166 @emph{Historic style} means ``as was typeset or written in historic
5167 editions (other than those of Petrucci)''.
5169 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
5171 Petrucci used C clefs with differently balanced left-side vertical
5172 beams, depending on which staff line it is printed.
5176 In this manual: see @ref{Clef}.
5180 The mensural g clef is mapped to the Petrucci g clef, until a new
5181 mensural g clef is implemented.
5186 @subsection Ancient flags
5191 Use the @code{flag-style} property of grob @internalsref{Stem} to
5192 select ancient flags. Besides the @code{default} flag style,
5193 only @code{mensural} style is supported
5195 @lilypond[quote,fragment,raggedright,verbatim]
5196 \override Stem #'flag-style = #'mensural
5197 \override Stem #'thickness = #1.0
5198 \override NoteHead #'style = #'mensural
5200 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
5201 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5204 Note that the innermost flare of each mensural flag always is
5205 vertically aligned with a staff line. If you do not like this
5206 behavior, you can set the @code{adjust-if-on-staffline} property of
5207 grob @internalsref{Stem} to @code{##f}. Then, the vertical position
5208 of the end of each flare is different between notes on staff lines and
5209 notes between staff lines
5211 @lilypond[quote,fragment,raggedright]
5212 \override Stem #'flag-style = #'mensural
5213 \override Stem #'thickness = #1.0
5214 \override Stem #'adjust-if-on-staffline = ##f
5215 \override NoteHead #'style = #'mensural
5217 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
5218 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5221 There is no particular flag style for neo-mensural notation. Hence,
5222 when typesetting e.g. the incipit of a transcribed piece of mensural
5223 music, the default flag style should be used. There are no flags in
5224 Gregorian Chant notation.
5227 @node Ancient time signatures
5228 @subsection Ancient time signatures
5230 @cindex time signatures
5233 There is limited support for mensural time signatures. The
5234 glyphs are hard-wired to particular time fractions. In other words,
5235 to get a particular mensural signature glyph with the @code{\time n/m}
5236 command, @code{n} and @code{m} have to be chosen according to the
5242 \set Score.timing = ##f
5243 \set Score.barAlways = ##t
5244 s_\markup { "$\\backslash$time 4/4" }
5245 ^\markup { " " \musicglyph #"timesig-neo_mensural4/4" }
5247 s_\markup { "$\\backslash$time 2/2" }
5248 ^\markup { " " \musicglyph #"timesig-neo_mensural2/2" }
5250 s_\markup { "$\\backslash$time 6/4" }
5251 ^\markup { " " \musicglyph #"timesig-neo_mensural6/4" }
5253 s_\markup { "$\\backslash$time 6/8" }
5254 ^\markup { " " \musicglyph #"timesig-neo_mensural6/8" }
5256 s_\markup { "$\\backslash$time 3/2" }
5257 ^\markup { " " \musicglyph #"timesig-neo_mensural3/2" }
5259 s_\markup { "$\\backslash$time 3/4" }
5260 ^\markup { " " \musicglyph #"timesig-neo_mensural3/4" }
5262 s_\markup { "$\\backslash$time 9/4" }
5263 ^\markup { " " \musicglyph #"timesig-neo_mensural9/4" }
5265 s_\markup { "$\\backslash$time 9/8" }
5266 ^\markup { " " \musicglyph #"timesig-neo_mensural9/8" }
5268 s_\markup { "$\\backslash$time 4/8" }
5269 ^\markup { " " \musicglyph #"timesig-neo_mensural4/8" }
5271 s_\markup { "$\\backslash$time 2/4" }
5272 ^\markup { " " \musicglyph #"timesig-neo_mensural2/4" }
5280 \remove Staff_symbol_engraver
5281 \remove Clef_engraver
5282 \remove Time_signature_engraver
5288 Use the @code{style} property of grob @internalsref{TimeSignature} to
5289 select ancient time signatures. Supported styles are
5290 @code{neo_mensural} and @code{mensural}. The above table uses the
5291 @code{neo_mensural} style. This style is appropriate e.g. for the
5292 incipit of transcriptions of mensural pieces. The @code{mensural}
5293 style mimics the look of historical printings of the 16th century.
5295 @inputfileref{input/test,time.ly} gives an overview over all available
5296 ancient and modern styles.
5300 Program reference: @ref{Time signature} gives a general introduction into the use of time
5305 Mensural signature glyphs are mapped to time fractions in a hard-wired
5306 way. This mapping is sensible, but still arbitrary: given a mensural
5307 time signature, the time fraction represents a modern meter that
5308 usually will be a good choice when transcribing a mensural piece of
5309 music. For a particular piece of mensural music, however, the mapping
5310 may be unsatisfactory. In particular, the mapping assumes a fixed
5311 transcription of durations (e.g. brevis = half note in 2/2, i.e. 4:1).
5312 Some glyphs (such as the alternate glyph for 6/8 meter) are not at all
5313 accessible through the @code{\time} command.
5315 Mensural time signatures are supported typographically, but not yet
5316 musically. The internal representation of durations is
5317 based on a purely binary system; a ternary division such as 1 brevis =
5318 3 semibrevis (tempus perfectum) or 1 semibrevis = 3 minima (cum
5319 prolatione maiori) is not correctly handled: event times in ternary
5320 modes will be badly computed, resulting e.g. in horizontally
5321 misaligned note heads, and bar checks are likely to erroneously fail.
5323 The syntax and semantics of the @code{\time} command for mensural
5324 music is subject to change.
5327 @subsection Custodes
5332 A @emph{custos} (plural: @emph{custodes}; Latin word for `guard') is a
5333 symbol that appears at the end of a staff. It anticipates the pitch
5334 of the first note(s) of the following line and thus helps the player
5335 or singer to manage line breaks during performance, thus enhancing
5336 readability of a score.
5338 Custodes were frequently used in music notation until the 17th
5339 century. Nowadays, they have survived only in a few particular forms
5340 of musical notation such as contemporary editions of Gregorian chant
5341 like the @emph{editio vaticana}. There are different custos glyphs
5342 used in different flavors of notational style.
5344 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
5345 @internalsref{Staff} context when declaring the @code{\paper} block,
5346 as shown in the following example
5352 \consists Custos_engraver
5353 Custos \override #'style = #'mensural
5358 The result looks like this
5360 @lilypond[quote,raggedright]
5364 \override Staff.Custos #'style = #'mensural
5371 \consists Custos_engraver
5377 The custos glyph is selected by the @code{style} property. The styles
5378 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
5379 @code{mensural}. They are demonstrated in the following fragment
5383 \new Lyrics \lyrics {
5387 { " " \musicglyph #"custodes-vaticana-u0" }
5391 { " " \musicglyph #"custodes-medicaea-u0" }
5396 { " " \musicglyph #"custodes-hufnagel-u0" }
5401 { " " \musicglyph #"custodes-mensural-u0" }
5413 Program reference: @internalsref{Custos}.
5415 Examples: @inputfileref{input/regression,custos.ly}.
5419 @subsection Divisiones
5425 A @emph{divisio} (plural: @emph{divisiones}; Latin word for
5426 `division') is a staff context symbol that is used to structure
5427 Gregorian music into phrases and sections. The musical meaning of
5428 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
5429 can be characterized as short, medium and long pause, somewhat like
5430 @ref{Breath marks}. The @emph{finalis} sign not only marks the end of
5431 a chant, but is also frequently used within a single
5432 antiphonal/responsorial chant to mark the end of each section.
5435 To use divisiones, include the file @code{gregorian-init.ly}. It
5436 contains definitions that you can apply by just inserting
5437 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
5438 and @code{\finalis} at proper places in the input. Some editions use
5439 @emph{virgula} or @emph{caesura} instead of divisio minima.
5440 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
5443 @lilypondfile[quote,raggedright]{divisiones.ly}
5447 @cindex @code{\virgula}
5449 @cindex @code{\caesura}
5451 @cindex @code{\divisioMinima}
5452 @code{\divisioMinima},
5453 @cindex @code{\divisioMaior}
5454 @code{\divisioMaior},
5455 @cindex @code{\divisioMaxima}
5456 @code{\divisioMaxima},
5457 @cindex @code{\finalis}
5462 In this manual: @ref{Breath marks}.
5464 Program reference: @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}.
5466 Examples: @inputfileref{input/test,divisiones.ly}.
5469 @subsection Ligatures
5473 @c TODO: Should double check if I recalled things correctly when I wrote
5474 @c down the following paragraph by heart.
5476 A ligature is a coherent graphical symbol that represents at least two
5477 distinct notes. Ligatures originally appeared in the manuscripts of
5478 Gregorian chant notation roughly since the 9th century to denote
5479 ascending or descending sequences of notes.
5481 Ligatures are entered by enclosing them in @code{\[} and @code{\]}.
5482 Some ligature styles may need additional input syntax specific for
5483 this particular type of ligature. By default, the
5484 @internalsref{LigatureBracket} engraver just puts a square bracket
5487 @lilypond[quote,raggedright,verbatim]
5495 To select a specific style of ligatures, a proper ligature engraver
5496 has to be added to the @internalsref{Voice} context, as explained in
5497 the following subsections. Only white mensural ligatures
5498 are supported with certain limitations.
5501 * White mensural ligatures::
5502 * Gregorian square neumes ligatures::
5505 @node White mensural ligatures
5506 @subsubsection White mensural ligatures
5508 @cindex Mensural ligatures
5509 @cindex White mensural ligatures
5511 There is limited support for white mensural ligatures.
5513 To engrave white mensural ligatures, in the paper block the
5514 @internalsref{Mensural_ligature_engraver} has to be put into the
5515 @internalsref{Voice} context, and remove the
5516 @internalsref{Ligature_bracket_engraver}
5522 \remove Ligature_bracket_engraver
5523 \consists Mensural_ligature_engraver
5528 There is no additional input language to describe the shape of a
5529 white mensural ligature. The shape is rather determined solely from
5530 the pitch and duration of the enclosed notes. While this approach may
5531 take a new user a while to get accustomed, it has the great advantage
5532 that the full musical information of the ligature is known internally.
5533 This is not only required for correct MIDI output, but also allows for
5534 automatic transcription of the ligatures.
5539 \set Score.timing = ##f
5540 \set Score.defaultBarType = "empty"
5541 \override NoteHead #'style = #'neo_mensural
5542 \override Staff.TimeSignature #'style = #'neo_mensural
5544 \[ g\longa c\breve a\breve f\breve d'\longa \]
5546 \[ e1 f1 a\breve g\longa \]
5548 @lilypond[quote,raggedright]
5551 \set Score.timing = ##f
5552 \set Score.defaultBarType = "empty"
5553 \override NoteHead #'style = #'neo_mensural
5554 \override Staff.TimeSignature #'style = #'neo_mensural
5556 \[ g\longa c\breve a\breve f\breve d'\longa \]
5558 \[ e1 f1 a\breve g\longa \]
5563 \remove Ligature_bracket_engraver
5564 \consists Mensural_ligature_engraver
5570 Without replacing @internalsref{Ligature_bracket_engraver} with
5571 @internalsref{Mensural_ligature_engraver}, the same music transcribes
5574 @lilypond[quote,raggedright]
5576 \set Score.timing = ##f
5577 \set Score.defaultBarType = "empty"
5578 \override NoteHead #'style = #'neo_mensural
5579 \override Staff.TimeSignature #'style = #'neo_mensural
5581 \[ g\longa c\breve a\breve f\breve d'\longa \]
5583 \[ e1 f1 a\breve g\longa \]
5589 The implementation is experimental; it may output strange warnings or
5590 even crash in some cases or produce weird results on more complex
5593 @node Gregorian square neumes ligatures
5594 @subsubsection Gregorian square neumes ligatures
5596 @cindex Square neumes ligatures
5597 @cindex Gregorian square neumes ligatures
5599 Gregorian square neumes notation (following the style of the Editio
5600 Vaticana) is under heavy development, but not yet really usable for
5601 production purposes. Core ligatures can already be typeset, but
5602 essential issues for serious typesetting are still under development,
5603 such as (among others) horizontal alignment of multiple ligatures,
5604 lyrics alignment and proper accidentals handling. Still, this section
5605 gives a sneak preview of what Gregorian chant may look like once it
5608 The following table contains the extended neumes table of the 2nd
5609 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
5610 1983 by the monks of Solesmes.
5612 @multitable @columnfractions .4 .2 .2 .2
5615 @b{Neuma aut@*Neumarum Elementa} @tab
5616 @b{Figurae@*Rectae} @tab
5617 @b{Figurae@*Liquescentes Auctae} @tab
5618 @b{Figurae@*Liquescentes Deminutae}
5620 @c TODO: \paper block is identical in all of the below examples.
5621 @c Therefore, it should somehow be included rather than duplicated all
5624 @c why not make identifiers in ly/engraver-init.ly? --hwn
5626 @c Because it's just used to typeset plain notes without
5627 @c a staff for demonstration purposes rather than something
5628 @c special of Gregorian chant notation. --jr
5633 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.5\cm]
5634 \include "gregorian-init.ly"
5639 \noBreak s^\markup {"a"} \noBreak
5641 % Punctum Inclinatum
5643 \noBreak s^\markup {"b"}
5645 \paper { \neumeDemoPaper }}
5648 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.5\cm]
5649 \include "gregorian-init.ly"
5652 % Punctum Auctum Ascendens
5653 \[ \auctum \ascendens b \]
5654 \noBreak s^\markup {"c"} \noBreak
5656 % Punctum Auctum Descendens
5657 \[ \auctum \descendens b \]
5658 \noBreak s^\markup {"d"} \noBreak
5660 % Punctum Inclinatum Auctum
5661 \[ \inclinatum \auctum b \]
5662 \noBreak s^\markup {"e"}
5664 \paper { \neumeDemoPaper }}
5667 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5668 \include "gregorian-init.ly"
5671 % Punctum Inclinatum Parvum
5672 \[ \inclinatum \deminutum b \]
5673 \noBreak s^\markup {"f"}
5675 \paper { \neumeDemoPaper }}
5681 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5682 \include "gregorian-init.ly"
5687 \noBreak s^\markup {"g"}
5689 \paper { \neumeDemoPaper }}
5695 @code{3. Apostropha vel Stropha}
5697 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5698 \include "gregorian-init.ly"
5703 \noBreak s^\markup {"h"}
5705 \paper { \neumeDemoPaper }}
5708 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5709 \include "gregorian-init.ly"
5713 \[ \stropha \auctum b \]
5714 \noBreak s^\markup {"i"}
5716 \paper { \neumeDemoPaper }}
5723 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5724 \include "gregorian-init.ly"
5729 \noBreak s^\markup {"j"}
5731 \paper { \neumeDemoPaper }}
5737 @code{5. Clivis vel Flexa}
5739 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5740 \include "gregorian-init.ly"
5747 \paper { \neumeDemoPaper }}
5750 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
5751 \include "gregorian-init.ly"
5754 % Clivis Aucta Descendens
5755 \[ b \flexa \auctum \descendens g \]
5756 \noBreak s^\markup {"l"} \noBreak
5758 % Clivis Aucta Ascendens
5759 \[ b \flexa \auctum \ascendens g \]
5760 \noBreak s^\markup {"m"}
5762 \paper { \neumeDemoPaper }}
5765 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5766 \include "gregorian-init.ly"
5770 \[ b \flexa \deminutum g \]
5773 \paper { \neumeDemoPaper }}
5777 @code{6. Podatus vel Pes}
5779 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5780 \include "gregorian-init.ly"
5787 \paper { \neumeDemoPaper }}
5790 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
5791 \include "gregorian-init.ly"
5794 % Pes Auctus Descendens
5795 \[ g \pes \auctum \descendens b \]
5796 \noBreak s^\markup {"p"} \noBreak
5798 % Pes Auctus Ascendens
5799 \[ g \pes \auctum \ascendens b \]
5800 \noBreak s^\markup {"q"}
5802 \paper { \neumeDemoPaper }}
5805 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5806 \include "gregorian-init.ly"
5810 \[ g \pes \deminutum b \]
5813 \paper { \neumeDemoPaper }}
5817 @code{7. Pes Quassus}
5819 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5820 \include "gregorian-init.ly"
5824 \[ \oriscus g \pes \virga b \]
5827 \paper { \neumeDemoPaper }}
5830 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5831 \include "gregorian-init.ly"
5834 % Pes Quassus Auctus Descendens
5835 \[ \oriscus g \pes \auctum \descendens b \]
5838 \paper { \neumeDemoPaper }}
5843 @code{8. Quilisma Pes}
5845 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5846 \include "gregorian-init.ly"
5850 \[ \quilisma g \pes b \]
5853 \paper { \neumeDemoPaper }}
5856 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5857 \include "gregorian-init.ly"
5860 % Quilisma Pes Auctus Descendens
5861 \[ \quilisma g \pes \auctum \descendens b \]
5864 \paper { \neumeDemoPaper }}
5869 @code{9. Podatus Initio Debilis}
5871 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5872 \include "gregorian-init.ly"
5875 % Pes Initio Debilis
5876 \[ \deminutum g \pes b \]
5879 \paper { \neumeDemoPaper }}
5882 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5883 \include "gregorian-init.ly"
5886 % Pes Auctus Descendens Initio Debilis
5887 \[ \deminutum g \pes \auctum \descendens b \]
5890 \paper { \neumeDemoPaper }}
5897 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5898 \include "gregorian-init.ly"
5902 \[ a \pes b \flexa g \]
5905 \paper { \neumeDemoPaper }}
5908 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5909 \include "gregorian-init.ly"
5912 % Torculus Auctus Descendens
5913 \[ a \pes b \flexa \auctum \descendens g \]
5916 \paper { \neumeDemoPaper }}
5919 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5920 \include "gregorian-init.ly"
5923 % Torculus Deminutus
5924 \[ a \pes b \flexa \deminutum g \]
5927 \paper { \neumeDemoPaper }}
5931 @code{11. Torculus Initio Debilis}
5933 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5934 \include "gregorian-init.ly"
5937 % Torculus Initio Debilis
5938 \[ \deminutum a \pes b \flexa g \]
5941 \paper { \neumeDemoPaper }}
5944 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5945 \include "gregorian-init.ly"
5948 % Torculus Auctus Descendens Initio Debilis
5949 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
5952 \paper { \neumeDemoPaper }}
5955 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5956 \include "gregorian-init.ly"
5959 % Torculus Deminutus Initio Debilis
5960 \[ \deminutum a \pes b \flexa \deminutum g \]
5963 \paper { \neumeDemoPaper }}
5967 @code{12. Porrectus}
5969 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5970 \include "gregorian-init.ly"
5974 \[ a \flexa g \pes b \]
5977 \paper { \neumeDemoPaper }}
5980 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5981 \include "gregorian-init.ly"
5984 % Porrectus Auctus Descendens
5985 \[ a \flexa g \pes \auctum \descendens b \]
5988 \paper { \neumeDemoPaper }}
5991 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5992 \include "gregorian-init.ly"
5995 % Porrectus Deminutus
5996 \[ a \flexa g \pes \deminutum b \]
5999 \paper { \neumeDemoPaper }}
6005 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6006 \include "gregorian-init.ly"
6010 \[ \virga b \inclinatum a \inclinatum g \]
6013 \paper { \neumeDemoPaper }
6017 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6018 \include "gregorian-init.ly"
6022 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6025 \paper { \neumeDemoPaper }}
6028 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6029 \include "gregorian-init.ly"
6032 % Climacus Deminutus
6033 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6036 \paper { \neumeDemoPaper }}
6040 @code{14. Scandicus}
6042 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6043 \include "gregorian-init.ly"
6047 \[ g \pes a \virga b \]
6050 \paper { \neumeDemoPaper }}
6053 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6054 \include "gregorian-init.ly"
6057 % Scandicus Auctus Descendens
6058 \[ g \pes a \pes \auctum \descendens b \]
6061 \paper { \neumeDemoPaper }}
6064 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6065 \include "gregorian-init.ly"
6068 % Scandicus Deminutus
6069 \[ g \pes a \pes \deminutum b \]
6072 \paper { \neumeDemoPaper }}
6078 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6079 \include "gregorian-init.ly"
6083 \[ g \oriscus a \pes \virga b \]
6086 \paper { \neumeDemoPaper }}
6089 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6090 \include "gregorian-init.ly"
6093 % Salicus Auctus Descendens
6094 \[ g \oriscus a \pes \auctum \descendens b \]
6097 \paper { \neumeDemoPaper }}
6104 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6105 \include "gregorian-init.ly"
6109 \[ \stropha b \stropha b \stropha a \]
6112 \paper { \neumeDemoPaper }
6121 Unlike most other neumes notation systems, the input language for
6122 neumes does not necessarily reflect directly the typographical
6123 appearance, but is designed to solely focuse on musical meaning. For
6124 example, @code{\[ a \pes b \flexa g \]} produces a Torculus consisting
6125 of three Punctum heads, while @code{\[ a \flexa g \pes b \]} produces
6126 a Porrectus with a curved flexa shape and only a single Punctum head.
6127 There is no command to explicitly typeset the curved flexa shape; the
6128 decision of when to typeset a curved flexa shape is purely taken from
6129 the musical input. The idea of this approach is to separate the
6130 musical aspects of the input from the notation style of the output.
6131 This way, the same input can be reused to typeset the same music in a
6132 different style of Gregorian chant notation.
6134 The following table shows the code fragments that produce the
6135 ligatures in the above neumes table. The letter in the first column
6136 in each line of the below table indicates to which ligature in the
6137 above table it refers. The second column gives the name of the
6138 ligature. The third column shows the code fragment that produces this
6139 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
6141 @multitable @columnfractions .1 .4 .5
6155 Punctum Inclinatum @tab
6156 @code{\[ \inclinatum b \]}
6160 Punctum Auctum Ascendens @tab
6161 @code{\[ \auctum \ascendens b \]}
6165 Punctum Auctum Descendens @tab
6166 @code{\[ \auctum \descendens b \]}
6170 Punctum Inclinatum Auctum @tab
6171 @code{\[ \inclinatum \auctum b \]}
6175 Punctum Inclinatum Parvum @tab
6176 @code{\[ \inclinatum \deminutum b \]}
6181 @code{\[ \virga b \]}
6186 @code{\[ \stropha b \]}
6191 @code{\[ \stropha \auctum b \]}
6196 @code{\[ \oriscus b \]}
6200 Clivis vel Flexa @tab
6201 @code{\[ b \flexa g \]}
6205 Clivis Aucta Descendens @tab
6206 @code{\[ b \flexa \auctum \descendens g \]}
6210 Clivis Aucta Ascendens @tab
6211 @code{\[ b \flexa \auctum \ascendens g \]}
6216 @code{\[ b \flexa \deminutum g \]}
6220 Podatus vel Pes @tab
6221 @code{\[ g \pes b \]}
6225 Pes Auctus Descendens @tab
6226 @code{\[ g \pes \auctum \descendens b \]}
6230 Pes Auctus Ascendens @tab
6231 @code{\[ g \pes \auctum \ascendens b \]}
6236 @code{\[ g \pes \deminutum b \]}
6241 @code{\[ \oriscus g \pes \virga b \]}
6245 Pes Quassus Auctus Descendens @tab
6246 @code{\[ \oriscus g \pes \auctum \descendens b \]}
6251 @code{\[ \quilisma g \pes b \]}
6255 Quilisma Pes Auctus Descendens @tab
6256 @code{\[ \quilisma g \pes \auctum \descendens b \]}
6260 Pes Initio Debilis @tab
6261 @code{\[ \deminutum g \pes b \]}
6265 Pes Auctus Descendens Initio Debilis @tab
6266 @code{\[ \deminutum g \pes \auctum \descendens b \]}
6271 @code{\[ a \pes b \flexa g \]}
6275 Torculus Auctus Descendens @tab
6276 @code{\[ a \pes b \flexa \auctum \descendens g \]}
6280 Torculus Deminutus @tab
6281 @code{\[ a \pes b \flexa \deminutum g \]}
6285 Torculus Initio Debilis @tab
6286 @code{\[ \deminutum a \pes b \flexa g \]}
6290 Torculus Auctus Descendens Initio Debilis @tab
6291 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
6295 Torculus Deminutus Initio Debilis @tab
6296 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
6301 @code{\[ a \flexa g \pes b \]}
6305 Porrectus Auctus Descendens @tab
6306 @code{\[ a \flexa g \pes \auctum \descendens b \]}
6310 Porrectus Deminutus @tab
6311 @code{\[ a \flexa g \pes \deminutum b \]}
6316 @code{\[ \virga b \inclinatum a \inclinatum g \]}
6320 Climacus Auctus @tab
6321 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
6325 Climacus Deminutus @tab
6326 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
6331 @code{\[ g \pes a \virga b \]}
6335 Scandicus Auctus Descendens @tab
6336 @code{\[ g \pes a \pes \auctum \descendens b \]}
6340 Scandicus Deminutus @tab
6341 @code{\[ g \pes a \pes \deminutum b \]}
6346 @code{\[ g \oriscus a \pes \virga b \]}
6350 Salicus Auctus Descendens @tab
6351 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
6356 @code{\[ \stropha b \stropha b \stropha a \]}
6362 The following head prefixes are supported
6364 @cindex @code{\virga}
6366 @cindex @code{\stropha}
6368 @cindex @code{\inclinatum}
6370 @cindex @code{\auctum}
6372 @cindex @code{\descendens}
6374 @cindex @code{\ascendens}
6376 @cindex @code{\oriscus}
6378 @cindex @code{\quilisma}
6380 @cindex @code{\deminutum}
6383 Head prefixes can be accumulated, though restrictions apply. For
6384 example, either @code{\descendens} or @code{\ascendens} can be applied
6385 to a head, but not both to the same head.
6388 @cindex @code{\flexa}
6389 Two adjacent heads can be tied together with the @code{\pes} and
6390 @code{\flexa} infix commands for a rising and falling line of melody,
6395 @node Vaticana style contexts
6396 @subsection Vaticana style contexts
6398 @cindex VaticanaVoiceContext
6399 @cindex VaticanaStaffContext
6401 The predefined @code{VaticanaVoiceContext} and
6402 @code{VaticanaStaffContext} can be used to easily engrave a piece of
6403 Gregorian Chant in the style of the Editio Vaticana. These contexts
6404 initialize all relevant context properties and grob properties to
6405 proper values. With these contexts, you can immediately go ahead
6406 entering the chant, as the following short excerpt demonstrates
6408 @lilypond[quote,raggedright,verbatim,noindent]
6409 \include "gregorian-init.ly"
6412 \context VaticanaVoice = "cantus" {
6413 \override Score.BarNumber #'transparent = ##t
6415 \[ c'\melisma c' \flexa a \]
6416 \[ a \flexa \deminutum g\melismaEnd \]
6418 \[ f\melisma \pes a c' c' \pes d'\melismaEnd \]
6419 c' \divisioMinima \break
6420 \[ c'\melisma c' \flexa a \]
6421 \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
6424 \lyricsto "cantus" \new Lyrics {
6425 San- ctus, San- ctus, San- ctus
6432 @subsection Figured bass
6434 @cindex Basso continuo
6436 @c TODO: musicological blurb about FB
6439 LilyPond has limited support for figured bass
6441 @lilypond[quote,verbatim,fragment]
6443 \context Voice { \clef bass dis4 c d ais }
6444 \context FiguredBass \figures {
6445 < 6 >4 < 7 >8 < 6+ [_!] >
6451 The support for figured bass consists of two parts: there is an input
6452 mode, introduced by @code{\figures}, where you can enter bass figures
6453 as numbers, and there is a context called @internalsref{FiguredBass} that
6454 takes care of making @internalsref{BassFigure} objects.
6456 In figures input mode, a group of bass figures is delimited by
6457 @code{<} and @code{>}. The duration is entered after the @code{>>}
6461 @lilypond[quote,fragment]
6462 \context FiguredBass
6466 Accidentals are added when you append @code{-}, @code{!} and @code{+}
6472 @lilypond[quote,fragment]
6473 \context FiguredBass
6474 \figures { <4- 6+ 7!> }
6477 Spaces or dashes may be inserted by using @code{_}. Brackets are
6478 introduced with @code{[} and @code{]}
6483 @lilypond[quote,fragment]
6484 \context FiguredBass
6485 \figures { < [4 6] 8 [_! 12]> }
6488 Although the support for figured bass may superficially resemble chord
6489 support, it works much simpler. The @code{\figures} mode simply
6490 stores the numbers , and @internalsref{FiguredBass} context prints
6491 them as entered. There is no conversion to pitches, and no
6492 realizations of the bass are played in the MIDI file.
6494 Internally, the code produces markup texts. You can use any of the
6495 markup text properties to override formatting. For example, the
6496 vertical spacing of the figures may be set with @code{baseline-skip}.
6500 Program reference: @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
6501 and @internalsref{FiguredBass} context.
6505 Slash notation for alterations is not supported.
6507 @node Contemporary notation
6508 @section Contemporary notation
6510 In the 20th century, composers have greatly expanded the musical
6511 vocabulary. With this expansion, many innovations in musical notation
6512 have been tried. The book by Stone (1980) gives a comprehensive
6513 overview (see @ref{Literature list}). In general, the use of new,
6514 innovative notation makes a piece harder to understand and perform and
6515 its use should therefore be avoided if possible. For this reason,
6516 support for contemporary notation in LilyPond is limited.
6525 @subsection Clusters
6529 A cluster indicates a continuous range of pitches to be played. They
6530 can be denoted as the envelope of a set of notes. They are entered by
6531 applying the function @code{notes-to-clusters} to a sequence of
6534 @lilypond[quote,relative=2,verbatim]
6535 \applymusic #notes-to-clusters { <c e > <b f'> }
6538 The following example (from
6539 @inputfileref{input/regression,cluster.ly}) shows what the result
6542 @lilypondfile[quote]{cluster.ly}
6544 Ordinary notes and clusters can be put together in the same staff,
6545 even simultaneously. In such a case no attempt is made to
6546 automatically avoid collisions between ordinary notes and clusters.
6550 Program reference: @internalsref{ClusterSpanner},
6551 @internalsref{ClusterSpannerBeacon},
6552 @internalsref{Cluster_spanner_engraver}, and
6553 @internalsref{ClusterNoteEvent}.
6555 Examples: @inputfileref{input/regression,cluster.ly}.
6559 Music expressions like @code{<< @{ g8 e8 @} a4 >>} are not printed
6560 accurately. Use @code{<g a>8 <e a>8} instead.
6565 @subsection Fermatas
6571 Contemporary music notation frequently uses special fermata symbols to
6572 indicate fermatas of differing lengths. The following fermatas are
6575 @lilypond[quote,raggedright]
6597 \context Lyrics \lyrics {
6598 \override LyricText #'font-family = #'typewriter
6599 "shortfermata" "fermata" "longfermata" "verylongfermata"
6604 See @ref{Articulations} for general instructions how to apply scripts
6605 such as fermatas to notes.
6608 @node Special notation
6609 @section Special notation
6613 * Easy Notation note heads::
6617 @subsection Balloon help
6619 Elements of notation can be marked and named with the help of a square
6620 balloon. The primary purpose of this feature is to explain notation.
6622 The following example demonstrates its use.
6624 @lilypond[quote,verbatim,fragment,raggedright,relative=2]
6627 #(add-balloon-text 'NoteHead "heads, or tails?"
6633 The function @code{add-balloon-text} takes the name of a grob, the
6634 label to print and where to put the label relative to the object. In
6635 the above example, the text ``heads or tails?'' ends 3 spaces below
6639 @cindex notation, explaining
6643 Program reference: @internalsref{text-balloon-interface}.
6645 Examples: @inputfileref{input/regression,balloon.ly}.
6647 @node Easy Notation note heads
6648 @subsection Easy Notation note heads
6650 @cindex easy notation
6653 The `easy play' note head includes a name inside the head. It is
6654 used in music for beginners
6656 @lilypond[quote,raggedright,verbatim,fragment,staffsize=26]
6661 The command @code{\setEasyHeads} overrides settings for the
6662 @internalsref{NoteHead} object. To make the letters readable, it has
6663 to be printed in a large font size. To print with a larger font, see
6664 @ref{Setting global staff size}.
6669 If you view the result with Xdvi, staff lines may show through the
6670 letters. Printing the PostScript file obtained does produce the
6675 @cindex @code{\setEasyHeads}
6676 @code{\setEasyHeads}
6682 Entered music can also be converted to MIDI output. The performance
6683 is intended for proof-hearing the music for errors.
6685 Ties, dynamics and tempo changes are interpreted. Dynamic marks,
6686 crescendi and decrescendi translate into MIDI volume levels. Dynamic
6687 marks translate to a fixed fraction of the available MIDI volume
6688 range, crescendi and decrescendi make the volume vary linearly between
6689 their two extremities. The fractions can be adjusted by
6690 @code{dynamicAbsoluteVolumeFunction} in @internalsref{Voice} context.
6691 For each type of MIDI instrument, a volume range can be defined. This
6692 gives a basic equalizer control, which can enhance the quality of
6693 the MIDI output remarkably. The equalizer can be controlled by
6694 setting @code{instrumentEqualizer}.
6698 Many musically interesting effects, such as swing, articulation,
6699 slurring, etc., are not translated to MIDI.
6701 The MIDI output allocates a channel for each Staff, and one for global
6702 settings. Hence, the MIDI file should not have more than 15 staves
6703 (or 14 if you do not use drums). Other staves will remain silent.
6705 Not all MIDI players correctly handle tempo change in the MIDI
6706 output. Players that are known to work include
6707 @uref{timidity,http://timidity.sourceforge.net/}
6712 * MIDI instrument names::
6717 @subsection MIDI block
6721 The MIDI block is analogous to the paper block, but it is somewhat
6722 simpler. The @code{\midi} block can contain
6726 @item a @code{\tempo} definition, and
6727 @item context definitions.
6730 A number followed by a period is interpreted as a real number, so
6731 for setting the tempo for dotted notes, an extra space should be
6732 inserted, for example
6735 \midi @{ \tempo 4 . = 120 @}
6739 @cindex context definition
6741 Context definitions follow precisely the same syntax as within the
6742 \paper block. Translation modules for sound are called performers.
6743 The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
6746 @node MIDI instrument names
6747 @subsection MIDI instrument names
6749 @cindex instrument names
6750 @cindex @code{Staff.midiInstrument}
6752 The MIDI instrument name is set by the @code{Staff.midiInstrument}
6753 property. The instrument name should be chosen from the list in
6754 @ref{MIDI instruments}.
6758 If the selected string does not exactly match, the default is used,
6759 which is the Grand Piano.