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::
30 * Formatting cue notes::
32 * Contemporary notation::
37 @c FIXME: Note entry vs Music entry at top level menu is confusing.
43 This section is about basic notation elements notes, rests and
44 related constructs, such as stems, tuplets and ties.
49 * Chromatic alterations::
64 A note is printed by specifying its pitch and then its duration
65 @footnote{Notes constitute the most basic elements of LilyPond input,
66 but they do not form valid input on their own without a @code{\score}
67 block. However, for the sake of brevity and simplicity we will
68 generally omit @code{\score} blocks and @code{\paper} declarations in
71 @lilypond[quote,fragment,verbatim]
80 @cindex Note specification
82 @cindex entering notes
84 The most common syntax for pitch entry is used in standard notes and
85 @code{\chords} mode. In these modes, pitches may be designated by
86 names. The notes are specified by the letters @code{a} through
87 @code{g}, while the octave is formed with notes ranging from @code{c}
88 to @code{b}. The pitch @code{c} is an octave below middle C and the
89 letters span the octave above that C
91 @lilypond[quote,fragment,verbatim]
93 a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
96 @cindex note names, Dutch
98 A sharp is formed by adding @code{-is} to the end of a pitch name and
99 a flat is formed by adding @code{-es}. Double sharps and double flats
100 are obtained by adding @code{-isis} or @code{-eses}. These
101 names are the Dutch note names. In Dutch, @code{aes} is contracted to
102 @code{as}, but both forms are accepted. Similarly, both
103 @code{es} and @code{ees} are accepted.
105 Half-flats and half-sharps are formed by adding @code{-eh} and
106 @code{-ih}; the following is a series of Cs with increasing pitches
108 @cindex quarter tones
109 @cindex semi-flats, semi-sharps
111 @lilypond[fragment,quote,verbatim,relative=3]
123 There are predefined sets of note names for various other languages.
124 To use them, include the language specific init file. For
125 example: @code{\include "english.ly"}. The available language files
126 and the note names they define are
131 Note Names sharp flat
132 nederlands.ly c d e f g a bes b -is -es
133 english.ly c d e f g a bf b -s/-sharp -f/-flat
135 deutsch.ly c d e f g a b h -is -es
136 norsk.ly c d e f g a b h -iss/-is -ess/-es
137 svenska.ly c d e f g a b h -iss -ess
138 italiano.ly do re mi fa sol la sib si -d -b
139 catalan.ly do re mi fa sol la sib si -d/-s -b
140 espanol.ly do re mi fa sol la sib si -s -b
149 The optional octave specification takes the form of a series of
150 single quote (`@code{'}') characters or a series of comma
151 (`@code{,}') characters. Each @code{'} raises the pitch by one
152 octave; each @code{,} lowers the pitch by an octave
154 @lilypond[quote,fragment,verbatim]
155 c' c'' es' g' as' gisis' ais'
161 Notes can be hidden and unhidden with the following commands
163 @cindex @code{\hideNotes}
165 @cindex @code{\unHideNotes}
171 Program reference: @internalsref{NoteEvent}, and @internalsref{NoteHead}.
173 @node Chromatic alterations
174 @subsection Chromatic alterations
176 Normally accidentals are printed automatically, but you may also
177 print them manually. A reminder accidental
178 @cindex reminder accidental
180 can be forced by adding an exclamation mark @code{!}
181 after the pitch. A cautionary accidental
182 @cindex cautionary accidental
183 @cindex parenthesized accidental
184 (i.e. an accidental within parentheses) can be obtained by adding the
185 question mark `@code{?}' after the pitch
187 @lilypond[quote,fragment,verbatim]
188 cis' cis' cis'! cis'?
194 The automatic production of accidentals can be tuned in many
195 ways. For more information, refer to @ref{Accidentals}.
200 There are no generally accepted standards for denoting three quarter
201 flats, so LilyPond's symbol does not conform to any standard.
206 A chord is formed by a enclosing a set of pitches in @code{<} and
207 @code{>}. A chord may be followed by a duration, and a set of
208 articulations, just like simple notes.
210 @lilypond[fragment,quote,relative=1]
221 Rests are entered like notes, with the note name @code{r}
223 @lilypond[fragment,quote,raggedright,verbatim]
227 Whole bar rests, centered in middle of the bar,
228 must be done with multi-measure rests. They are discussed in
229 @ref{Multi measure rests}.
232 A rest's vertical position may be explicitly specified by entering a
233 note with the @code{\rest} keyword appended. This makes manual
234 formatting in polyphonic music easier. Rest collision testing will
235 leave these rests alone
239 @lilypond[fragment,quote,raggedright,verbatim]
245 Program reference: @internalsref{RestEvent}, and @internalsref{Rest}.
252 @cindex Invisible rest
255 An invisible rest (also called a `skip') can be entered like a note
256 with note name `@code{s}' or with @code{\skip @var{duration}}
258 @lilypond[fragment,quote,raggedright,verbatim]
262 The @code{s} syntax is only available in note mode and chord mode. In
263 other situations, you should use the @code{\skip} command
265 @lilypond[quote,raggedright,verbatim]
267 { \time 4/8 \skip 2 \time 4/4 }
268 \relative c'' { a2 a1 }
272 The skip command is merely an empty musical placeholder. It does not
273 produce any output, not even transparent output.
275 The @code{s} skip command does create @internalsref{Staff} and
276 @internalsref{Voice} when necessary, similar to note and rest
277 commands. For example, the following results in an empty staff.
279 @lilypond[quote,raggedright,verbatim]
283 The same fragment using @code{\skip} results in an empty page.
287 Program reference: @internalsref{SkipEvent}, @internalsref{SkipMusic}.
292 @subsection Durations
296 @cindex @code{\longa}
297 @cindex @code{\breve}
298 @cindex @code{\maxima}
301 In Note, Chord, and Lyrics mode, durations are designated by numbers
302 and dots: durations are entered as their reciprocal values. For example,
303 a quarter note is entered using a @code{4} (since it is a 1/4 note), while
304 a half note is entered using a @code{2} (since it is a 1/2 note). For notes
305 longer than a whole you must use variables
309 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
311 r1 r2 r4 r8 r16 r32 r64 r64
317 a\breve*1/2 \autoBeamOff
318 a1 a2 a4 a8 a16 a32 a64 a64
319 r\longa*1/4 r\breve *1/2
320 r1 r2 r4 r8 r16 r32 r64 r64
326 \remove "Clef_engraver"
327 \override StaffSymbol #'transparent = ##t
328 \override TimeSignature #'transparent = ##t
329 \override BarLine #'transparent = ##t
330 \consists "Pitch_squash_engraver"
337 If the duration is omitted then it is set to the previously entered
338 duration. The default for the first note is a quarter note. The duration
339 can be followed by dots (`@code{.}') in order to obtain dotted note
343 @lilypond[quote,fragment,verbatim]
344 a' b' c''8 b' a'4 a'4. b'4.. c'8.
349 You can alter the length of duration by a fraction @var{N/M}
350 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
351 will not affect the appearance of the notes or rests produced.
353 In the following example, the first three notes take up exactly two
354 beats, but no triplet bracket is printed.
355 @lilypond[quote,fragment,relative=3,verbatim]
357 a4*2/3 gis4*2/3 a4*2/3
363 Dots are normally moved up to avoid staff lines, except in polyphonic
364 situations. The following commands may be used to force a particular
367 @cindex @code{\dotsUp}
369 @cindex @code{\dotsDown}
371 @cindex @code{\dotsBoth}
376 This manual: @ref{Tuplets}
378 Program reference: @internalsref{Dots}, and @internalsref{DotColumn}.
383 Whenever a note is found, a @internalsref{Stem} object is created
384 automatically. For whole notes and rests, they are also created but
389 @cindex @code{\stemUp}
391 @cindex @code{\stemDown}
393 @cindex @code{\stemBoth}
404 A tie connects two adjacent note heads of the same pitch. The tie in
405 effect extends the length of a note. Ties should not be confused with
406 slurs, which indicate articulation, or phrasing slurs, which indicate
407 musical phrasing. A tie is entered using the tilde symbol `@code{~}'
409 @lilypond[quote,fragment,verbatim]
410 e' ~ e' <c' e' g'> ~ <c' e' g'>
413 When a tie is applied to a chord, all note heads whose pitches match
414 are connected. When no note heads match, no ties will be created.
416 In its meaning a tie is just a way of extending a note duration, similar
417 to the augmentation dot; in the following example there are two ways of
418 notating exactly the same concept
420 @lilypond[quote,fragment,raggedright]
421 \time 3/4 c'2. c'2 ~ c'4
423 If you need to tie a lot of notes over bars, it may be easier to use automatic
424 note splitting (see @ref{Automatic note splitting}).
429 @cindex @code{\tieUp}
431 @cindex @code{\tieDown}
433 @cindex @code{\tieBoth}
435 @cindex @code{\tieDotted}
437 @cindex @code{\tieSolid}
442 In this manual: @ref{Automatic note splitting}.
444 Program reference: @internalsref{TieEvent}, @internalsref{Tie}.
446 For tying only a subset of the note heads of a pair of chords, see
447 @inputfileref{input/regression,tie-chord-partial.ly}.
452 Switching staves when a tie is active will not produce a slanted tie.
454 Formatting of ties is a difficult subject. The results are often not
464 @cindex @code{\times}
466 Tuplets are made out of a music expression by multiplying all durations
469 @cindex @code{\times}
471 \times @var{fraction} @var{musicexpr}
475 The duration of @var{musicexpr} will be multiplied by the fraction.
476 The fraction's denominator will be printed over the notes, optionally
477 with a bracket. The most common tuplet is the triplet in which 3
478 notes have the length of 2, so the notes are 2/3 of their written
481 @lilypond[quote,fragment,verbatim]
482 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
485 The property @code{tupletSpannerDuration} specifies how long each
486 bracket should last. With this, you can make lots of tuplets while
487 typing @code{\times} only once, saving lots of typing. In the next
488 example, there are two triplets shown, while @code{\times} was only
491 @lilypond[quote,fragment,relative=1,raggedright,verbatim]
492 \set tupletSpannerDuration = #(ly:make-moment 1 4)
493 \times 2/3 { c'8 c c c c c }
496 The format of the number is determined by the property
497 @code{tupletNumberFormatFunction}. The default prints only the
498 denominator, but if it is set to the Scheme function
499 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
503 @cindex @code{tupletNumberFormatFunction}
504 @cindex tuplet formatting
509 @cindex @code{\tupletUp}
511 @cindex @code{\tupletDown}
513 @cindex @code{\tupletBoth}
518 User manual: @ref{Changing context properties on the fly} for the
522 Program reference: @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
524 Examples: @inputfileref{input/regression,tuplet-nest.ly}.
528 Nested tuplets are not formatted automatically. In this case, outer
529 tuplet brackets should be moved manually, which is demonstrated in
530 @inputfileref{input/regression,tuplet-nest.ly}.
534 @node Easier music entry
535 @section Easier music entry
538 This section deals with tricks and features of the input language that
539 were added solely to help entering music, finding and correcting
540 mistakes. There are also external tools that make debugging easier.
541 See @ref{Point and click} for more information.
543 It is also possible to enter and edit music using other programs. For
544 example, GUI interfaces, or MIDI sequencers. Refer to the LilyPond
545 website for more information.
552 * Skipping corrected music::
553 * Automatic note splitting::
559 @node Relative octaves
560 @subsection Relative octaves
562 @cindex relative octave specification
564 Octaves are specified by adding @code{'} and @code{,} to pitch names.
565 When you copy existing music, it is easy to accidentally put a pitch
566 in the wrong octave and hard to find such an error. The relative
567 octave mode prevents these errors: a single error puts the rest of the
568 piece off by one octave
570 @cindex @code{\relative}
572 \relative @var{startpitch} @var{musicexpr}
575 The octave of notes that appear in @var{musicexpr} are calculated as
576 follows: If no octave changing marks are used, the basic interval
577 between this and the last note is always taken to be a fourth or
578 less. This distance is determined without regarding alterations; a
579 @code{fisis} following a @code{ceses} will be put above the
582 The octave changing marks @code{'} and @code{,} can be added to raise
583 or lower the pitch by an extra octave. Upon entering relative mode,
584 an absolute starting pitch must be specified that will act as the
585 predecessor of the first note of @var{musicexpr}.
587 Here is the relative mode shown in action
588 @lilypond[quote,fragment,raggedright,verbatim]
594 Octave changing marks are used for intervals greater than a fourth
595 @lilypond[quote,fragment,verbatim]
601 If the preceding item is a chord, the first note of the chord is used
602 to determine the first note of the next chord
604 @lilypond[quote,fragment,verbatim]
612 The pitch after the @code{\relative} contains a note name.
615 The relative conversion will not affect @code{\transpose},
616 @code{\chords} or @code{\relative} sections in its argument. If you
617 want to use relative within transposed music, you must place an
618 additional @code{\relative} inside the @code{\transpose}.
621 @subsection Octave check
624 Octave checks make octave errors easier to correct: a note may be
625 followed by @code{=}@var{quotes} which indicates what its absolute
626 octave should be. In the following example,
628 \relative c'' @{ c='' b=' d,='' @}
632 @c take care with @code, adds confusing quotes.
633 the d will generate a warning, because a d'' is expected, but a d' is
634 found. In the output, the octave is corrected for this and the
639 There is also a syntax that is separate from the notes. The syntax
645 This checks that @var{pitch} (without quotes) yields @var{pitch} (with
646 quotes) in \relative mode. If not, a warning is printed, and the
647 octave is corrected, for example, the first check is passed
648 successfully. The second check fails with an error message. The
649 octave is adjusted so the following notes are in the correct octave
660 The octave of a note following an octave check is determined with
661 respect to the note preceding it. In the next fragment, the last note
662 is a @code{a'}, above middle C. Hence, the @code{\octave} check may
663 be deleted without changing the meaning of the piece.
665 @lilypond[quote,verbatim,fragment]
674 @subsection Bar check
678 @cindex @code{barCheckSynchronize}
681 Bar checks help detect errors in the durations. A bar check is
682 entered using the bar symbol, `@code{|}'. Whenever it is encountered
683 during interpretation, it should fall on a measure boundary. If it
684 does not, a warning is printed. In the next example, the second bar
685 check will signal an error
687 \time 3/4 c2 e4 | g2 |
690 Bar checks can also be used in lyrics, for example
695 Twin -- kle | Twin -- kle
700 @cindex @code{skipTypesetting}
702 Failed bar checks are caused by entering incorrect
703 durations. Incorrect durations often completely garble up the score,
704 especially if it is polyphonic, so you should start correcting the
705 score by scanning for failed bar checks and incorrect durations. To
706 speed up this process, you can use @code{skipTypesetting}, described
709 It is also possible to redefine the meaning of @code{|}. This is done
710 by assigning a music expression to @code{pipeSymbol},
713 pipeSymbol = \bar "||"
715 { c'2 c'2 | c'2 c'2 | }
719 @node Skipping corrected music
720 @subsection Skipping corrected music
722 The property @code{Score.skipTypesetting} can be used to switch on and
723 off typesetting completely during the interpretation phase. When
724 typesetting is switched off, the music is processed much more quickly.
725 This can be used to skip over the parts of a score that have already
726 been checked for errors
728 @lilypond[quote,fragment,raggedright,verbatim]
731 \set Score.skipTypesetting = ##t
733 \set Score.skipTypesetting = ##f
737 @node Automatic note splitting
738 @subsection Automatic note splitting
740 Long notes can be converted automatically to tied notes. This is done
741 by replacing the @internalsref{Note_heads_engraver} by the
742 @internalsref{Completion_heads_engraver}.
743 In the following examples, notes crossing the bar line are split and tied.
746 @lilypond[quote,fragment,verbatim,relative=1,raggedright]
748 \remove "Note_heads_engraver"
749 \consists "Completion_heads_engraver"
751 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
755 This engraver splits all running notes at the bar line, and inserts
756 ties. One of its uses is to debug complex scores: if the measures are
757 not entirely filled, then the ties exactly show how much each measure
762 Not all durations (especially those containing tuplets) can be
763 represented exactly; the engraver will not insert tuplets.
767 Examples: @inputfileref{input/regression,completion-heads.ly}.
769 Program reference: @internalsref{Completion_heads_engraver}.
773 @section Staff notation
775 This section describes music notation that occurs on staff level,
776 such as keys, clefs and time signatures.
778 @cindex Staff notation
789 * Controlling formatting of prefatory matter::
793 @subsection Staff symbol
795 @cindex adjusting staff symbol
797 Notes, dynamic signs, etc. are grouped
798 with a set of horizontal lines, into a staff (plural `staves'). In our
799 system, these lines are drawn using a separate layout object called
803 @cindex staff lines, setting number of
804 @cindex staff lines, setting thickness of
805 @cindex thickness of staff lines, setting
806 @cindex number of staff lines, setting
810 Program reference: @internalsref{StaffSymbol}.
812 Examples: @inputfileref{input/test,staff-lines.ly},
813 @inputfileref{input/test,staff-size.ly}.
817 If a staff is ended halfway a piece, the staff symbol may not end
818 exactly on the bar line.
822 @subsection Key signature
823 @cindex Key signature
827 The key signature indicates the scale in which a piece is played. It
828 is denoted by a set of alterations (flats or sharps) at the start of
832 Setting or changing the key signature is done with the @code{\key}
835 @code{\key} @var{pitch} @var{type}
838 @cindex @code{\minor}
839 @cindex @code{\major}
840 @cindex @code{\minor}
841 @cindex @code{\ionian}
842 @cindex @code{\locrian}
843 @cindex @code{\aeolian}
844 @cindex @code{\mixolydian}
845 @cindex @code{\lydian}
846 @cindex @code{\phrygian}
847 @cindex @code{\dorian}
849 Here, @var{type} should be @code{\major} or @code{\minor} to get
850 @var{pitch}-major or @var{pitch}-minor, respectively.
851 The standard mode names @code{\ionian},
852 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
853 @code{\phrygian}, and @code{\dorian} are also defined.
855 This command sets the context property
856 @internalsref{Staff}.@code{keySignature}. Non-standard key signatures
857 can be specified by setting this property directly.
859 Accidentals and key signatures often confuse new users, because
860 unaltered notes get natural signs depending on the key signature. For
861 more information, see @ref{More about pitches}.
865 The ordering of a key cancellation is wrong when it is combined with
866 repeat bar lines. The cancellation is also printed after a line break.
870 Program reference: @internalsref{KeyChangeEvent}, and @internalsref{KeySignature}.
872 @cindex @code{keySignature}
879 The clef indicates which lines of the staff correspond to which
883 The clef can be set or changed with the @code{\clef} command
884 @lilypond[quote,fragment,verbatim]
885 \key f\major c''2 \clef alto g'2
888 Supported clef-names include
889 @c Moved standard clefs to the top /MB
893 @item treble, violin, G, G2
906 G clef on 1st line, so-called French violin clef
911 @cindex mezzosoprano clef
914 @cindex baritone clef
917 @cindex varbaritone clef
928 By adding @code{_8} or @code{^8} to the clef name, the clef is
929 transposed one octave down or up, respectively, and @code{_15} and
930 @code{^15} transposes by two octaves. The argument @var{clefname}
931 must be enclosed in quotes when it contains underscores or digits. For
935 @cindex choral tenor clef
936 @lilypond[quote,verbatim,fragment,relative=1]
940 This command is equivalent to setting @code{clefGlyph},
941 @code{clefPosition} (which controls the Y position of the clef),
942 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
943 when any of these properties are changed. The following example shows
944 possibilities when setting properties manually.
948 \set Staff.clefGlyph = #"clefs-F"
949 \set Staff.clefPosition = #2
951 \set Staff.clefGlyph = #"clefs-G"
953 \set Staff.clefGlyph = #"clefs-C"
955 \set Staff.clefOctavation = #7
957 \set Staff.clefOctavation = #0
958 \set Staff.clefPosition = #0
968 Program reference: @internalsref{Clef}.
972 @node Ottava brackets
973 @subsection Ottava brackets
975 ``Ottava'' brackets introduce an extra transposition of an octave for
976 the staff. They are created by invoking the function
977 @code{set-octavation}
983 @lilypond[quote,verbatim,fragment]
993 The @code{set-octavation} function also takes -1 (for 8va bassa) and 2
994 (for 15ma) as arguments. Internally the function sets the properties
995 @code{ottavation} (e.g. to @code{"8va"}) and
996 @code{centralCPosition}. For overriding the text of the bracket, set
997 @code{ottavation} after invoking @code{set-octavation}, i.e.,
1001 \set Staff.ottavation = #"8"
1006 Program reference: @internalsref{OttavaBracket}.
1008 Examples: @inputfileref{input/regression,ottava.ly},
1009 @inputfileref{input/regression,ottava-broken.ly}.
1013 @code{set-octavation} will get confused when clef changes happen
1014 during an octavation bracket.
1016 @node Time signature
1017 @subsection Time signature
1018 @cindex Time signature
1020 @cindex @code{\time}
1022 Time signature indicates the metrum of a piece: a regular pattern of
1023 strong and weak beats. It is denoted by a fraction at the start of the
1027 The time signature is set or changed by the @code{\time}
1029 @lilypond[quote,fragment,verbatim]
1030 \time 2/4 c'2 \time 3/4 c'2.
1033 The symbol that is printed can be customized with the @code{style}
1034 property. Setting it to @code{#'()} uses fraction style for 4/4 and
1035 2/2 time. There are many more options for its layout. See
1036 @inputfileref{input/test,time.ly} for more examples.
1039 This command sets the property @code{timeSignatureFraction},
1040 @code{beatLength} and @code{measureLength} in the @code{Timing}
1041 context, which is normally aliased to @internalsref{Score}. The
1042 property @code{measureLength} determines where bar lines should be
1043 inserted, and how automatic beams should be generated. Changing the
1044 value of @code{timeSignatureFraction} also causes the symbol to be
1047 More options are available through the Scheme function
1048 @code{set-time-signature}. In combination with the
1049 @internalsref{Measure_grouping_engraver}, it will create
1050 @internalsref{MeasureGrouping} signs. Such signs ease reading
1051 rhythmically complex modern music. In the following example, the 9/8
1052 measure is subdivided in 2, 2, 2 and 3. This is passed to
1053 @code{set-time-signature} as the third argument @code{(2 2 2 3)}
1055 @lilypond[quote,raggedright,verbatim]
1058 #(set-time-signature 9 8 '(2 2 2 3))
1059 g8[ g] d[ d] g[ g] a8[( bes g]) |
1060 #(set-time-signature 5 8 '(3 2))
1066 \consists "Measure_grouping_engraver"
1074 Program reference: @internalsref{TimeSignature}, and @internalsref{Timing_engraver}.
1079 Automatic beaming does not use the measure grouping specified with
1080 @code{set-time-signature}.
1082 @node Partial measures
1083 @subsection Partial measures
1086 @cindex partial measure
1087 @cindex measure, partial
1088 @cindex shorten measures
1089 @cindex @code{\partial}
1091 Partial measures, for example in upsteps, are entered using the
1092 @code{\partial} command
1093 @lilypond[quote,fragment,verbatim,relative=2]
1094 \partial 16*5 c16 cis d dis e | a2. c,4 | b2
1097 The syntax for this command is
1099 \partial @var{duration}
1101 This is internally translated into
1103 \set Timing.measurePosition = -@var{length of duration}
1106 The property @code{measurePosition} contains a rational number
1107 indicating how much of the measure has passed at this point.
1109 @node Unmetered music
1110 @subsection Unmetered music
1114 Bar lines and bar numbers are calculated automatically. For unmetered
1115 music (e.g. cadenzas), this is not desirable. By setting
1116 @code{Score.timing} to false, this automatic timing can be switched
1117 off. Empty bar lines,
1124 indicate where line breaks can occur.
1128 @cindex @code{\cadenzaOn}
1130 @cindex @code{\cadenzaOff}
1137 @subsection Bar lines
1141 @cindex measure lines
1145 Bar lines delimit measures, but are also used to indicate repeats.
1146 Normally, they are inserted automatically. Line breaks may only
1147 happen on bar lines.
1149 Special types of bar lines can be forced with the @code{\bar} command
1151 @lilypond[quote,relative=2,fragment,verbatim]
1155 The following bar types are available
1156 @lilypond[quote,fragment,relative=1,raggedright,verbatim]
1169 For allowing line breaks, there is a special command,
1173 This will insert an invisible bar line, and allow line breaks at this
1176 In scores with many staves, a @code{\bar} command in one staff is
1177 automatically applied to all staves. The resulting bar lines are
1178 connected between different staves of a @internalsref{StaffGroup}
1180 @lilypond[quote,fragment,verbatim]
1182 \context StaffGroup <<
1188 \new Staff { \clef bass c4 g e g }
1190 \new Staff { \clef bass c2 c2 }
1194 A bar line is created whenever the @code{whichBar} property is set.
1195 At the start of a measure it is set to the contents of
1196 @code{defaultBarType}. The contents of @code{repeatCommands} are used
1197 to override default measure bars.
1199 The command @code{\bar }@var{bartype} is a short cut for doing
1200 @code{\set Timing.whichBar = }@var{bartype}. Whenever @code{whichBar}
1201 is set to a string, a bar line of that type is created.
1203 @cindex @code{whichBar}
1204 @cindex @code{repeatCommands}
1205 @cindex @code{defaultBarType}
1207 You are encouraged to use @code{\repeat} for repetitions. See
1214 In this manual: @ref{Repeats}.
1217 Program reference: the bar line objects that are created at
1218 @internalsref{Staff} level are called @internalsref{BarLine}, the bar
1219 lines that span staves are @internalsref{SpanBar} objects.
1221 @cindex bar lines at start of system
1222 @cindex start of system
1224 The bar lines at the start of each system are
1225 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
1226 @internalsref{SystemStartBracket}. Only one of these types is created
1227 in every context, and that type is determined by the property
1228 @code{systemStartDelimiter}.
1230 Examples: @inputfileref{input/test,bar-lines.ly},
1232 @node Controlling formatting of prefatory matter
1233 @subsection Controlling formatting of prefatory matter
1239 \override Staff.Clef #'break-visibility = #end-of-line-visible
1240 \override Staff.KeySignature #'break-visibility = #end-of-line-visible
1241 \set Staff.explicitClefVisibility = #end-of-line-visible
1242 \set Staff.explicitKeySignatureVisibility = #end-of-line-visible
1244 % We want the time sig to take space, otherwise there is not
1245 % enough white at the start of the line.
1248 \override Staff.TimeSignature #'transparent = ##t
1249 \set Score.defaultBarType = #"empty"
1270 The easiest way to enter fragments with more than one voice on a staff
1271 is to split chords using the separator @code{\\}. You can use it for
1272 small, short-lived voices or for single chords
1276 @lilypond[quote,verbatim,fragment]
1277 \context Staff \relative c'' {
1278 c4 << { f d e } \\ { b c2 } >>
1279 c4 << g' \\ b, \\ f' \\ d >>
1283 The separator causes @internalsref{Voice} contexts@footnote{Polyphonic
1284 voices are sometimes called "layers" other notation packages}
1286 to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
1287 each of these contexts, vertical direction of slurs, stems, etc. is set
1290 @cindex @code{\voiceOne}
1291 @cindex @code{\voiceFour}
1293 This can also be done by instantiating @internalsref{Voice} contexts
1294 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1295 a stem directions and horizontal shift for each part
1298 @lilypond[quote,raggedright,verbatim]
1301 \new Voice { \voiceOne cis2 b }
1302 \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
1303 \new Voice { \voiceTwo fis4~ fis4 f ~ f } >>
1307 The command @code{\oneVoice} will revert back to the normal setting.
1308 @cindex @code{\oneVoice}
1311 Normally, note heads with a different number of dots are not merged, but
1312 when the object property @code{merge-differently-dotted} is set in
1313 the @internalsref{NoteCollision} object, they are merged
1314 @lilypond[quote,verbatim,fragment,raggedright,relative=2]
1317 \override Staff.NoteCollision
1318 #'merge-differently-dotted = ##t
1320 } \\ { g8.[ f16] g8.[ f16] } >>
1323 Similarly, you can merge half note heads with eighth notes, by setting
1324 @code{merge-differently-headed}
1325 @lilypond[quote,fragment,relative=2,verbatim]
1328 \override Staff.NoteCollision
1329 #'merge-differently-headed = ##t
1330 c8 c4. } \\ { c2 c2 } >>
1333 LilyPond also vertically shifts rests that are opposite of a stem,
1336 @lilypond[quote,raggedright,fragment,verbatim]
1337 \context Voice << c''4 \\ r4 >>
1345 @cindex @code{\oneVoice}
1347 @cindex @code{\voiceOne}
1349 @cindex @code{\voiceTwo}
1351 @cindex @code{\voiceThree}
1353 @cindex @code{\voiceFour}
1357 The following commands specify in what chords of the current voice
1358 should be shifted: the outer voice has @code{\shiftOff}, and the inner
1359 voices have @code{\shiftOn}, @code{\shiftOnn}, etc.
1362 @cindex @code{\shiftOn}
1364 @cindex @code{\shiftOnn}
1366 @cindex @code{\shiftOnnn}
1368 @cindex @code{\shiftOff}
1375 Program reference: the objects responsible for resolving collisions are
1376 @internalsref{NoteCollision} and @internalsref{RestCollision}.
1378 Examples: See also example files
1379 @inputfileref{input/regression,collision-dots.ly},
1380 @inputfileref{input/regression,collision-head-chords.ly},
1381 @inputfileref{input/regression,collision-heads.ly},
1382 @inputfileref{input/regression,collision-mesh.ly}, and
1383 @inputfileref{input/regression,collisions.ly}.
1388 Resolving collisions is a intricate subject, and only a few situations
1389 are handled. When LilyPond cannot cope, the @code{force-hshift}
1390 property of the @internalsref{NoteColumn} object and pitched rests can
1391 be used to override typesetting decisions.
1393 When using @code{merge-differently-headed} with an upstem eighth or a
1394 shorter note, and a downstem half note, the eighth note gets the wrong
1397 There is no support for clusters where the same note occurs with
1398 different accidentals in the same chord. In this case, it is
1399 recommended to use enharmonic transcription, or to use special cluster
1400 notation (see @ref{Clusters}).
1405 Beams are used to group short notes into chunks that are aligned with
1406 the metrum. They are inserted automatically
1408 @lilypond[quote,fragment,verbatim,relative=2]
1409 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1412 When these automatic decisions are not good enough, beaming can be
1413 entered explicitly. It is also possible to define beaming patterns
1414 that differ from the defaults.
1416 Individual notes may be marked with @code{\noBeam}, to prevent them
1419 @lilypond[quote,fragment,verbatim,relative=2]
1420 \time 2/4 c8 c\noBeam c c
1426 Program reference: @internalsref{Beam}.
1429 @cindex Automatic beams
1432 * Setting automatic beam behavior::
1437 @subsection Manual beams
1438 @cindex beams, manual
1442 In some cases it may be necessary to override the automatic beaming
1443 algorithm. For example, the autobeamer will not put beams over rests
1444 or bar lines. Such beams are specified by manually: the begin and end
1445 point are marked with @code{[} and @code{]}
1447 @lilypond[quote,fragment,relative=1,verbatim]
1449 r4 r8[ g' a r8] r8 g[ | a] r8
1453 @cindex @code{stemLeftBeamCount}
1455 Normally, beaming patterns within a beam are determined automatically.
1456 If necessary, the properties @code{stemLeftBeamCount} and
1457 @code{stemRightBeamCount} can be used to override the defaults. If
1458 either property is set, its value will be used only once, and then it
1461 @lilypond[quote,fragment,relative=1,verbatim]
1464 f8[ r16 \set stemLeftBeamCount = #1 f g a]
1467 @cindex @code{stemRightBeamCount}
1470 The property @code{subdivideBeams} can be set in order to subdivide
1471 all 16th or shorter beams at beat positions, as defined by the
1472 @code{beatLength} property.
1475 @lilypond[fragment,quote,relative=2,verbatim,noindent]
1477 \set subdivideBeams = ##t
1479 \set Score.beatLength = #(ly:make-moment 1 8)
1482 @cindex @code{subdivideBeams}
1484 Kneed beams are inserted automatically, when a large gap is detected
1485 between the note heads. This behavior can be tuned through the object
1486 property @code{auto-knee-gap}.
1488 Normally, line breaks are forbidden when beams cross bar lines. This
1489 behavior can be changed by setting @code{allowBeamBreak}.
1491 @cindex @code{allowBeamBreak}
1492 @cindex beams and line breaks
1494 @cindex beams, kneed
1496 @cindex auto-knee-gap
1501 User manual: @ref{Changing context properties on the fly} for the
1507 @cindex Frenched staves
1509 Automatically kneed cross-staff beams cannot be used together with
1512 Beams do not avoid collisions with symbols around the notes, such as
1513 texts and accidentals.
1517 @node Setting automatic beam behavior
1518 @subsection Setting automatic beam behavior
1520 @cindex @code{autoBeamSettings}
1521 @cindex @code{(end * * * *)}
1522 @cindex @code{(begin * * * *)}
1523 @cindex automatic beams, tuning
1524 @cindex tuning automatic beaming
1526 @c [TODO: use \applycontext]
1528 In normal time signatures, automatic beams can start on any note but can
1529 only end in a few positions within the measure: beams can end on a beat,
1530 or at durations specified by the properties in
1531 @code{autoBeamSettings}. The defaults for @code{autoBeamSettings}
1532 are defined in @file{scm/auto-beam.scm}.
1534 The value of @code{autoBeamSettings} is changed with two functions,
1536 #(override-auto-beam-setting
1537 '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b}
1539 #(revert-auto-beam-setting '(@var{be} @var{p} @var{q} @var{n} @var{m}))
1541 Here, @var{be} is the symbol @code{begin} or @code{end}, and
1542 @var{context} is an optional context (default: @code{'Voice}). It
1543 determines whether the rule applies to begin or end-points. The
1544 quantity @var{p}/@var{q} refers to the length of the beamed notes (and
1545 `@code{* *}' designates notes of any length), @var{n}/@var{M} refers
1546 to a time signature (wildcards `@code{* *}' may be entered to
1547 designate all time signatures), @var{a}/@var{b} is a duration. By
1548 default, this command changes settings for the current voice. It is
1549 also possible to adjust settings at higher contexts, by adding a
1550 @var{context} argument.
1552 For example, if automatic beams should end on every quarter note, use
1555 #(override-auto-beam-setting '(end * * * *) 1 4 'Staff)
1557 Since the duration of a quarter note is 1/4 of a whole note, it is
1558 entered as @code{(ly:make-moment 1 4)}.
1560 The same syntax can be used to specify beam starting points. In this
1561 example, automatic beams can only end on a dotted quarter note
1563 #(override-auto-beam-setting '(end * * * *) 3 8)
1565 In 4/4 time signature, this means that automatic beams could end only on
1566 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1567 3/8, has passed within the measure).
1569 Rules can also be restricted to specific time signatures. A rule that
1570 should only be applied in @var{N}/@var{M} time signature is formed by
1571 replacing the second asterisks by @var{N} and @var{M}. For example, a
1572 rule for 6/8 time exclusively looks like
1574 #(override-auto-beam-setting '(begin * * 6 8) @dots{})
1577 If a rule should be to applied only to certain types of beams, use the
1578 first pair of asterisks. Beams are classified according to the
1579 shortest note they contain. For a beam ending rule that only applies
1580 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1583 @cindex automatic beam generation
1585 @cindex @code{autoBeaming}
1588 If beams are used to indicate melismata in songs, then automatic
1589 beaming should be switched off. This is done by setting
1590 @code{autoBeaming} to @code{#f}.
1594 @cindex @code{\autoBeamOff}
1595 @code{\autoBeamOff},
1596 @cindex @code{\autoBeamOn}
1602 If a score ends while an automatic beam has not been ended and is
1603 still accepting notes, this last beam will not be typeset at all. The
1604 same holds polyphonic voices, entered with @code{<< @dots{} \\ @dots{}
1605 >>}. If a polyphonic voice ends while an automatic beam is still
1606 accepting notes, it is not typeset.
1608 The rules for ending a beam depend on the shortest note in a beam.
1609 So, while it is possible to have different ending rules for eight
1610 beams and sixteenth beams, a beam that contains both eight and
1611 sixteenth notes will use the rules for the sixteenth beam.
1613 In the example below, the autobeamer makes eight beams and sixteenth
1614 end at 3 eights; the third beam can only be corrected by specifying
1617 @lilypond[quote,raggedright,fragment,relative=1]
1618 #(override-auto-beam-setting '(end * * * *) 3 8)
1619 % rather show case where it goes wrong
1620 %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
1621 \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
1623 It is not possible to specify beaming parameters that act differently in
1624 different parts of a measure. This means that it is not possible to use
1625 automatic beaming in irregular meters such as @code{5/8}.
1627 @node Beam formatting
1628 @subsection Beam formatting
1631 When a beam falls in the middle of the staff, the beams point normally
1632 down. However, this behaviour can be altered with the
1633 @code{neutral-direction} property.
1639 \override Beam #'neutral-direction = #-1
1641 \override Beam #'neutral-direction = #1
1647 @section Accidentals
1650 This section describes how to change the way that accidentals are
1651 inserted automatically before the running notes.
1653 Common rules for typesetting accidentals have been canned in a
1654 function. This function is called as follows
1656 @cindex @code{set-accidental-style}
1658 #(set-accidental-style 'modern 'Voice)
1661 The function takes two arguments: a symbol that denotes the style (in
1662 the example, @code{modern}), and another symbol that denotes the
1663 context name (in this example, @code{Voice}). If no context name is
1664 supplied, @code{Staff} is the default.
1666 The following styles are supported
1669 This is the default typesetting behavior. It should correspond
1670 to 18th century common practice: Accidentals are
1671 remembered to the end of the measure in which they occur and
1672 only on their own octave.
1676 The normal behavior is to remember the accidentals on
1677 Staff-level. This variable, however, typesets accidentals
1678 individually for each voice. Apart from that, the rule is similar to
1681 This leads to some weird and often unwanted results
1682 because accidentals from one voice do not get canceled in other
1684 @lilypond[quote,raggedright,relative=1,fragment,verbatim]
1686 #(set-accidental-style 'voice)
1692 Hence you should only use @code{voice} if the voices
1693 are to be read solely by individual musicians. If the staff is to be
1694 used by one musician (e.g. a conductor) then you use
1695 @code{modern} or @code{modern-cautionary}
1699 @cindex @code{modern} style accidentals
1700 This rule corresponds to the common practice in the 20th
1702 This rule prints the same accidentals as @code{default}, but temporary
1703 accidentals also are canceled in other octaves. Furthermore,
1704 in the same octave, they also get canceled in the following
1707 @lilypond[quote,raggedright,fragment,verbatim]
1708 #(set-accidental-style 'modern)
1709 cis' c'' cis'2 | c'' c'
1712 @item @code{modern-cautionary}
1713 @cindex @code{modern-cautionary}
1714 This rule is similar to @code{modern}, but the
1715 ``extra'' accidentals (the ones not typeset by
1716 @code{default}) are typeset as cautionary accidentals.
1717 They are printed in reduced size or with parentheses
1718 @lilypond[quote,raggedright,fragment,verbatim]
1719 #(set-accidental-style 'modern-cautionary)
1720 cis' c'' cis'2 | c'' c'
1723 @cindex @code{modern-voice}
1725 This rule is used for multivoice accidentals to be read both by musicians
1726 playing one voice and musicians playing all voices. Accidentals are
1727 typeset for each voice, but they @emph{are} canceled across voices in
1728 the same @internalsref{Staff}.
1730 @cindex @code{modern-voice-cautionary}
1731 @item modern-voice-cautionary
1732 This rule is the same as @code{modern-voice}, but with the extra
1733 accidentals (the ones not typeset by @code{voice}) typeset
1734 as cautionaries. Even though all accidentals typeset by
1735 @code{default} @emph{are} typeset by this variable then
1736 some of them are typeset as cautionaries.
1739 @cindex @code{piano} accidentals
1740 This rule reflects 20th century practice for piano notation. Very similar to
1741 @code{modern} but accidentals also get canceled
1742 across the staves in the same @internalsref{GrandStaff} or
1743 @internalsref{PianoStaff}.
1745 @item piano-cautionary
1746 @cindex @code{#(set-accidental-style 'piano-cautionary)}
1747 As @code{#(set-accidental-style 'piano)' , str)} but with the extra accidentals
1748 typeset as cautionaries.
1751 @cindex @code{no-reset} accidental style
1753 This is the same as @code{default} but with accidentals lasting
1754 ``forever'' and not only until the next measure
1755 @lilypond[quote,raggedright,fragment,verbatim,relative=1]
1756 #(set-accidental-style 'no-reset)
1761 This is sort of the opposite of @code{no-reset}: Accidentals
1762 are not remembered at all---and hence all accidentals are
1763 typeset relative to the key signature, regardless of what was
1766 @lilypond[quote,raggedright,fragment,verbatim,relative=1]
1767 #(set-accidental-style 'forget)
1768 \key d\major c4 c cis cis d d dis dis
1775 Program reference: @internalsref{Accidental_engraver},
1776 @internalsref{Accidental}, and @internalsref{AccidentalPlacement}.
1781 Simultaneous notes are considered to be entered in sequential
1782 mode. This means that in a chord the accidentals are typeset as if the
1783 notes in the chord happened once at a time - in the order in which
1784 they appear in the input file.
1786 This is only a problem when accidentals in a chord depend on each
1787 other. This problem can be solved by manually inserting @code{!} and
1788 @code{?} for the problematic notes.
1790 In the default scheme, accidentals only depend on other
1791 accidentals with the same pitch on the same staff, so no conflicts are
1794 @node Expressive marks
1795 @section Expressive marks
1798 @c todo: should change ordering
1799 @c where to put text spanners, metronome marks,
1808 * Analysis brackets::
1810 * Fingering instructions::
1821 A slur indicates that notes are to be played bound or @emph{legato}.
1824 They are entered using parentheses
1825 @lilypond[quote,relative=2,fragment,verbatim]
1826 f( g)( a) a8 b( a4 g2 f4)
1830 The direction of a slur can be set with the
1834 \override Slur #'direction = #UP
1835 \slurUp % shortcut for the previous line
1839 However, there is a convenient shorthand for forcing slur
1840 directions. By adding @code{_} or @code{^} before the opening
1841 parentheses, the direction is also set. For example,
1843 @lilypond[relative=2,fragment]
1850 @cindex @code{\slurUp}
1852 @cindex @code{\slurDown}
1854 @cindex @code{\slurBoth}
1856 @cindex @code{\slurDotted}
1858 @cindex @code{\slurSolid}
1863 Program reference: @seeinternals{Slur}, and @internalsref{SlurEvent}.
1867 @cindex Adjusting slurs
1869 @node Phrasing slurs
1870 @subsection Phrasing slurs
1872 @cindex phrasing slurs
1873 @cindex phrasing marks
1875 A phrasing slur (or phrasing mark) connects chords and is used to
1876 indicate a musical sentence. It is started using @code{\(} and @code{\)}
1879 @lilypond[quote,fragment,verbatim,relative=1]
1880 \time 6/4 c'\( d( e) f( e) d\)
1883 Typographically, the phrasing slur behaves almost exactly like a
1884 normal slur. However, they are treated as different objects. A
1885 @code{\slurUp} will have no effect on a phrasing slur; instead, you
1886 should use @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
1887 @code{\phrasingSlurBoth}.
1889 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth}
1890 will only affect normal slurs and not phrasing slurs.
1894 @cindex @code{\phrasingSlurUp}
1895 @code{\phrasingSlurUp},
1896 @cindex @code{\phrasingSlurDown}
1897 @code{\phrasingSlurDown},
1898 @cindex @code{\phrasingSlurBoth}
1899 @code{\phrasingSlurBoth}.
1903 Program reference: see also @internalsref{PhrasingSlur}, and
1904 @internalsref{PhrasingSlurEvent}.
1908 Putting phrasing slurs over rests leads to spurious warnings.
1911 @subsection Breath marks
1913 Breath marks are entered using @code{\breathe}
1916 @lilypond[quote,fragment,relative=1,verbatim]
1920 The glyph of the breath mark can be tuned by overriding the
1921 @code{text} property of the @code{BreathingSign} layout object with
1922 any markup text. For example,
1923 @lilypond[quote,fragment,verbatim,relative=1]
1925 \override BreathingSign #'text
1926 = #(make-musicglyph-markup "scripts-rvarcomma")
1933 Program reference: @internalsref{BreathingSign},
1934 @internalsref{BreathingSignEvent}.
1936 Examples: @inputfileref{input/regression,breathing-sign.ly}.
1939 @node Metronome marks
1940 @subsection Metronome marks
1943 @cindex beats per minute
1944 @cindex metronome marking
1946 Metronome settings can be entered as follows
1948 \tempo @var{duration} = @var{per-minute}
1951 In the MIDI output, they are interpreted as a tempo change, and in the
1952 paper output, a metronome marking is printed
1953 @cindex @code{\tempo}
1954 @lilypond[quote,fragment,verbatim]
1960 Program reference: @internalsref{MetronomeChangeEvent}.
1965 @subsection Text spanners
1966 @cindex Text spanners
1968 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
1969 are written as texts, and extended over many measures with dotted
1970 lines. You can create such texts using text spanners: attach
1971 @code{\startTextSpan} and @code{\stopTextSpan} to the
1972 start and ending note of the spanner.
1974 The string to be printed, as well as the style, is set through object
1977 @lilypond[quote,fragment,relative=1,verbatim]
1980 \override TextSpanner #'direction = #-1
1981 \override TextSpanner #'edge-text = #'("rall " . "")
1982 c2\startTextSpan b c\stopTextSpan a
1989 Internals @internalsref{TextSpanEvent},
1990 @internalsref{TextSpanner}.
1992 Examples: @inputfileref{input/regression,text-spanner.ly}.
1995 @node Analysis brackets
1996 @subsection Analysis brackets
1998 @cindex phrasing brackets
1999 @cindex musicological analysis
2000 @cindex note grouping bracket
2002 Brackets are used in musical analysis to indicate structure in musical
2003 pieces. LilyPond supports a simple form of nested horizontal brackets.
2004 To use this, add the @internalsref{Horizontal_bracket_engraver} to
2005 @internalsref{Staff} context. A bracket is started with
2006 @code{\startGroup} and closed with @code{\stopGroup}
2008 @lilypond[quote,raggedright,verbatim]
2011 c4\startGroup\startGroup
2014 c4\stopGroup\stopGroup
2018 \Staff \consists "Horizontal_bracket_engraver"
2024 Program reference: @internalsref{HorizontalBracket},
2025 @internalsref{NoteGroupingEvent}.
2027 Examples: @inputfileref{input/regression,note-group-bracket.ly}.
2031 @subsection Articulations
2032 @cindex Articulations
2034 @cindex articulations
2038 A variety of symbols can appear above and below notes to indicate
2039 different characteristics of the performance. They are added to a note
2040 by adding a dash and the character signifying the
2041 articulation. They are demonstrated here
2043 @lilypondfile[quote,raggedright]{script-abbreviations.ly}
2045 The meanings of these shorthands can be changed. See
2046 @file{ly/script-init.ly} for examples.
2049 The script is automatically placed, but if you need to force
2050 directions, you can use @code{_} to force them down, or @code{^} to
2052 @lilypond[quote,fragment,verbatim]
2056 Other symbols can be added using the syntax
2057 @var{note}@code{\}@var{name}, e.g. @code{c4\fermata}. Again, they
2058 can be forced up or down using @code{^} and @code{_},
2061 @lilypond[quote,verbatim,fragment,relative=3]
2062 c\fermata c^\fermata c_\fermata
2069 @cindex staccatissimo
2078 @cindex organ pedal marks
2087 @cindex prallmordent
2091 @cindex thumb marking
2096 @lilypondfile[quote,raggedright]{script-chart.ly}
2100 @cindex @code{\scriptUp}
2102 @cindex @code{\scriptDown}
2104 @cindex @code{\scriptBoth}
2109 Program reference: @internalsref{ScriptEvent}, and @internalsref{Script}.
2113 These note ornaments appear in the printed output but have no
2114 effect on the MIDI rendering of the music.
2117 @node Fingering instructions
2118 @subsection Fingering instructions
2122 Fingering instructions can be entered using
2124 @var{note}-@var{digit}
2126 For finger changes, use markup texts
2128 @lilypond[quote,verbatim,raggedright,fragment]
2129 c'4-1 c'4-2 c'4-3 c'4-4
2130 c'^\markup { \finger "2-3" }
2133 @cindex finger change
2138 You can use the thumb-script to indicate that a note should be
2139 played with the thumb (e.g. in cello music)
2141 @lilypond[quote,verbatim,raggedright,fragment]
2142 <a' a''-3>8_\thumb <b' b''-3>_\thumb
2145 Fingerings for chords can also be added to individual notes
2146 of the chord by adding them after the pitches
2147 @lilypond[quote,verbatim,raggedright,fragment,relative=2]
2148 < c-1 e-2 g-3 b-5 >4
2152 iIn this case, setting @code{fingeringOrientations} will put fingerings next
2155 @lilypond[quote,verbatim,raggedright,fragment,relative=1]
2156 \set fingeringOrientations = #'(left down)
2157 <c-1 es-2 g-4 bes-5 > 4
2158 \set fingeringOrientations = #'(up right down)
2159 <c-1 es-2 g-4 bes-5 > 4
2160 \set fingeringOrientations = #'(right)
2164 The last note demonstrates how fingering instructions can be put close
2165 to note heads in monophonic music, using this feature.
2169 Program reference: @internalsref{FingerEvent}, and @internalsref{Fingering}.
2171 Examples: @inputfileref{input/regression,finger-chords.ly}.
2174 @subsection Text scripts
2175 @cindex Text scripts
2177 @cindex text items, non-empty
2178 @cindex non-empty texts
2180 It is possible to place arbitrary strings of text or markup text (see
2181 @ref{Text markup}) above or below notes by using a string
2182 @code{c^"text"}. By default, these indications do not influence the
2183 note spacing, but by using the command @code{\fatText}, the widths
2184 will be taken into account
2186 @lilypond[quote,fragment,raggedright,verbatim]
2188 c4^"longtext" \fatText c4_"longlongtext" c4
2192 It is possible to use @TeX{} commands in the strings, but this should
2193 be avoided because the exact dimensions of the string can then no
2198 @cindex @code{\fatText}
2200 @cindex @code{\emptyText}
2205 In this manual: @ref{Text markup}.
2207 Program reference: @internalsref{TextScriptEvent}, @internalsref{TextScript}.
2213 @subsection Grace notes
2216 @c should have blurb about accaciatura / appogiatura
2218 @cindex @code{\grace}
2222 Grace notes are ornaments that are written out. The most common ones
2223 are acciaccatura, which should be played as very short. It is denoted
2224 by a slurred small note with a slashed stem. The appoggiatura is a
2225 grace note that takes a fixed fraction of the main note, is and
2226 denoted as a slurred note in small print without a slash.
2227 They are entered with the commands @code{\acciaccatura} and
2228 @code{\appoggiatura}, as demonstrated in the following example
2231 @cindex appoggiatura
2232 @cindex acciaccatura
2234 @lilypond[quote,relative=2,verbatim,fragment]
2235 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
2236 \acciaccatura { g16[ f] } e4
2239 Both are special forms of the @code{\grace} command. By prefixing this
2240 keyword to a music expression, a new one is formed, which will be
2241 printed in a smaller font and takes up no logical time in a measure.
2243 @lilypond[quote,relative=2,verbatim,fragment]
2245 \grace { c16[ d16] } c2 c4
2249 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
2250 @code{\grace} command does not start a slur.
2252 Internally, timing for grace notes is done using a second, `grace'
2253 time. Every point in time consists of two rational numbers: one
2254 denotes the logical time, one denotes the grace timing. The above
2255 example is shown here with timing tuples
2257 @lilypond[quote,raggedright]
2260 c4 \grace c16 c4 \grace {
2263 \new Lyrics \lyrics {
2266 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
2267 \markup { (\fraction 1 4 , 0 ) } 4
2269 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2270 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2272 \markup { ( \fraction 2 4 , 0 ) }
2278 The placement of grace notes is synchronized between different staves.
2279 In the following example, there are two sixteenth graces notes for
2280 every eighth grace note
2282 @lilypond[quote,relative=2,verbatim,fragment]
2283 << \new Staff { e4 \grace { c16[ d e f] } e4 }
2284 \new Staff { c'4 \grace { g8[ b] } c4 } >>
2289 If you want to end a note with a grace, the standard trick is to put
2290 the grace notes after a ``space note''
2292 @lilypond[quote,fragment,verbatim,relative=2]
2295 { s2 \grace { c16[ d] } } >>
2301 By adjusting the duration of the skip note (here it is a half-note),
2302 the space between the main-note and the grace is adjusted.
2305 A @code{\grace} section will introduce special typesetting settings,
2306 for example, to produce smaller type, and set directions. Hence, when
2307 introducing layout tweaks, they should be inside the grace section,
2309 @lilypond[quote,fragment,verbatim,relative=2]
2312 \override Stem #'direction = #-1
2314 \revert Stem #'direction
2321 The overrides should also be reverted inside the grace section.
2323 If the layout of grace sections must be changed throughout the music,
2324 then this can be accomplished through the function
2325 @code{add-grace-property}. The following example undefines the Stem
2326 direction for this grace, so stems do not always point up.
2330 #(add-grace-property 'Voice 'Stem 'direction '())
2336 Another option is to change the variables @code{startGraceMusic},
2337 @code{stopGraceMusic}, @code{startAcciaccaturaMusic},
2338 @code{stopAcciaccaturaMusic}, @code{startAppoggiaturaMusic},
2339 @code{stopAppoggiaturaMusic}. More information is in the file
2340 @file{ly/grace-init.ly}.
2345 Program reference: @internalsref{GraceMusic}.
2349 A score that starts with an @code{\grace} section needs an explicit
2350 @code{\context Voice} declaration, otherwise the main note and grace
2351 note end up on different staves.
2353 Grace note synchronization can also lead to surprises. Staff notation,
2354 such as key signatures, bar lines, etc. are also synchronized. Take
2355 care when you mix staves with grace notes and staves without, for example,
2357 @lilypond[quote,relative=2,verbatim,fragment]
2358 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2359 \new Staff { c4 \bar "|:" d4 } >>
2363 This can be remedied by inserting grace skips, for the above example
2366 \new Staff @{ c4 \bar "|:" \grace s16 d4 @} >>
2369 Grace sections should only be used within sequential music
2370 expressions. Nesting or juxtaposing grace sections is not supported,
2371 and might produce crashes or other errors.
2375 @subsection Glissando
2378 @cindex @code{\glissando}
2380 A glissando is a smooth change in pitch. It is denoted by a line or a
2381 wavy line between two notes.
2384 A glissando line can be requested by attaching a @code{\glissando} to
2387 @lilypond[quote,fragment,relative=1,verbatim]
2393 Program reference: @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2395 Example files: @file{input/regression,glissando.ly}
2401 Printing text over the line (such as @emph{gliss.}) is not supported.
2405 @subsection Dynamics
2418 @cindex @code{\ffff}
2428 Absolute dynamic marks are specified using a command after a note
2429 @code{c4\ff}. The available dynamic marks are @code{\ppp},
2430 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2431 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2432 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}
2434 @lilypond[quote,verbatim,raggedright,fragment,relative=1]
2435 c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2445 A crescendo mark is started with @code{\<} and terminated with
2446 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2447 with @code{\!}. Because these marks are bound to notes, if you must
2448 use spacer notes if multiple marks during one note are needed
2450 @lilypond[quote,fragment,verbatim]
2451 c''\< c''\! d''\> e''\!
2452 << f''1 { s4 s4\< s4\! \> s4\! } >>
2454 This may give rise to very short hairpins. Use @code{minimum-length}
2455 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2459 \override Staff.Hairpin #'minimum-length = #5
2462 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2463 is an example how to do it
2465 @lilypond[quote,fragment,relative=2,verbatim]
2475 You can also supply your own texts
2476 @lilypond[quote,fragment,relative=1,verbatim]
2478 \set crescendoText = \markup { \italic "cresc. poco" }
2479 \set crescendoSpanner = #'dashed-line
2489 @cindex @code{\dynamicUp}
2491 @cindex @code{\dynamicDown}
2492 @code{\dynamicDown},
2493 @cindex @code{\dynamicBoth}
2494 @code{\dynamicBoth}.
2496 @cindex direction, of dynamics
2500 Program reference: @internalsref{CrescendoEvent},
2501 @internalsref{DecrescendoEvent}, and
2502 @internalsref{AbsoluteDynamicEvent}.
2504 Dynamics @internalsref{DynamicText} and @internalsref{Hairpin}
2505 objects. Vertical positioning of these symbols is handled by the
2506 @internalsref{DynamicLineSpanner} object.
2514 @cindex @code{\repeat}
2517 Repetition is a central concept in music, and multiple notations exist
2518 for repetitions. In LilyPond, most of these notations can be captured
2519 in a uniform syntax. One of the advantages is that they can be
2520 rendered in MIDI accurately.
2522 The following types of repetition are supported
2526 Repeated music is fully written (played) out. Useful for MIDI
2527 output, and entering repetitive music.
2530 This is the normal notation: Repeats are not written out, but
2531 alternative endings (volte) are printed, left to right.
2535 Alternative endings are written stacked. This has limited use but may be
2536 used to typeset two lines of lyrics in songs with repeats, see
2537 @inputfileref{input,star-spangled-banner.ly}.
2545 Make beat or measure repeats. These look like percent signs.
2551 * Repeats and MIDI::
2552 * Manual repeat commands::
2554 * Tremolo subdivisions::
2559 @subsection Repeat syntax
2562 LilyPond has one syntactic construct for specifying different types of
2563 repeats. The syntax is
2566 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2569 If you have alternative endings, you may add
2570 @cindex @code{\alternative}
2572 \alternative @code{@{} @var{alternative1}
2574 @var{alternative3} @dots{} @code{@}}
2576 where each @var{alternative} is a music expression. If you do not
2577 give enough alternatives for all of the repeats, the first alternative
2578 is assumed to be played more than once.
2580 Normal notation repeats are used like this
2581 @lilypond[quote,fragment,verbatim,relative=2]
2583 \repeat volta 2 { c4 d e f }
2584 \repeat volta 2 { f e d c }
2587 With alternative endings
2588 @lilypond[quote,fragment,verbatim,relative=2]
2590 \repeat volta 2 {c4 d e f}
2591 \alternative { {d2 d} {f f,} }
2595 @lilypond[quote,fragment,verbatim,relative=2]
2598 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2599 \alternative { { g4 g g } { a | a a a a | b2. } }
2605 Brackets for the repeat are normally only printed over the topmost
2606 staff. This can be adjusted by setting the @code{voltaOnThisStaff}
2607 property @inputfileref{input/regression,volta-multi-staff.ly},
2608 @inputfileref{input/regression,volta-chord-names.ly}
2612 A nested repeat like
2621 is ambiguous, since it is is not clear to which @code{\repeat} the
2622 @code{\alternative} belongs. This ambiguity is resolved by always
2623 having the @code{\alternative} belong to the inner @code{\repeat}.
2624 For clarity, it is advisable to use braces in such situations.
2629 Timing information is not remembered at the start of an alternative,
2630 so after a repeat timing information must be reset by hand, for
2631 example by setting @code{Score.measurePosition} or entering
2632 @code{\partial}. Similarly, slurs or ties are also not repeated.
2637 @node Repeats and MIDI
2638 @subsection Repeats and MIDI
2640 @cindex expanding repeats
2642 For instructions on how to expand repeats for MIDI output, see the
2643 example file @inputfileref{input/test,unfold-all-repeats.ly}.
2647 @node Manual repeat commands
2648 @subsection Manual repeat commands
2650 @cindex @code{repeatCommands}
2652 The property @code{repeatCommands} can be used to control the layout of
2653 repeats. Its value is a Scheme list of repeat commands, where each repeat
2657 @item the symbol @code{start-repeat},
2658 which prints a @code{|:} bar line,
2659 @item the symbol @code{end-repeat},
2660 which prints a @code{:|} bar line,
2661 @item the list @code{(volta @var{text})},
2662 which prints a volta bracket saying @var{text}: The text can be specified as
2663 a text string or as a markup text, see @ref{Text markup}. Do not
2664 forget to change the font, as the default number font does not contain
2665 alphabetic characters. Or,
2666 @item the list @code{(volta #f)}, which
2667 stops a running volta bracket
2670 @lilypond[quote,verbatim,fragment,relative=2]
2672 \set Score.repeatCommands = #'((volta "93") end-repeat)
2674 \set Score.repeatCommands = #'((volta #f))
2681 Program reference: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2682 @internalsref{VoltaRepeatedMusic},
2683 @internalsref{UnfoldedRepeatedMusic}, and
2684 @internalsref{FoldedRepeatedMusic}.
2686 @node Tremolo repeats
2687 @subsection Tremolo repeats
2688 @cindex tremolo beams
2690 To place tremolo marks between notes, use @code{\repeat} with tremolo
2692 @lilypond[quote,verbatim,raggedright]
2693 \context Voice \relative c' {
2694 \repeat "tremolo" 8 { c16 d16 }
2695 \repeat "tremolo" 4 { c16 d16 }
2696 \repeat "tremolo" 2 { c16 d16 }
2700 Tremolo marks can also be put on a single note. In this case, the
2701 note should not be surrounded by braces.
2702 @lilypond[quote,verbatim,raggedright]
2703 \repeat "tremolo" 4 c'16
2706 A similar mechanism is the tremolo subdivision, described in
2707 @ref{Tremolo subdivisions}.
2711 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
2713 Program reference: tremolo beams are @internalsref{Beam} objects. Single stem
2714 tremolos are @internalsref{StemTremolo} objects. The music expression is
2715 @internalsref{TremoloEvent}.
2717 Example files: @inputfileref{input/regression,chord-tremolo.ly},
2718 @inputfileref{input/regression,stem-tremolo.ly}.
2720 @node Tremolo subdivisions
2721 @subsection Tremolo subdivisions
2722 @cindex tremolo marks
2723 @cindex @code{tremoloFlags}
2725 Tremolo marks can be printed on a single note by adding
2726 `@code{:}[@var{length}]' after the note. The length must be at least
2727 8. A @var{length} value of 8 gives one line across the note stem. If
2728 the length is omitted, the last value (stored in @code{tremoloFlags})
2731 @lilypond[quote,verbatim,fragment]
2732 c'2:8 c':32 | c': c': |
2735 @c [TODO : stok is te kort bij 32en]
2739 Tremolos entered in this way do not carry over into the MIDI output.
2743 In this manual: @ref{Tremolo repeats}.
2745 Elsewhere: @internalsref{StemTremolo}, @internalsref{TremoloEvent}.
2747 @node Measure repeats
2748 @subsection Measure repeats
2750 @cindex percent repeats
2751 @cindex measure repeats
2753 In the @code{percent} style, a note pattern can be repeated. It is
2754 printed once, and then the pattern is replaced with a special sign.
2755 Patterns of a one and two measures are replaced by percent-like signs,
2756 patterns that divide the measure length are replaced by slashes
2758 @lilypond[quote,verbatim,raggedright]
2759 \repeat "percent" 4 { c'4 }
2760 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
2765 Program reference: @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
2766 @internalsref{PercentRepeatedMusic}, and
2767 @internalsref{DoublePercentRepeat}.
2771 @node Rhythmic music
2772 @section Rhythmic music
2776 * Showing melody rhythms::
2777 * Entering percussion::
2778 * Percussion staves::
2782 @node Showing melody rhythms
2783 @subsection Showing melody rhythms
2785 Sometimes you might want to show only the rhythm of a melody. This
2786 can be done with the rhythmic staff. All pitches of notes on such a
2787 staff are squashed, and the staff itself has a single line
2789 @lilypond[quote,fragment,relative=1,verbatim]
2790 \context RhythmicStaff {
2792 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
2798 Program reference: @internalsref{RhythmicStaff}.
2800 Examples: @inputfileref{input/regression,rhythmic-staff.ly}.
2803 @node Entering percussion
2804 @subsection Entering percussion
2810 Percussion notes may be entered in @code{\drums} mode, which is
2811 similar to @code{notes}. Each piece of percussion has a full name and
2812 an abbreviated name, and both be used in input files
2815 hihat hh bassdrum bd
2817 @lilypond[quote,raggedright]
2818 \new DrumStaff \drums { hihat hh bassdrum bd }
2821 The complete list of drum names is in the init file
2822 @file{ly/drumpitch-init.ly}.
2823 @c TODO: properly document this.
2827 Program reference: @internalsref{DrumNoteEvent}.
2829 @node Percussion staves
2830 @subsection Percussion staves
2834 A percussion part for more than one instrument typically uses a
2835 multiline staff where each position in the staff refers to one piece
2839 To typeset the music, the notes must be interpreted in a
2840 @internalsref{DrumStaff} and @internalsref{DrumVoice} contexts
2843 @lilypond[quote,raggedright,verbatim]
2844 up = \drums { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2845 down = \drums { bassdrum4 snare8 bd r bd sn4 }
2847 \new DrumVoice { \voiceOne \up }
2848 \new DrumVoice { \voiceTwo \down }
2852 The above example shows verbose polyphonic notation. The short
2853 polyphonic notation, described in @ref{Polyphony}, can also be used if
2854 the @internalsref{DrumVoices} are instantiated by hand first. For example,
2856 @lilypond[quote,fragment,verbatim]
2858 \context DrumVoice = "1" { s1 *2 }
2859 \context DrumVoice = "2" { s1 *2 }
2863 { \repeat unfold 16 hh16 }
2872 There are also other layout possibilities. To use these, set the
2873 property @code{drumStyleTable} in context @internalsref{DrumVoice}.
2874 The following variables have been predefined
2878 is the default. It typesets a typical drum kit on a five-line staff
2880 @lilypond[quote,noindent]
2881 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
2882 bd sn ss tomh tommh tomml toml tomfh tomfl }
2883 mus = \drums { cymc cyms cymr hh | hhc hho hhho hhp | \break cb hc
2884 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
2886 << \new DrumStaff\with {
2887 \remove Bar_engraver
2888 \remove Time_signature_engraver
2889 \override Stem #'transparent = ##t
2890 \override Stem #'Y-extent-callback = ##f
2891 minimumVerticalExtent = #'(-4.0 . 5.0)
2893 \context Lyrics \nam
2896 %% need to do this, because of indented @itemize
2899 \override LyricText #'font-family = #'typewriter
2900 \override BarNumber #'transparent =##T
2904 The drum scheme supports six different toms. When there fewer toms, simply
2905 select the toms that produce the desired result, i.e. to get toms on
2906 the three middle lines you use @code{tommh}, @code{tomml} and
2909 @item timbales-style
2910 to typeset timbales on a two line staff
2912 @lilypond[quote,raggedright]
2913 nam = \lyrics { timh ssh timl ssl cb }
2914 mus = \drums { timh ssh timl ssl cb s16 }
2917 \context DrumStaff \with {
2918 \remove Bar_engraver
2919 \remove Time_signature_engraver
2920 \override Stem #'transparent = ##t
2921 \override Stem #'Y-extent-callback = ##f
2922 \override StaffSymbol #'line-count = #2
2923 \override StaffSymbol #'staff-space = #2
2924 minimumVerticalExtent = #'(-3.0 . 4.0)
2925 drumStyleTable = #timbales-style
2928 \override LyricText #'font-family = #'typewriter
2934 to typeset congas on a two line staff
2936 @lilypond[quote,raggedright]
2937 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
2938 mus = \drums { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
2940 \context DrumStaff\with {
2941 \remove Bar_engraver
2942 \remove Time_signature_engraver
2943 drumStyleTable = #congas-style
2944 \override StaffSymbol #'line-count = #2
2946 %% this sucks; it will lengthen stems.
2947 \override StaffSymbol #'staff-space = #2
2948 \override Stem #'transparent = ##t
2949 \override Stem #'Y-extent-callback = ##f
2952 \override LyricText #'font-family = #'typewriter
2957 to typeset bongos on a two line staff
2959 @lilypond[quote,raggedright]
2960 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
2961 mus = \drums { boh boho bohm ssh bol bolo bolm ssl s16 }
2963 \context DrumStaff\with {
2964 \remove Bar_engraver
2965 \remove Time_signature_engraver
2966 \override StaffSymbol #'line-count = #2
2967 drumStyleTable = #bongos-style
2969 %% this sucks; it will lengthen stems.
2970 \override StaffSymbol #'staff-space = #2
2971 \override Stem #'transparent = ##t
2972 \override Stem #'Y-extent-callback = ##f
2975 \override LyricText #'font-family = #'typewriter
2980 @item percussion-style
2981 to typeset all kinds of simple percussion on one line staves
2982 @lilypond[quote,raggedright]
2983 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
2984 mus = \drums { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
2986 \context DrumStaff\with{
2987 \remove Bar_engraver
2988 drumStyleTable = #percussion-style
2989 \override StaffSymbol #'line-count = #1
2990 \remove Time_signature_engraver
2991 \override Stem #'transparent = ##t
2992 \override Stem #'Y-extent-callback = ##f
2996 \override LyricText #'font-family = #'typewriter
3002 If you do not like any of the predefined lists you can define your own
3003 list at the top of your file
3005 @lilypond[quote,raggedright,verbatim]
3007 (bassdrum default #f -1)
3008 (snare default #f 0)
3010 (pedalhihat xcircle "stopped" 2)
3011 (lowtom diamond #f 3)))
3012 up = \drums { hh8 hh hh hh hhp4 hhp }
3013 down = \drums { bd4 sn bd toml8 toml }
3016 \set DrumStaff.drumStyleTable
3017 = #(alist->hash-table mydrums)
3018 \new DrumVoice { \voiceOne \up }
3019 \new DrumVoice { \voiceTwo \down }
3026 Init files: @file{ly/drumpitch-init.ly}.
3028 Program reference: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
3032 Because general MIDI does not contain rim shots, the sidestick is used
3033 for this purpose instead.
3036 @section Piano music
3038 Piano staves are two normal staves coupled with a brace. The staves
3039 are largely independent, but sometimes voices can cross between the
3040 two staves. The same notation is also used for harps and other key
3041 instruments. The @internalsref{PianoStaff} is especially built to
3042 handle this cross-staffing behavior. In this section we discuss the
3043 @internalsref{PianoStaff} and some other pianistic peculiarities.
3047 * Automatic staff changes::
3048 * Manual staff switches::
3051 * Staff switch lines::
3056 There is no support for putting chords across staves. You can get
3057 this result by increasing the length of the stem in the lower stave so
3058 it reaches the stem in the upper stave, or vice versa. An example is
3059 included with the distribution as
3060 @inputfileref{input/test,stem-cross-staff.ly}.
3062 Dynamics are not centered, but kludges do exist. See
3063 @inputfileref{input/template,piano-dynamics.ly}.
3065 @cindex cross staff stem
3066 @cindex stem, cross staff
3067 @cindex distance between staves in piano music
3069 The distance between the two staves is normally fixed across the
3070 entire score. It is possible to tune this per system, but it does
3071 require arcane command incantations. See
3072 @inputfileref{input/test,piano-staff-distance.ly}.
3075 @node Automatic staff changes
3076 @subsection Automatic staff changes
3077 @cindex Automatic staff changes
3079 Voices can switch automatically between the top and the bottom
3080 staff. The syntax for this is
3084 \autochange \context Voice @{ @dots{}@var{music}@dots{} @}
3089 The two staves of the piano staff must be named @code{up} and
3092 A @code{\relative} section that is outside of @code{\autochange} has
3093 no effect on the pitches of @var{music}, so, if necessary, put
3094 @code{\relative} inside @code{\autochange} like
3098 \autochange \relative @dots{} \new Voice @dots{}
3103 The autochanger switches on basis of pitch (middle C is the turning
3104 point), and it looks ahead skipping over rests to switch in
3105 advance. Here is a practical example
3107 @lilypond[quote,verbatim,raggedright]
3108 \context PianoStaff <<
3109 \context Staff = "up" {
3110 \autochange \new Voice \relative c' {
3111 g4 a b c d r4 a g } }
3112 \context Staff = "down" {
3119 In this example, spacer rests are used to prevent the bottom staff from
3120 terminating too soon.
3125 In this manual: @ref{Manual staff switches}.
3127 Program reference: @internalsref{AutoChangeMusic}.
3133 The staff switches often do not end up in optimal places. For high
3134 quality output, staff switches should be specified manually.
3137 @code{\autochange} cannot be inside @code{\times}.
3139 Internally, the @code{\partcombine} interprets both arguments as
3140 @code{Voice}s named @code{one} and @code{two}, and then decides when
3141 the parts can be combined. Consequently, if the arguments switch to
3142 differently named @internalsref{Voice} contexts, the events in those
3146 @node Manual staff switches
3147 @subsection Manual staff switches
3149 @cindex manual staff switches
3150 @cindex staff switch, manual
3152 Voices can be switched between staves manually, using the following command
3154 \change Staff = @var{staffname} @var{music}
3158 The string @var{staffname} is the name of the staff. It switches the
3159 current voice from its current staff to the Staff called
3160 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3161 @code{"down"}. The @context{Staff} referred to must already exist, so
3162 usually the setup for a score will start with a setup of the staves,
3166 \context Staff = up @{
3167 \skip 1 * 10 %@emph{ keep staff alive}
3169 \context Staff = down @{
3170 \skip 1 * 10 %@emph{idem}
3176 and the @context{Voice} is inserted afterwards
3179 \context Staff = down
3180 \new Voice @{ @dots{} \change Staff = up @dots{} @}
3188 Pianos have pedals that alter the way sound are produced. Generally, a
3189 piano has three pedals, sustain, una corda, and sostenuto.
3192 Piano pedal instruction can be expressed by attaching
3193 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3194 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3197 @lilypond[quote,fragment,verbatim]
3198 c'4\sustainDown c'4\sustainUp
3201 What is printed can be modified by setting @code{pedal@var{X}Strings},
3202 where @var{X} is one of the pedal types: @code{Sustain},
3203 @code{Sostenuto} or @code{UnaCorda}. Refer to
3204 @internalsref{SustainPedal} in the program reference for more
3207 Pedals can also be indicated by a sequence of brackets, by setting the
3208 @code{pedalSustainStyle} property to @code{bracket} objects
3210 @lilypond[quote,fragment,verbatim,relative=2]
3211 \set Staff.pedalSustainStyle = #'bracket
3213 b\sustainUp\sustainDown
3214 b g \sustainUp a \sustainDown \bar "|."
3217 A third style of pedal notation is a mixture of text and brackets,
3218 obtained by setting the @code{pedalSustainStyle} style property to
3221 @lilypond[quote,fragment,verbatim,relative=2]
3222 \set Staff.pedalSustainStyle = #'mixed
3224 b\sustainUp\sustainDown
3225 b g \sustainUp a \sustainDown \bar "|."
3228 The default `*Ped.' style for sustain and damper pedals corresponds to
3229 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
3232 @lilypond[quote,fragment,verbatim,relative=2]
3233 c\sostenutoDown d e c, f g a\sostenutoUp
3236 For fine-tuning of the appearance of a pedal bracket, the properties
3237 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3238 @code{PianoPedalBracket} objects (see
3239 @internalsref{PianoPedalBracket} in the Program reference) can be modified. For example, the
3240 bracket may be extended to the end of the note head
3242 @lilypond[quote,fragment,verbatim,relative=2]
3243 \override Staff.PianoPedalBracket
3244 #'shorten-pair = #'(0 . -1.0)
3245 c\sostenutoDown d e c, f g a\sostenutoUp
3249 @subsection Arpeggio
3252 @cindex broken arpeggio
3253 @cindex @code{\arpeggio}
3255 You can specify an arpeggio sign on a chord by attaching an
3256 @code{\arpeggio} to a chord
3259 @lilypond[quote,fragment,relative=1,verbatim]
3263 When an arpeggio crosses staves, you attach an arpeggio to the chords
3264 in both staves, and set
3265 @internalsref{PianoStaff}.@code{connectArpeggios}
3267 @lilypond[quote,fragment,relative=1,verbatim]
3268 \context PianoStaff <<
3269 \set PianoStaff.connectArpeggios = ##t
3270 \new Staff { <c' e g c>\arpeggio }
3271 \new Staff { \clef bass <c,, e g>\arpeggio }
3275 The direction of the arpeggio is sometimes denoted by adding an
3276 arrowhead to the wiggly line
3278 @lilypond[quote,fragment,relative=1,verbatim]
3287 A square bracket on the left indicates that the player should not
3288 arpeggiate the chord
3290 @lilypond[quote,fragment,relative=1,verbatim]
3297 @cindex @code{\arpeggio}
3299 @cindex @code{\arpeggioUp}
3301 @cindex @code{\arpeggioDown}
3302 @code{\arpeggioDown},
3303 @cindex @code{\arpeggioBoth}
3304 @code{\arpeggioBoth},
3305 @cindex @code{\arpeggioBracket}
3306 @code{\arpeggioBracket}.
3310 Program reference: @internalsref{ArpeggioEvent} music expressions lead to
3311 @internalsref{Arpeggio} objects. Cross staff arpeggios are
3312 @internalsref{PianoStaff}.@internalsref{Arpeggio}.
3316 It is not possible to mix connected arpeggios and unconnected
3317 arpeggios in one @internalsref{PianoStaff} at the same time.
3319 @node Staff switch lines
3320 @subsection Staff switch lines
3323 @cindex follow voice
3324 @cindex staff switching
3327 @cindex @code{followVoice}
3329 Whenever a voice switches to another staff a line connecting the notes
3330 can be printed automatically. This is enabled if the property
3331 @code{PianoStaff.followVoice} is set to true
3333 @lilypond[quote,fragment,relative=1,verbatim]
3334 \context PianoStaff <<
3335 \set PianoStaff.followVoice = ##t
3336 \context Staff \context Voice {
3341 \context Staff=two { \clef bass \skip 1*2 }
3347 The associated object is @internalsref{VoiceFollower}.
3351 @cindex @code{\showStaffSwitch}
3352 @code{\showStaffSwitch},
3353 @cindex @code{\hideStaffSwitch}
3354 @code{\hideStaffSwitch}.
3358 @section Vocal music
3361 The easiest way to add lyrics to a melody, is by appending
3366 \newlyrics @{ @var{the lyrics} @}
3369 to a melody. Here is an example,
3371 @lilypond[raggedright,verbatim]
3372 \relative { \time 3/4 c2 e4 g2. }
3373 \newlyrics { play the game }
3376 More stanzas can be added by adding more
3377 @code{\newlyrics} sections
3379 @lilypond[raggedright,verbatim]
3380 \relative { \time 3/4 c2 e4 g2. }
3381 \newlyrics { play the game }
3382 \newlyrics { speel het spel }
3383 \newlyrics { joue le jeu }
3386 The @code{\newlyrics} keyword has three functions: it interprets the
3387 following words as texts instead of notes, it sets up a context for
3388 printing texts (the @code{Lyrics} context), and it couples the melody
3389 with the lyrics, so the durations of both are aligned.
3391 These three functions can be controlled separately, and that is what
3392 the following sections are about.
3396 * The Lyrics context::
3401 @node Entering lyrics
3402 @subsection Entering lyrics
3406 @cindex @code{\lyrics}
3409 Lyrics are entered in a special input mode. This mode is is introduced
3410 by the keyword @code{\lyrics}. In this mode you can enter lyrics,
3411 with punctuation and accents without any hassle. Syllables are
3412 entered like notes, but with pitches replaced by text. For example,
3414 \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
3417 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3418 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3419 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3420 any 8-bit character with ASCII code over 127, or a two-character
3421 combination of a backslash followed by one of @code{`}, @code{'},
3422 @code{"}, or @code{^}.
3424 Subsequent characters of a word can be any character that is not a digit
3425 and not white space. One important consequence of this is that a word
3426 can end with @code{@}}. The following example is usually a bug. The
3427 syllable includes a @code{@}}, and hence the opening brace is not balanced
3429 \lyrics @{ twinkle@}
3432 @cindex @code{\property}, in @code{\lyrics}
3433 Similarly, a period following a alphabetic sequence, is included in
3434 the resulting string. As a consequence, spaces must be inserted around
3437 \override Score . LyricText #'font-shape = #'italic
3441 @cindex spaces, in lyrics
3442 @cindex quotes, in lyrics
3444 Any @code{_} character which appears in an unquoted word is converted
3445 to a space. This provides a mechanism for introducing spaces into words
3446 without using quotes. Quoted words can also be used in Lyrics mode to
3447 specify words that cannot be written with the above rules. The
3448 following example incorporates double quotes
3451 \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3454 This example is slightly academic, since it gives better looking
3455 results to use matched single quotes, @code{``} and @code{''}
3457 \lyrics @{ He said: ``Let my peo ple go'' @}
3462 Centered hyphens are entered as `@code{-}@code{-}' between syllables.
3463 The hyphen will have variable length depending on the space between
3464 the syllables and it will be centered between the syllables.
3469 When a lyric is sung over many notes (this is called a melisma), this is
3470 indicated with a horizontal line centered between a syllable and the
3471 next one. Such a line is called an extender line, and it is entered as
3476 Program reference: events @internalsref{LyricEvent},
3477 @internalsref{HyphenEvent}, and @internalsref{ExtenderEvent}. Objects
3478 @internalsref{LyricHyphen}, @internalsref{LyricExtender} and
3479 @internalsref{LyricText}.
3481 Examples: @inputfileref{input/test,lyric-hyphen-retain.ly}.
3485 The definition of lyrics mode is too complex.
3489 @node The Lyrics context
3490 @subsection The Lyrics context
3493 Lyrics are printed by interpreting them in a @internalsref{Lyrics} context
3495 \context Lyrics \lyrics @dots{}
3498 @cindex automatic syllable durations
3499 @cindex @code{\lyricsto}
3500 @cindex lyrics and melodies
3502 This will place the lyrics according to the durations that were
3503 entered. The lyrics can also be aligned under a given melody
3504 automatically. In this case, it is no longer necessary to enter the
3505 correct duration for each syllable. This is achieved by combining the
3506 melody and the lyrics with the @code{\lyricsto} expression
3508 \lyricsto @var{name} \new Lyrics @dots{}
3511 This aligns the lyrics to the
3513 notes of the @internalsref{Voice} context called @var{name}, which has
3514 to exist. Therefore, normally the @code{Voice} is specified first, and
3515 then the lyrics are specified with @code{\lyricsto}. The command
3516 @code{\lyricsto} switches to @code{\lyrics} mode automatically, so the
3517 @code{\lyrics} keyword may be omitted.
3519 For different or more complex orderings, the best way is to setup the
3520 hierarchy of staves and lyrics first, e.g.
3522 \context ChoirStaff <<
3523 \context Lyrics = sopranoLyrics @{ s1 @}
3524 \context Voice = soprano @{ @emph{music} @}
3525 \context Lyrics = tenorLyrics @{ s1 @}
3526 \context Voice = tenor @{ @emph{music} @}
3529 and then combine the appropriate melodies and lyric lines
3531 \lyricsto "soprano" \context Lyrics = sopranoLyrics
3536 The final input would resemble
3539 << \context ChoirStaff << @emph{setup the music} >>
3540 \lyricsto "soprano" @emph{etc}
3541 \lyricsto "alto" @emph{etc}
3547 The @code{\lyricsto} command detects melismata: it only puts one
3548 syllable under a tied or slurred group of notes. If you want to force
3549 an unslurred group of notes to be a melisma, insert @code{\melisma}
3550 after the first note of the group, and @code{\melismaEnd} after the
3553 @lilypond[quote,relative=2,raggedright,fragment,verbatim]
3555 \context Voice = "lala" {
3563 \lyricsto "lala" \new Lyrics {
3569 In addition, notes are considered a melisma if they are manually
3570 beamed, and automatic beaming (see @ref{Setting automatic beam
3571 behavior}) is switched off. The criteria for deciding melismata can
3572 be tuned with the property @code{melismaBusyProperties}. See
3573 @internalsref{Melisma_translator} in the program reference for more
3576 Lyrics can also be entered without @code{\lyricsto}. In this case the
3577 durations of each syllable must be entered explicitly, for example,
3584 Alignment to a melody can be specified with the @code{associatedVoice}
3588 \set associatedVoice = #"melody"
3591 Here is an example demonstrating manual lyric durations,
3593 @lilypond[relative=1,verbatim,fragment]
3594 << \context Voice = melody {
3598 \new Lyrics \lyrics {
3599 \set associatedVoice = #"melody"
3607 When multiple stanzas are put on the same melody, it can happen that
3608 two stanzas have melismata in different locations. This can be
3609 remedied by switching off melismata for one
3610 @internalsref{Lyrics}. This is achieved by setting
3611 the @code{ignoreMelismata} property to @code{#t}. An example is shown
3612 in @inputfileref{input/regression,lyric-combine-new.ly}.
3615 @cindex choral score
3617 A complete example of a SATB score setup is in the file
3618 @inputfileref{input/template,satb.ly}.
3623 @code{\melisma}, @code{\melismaEnd}
3624 @cindex @code{\melismaEnd}
3625 @cindex @code{\melisma}
3629 Program reference: Music expressions: @internalsref{LyricCombineMusic},
3630 Contexts: @internalsref{Lyrics}, @internalsref{Melisma_translator}.
3632 Examples: @inputfileref{input/template,satb.ly},
3633 @inputfileref{input/regression,lyric-combine-new.ly},
3634 @c TODO: make separate section for melismata
3635 @inputfileref{input/test,lyrics-melisma-variants.ly}.
3636 @inputfileref{input/test,lyrics-melisma-faster.ly}.
3640 Melismata are not detected automatically, and extender lines must be
3644 For proper processing of extender lines, the
3645 @internalsref{Lyrics} and @internalsref{Voice} should be
3646 linked. This can be achieved either by using @code{\lyricsto} or by
3647 setting corresponding names for both contexts. The latter is explained
3648 in @ref{More stanzas}.
3650 @c TODO: document \new Staff << Voice \lyricsto >> bug
3653 @subsection More stanzas
3655 @cindex phrasing, in lyrics
3658 The lyrics should be aligned with the note heads of the melody. To
3659 achieve this, each line of lyrics should be marked to correspond with
3660 the melodic line. This is done automatically when @code{\lyricsto},
3661 but it can also be done manually.
3663 To this end, give the @internalsref{Voice} context an identity
3665 \context Voice = duet @{
3670 Then set the @internalsref{Lyrics} contexts to names starting with
3671 that identity followed by a dash. In the preceding example, the
3672 @internalsref{Voice} identity is @code{duet}, so the identities of the
3673 @internalsref{Lyrics}s are marked @code{duet-1} and @code{duet-2}
3675 \context Lyrics = "duet-1" @{
3676 Hi, my name is Bert. @}
3677 \context Lyrics = "duet-2" @{
3678 Ooooo, ch\'e -- ri, je t'aime. @}
3681 @c \lyricsto in the example below is pointless, given subject of the
3685 The complete example is shown here
3686 @lilypond[quote,raggedright,verbatim]
3688 \relative c'' \context Voice = duet {
3692 \lyricsto "duet" \new Lyrics {
3693 \set vocalName = "Bert"
3694 Hi, my name is Bert. }
3695 \lyricsto "duet" \new Lyrics {
3696 \set vocalName = "Ernie"
3697 Ooooo, ch\'e -- ri, je t'aime. }
3702 @cindex stanza number
3703 @cindex singer's names
3704 @cindex name of singer
3706 Stanza numbers can be added by setting @code{stanza}, e.g.
3708 @lilypond[quote,verbatim,relative=2]
3710 \context Voice = duet {
3711 \time 3/4 g2 e4 a2 f4 g2. }
3712 \lyricsto "duet" \new Lyrics {
3714 Hi, my name is Bert. }
3718 This example also demonstrates how names of the singers can be added
3719 using @code{vocalName} analogous to instrument annotations for staves.
3720 A short version may be entered as @code{vocNam}.
3722 To make empty spaces in lyrics, use @code{\skip}.
3727 Program reference: Layout objects @internalsref{LyricText} and
3728 @internalsref{VocalName}. Music expressions
3729 @internalsref{LyricEvent}.
3737 The term @emph{ambitus} denotes a range of pitches for a given voice
3738 in a part of music. It also may denote the pitch range that a musical
3739 instrument is capable of playing. Ambituses are printed on vocal
3740 parts, so singers can easily determine if it meets his or her
3743 It denoted at the beginning of a piece near the initial clef. The
3744 range is graphically specified by two note heads, that represent the
3745 minimum and maximum pitch. To print such ambituses, add the
3746 @internalsref{Ambitus_engraver} to the @internalsref{Voice} context,
3753 \consists Ambitus_engraver
3758 This results in the following output
3760 @lilypond[quote,raggedright]
3764 \consists Ambitus_engraver
3779 If you have multiple voices in a single staff, and you want a single
3780 ambitus per staff rather than per each voice, add the
3781 @internalsref{Ambitus_engraver} to the @internalsref{Staff} context
3782 rather than to the @internalsref{Voice} context.
3784 It is possible to tune individual ambituses for multiple voices on a
3785 single staff, for example by erasing or shifting them horizontally. An
3786 example is in @inputfileref{input/test,ambitus-mixed.ly}.
3790 Program reference: @internalsref{Ambitus},
3791 @internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
3792 @internalsref{AmbitusAccidental}.
3794 Examples: @inputfileref{input/regression,ambitus.ly},
3795 @inputfileref{input/test,ambitus-mixed.ly}.
3799 There is no collision handling in the case of multiple per-voice
3806 @cindex guitar tablature
3808 Tablature notation is used for notating music for plucked string
3809 instruments. It notates pitches not by using note heads, but by
3810 indicating on which string and fret a note must be played. LilyPond
3811 offers limited support for tablature.
3814 * Tablatures basic::
3815 * Non-guitar tablatures::
3818 @node Tablatures basic
3819 @subsection Tablatures basic
3820 @cindex Tablatures basic
3822 The string number associated to a note is given as a backslash
3823 followed by a number, e.g. @code{c4\3} for a C quarter on the third
3824 string. By default, string 1 is the highest one, and the tuning
3825 defaults to the standard guitar tuning (with 6 strings). The notes
3826 are printed as tablature, by using @internalsref{TabStaff} and
3827 @internalsref{TabVoice} contexts
3829 @lilypond[quote,fragment,verbatim]
3836 @cindex @code{minimumFret}
3839 When no string is specified, the first string that does not give a
3840 fret number less than @code{minimumFret} is selected. The default
3841 value for @code{minimumFret} is 0
3846 \set TabStaff.minimumFret = #8
3849 @lilypond[quote,noindent,raggedright]
3853 \set TabStaff.minimumFret = #8
3856 \context StaffGroup <<
3857 \context Staff { \clef "G_8" \frag }
3858 \context TabStaff { \frag }
3864 Program reference: @internalsref{TabStaff}, @internalsref{TabVoice}, and
3865 @internalsref{StringNumberEvent}.
3869 Chords are not handled in a special way, and hence the automatic
3870 string selector may easily select the same string to two notes in a
3874 @node Non-guitar tablatures
3875 @subsection Non-guitar tablatures
3876 @cindex Non-guitar tablatures
3878 You can change the number of strings, by setting the number of lines
3879 in the @internalsref{TabStaff}.
3881 You can change the tuning of the strings. A string tuning is given as
3882 a Scheme list with one integer number for each string, the number
3883 being the pitch (measured in semitones relative to middle C) of an
3884 open string. The numbers specified for @code{stringTuning} are the
3885 numbers of semitones to subtract or add, starting the specified pitch
3886 by default middle C, in string order. Thus, the notes are e, a, d, and
3889 @lilypond[quote,fragment,verbatim]
3890 \context TabStaff <<
3891 \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
3894 a,4 c' a e' e c' a e'
3901 No guitar special effects have been implemented.
3905 Program reference: @internalsref{Tab_note_heads_engraver}.
3909 @section Chord names
3912 LilyPond has support for both printing chord names. Chords may be
3913 entered in musical chord notation, i.e. @code{< .. >}, but they can
3914 also be entered by name. Internally, the chords are represented as a
3915 set of pitches, so they can be transposed
3918 @lilypond[quote,verbatim,raggedright]
3919 twoWays = \transpose c c' {
3928 << \context ChordNames \twoWays
3929 \context Voice \twoWays >>
3932 This example also shows that the chord printing routines do not try to
3933 be intelligent. The last chord (@code{f bes d}) is not interpreted as
3939 * Printing chord names::
3944 @subsection Chords mode
3947 Chord mode is a mode where you can input sets of pitches using common
3948 names. It is introduced by the keyword @code{\chords}.
3949 In chords mode, a chord is entered by the root, which is entered
3951 @lilypond[quote,fragment,verbatim,relative=2]
3952 \chords { es4. d8 c2 }
3957 Other chords may be entered by suffixing a colon, and introducing a
3958 modifier, and optionally, a number
3960 @lilypond[quote,fragment,verbatim]
3961 \chords { e1:m e1:7 e1:m7 }
3963 The first number following the root is taken to be the `type' of the
3964 chord, thirds are added to the root until it reaches the specified
3966 @lilypond[quote,fragment,verbatim]
3967 \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
3970 @cindex root of chord
3971 @cindex additions, in chords
3972 @cindex removals, in chords
3974 More complex chords may also be constructed adding separate steps
3975 to a chord. Additions are added after the number following
3976 the colon, and are separated by dots
3978 @lilypond[quote,verbatim,fragment]
3979 \chords { c:5.6 c:3.7.8 c:3.6.13 }
3981 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
3983 @lilypond[quote,verbatim,fragment]
3984 \chords { c:7+ c:5+.3- c:3-.5-.7- }
3986 Removals are specified similarly, and are introduced by a caret. They
3987 must come after the additions
3988 @lilypond[quote,verbatim,fragment]
3989 \chords { c^3 c:7^5 c:9^3.5 }
3992 Modifiers can be used to change pitches. The following modifiers are
3996 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
3998 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
4001 is the augmented chord. This modifier raises the 5th step.
4003 is the major 7th chord. This modifier raises the 7th step if present.
4005 is the suspended 4th or 2nd. This modifier removes the 3rd
4006 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
4009 Modifiers can be mixed with additions
4010 @lilypond[quote,verbatim,fragment]
4011 \chords { c:sus4 c:7sus4 c:dim7 c:m6 }
4014 @cindex modifiers, in chords.
4021 Since an unaltered 11 does not sound good when combined with an
4022 unaltered 3, the 11 is removed in this case (unless it is added
4025 @lilypond[quote,fragment,verbatim]
4026 \chords { c:13 c:13.11 c:m13 }
4031 An inversion (putting one pitch of the chord on the bottom), as well
4032 as bass notes, can be specified by appending
4033 @code{/}@var{pitch} to the chord
4034 @lilypond[quote,fragment,verbatim]
4035 \chords { c1 c/g c/f }
4039 A bass note can be added instead of transposed out of the chord,
4040 by using @code{/+}@var{pitch}.
4042 @lilypond[quote,fragment,verbatim]
4043 \chords { c1 c/+g c/+f }
4046 Chords is a mode similar to @code{\lyrics} etc. Most
4047 of the commands continue to work, for example, @code{r} and
4048 @code{\skip} can be used to insert rests and spaces, and property
4049 commands may be used to change various settings.
4055 Each step can only be present in a chord once. The following
4056 simply produces the augmented chord, since @code{5+} is interpreted
4059 @lilypond[quote,verbatim,fragment]
4060 \chords { c:5.5-.5+ }
4064 @node Printing chord names
4065 @subsection Printing chord names
4067 @cindex printing chord names
4071 For displaying printed chord names, use the @internalsref{ChordNames} context.
4072 The chords may be entered either using the notation
4073 described above, or directly using @code{<} and @code{>}
4075 @lilypond[quote,verbatim,raggedright]
4077 \chords {a1 b c} <d' f' a'> <e' g' b'>
4081 \context ChordNames \scheme
4082 \context Staff \scheme
4086 You can make the chord changes stand out by setting
4087 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
4088 display chord names when there is a change in the chords scheme and at
4089 the start of a new line
4091 @lilypond[quote,verbatim,linewidth=9\cm]
4093 c1:m c:m \break c:m c:m d
4096 \context ChordNames {
4097 \set chordChanges = ##t
4099 \context Staff \transpose c c' \scheme
4103 The previous examples all show chords over a staff. This is not
4104 necessary. Chords may also be printed separately. It may be necessary
4105 to add @internalsref{Volta_engraver} and @internalsref{Bar_engraver}
4106 for showing repeats.
4108 @lilypond[raggedright,verbatim]
4109 \new ChordNames \with {
4110 \override BarLine #'bar-size = #4
4111 \consists Bar_engraver
4112 \consists "Volta_engraver"
4114 \repeat volta 2 \chords {
4121 The default chord name layout is a system for Jazz music, proposed by
4122 Klaus Ignatzek (see @ref{Literature list}). It can be tuned through the
4123 following properties
4126 @cindex @code{chordNameExceptions}
4127 @item chordNameExceptions
4128 This is a list that contains the chords that have special formatting.
4130 @inputfileref{input/regression,chord-name-exceptions.ly}.
4131 @cindex exceptions, chord names.
4134 @cindex @code{majorSevenSymbol}
4135 @item majorSevenSymbol
4136 This property contains the markup object used for the 7th step, when
4137 it is major. Predefined options are @code{whiteTriangleMarkup} and
4138 @code{blackTriangleMarkup}. See
4139 @inputfileref{input/regression,chord-name-major7.ly} for an example.
4141 @cindex @code{chordNameSeparator}
4142 @item chordNameSeparator
4143 Different parts of a chord name are normally separated by a
4144 slash. By setting @code{chordNameSeparator}, you can specify other
4146 @lilypond[quote,fragment,verbatim]
4147 \context ChordNames \chords {
4149 \set chordNameSeparator
4150 = \markup { \typewriter "|" }
4155 @cindex @code{chordRootNamer}
4156 @item chordRootNamer
4157 The root of a chord is usually printed as a letter with an optional
4158 alteration. The transformation from pitch to letter is done by this
4159 function. Special note names (for example, the German ``H'' for a
4160 B-chord) can be produced by storing a new function in this property.
4162 @cindex @code{chordNoteNamer}
4163 @item chordNoteNamer
4164 The default is to print single pitch, e.g. the bass note, using the
4165 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
4166 to a specialized function to change this behavior. For example, the
4167 base can be printed in lower case.
4171 The predefined variables @code{\germanChords},
4172 @code{\semiGermanChords} set these variables. The effect is
4175 @lilypondfile[notexidoc]{chord-names-german.ly}
4177 There are also two other chord name schemes implemented: an alternate
4178 Jazz chord notation, and a systematic scheme called Banter chords. The
4179 alternate jazz notation is also shown on the chart in @ref{Chord name
4180 chart}. Turning on these styles is described in the input file
4181 @inputfileref{input/test,chord-names-jazz.ly}.
4185 @cindex chords, jazz
4190 @cindex @code{\germanChords}
4191 @code{\germanChords},
4192 @cindex @code{\semiGermanChords}
4193 @code{\semiGermanChords}.
4200 Examples: @inputfileref{input/regression,chord-name-major7.ly},
4201 @inputfileref{input/regression,chord-name-exceptions.ly},
4202 @inputfileref{input/test,chord-names-jazz.ly},
4203 @inputfileref{input/test,chords-without-melody.ly}.
4206 Init files: @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
4211 Chord names are determined solely from the list of pitches. Chord
4212 inversions are not identified, and neither are added bass notes. This
4213 may result in strange chord names when chords are entered with the
4214 @code{< .. >} syntax.
4219 @node Orchestral music
4220 @section Orchestral music
4222 @cindex Writing parts
4224 Orchestral music involves some special notation, both in the full
4225 score and the individual parts. This section explains how to tackle
4226 some common problems in orchestral music.
4231 * Multiple staff contexts::
4232 * Aligning to cadenzas::
4235 * Instrument names::
4237 * Instrument transpositions::
4238 * Multi measure rests::
4239 * Automatic part combining::
4241 * Different editions from one source::
4242 * Quoting other voices::
4245 @node Multiple staff contexts
4246 @subsection Multiple staff contexts
4248 Polyphonic scores consist of many staves. These staves can be
4249 constructed in three different ways
4251 @item The group is started with a brace at the left, and bar lines are
4252 connected. This is done with the @internalsref{GrandStaff} context.
4254 @item The group is started with a bracket, and bar lines are connected. This is done with the
4255 @internalsref{StaffGroup} context
4258 @item The group is started with a vertical line. Bar lines are not
4259 connected. This is the default for the score.
4263 @cindex Staff, multiple
4264 @cindex bracket, vertical
4265 @cindex brace, vertical
4270 @node Aligning to cadenzas
4271 @subsection Aligning to cadenzas
4274 In an orchestral context, cadenzas present a special problem:
4275 when constructing a score that includes a cadenza, all other
4276 instruments should skip just as many notes as the length of the
4277 cadenza, otherwise they will start too soon or too late.
4279 A solution to this problem are the functions @code{mmrest-of-length}
4280 and @code{skip-of-length}. These Scheme functions take a piece music
4281 as argument, and generate a @code{\skip} or multi rest, exactly as
4282 long as the piece. The use of @code{mmrest-of-length} is demonstrated
4283 in the following example.
4285 @lilypond[raggedright]
4286 cadenza = \relative c' {
4287 c4 d8 << { e f g } \\ { d4. } >>
4292 \new Staff { \cadenza c'4 }
4294 #(ly:export (mmrest-of-length cadenza))
4304 @node Rehearsal marks
4305 @subsection Rehearsal marks
4306 @cindex Rehearsal marks
4308 @cindex @code{\mark}
4310 To print a rehearsal mark, use the @code{\mark} command
4311 @lilypond[quote,fragment,verbatim]
4322 (The letter I is skipped in accordance with engraving traditions.)
4324 The mark is incremented automatically if you use @code{\mark
4325 \default}, but you can also use an integer argument to set the mark
4326 manually. The value to use is stored in the property
4327 @code{rehearsalMark}.
4329 The style is defined by the property @code{markFormatter}. It is a
4330 function taking the current mark (an integer) and the current context
4331 as argument. It should return a markup object. In the following
4332 example, @code{markFormatter} is set to a canned procedure. After a
4333 few measures, it is set to function that produces a boxed number.
4335 @lilypond[quote,verbatim,fragment,relative=2]
4336 \set Score.markFormatter = #format-mark-numbers
4339 \set Score.markFormatter
4340 = #(lambda (mark context)
4341 (make-bold-markup (make-box-markup (number->string mark))))
4346 The file @file{scm/translation-functions.scm} contains the definitions
4347 of @code{format-mark-numbers} (the default format) and
4348 @code{format-mark-letters}. They can be used as inspiration for other
4349 formatting functions.
4352 @cindex coda on bar line
4353 @cindex segno on bar line
4354 @cindex fermata on bar line
4355 @cindex bar lines, symbols on
4357 The @code{\mark} command can also be used to put signs like coda,
4358 segno and fermatas on a bar line. Use @code{\markup} to
4359 to access the appropriate symbol
4361 @lilypond[quote,fragment,verbatim,relative=2]
4362 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4366 In the case of a line break, marks must also be printed at the end of
4367 the line, and not at the beginning. Use the following to force that
4370 \override Score.RehearsalMark
4371 #'break-visibility = #begin-of-line-invisible
4377 @cindex bar lines, putting symbols on
4381 Program reference: @internalsref{MarkEvent}, @internalsref{RehearsalMark}.
4383 Init files: @file{scm/translation-functions.scm} contains the
4384 definition of @code{format-mark-numbers} and
4385 @code{format-mark-letters}. They can be used as inspiration for other
4386 formatting functions.
4388 Examples: @inputfileref{input/regression,rehearsal-mark-letter.ly},
4389 @inputfileref{input/regression,rehearsal-mark-number.ly}.
4393 @subsection Bar numbers
4397 @cindex measure numbers
4398 @cindex @code{currentBarNumber}
4400 Bar numbers are printed by default at the start of the line. The
4401 number itself is stored in the @code{currentBarNumber} property, which
4402 is normally updated automatically for every measure.
4404 Bar numbers can be typeset at regular intervals instead of at the
4405 beginning of each line. This is illustrated in the following example,
4406 whose source is available as
4407 @inputfileref{input/test,bar-number-regular-interval.ly}
4409 @lilypondfile[quote]{bar-number-regular-interval.ly}
4413 Program reference: @internalsref{BarNumber}.
4415 Examples: @inputfileref{input/test,bar-number-every-five-reset.ly},
4416 and @inputfileref{input/test,bar-number-regular-interval.ly}.
4420 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4421 there is one at the top. To solve this, the
4422 @code{padding} property of @internalsref{BarNumber} can be
4423 used to position the number correctly.
4425 @node Instrument names
4426 @subsection Instrument names
4428 In an orchestral score, instrument names are printed left side of the
4431 This can be achieved by setting @internalsref{Staff}.@code{instrument}
4432 and @internalsref{Staff}.@code{instr}. This will print a string before
4433 the start of the staff. For the first start, @code{instrument} is
4434 used, for the next ones @code{instr} is used.
4436 @lilypond[quote,verbatim,raggedright,relative=1,fragment]
4437 \set Staff.instrument = "Ploink "
4438 \set Staff.instr = "Plk "
4444 You can also use markup texts to construct more complicated instrument
4447 @lilypond[quote,fragment,verbatim,raggedright]
4449 \set Staff.instrument = \markup {
4450 \column < "Clarinetti" { "in B"
4451 \smaller \flat } > }
4456 For longer instrument names, it may be useful to increase the
4457 @code{indent} setting in the @code{\paper} block.
4461 Program reference: @internalsref{InstrumentName}.
4465 When you put a name on a grand staff or piano staff the width of the
4466 brace is not taken into account. You must add extra spaces to the end of
4467 the name to avoid a collision.
4470 @subsection Transpose
4472 @cindex transposition of pitches
4473 @cindex @code{\transpose}
4475 A music expression can be transposed with @code{\transpose}. The
4478 \transpose @var{from} @var{to} @var{musicexpr}
4481 This means that @var{musicexpr} is transposed by the interval between
4482 the pitches @var{from} and @var{to}: any note with pitch @code{from}
4483 is changed to @code{to}.
4486 For example, consider a piece written in the key of D major. If
4487 this piece is a little too low for its performer, it can be
4488 transposed up to E major with
4490 \transpose d e @dots{}
4493 Consider a part written for violin (a C instrument). If
4494 this part is to be played on the A clarinet, the following
4495 transposition will produce the appropriate part
4498 \transpose a c @dots{}
4501 @code{\transpose} distinguishes between enharmonic pitches: both
4502 @code{\transpose c cis} or @code{\transpose c des} will transpose up
4503 half a tone. The first version will print sharps and the second
4504 version will print flats
4506 @lilypond[quote,raggedright,verbatim]
4507 mus = { \key d \major cis d fis g }
4511 \transpose c g' \mus
4512 \transpose c f' \mus
4519 Program reference: @internalsref{TransposedMusic}, and
4520 @internalsref{UntransposableMusic}.
4524 If you want to use both @code{\transpose} and @code{\relative},
4525 you must put @code{\transpose} outside of @code{\relative}, since
4526 @code{\relative} will have no effect music that appears inside a
4529 @node Instrument transpositions
4530 @subsection Instrument transpositions
4532 The key of a transposing instrument can also be specified. This
4533 applies to many wind instruments, for example, clarinets (B-flat, A and
4534 E-flat), horn (F) and trumpet (B-flat, C, D and E-flat).
4537 The transposition is entered after the keyword @code{\transposition}
4540 \transposition bes %% B-flat clarinet
4543 This command sets the property @code{instrumentTransposition}. The value of
4544 this property is used for MIDI output and quotations. It does not
4545 affect how notes are printed in the current staff.
4547 @cindex transposition, MIDI
4548 @cindex transposition, instrument
4551 @node Multi measure rests
4552 @subsection Multi measure rests
4553 @cindex multi measure rests
4554 @cindex Rests, multi measure
4558 Multi measure rests are entered using `@code{R}'. It is specifically
4559 meant for full bar rests and for entering parts: the rest can expand
4560 to fill a score with rests, or it can be printed as a single
4561 multimeasure rest. This expansion is controlled by the property
4562 @code{Score.skipBars}. If this is set to true, empty measures will not
4563 be expanded, and the appropriate number is added automatically
4565 @lilypond[quote,fragment,verbatim]
4566 \time 4/4 r1 | R1 | R1*2
4567 \set Score.skipBars = ##t R1*17 R1*4
4570 The @code{1} in @code{R1} is similar to the duration notation used for
4571 notes. Hence, for time signatures other than 4/4, you must enter other
4572 durations. This can be done with augmentation dots or fractions
4574 @lilypond[quote,fragment,verbatim]
4575 \set Score.skipBars = ##t
4583 An @code{R} spanning a single measure is printed as either a whole rest
4584 or a breve, centered in the measure regardless of the time signature.
4586 @cindex text on multi-measure rest
4587 @cindex script on multi-measure rest
4588 @cindex fermata on multi-measure rest
4590 Texts can be added to multi-measure rests by using the
4591 @var{note}-@code{markup} syntax (see @ref{Text markup}). In this case, the number is
4592 replaced. If you need both texts and the number, you must add the
4593 number by hand. A variable (@code{\fermataMarkup}) is provided for
4597 @lilypond[quote,verbatim,fragment]
4599 R2._\markup { "Ad lib" }
4603 If you want to have a text on the left end of a multi-measure rest,
4604 attach the text to a zero-length skip note, i.e.
4612 @cindex whole rests for a full measure
4616 Program reference: @internalsref{MultiMeasureRestEvent},
4617 @internalsref{MultiMeasureTextEvent},
4618 @internalsref{MultiMeasureRestMusicGroup}, and
4619 @internalsref{MultiMeasureRest}.
4621 The layout object @internalsref{MultiMeasureRestNumber} is for the
4622 default number, and @internalsref{MultiMeasureRestText} for user
4627 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
4628 over multi-measure rests.
4630 @cindex condensing rests
4632 There is no way to automatically condense multiple rests into a single
4633 multimeasure rest. Multi measure rests do not take part in rest
4636 Be careful when entering multimeasure rests followed by whole
4637 notes. The following will enter two notes lasting four measures each
4641 When @code{skipBars} is set, the result will look OK, but the bar
4642 numbering will be off.
4644 @node Automatic part combining
4645 @subsection Automatic part combining
4646 @cindex automatic part combining
4647 @cindex part combiner
4650 Automatic part combining is used to merge two parts of music onto a
4651 staff. It is aimed at typesetting orchestral scores. When the two
4652 parts are identical for a period of time, only one is shown. In
4653 places where the two parts differ, they are typeset as separate
4654 voices, and stem directions are set automatically. Also, solo and
4655 @emph{a due} parts are identified and can be marked.
4657 The syntax for part combining is
4660 \partcombine @var{musicexpr1} @var{musicexpr2}
4663 The music expressions will be interpreted as @internalsref{Voice}
4664 contexts. If using relative octaves, @code{\relative} should be
4665 specified for both music expressions, i.e.
4668 \partcombine \relative @dots{} @var{musicexpr1}
4669 \relative @dots{} @var{musicexpr2}
4673 A @code{\relative} section that is outside of @code{\partcombine} has
4674 no effect on the pitches of @var{musicexpr1} and @var{musicexpr2}.
4677 The following example demonstrates the basic functionality of the part
4678 combiner: putting parts on one staff, and setting stem directions and
4681 @lilypond[quote,verbatim,raggedright,fragment]
4682 \new Staff \partcombine
4683 \relative g' { g g a( b) c c r r }
4684 \relative g' { g g r4 r e e g g }
4687 The first @code{g} appears only once, although it was
4688 specified twice (once in each part). Stem, slur and tie directions are
4689 set automatically, depending whether there is a solo or unisono. The
4690 first part (with context called @code{one}) always gets up stems, and
4691 `solo', while the second (called @code{two}) always gets down stems and
4694 If you just want the merging parts, and not the textual markings, you
4695 may set the property @code{soloADue} to false
4697 @lilypond[quote,verbatim,raggedright,fragment,relative=2]
4699 \set Staff.soloADue = ##f
4701 \relative g' { g a( b) r }
4702 \relative g' { g r4 r f }
4708 Program reference: @internalsref{PartCombineMusic},
4709 @internalsref{SoloOneEvent}, and
4710 @internalsref{SoloTwoEvent}, and
4711 @internalsref{UnisonoEvent}.
4715 In @code{soloADue} mode, when the two voices play the same notes on and
4716 off, the part combiner may typeset @code{a2} more than once in a
4719 @code{\partcombine} cannot be inside @code{\times}.
4721 @code{\partcombine} cannot be inside @code{\relative}.
4723 Internally, the @code{\partcombine} interprets both arguments as
4724 @code{Voice}s named @code{one} and @code{two}, and then decides when
4725 the parts can be combined. Consequently, if the arguments switch to
4726 differently named @internalsref{Voice} contexts, the events in those
4730 @subsection Hiding staves
4732 @cindex Frenched scores
4733 @cindex Hiding staves
4735 In orchestral scores, staff lines that only have rests are usually
4736 removed. This saves some space. This style is called `French Score'.
4737 For @internalsref{Lyrics},
4738 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
4739 switched on by default. When these line of these contexts turn out
4740 empty after the line-breaking process, they are removed.
4742 For normal staves, a specialized @internalsref{Staff} context is
4743 available, which does the same: staves containing nothing (or only
4744 multi measure rests) are removed. The context definition is stored in
4745 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
4746 in this example disappears in the second line
4749 @lilypond[quote,verbatim]
4752 \context { \RemoveEmptyStaffContext }
4757 \new Staff { e4 f g a \break c1 }
4758 \new Staff { c4 d e f \break R1 }
4763 The first page shows all staves in full. If empty staves should be
4764 removed from the first page too, set @code{remove-first} to false in
4765 @internalsref{RemoveEmptyVerticalGroup}.
4767 Another application is making ossia sections, i.e. alternative
4768 melodies on a separate piece of staff, with help of a Frenched
4769 staff. See @inputfileref{input/test,ossia.ly} for an example.
4772 @node Different editions from one source
4773 @subsection Different editions from one source
4775 The @code{\tag} command marks music expressions with a name. These
4776 tagged expressions can be filtered out later. With this mechanism it
4777 is possible to make different versions of the same music source.
4779 In the following example, we see two versions of a piece of music, one
4780 for the full score, and one with cue notes for the instrumental part
4796 The same can be applied to articulations, texts, etc.: they are
4799 -\tag #@var{your-tag}
4801 to an articulation, for example,
4806 This defines a note with a conditional fingering indication.
4808 By applying the @code{remove-tag} function, tagged expressions can be
4809 filtered. For example,
4813 \applymusic #(remove-tag 'score) @var{the music}
4814 \applymusic #(remove-tag 'part) @var{the music}
4819 @lilypondfile[quote]{tag-filter.ly}
4821 The argument of the @code{\tag} command should be a symbol, or a list
4822 of symbols, for example,
4824 \tag #'(original-part transposed-part) @dots{}
4829 Examples: @inputfileref{input/regression,tag-filter.ly}.
4832 @node Quoting other voices
4833 @subsection Quoting other voices
4835 With quotations, fragments of other parts can be inserted into a part
4836 directly. Before a part can be quoted, it must be marked especially as
4837 quotable. This is done with code @code{\addquote} command. The
4838 quotation may then be done with @code{\quote}
4841 \addquote @var{name} @var{music}
4842 \quote @var{name} @var{duration}
4847 Here, @var{name} is an identifying string. The @var{music} is any kind
4848 of music. This is an example of @code{\addquote}
4851 \addquote clarinet \relative c' {
4856 During a part, a piece of music can be quoted with the @code{\quote}
4863 This would cite 3 quarter notes (a dotted half note) of the previously
4864 added clarinet voice.
4866 Quotations take into account the transposition both source and target
4867 instruments, if they are specified using the @code{\transposition} command.
4869 @lilypond[quote,raggedright,verbatim]
4870 \addquote clarinet \relative c' {
4876 e'8 f'8 \quote clarinet 2
4882 Only the contents of the first @internalsref{Voice} occurring in an
4883 @code{\addquote} command will be considered for quotation, so
4884 @var{music} can not contain @code{\new} and @code{\context Voice}
4885 statements that would switch to a different Voice.
4890 In this manual: @ref{Instrument transpositions}.
4892 Examples: @inputfileref{input/regression,quote.ly}
4893 @inputfileref{input/regression,quote-transposition.ly}
4895 Program reference: @internalsref{QuoteMusic}.
4897 @node Formatting cue notes
4898 @section Formatting cue notes
4901 The previous section deals with inserting notes from another
4902 voice. When making a part, these notes need to be specially formatted.
4903 Here is an example of formatted cue notes
4908 \override Stem #'length = #5.5
4909 \override Beam #'thickness = #0.384
4910 \override Beam #'space-function =
4911 #(lambda (beam mult) (* 0.8 (Beam::space_function beam mult)))
4915 \set Staff.instrument = #"Horn in F"
4916 \set Score.skipBars = ##t
4919 \once \override Staff.MultiMeasureRest #'staff-position = #-6
4926 r8^"Bsn." c'8 f'8[ f'8]
4936 There are a couple of points to take care of:
4940 The multi rest of the original part should be moved up or down during
4943 Cue notes have smaller font sizes.
4945 When cued notes have a clef change relative to the original part, the
4946 clef should be restored after the cue section. This minimizes
4947 confusion for the reader,
4949 When the original part starts, this should be marked with the name of
4950 the instrument, in this case ``Horn.'' Of course, the cue part is
4951 marked with the instrument playing the cue.
4956 @node Ancient notation
4957 @section Ancient notation
4959 @cindex Vaticana, Editio
4960 @cindex Medicaea, Editio
4965 Support for ancient notation includes features for mensural notation
4966 and Gregorian Chant notation. There is also limited support for
4967 figured bass notation.
4969 Many graphical objects provide a @code{style} property, see
4970 @ref{Ancient note heads}, @ref{Ancient accidentals}, @ref{Ancient
4971 rests}, @ref{Ancient clefs}, @ref{Ancient flags} and @ref{Ancient time
4972 signatures}. By manipulating such a grob property, the typographical
4973 appearance of the affected graphical objects can be accommodated for a
4974 specific notation flavor without need for introducing any new
4977 Other aspects of ancient notation can not that easily be expressed as
4978 in terms of just changing a style property of a graphical object.
4979 Therefore, some notational concepts are introduced specifically for
4980 ancient notation, see @ref{Custodes}, @ref{Divisiones},
4981 @ref{Ligatures}, and @ref{Figured bass}.
4985 * Ancient note heads::
4986 * Ancient accidentals::
4990 * Ancient time signatures::
4994 * Vaticana style contexts::
4998 If this all is way too much of documentation for you, and you just
4999 want to dive into typesetting without worrying too much about the
5000 details on how to customize a context, you may have a look at the
5001 predefined contexts (see @ref{Vaticana style contexts}). Use them to
5002 set up predefined style-specific voice and staff contexts, and
5003 directly go ahead with the note entry.
5007 Ligatures need special spacing that has not yet been implemented. As
5008 a result, there is too much space between ligatures most of the time,
5009 and line breaking often is unsatisfactory. Also, lyrics do not
5010 correctly align with ligatures.
5012 Accidentals must not be printed within a ligature, but instead need to
5013 be collected and printed in front of it.
5015 Augmentum dots within ligatures are not handled correctly.
5018 @node Ancient note heads
5019 @subsection Ancient note heads
5024 For ancient notation, a note head style other than the @code{default}
5025 style may be chosen. This is accomplished by setting the @code{style}
5026 property of the NoteHead object to the desired value (@code{baroque},
5027 @code{neomensural} or @code{mensural}). The @code{baroque} style
5028 differs from the @code{default} style only in using a square shape for
5029 @code{\breve} note heads. The @code{neomensural} style differs from
5030 the @code{baroque} style in that it uses rhomboidal heads for whole
5031 notes and all smaller durations. Stems are centered on the note
5032 heads. This style is in particular useful when transcribing mensural
5033 music, e.g. for the incipit. The @code{mensural} style finally
5034 produces note heads that mimic the look of note heads in historic
5035 printings of the 16th century.
5037 The following example demonstrates the @code{neomensural} style
5039 @lilypond[quote,fragment,raggedright,verbatim]
5040 \override NoteHead #'style = #'neomensural
5041 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
5044 When typesetting a piece in Gregorian Chant notation, a Gregorian
5045 ligature engraver will automatically select the proper note heads,
5046 such there is no need to explicitly set the note head style. Still,
5047 the note head style can be set e.g. to @code{vaticana_punctum} to
5048 produce punctum neumes. Similarly, a mensural ligature engraver is
5049 used to automatically assemble mensural ligatures. See
5050 @ref{Ligatures} for how ligature engravers work.
5055 @ref{Percussion staves} use note head styles of their own that are
5056 frequently used in contemporary music notation.
5058 Examples: @inputfileref{input/regression,note-head-style.ly} gives an
5059 overview over all available note head styles.
5062 @node Ancient accidentals
5063 @subsection Ancient accidentals
5068 Use the @code{style} property of grob @internalsref{Accidental} to
5069 select ancient accidentals. Supported styles are
5070 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
5072 @lilypond[quote,raggedright,staffsize=26]
5080 { " " \musicglyph #"accidentals-vaticana-1"
5081 " " \musicglyph #"accidentals-vaticana0" }
5085 { " " \musicglyph #"accidentals-medicaea-1" }
5089 { " " \musicglyph #"accidentals-hufnagel-1" }
5093 { " " \musicglyph #"accidentals-mensural-1"
5094 " " \musicglyph #"accidentals-mensural1" }
5103 \remove "Bar_number_engraver"
5107 \remove "Clef_engraver"
5108 \remove "Key_engraver"
5109 \remove "Time_signature_engraver"
5110 \remove "Staff_symbol_engraver"
5111 minimumVerticalExtent = ##f
5117 As shown, not all accidentals are supported by each style. When
5118 trying to access an unsupported accidental, LilyPond will switch to a
5119 different style, as demonstrated in
5120 @inputfileref{input/test,ancient-accidentals.ly}.
5122 Similarly to local accidentals, the style of the key signature can be
5123 controlled by the @code{style} property of the
5124 @internalsref{KeySignature} grob.
5128 In this manual: @ref{Pitches}, @ref{Chromatic alterations} and
5129 @ref{Accidentals} give a general introduction into the use of
5130 accidentals. @ref{Key signature} gives a general introduction into
5131 the use of key signatures.
5133 Program reference: @internalsref{KeySignature}.
5135 Examples: @inputfileref{input/test,ancient-accidentals.ly}.
5138 @subsection Ancient rests
5143 Use the @code{style} property of grob @internalsref{Rest} to select
5144 ancient accidentals. Supported styles are @code{classical},
5145 @code{neomensural} and @code{mensural}. @code{classical} differs
5146 from the @code{default} style only in that the quarter rest looks like
5147 a horizontally mirrored 8th rest. The @code{neomensural} style suits
5148 well for e.g. the incipit of a transcribed mensural piece of music.
5149 The @code{mensural} style finally mimics the appearance of rests as
5150 in historic prints of the 16th century.
5152 The following example demonstrates the @code{neomensural} style
5154 @lilypond[quote,fragment,raggedright,verbatim]
5155 \override Rest #'style = #'neomensural
5156 r\longa r\breve r1 r2 r4 r8 r16
5159 There are no 32th and 64th rests specifically for the mensural or
5160 neo-mensural style. Instead, the rests from the default style will be
5161 taken. See @inputfileref{input/test,rests.ly} for a chart of all
5164 There are no rests in Gregorian Chant notation; instead, it uses
5169 In this manual: @ref{Rests} gives a general introduction into the use of rests.
5173 @subsection Ancient clefs
5178 LilyPond supports a variety of clefs, many of them ancient.
5180 The following table shows all ancient clefs that are supported via the
5181 @code{\clef} command. Some of the clefs use the same glyph, but
5182 differ only with respect to the line they are printed on. In such
5183 cases, a trailing number in the name is used to enumerate these clefs.
5184 Still, you can manually force a clef glyph to be typeset on an
5185 arbitrary line, as described in @ref{Clef}. The note printed to the
5186 right side of each clef in the example column denotes the @code{c'}
5187 with respect to that clef.
5189 @multitable @columnfractions .4 .4 .2
5192 @b{Description} @tab
5193 @b{Supported Clefs} @tab
5197 modern style mensural C clef @tab
5198 @code{neomensural_c1}, @code{neomensural_c2},
5199 @code{neomensural_c3}, @code{neomensural_c4} @tab
5200 @lilypond[fragment,quote,relative=1,notime]
5201 \override Staff.TimeSignature #'transparent = ##t
5202 \clef "neomensural_c2" c
5206 petrucci style mensural C clefs, for use on different staff lines
5207 (the examples shows the 2nd staff line C clef).
5217 @lilypond[fragment,quote,relative=1,notime]
5218 \override Staff.TimeSignature #'transparent = ##t
5219 \clef "petrucci_c2" c
5223 petrucci style mensural F clef @tab
5224 @code{petrucci_f} @tab
5225 @lilypond[fragment,quote,relative=1,notime]
5226 \override Staff.TimeSignature #'transparent = ##t
5227 \clef "petrucci_f" c
5231 petrucci style mensural G clef @tab
5232 @code{petrucci_g} @tab
5233 @lilypond[fragment,quote,relative=1,notime]
5234 \override Staff.TimeSignature #'transparent = ##t
5235 \clef "petrucci_g" c
5239 historic style mensural C clef @tab
5240 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
5241 @code{mensural_c4} @tab
5242 @lilypond[fragment,quote,relative=1,notime]
5243 \override Staff.TimeSignature #'transparent = ##t
5244 \clef "mensural_c2" c
5248 historic style mensural F clef @tab
5249 @code{mensural_f} @tab
5250 @lilypond[fragment,quote,relative=1,notime]
5251 \override Staff.TimeSignature #'transparent = ##t
5252 \clef "mensural_f" c
5256 historic style mensural G clef @tab
5257 @code{mensural_g} @tab
5258 @lilypond[fragment,quote,relative=1,notime]
5259 \override Staff.TimeSignature #'transparent = ##t
5260 \clef "mensural_g" c
5264 Editio Vaticana style do clef @tab
5265 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
5266 @lilypond[fragment,quote,relative=1,notime]
5267 \override Staff.StaffSymbol #'line-count = #4
5268 \override Staff.TimeSignature #'transparent = ##t
5269 \clef "vaticana_do2" c
5273 Editio Vaticana style fa clef @tab
5274 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
5275 @lilypond[quote,relative=1,notime,fragment]
5276 \override Staff.StaffSymbol #'line-count = #4
5277 \override Staff.TimeSignature #'transparent = ##t
5278 \clef "vaticana_fa2" c
5282 Editio Medicaea style do clef @tab
5283 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
5284 @lilypond[fragment,quote,relative=1,notime]
5285 \override Staff.StaffSymbol #'line-count = #4
5286 \override Staff.TimeSignature #'transparent = ##t
5287 \clef "medicaea_do2" c
5291 Editio Medicaea style fa clef @tab
5292 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
5293 @lilypond[fragment,quote,relative=1,notime]
5294 \override Staff.StaffSymbol #'line-count = #4
5295 \override Staff.TimeSignature #'transparent = ##t
5296 \clef "medicaea_fa2" c
5300 historic style hufnagel do clef @tab
5301 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
5302 @lilypond[fragment,quote,relative=1,notime]
5303 \override Staff.StaffSymbol #'line-count = #4
5304 \override Staff.TimeSignature #'transparent = ##t
5305 \clef "hufnagel_do2" c
5309 historic style hufnagel fa clef @tab
5310 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
5311 @lilypond[fragment,quote,relative=1,notime]
5312 \override Staff.StaffSymbol #'line-count = #4
5313 \override Staff.TimeSignature #'transparent = ##t
5314 \clef "hufnagel_fa2" c
5318 historic style hufnagel combined do/fa clef @tab
5319 @code{hufnagel_do_fa} @tab
5320 @lilypond[fragment,quote,relative=1,notime]
5321 \override Staff.TimeSignature #'transparent = ##t
5322 \clef "hufnagel_do_fa" c
5329 @emph{Modern style} means ``as is typeset in contemporary editions of
5330 transcribed mensural music''.
5332 @emph{Petrucci style} means ``inspired by printings published by the
5333 famous engraver Petrucci (1466-1539)''.
5335 @emph{Historic style} means ``as was typeset or written in historic
5336 editions (other than those of Petrucci)''.
5338 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
5340 Petrucci used C clefs with differently balanced left-side vertical
5341 beams, depending on which staff line it is printed.
5345 In this manual: see @ref{Clef}.
5349 The mensural g clef is mapped to the Petrucci g clef, until a new
5350 mensural g clef is implemented.
5355 @subsection Ancient flags
5360 Use the @code{flag-style} property of grob @internalsref{Stem} to
5361 select ancient flags. Besides the @code{default} flag style,
5362 only @code{mensural} style is supported
5364 @lilypond[quote,fragment,raggedright,verbatim]
5365 \override Stem #'flag-style = #'mensural
5366 \override Stem #'thickness = #1.0
5367 \override NoteHead #'style = #'mensural
5369 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
5370 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5373 Note that the innermost flare of each mensural flag always is
5374 vertically aligned with a staff line. If you do not like this
5375 behavior, you can set the @code{adjust-if-on-staffline} property of
5376 grob @internalsref{Stem} to @code{##f}. Then, the vertical position
5377 of the end of each flare is different between notes on staff lines and
5378 notes between staff lines
5380 @lilypond[quote,fragment,raggedright]
5381 \override Stem #'flag-style = #'mensural
5382 \override Stem #'thickness = #1.0
5383 \override Stem #'adjust-if-on-staffline = ##f
5384 \override NoteHead #'style = #'mensural
5386 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
5387 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5390 There is no particular flag style for neo-mensural notation. Hence,
5391 when typesetting e.g. the incipit of a transcribed piece of mensural
5392 music, the default flag style should be used. There are no flags in
5393 Gregorian Chant notation.
5396 @node Ancient time signatures
5397 @subsection Ancient time signatures
5399 @cindex time signatures
5402 There is limited support for mensural time signatures. The
5403 glyphs are hard-wired to particular time fractions. In other words,
5404 to get a particular mensural signature glyph with the @code{\time n/m}
5405 command, @code{n} and @code{m} have to be chosen according to the
5411 \set Score.timing = ##f
5412 \set Score.barAlways = ##t
5413 s_\markup { "$\\backslash$time 4/4" }
5414 ^\markup { " " \musicglyph #"timesig-neomensural4/4" }
5416 s_\markup { "$\\backslash$time 2/2" }
5417 ^\markup { " " \musicglyph #"timesig-neomensural2/2" }
5419 s_\markup { "$\\backslash$time 6/4" }
5420 ^\markup { " " \musicglyph #"timesig-neomensural6/4" }
5422 s_\markup { "$\\backslash$time 6/8" }
5423 ^\markup { " " \musicglyph #"timesig-neomensural6/8" }
5425 s_\markup { "$\\backslash$time 3/2" }
5426 ^\markup { " " \musicglyph #"timesig-neomensural3/2" }
5428 s_\markup { "$\\backslash$time 3/4" }
5429 ^\markup { " " \musicglyph #"timesig-neomensural3/4" }
5431 s_\markup { "$\\backslash$time 9/4" }
5432 ^\markup { " " \musicglyph #"timesig-neomensural9/4" }
5434 s_\markup { "$\\backslash$time 9/8" }
5435 ^\markup { " " \musicglyph #"timesig-neomensural9/8" }
5437 s_\markup { "$\\backslash$time 4/8" }
5438 ^\markup { " " \musicglyph #"timesig-neomensural4/8" }
5440 s_\markup { "$\\backslash$time 2/4" }
5441 ^\markup { " " \musicglyph #"timesig-neomensural2/4" }
5449 \remove Staff_symbol_engraver
5450 \remove Clef_engraver
5451 \remove Time_signature_engraver
5457 Use the @code{style} property of grob @internalsref{TimeSignature} to
5458 select ancient time signatures. Supported styles are
5459 @code{neomensural} and @code{mensural}. The above table uses the
5460 @code{neomensural} style. This style is appropriate e.g. for the
5461 incipit of transcriptions of mensural pieces. The @code{mensural}
5462 style mimics the look of historical printings of the 16th century.
5464 @inputfileref{input/test,time.ly} gives an overview over all available
5465 ancient and modern styles.
5469 Program reference: @ref{Time signature} gives a general introduction into the use of time
5474 Mensural signature glyphs are mapped to time fractions in a hard-wired
5475 way. This mapping is sensible, but still arbitrary: given a mensural
5476 time signature, the time fraction represents a modern meter that
5477 usually will be a good choice when transcribing a mensural piece of
5478 music. For a particular piece of mensural music, however, the mapping
5479 may be unsatisfactory. In particular, the mapping assumes a fixed
5480 transcription of durations (e.g. brevis = half note in 2/2, i.e. 4:1).
5481 Some glyphs (such as the alternate glyph for 6/8 meter) are not at all
5482 accessible through the @code{\time} command.
5484 Mensural time signatures are supported typographically, but not yet
5485 musically. The internal representation of durations is
5486 based on a purely binary system; a ternary division such as 1 brevis =
5487 3 semibrevis (tempus perfectum) or 1 semibrevis = 3 minima (cum
5488 prolatione maiori) is not correctly handled: event times in ternary
5489 modes will be badly computed, resulting e.g. in horizontally
5490 misaligned note heads, and bar checks are likely to erroneously fail.
5492 The syntax and semantics of the @code{\time} command for mensural
5493 music is subject to change.
5496 @subsection Custodes
5501 A @emph{custos} (plural: @emph{custodes}; Latin word for `guard') is a
5502 symbol that appears at the end of a staff. It anticipates the pitch
5503 of the first note(s) of the following line and thus helps the player
5504 or singer to manage line breaks during performance, thus enhancing
5505 readability of a score.
5507 Custodes were frequently used in music notation until the 17th
5508 century. Nowadays, they have survived only in a few particular forms
5509 of musical notation such as contemporary editions of Gregorian chant
5510 like the @emph{editio vaticana}. There are different custos glyphs
5511 used in different flavors of notational style.
5513 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
5514 @internalsref{Staff} context when declaring the @code{\paper} block,
5515 as shown in the following example
5521 \consists Custos_engraver
5522 Custos \override #'style = #'mensural
5527 The result looks like this
5529 @lilypond[quote,raggedright]
5533 \override Staff.Custos #'style = #'mensural
5540 \consists Custos_engraver
5546 The custos glyph is selected by the @code{style} property. The styles
5547 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
5548 @code{mensural}. They are demonstrated in the following fragment
5552 \new Lyrics \lyrics {
5556 { " " \musicglyph #"custodes-vaticana-u0" }
5560 { " " \musicglyph #"custodes-medicaea-u0" }
5565 { " " \musicglyph #"custodes-hufnagel-u0" }
5570 { " " \musicglyph #"custodes-mensural-u0" }
5582 Program reference: @internalsref{Custos}.
5584 Examples: @inputfileref{input/regression,custos.ly}.
5588 @subsection Divisiones
5594 A @emph{divisio} (plural: @emph{divisiones}; Latin word for
5595 `division') is a staff context symbol that is used to structure
5596 Gregorian music into phrases and sections. The musical meaning of
5597 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
5598 can be characterized as short, medium and long pause, somewhat like
5599 @ref{Breath marks}. The @emph{finalis} sign not only marks the end of
5600 a chant, but is also frequently used within a single
5601 antiphonal/responsorial chant to mark the end of each section.
5604 To use divisiones, include the file @code{gregorian-init.ly}. It
5605 contains definitions that you can apply by just inserting
5606 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
5607 and @code{\finalis} at proper places in the input. Some editions use
5608 @emph{virgula} or @emph{caesura} instead of divisio minima.
5609 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
5612 @lilypondfile[quote,raggedright]{divisiones.ly}
5616 @cindex @code{\virgula}
5618 @cindex @code{\caesura}
5620 @cindex @code{\divisioMinima}
5621 @code{\divisioMinima},
5622 @cindex @code{\divisioMaior}
5623 @code{\divisioMaior},
5624 @cindex @code{\divisioMaxima}
5625 @code{\divisioMaxima},
5626 @cindex @code{\finalis}
5631 In this manual: @ref{Breath marks}.
5633 Program reference: @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}.
5635 Examples: @inputfileref{input/test,divisiones.ly}.
5638 @subsection Ligatures
5642 @c TODO: Should double check if I recalled things correctly when I wrote
5643 @c down the following paragraph by heart.
5645 A ligature is a coherent graphical symbol that represents at least two
5646 distinct notes. Ligatures originally appeared in the manuscripts of
5647 Gregorian chant notation roughly since the 9th century to denote
5648 ascending or descending sequences of notes.
5650 Ligatures are entered by enclosing them in @code{\[} and @code{\]}.
5651 Some ligature styles may need additional input syntax specific for
5652 this particular type of ligature. By default, the
5653 @internalsref{LigatureBracket} engraver just puts a square bracket
5656 @lilypond[quote,raggedright,verbatim]
5664 To select a specific style of ligatures, a proper ligature engraver
5665 has to be added to the @internalsref{Voice} context, as explained in
5666 the following subsections. Only white mensural ligatures
5667 are supported with certain limitations.
5670 * White mensural ligatures::
5671 * Gregorian square neumes ligatures::
5674 @node White mensural ligatures
5675 @subsubsection White mensural ligatures
5677 @cindex Mensural ligatures
5678 @cindex White mensural ligatures
5680 There is limited support for white mensural ligatures.
5682 To engrave white mensural ligatures, in the paper block the
5683 @internalsref{Mensural_ligature_engraver} has to be put into the
5684 @internalsref{Voice} context, and remove the
5685 @internalsref{Ligature_bracket_engraver}
5691 \remove Ligature_bracket_engraver
5692 \consists Mensural_ligature_engraver
5697 There is no additional input language to describe the shape of a
5698 white mensural ligature. The shape is rather determined solely from
5699 the pitch and duration of the enclosed notes. While this approach may
5700 take a new user a while to get accustomed, it has the great advantage
5701 that the full musical information of the ligature is known internally.
5702 This is not only required for correct MIDI output, but also allows for
5703 automatic transcription of the ligatures.
5708 \set Score.timing = ##f
5709 \set Score.defaultBarType = "empty"
5710 \override NoteHead #'style = #'neomensural
5711 \override Staff.TimeSignature #'style = #'neomensural
5713 \[ g\longa c\breve a\breve f\breve d'\longa \]
5715 \[ e1 f1 a\breve g\longa \]
5717 @lilypond[quote,raggedright]
5720 \set Score.timing = ##f
5721 \set Score.defaultBarType = "empty"
5722 \override NoteHead #'style = #'neomensural
5723 \override Staff.TimeSignature #'style = #'neomensural
5725 \[ g\longa c\breve a\breve f\breve d'\longa \]
5727 \[ e1 f1 a\breve g\longa \]
5732 \remove Ligature_bracket_engraver
5733 \consists Mensural_ligature_engraver
5739 Without replacing @internalsref{Ligature_bracket_engraver} with
5740 @internalsref{Mensural_ligature_engraver}, the same music transcribes
5743 @lilypond[quote,raggedright]
5745 \set Score.timing = ##f
5746 \set Score.defaultBarType = "empty"
5747 \override NoteHead #'style = #'neomensural
5748 \override Staff.TimeSignature #'style = #'neomensural
5750 \[ g\longa c\breve a\breve f\breve d'\longa \]
5752 \[ e1 f1 a\breve g\longa \]
5758 The implementation is experimental; it may output strange warnings or
5759 even crash in some cases or produce weird results on more complex
5762 @node Gregorian square neumes ligatures
5763 @subsubsection Gregorian square neumes ligatures
5765 @cindex Square neumes ligatures
5766 @cindex Gregorian square neumes ligatures
5768 Gregorian square neumes notation (following the style of the Editio
5769 Vaticana) is under heavy development, but not yet really usable for
5770 production purposes. Core ligatures can already be typeset, but
5771 essential issues for serious typesetting are still under development,
5772 such as (among others) horizontal alignment of multiple ligatures,
5773 lyrics alignment and proper accidentals handling. Still, this section
5774 gives a sneak preview of what Gregorian chant may look like once it
5777 The following table contains the extended neumes table of the 2nd
5778 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
5779 1983 by the monks of Solesmes.
5781 @multitable @columnfractions .4 .2 .2 .2
5784 @b{Neuma aut@*Neumarum Elementa} @tab
5785 @b{Figurae@*Rectae} @tab
5786 @b{Figurae@*Liquescentes Auctae} @tab
5787 @b{Figurae@*Liquescentes Deminutae}
5789 @c TODO: \paper block is identical in all of the below examples.
5790 @c Therefore, it should somehow be included rather than duplicated all
5793 @c why not make identifiers in ly/engraver-init.ly? --hwn
5795 @c Because it's just used to typeset plain notes without
5796 @c a staff for demonstration purposes rather than something
5797 @c special of Gregorian chant notation. --jr
5802 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.5\cm]
5803 \include "gregorian-init.ly"
5808 \noBreak s^\markup {"a"} \noBreak
5810 % Punctum Inclinatum
5812 \noBreak s^\markup {"b"}
5814 \paper { \neumeDemoPaper }}
5817 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.5\cm]
5818 \include "gregorian-init.ly"
5821 % Punctum Auctum Ascendens
5822 \[ \auctum \ascendens b \]
5823 \noBreak s^\markup {"c"} \noBreak
5825 % Punctum Auctum Descendens
5826 \[ \auctum \descendens b \]
5827 \noBreak s^\markup {"d"} \noBreak
5829 % Punctum Inclinatum Auctum
5830 \[ \inclinatum \auctum b \]
5831 \noBreak s^\markup {"e"}
5833 \paper { \neumeDemoPaper }}
5836 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5837 \include "gregorian-init.ly"
5840 % Punctum Inclinatum Parvum
5841 \[ \inclinatum \deminutum b \]
5842 \noBreak s^\markup {"f"}
5844 \paper { \neumeDemoPaper }}
5850 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5851 \include "gregorian-init.ly"
5856 \noBreak s^\markup {"g"}
5858 \paper { \neumeDemoPaper }}
5864 @code{3. Apostropha vel Stropha}
5866 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5867 \include "gregorian-init.ly"
5872 \noBreak s^\markup {"h"}
5874 \paper { \neumeDemoPaper }}
5877 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5878 \include "gregorian-init.ly"
5882 \[ \stropha \auctum b \]
5883 \noBreak s^\markup {"i"}
5885 \paper { \neumeDemoPaper }}
5892 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5893 \include "gregorian-init.ly"
5898 \noBreak s^\markup {"j"}
5900 \paper { \neumeDemoPaper }}
5906 @code{5. Clivis vel Flexa}
5908 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5909 \include "gregorian-init.ly"
5916 \paper { \neumeDemoPaper }}
5919 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
5920 \include "gregorian-init.ly"
5923 % Clivis Aucta Descendens
5924 \[ b \flexa \auctum \descendens g \]
5925 \noBreak s^\markup {"l"} \noBreak
5927 % Clivis Aucta Ascendens
5928 \[ b \flexa \auctum \ascendens g \]
5929 \noBreak s^\markup {"m"}
5931 \paper { \neumeDemoPaper }}
5934 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5935 \include "gregorian-init.ly"
5939 \[ b \flexa \deminutum g \]
5942 \paper { \neumeDemoPaper }}
5946 @code{6. Podatus vel Pes}
5948 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5949 \include "gregorian-init.ly"
5956 \paper { \neumeDemoPaper }}
5959 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
5960 \include "gregorian-init.ly"
5963 % Pes Auctus Descendens
5964 \[ g \pes \auctum \descendens b \]
5965 \noBreak s^\markup {"p"} \noBreak
5967 % Pes Auctus Ascendens
5968 \[ g \pes \auctum \ascendens b \]
5969 \noBreak s^\markup {"q"}
5971 \paper { \neumeDemoPaper }}
5974 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5975 \include "gregorian-init.ly"
5979 \[ g \pes \deminutum b \]
5982 \paper { \neumeDemoPaper }}
5986 @code{7. Pes Quassus}
5988 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5989 \include "gregorian-init.ly"
5993 \[ \oriscus g \pes \virga b \]
5996 \paper { \neumeDemoPaper }}
5999 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6000 \include "gregorian-init.ly"
6003 % Pes Quassus Auctus Descendens
6004 \[ \oriscus g \pes \auctum \descendens b \]
6007 \paper { \neumeDemoPaper }}
6012 @code{8. Quilisma Pes}
6014 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6015 \include "gregorian-init.ly"
6019 \[ \quilisma g \pes b \]
6022 \paper { \neumeDemoPaper }}
6025 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6026 \include "gregorian-init.ly"
6029 % Quilisma Pes Auctus Descendens
6030 \[ \quilisma g \pes \auctum \descendens b \]
6033 \paper { \neumeDemoPaper }}
6038 @code{9. Podatus Initio Debilis}
6040 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6041 \include "gregorian-init.ly"
6044 % Pes Initio Debilis
6045 \[ \deminutum g \pes b \]
6048 \paper { \neumeDemoPaper }}
6051 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6052 \include "gregorian-init.ly"
6055 % Pes Auctus Descendens Initio Debilis
6056 \[ \deminutum g \pes \auctum \descendens b \]
6059 \paper { \neumeDemoPaper }}
6066 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6067 \include "gregorian-init.ly"
6071 \[ a \pes b \flexa g \]
6074 \paper { \neumeDemoPaper }}
6077 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6078 \include "gregorian-init.ly"
6081 % Torculus Auctus Descendens
6082 \[ a \pes b \flexa \auctum \descendens g \]
6085 \paper { \neumeDemoPaper }}
6088 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6089 \include "gregorian-init.ly"
6092 % Torculus Deminutus
6093 \[ a \pes b \flexa \deminutum g \]
6096 \paper { \neumeDemoPaper }}
6100 @code{11. Torculus Initio Debilis}
6102 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6103 \include "gregorian-init.ly"
6106 % Torculus Initio Debilis
6107 \[ \deminutum a \pes b \flexa g \]
6110 \paper { \neumeDemoPaper }}
6113 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6114 \include "gregorian-init.ly"
6117 % Torculus Auctus Descendens Initio Debilis
6118 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6121 \paper { \neumeDemoPaper }}
6124 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6125 \include "gregorian-init.ly"
6128 % Torculus Deminutus Initio Debilis
6129 \[ \deminutum a \pes b \flexa \deminutum g \]
6132 \paper { \neumeDemoPaper }}
6136 @code{12. Porrectus}
6138 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6139 \include "gregorian-init.ly"
6143 \[ a \flexa g \pes b \]
6146 \paper { \neumeDemoPaper }}
6149 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6150 \include "gregorian-init.ly"
6153 % Porrectus Auctus Descendens
6154 \[ a \flexa g \pes \auctum \descendens b \]
6157 \paper { \neumeDemoPaper }}
6160 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6161 \include "gregorian-init.ly"
6164 % Porrectus Deminutus
6165 \[ a \flexa g \pes \deminutum b \]
6168 \paper { \neumeDemoPaper }}
6174 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6175 \include "gregorian-init.ly"
6179 \[ \virga b \inclinatum a \inclinatum g \]
6182 \paper { \neumeDemoPaper }
6186 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6187 \include "gregorian-init.ly"
6191 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6194 \paper { \neumeDemoPaper }}
6197 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6198 \include "gregorian-init.ly"
6201 % Climacus Deminutus
6202 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6205 \paper { \neumeDemoPaper }}
6209 @code{14. Scandicus}
6211 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6212 \include "gregorian-init.ly"
6216 \[ g \pes a \virga b \]
6219 \paper { \neumeDemoPaper }}
6222 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6223 \include "gregorian-init.ly"
6226 % Scandicus Auctus Descendens
6227 \[ g \pes a \pes \auctum \descendens b \]
6230 \paper { \neumeDemoPaper }}
6233 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6234 \include "gregorian-init.ly"
6237 % Scandicus Deminutus
6238 \[ g \pes a \pes \deminutum b \]
6241 \paper { \neumeDemoPaper }}
6247 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6248 \include "gregorian-init.ly"
6252 \[ g \oriscus a \pes \virga b \]
6255 \paper { \neumeDemoPaper }}
6258 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6259 \include "gregorian-init.ly"
6262 % Salicus Auctus Descendens
6263 \[ g \oriscus a \pes \auctum \descendens b \]
6266 \paper { \neumeDemoPaper }}
6273 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6274 \include "gregorian-init.ly"
6278 \[ \stropha b \stropha b \stropha a \]
6281 \paper { \neumeDemoPaper }
6290 Unlike most other neumes notation systems, the input language for
6291 neumes does not necessarily reflect directly the typographical
6292 appearance, but is designed to solely focuse on musical meaning. For
6293 example, @code{\[ a \pes b \flexa g \]} produces a Torculus consisting
6294 of three Punctum heads, while @code{\[ a \flexa g \pes b \]} produces
6295 a Porrectus with a curved flexa shape and only a single Punctum head.
6296 There is no command to explicitly typeset the curved flexa shape; the
6297 decision of when to typeset a curved flexa shape is purely taken from
6298 the musical input. The idea of this approach is to separate the
6299 musical aspects of the input from the notation style of the output.
6300 This way, the same input can be reused to typeset the same music in a
6301 different style of Gregorian chant notation.
6303 The following table shows the code fragments that produce the
6304 ligatures in the above neumes table. The letter in the first column
6305 in each line of the below table indicates to which ligature in the
6306 above table it refers. The second column gives the name of the
6307 ligature. The third column shows the code fragment that produces this
6308 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
6310 @multitable @columnfractions .1 .4 .5
6324 Punctum Inclinatum @tab
6325 @code{\[ \inclinatum b \]}
6329 Punctum Auctum Ascendens @tab
6330 @code{\[ \auctum \ascendens b \]}
6334 Punctum Auctum Descendens @tab
6335 @code{\[ \auctum \descendens b \]}
6339 Punctum Inclinatum Auctum @tab
6340 @code{\[ \inclinatum \auctum b \]}
6344 Punctum Inclinatum Parvum @tab
6345 @code{\[ \inclinatum \deminutum b \]}
6350 @code{\[ \virga b \]}
6355 @code{\[ \stropha b \]}
6360 @code{\[ \stropha \auctum b \]}
6365 @code{\[ \oriscus b \]}
6369 Clivis vel Flexa @tab
6370 @code{\[ b \flexa g \]}
6374 Clivis Aucta Descendens @tab
6375 @code{\[ b \flexa \auctum \descendens g \]}
6379 Clivis Aucta Ascendens @tab
6380 @code{\[ b \flexa \auctum \ascendens g \]}
6385 @code{\[ b \flexa \deminutum g \]}
6389 Podatus vel Pes @tab
6390 @code{\[ g \pes b \]}
6394 Pes Auctus Descendens @tab
6395 @code{\[ g \pes \auctum \descendens b \]}
6399 Pes Auctus Ascendens @tab
6400 @code{\[ g \pes \auctum \ascendens b \]}
6405 @code{\[ g \pes \deminutum b \]}
6410 @code{\[ \oriscus g \pes \virga b \]}
6414 Pes Quassus Auctus Descendens @tab
6415 @code{\[ \oriscus g \pes \auctum \descendens b \]}
6420 @code{\[ \quilisma g \pes b \]}
6424 Quilisma Pes Auctus Descendens @tab
6425 @code{\[ \quilisma g \pes \auctum \descendens b \]}
6429 Pes Initio Debilis @tab
6430 @code{\[ \deminutum g \pes b \]}
6434 Pes Auctus Descendens Initio Debilis @tab
6435 @code{\[ \deminutum g \pes \auctum \descendens b \]}
6440 @code{\[ a \pes b \flexa g \]}
6444 Torculus Auctus Descendens @tab
6445 @code{\[ a \pes b \flexa \auctum \descendens g \]}
6449 Torculus Deminutus @tab
6450 @code{\[ a \pes b \flexa \deminutum g \]}
6454 Torculus Initio Debilis @tab
6455 @code{\[ \deminutum a \pes b \flexa g \]}
6459 Torculus Auctus Descendens Initio Debilis @tab
6460 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
6464 Torculus Deminutus Initio Debilis @tab
6465 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
6470 @code{\[ a \flexa g \pes b \]}
6474 Porrectus Auctus Descendens @tab
6475 @code{\[ a \flexa g \pes \auctum \descendens b \]}
6479 Porrectus Deminutus @tab
6480 @code{\[ a \flexa g \pes \deminutum b \]}
6485 @code{\[ \virga b \inclinatum a \inclinatum g \]}
6489 Climacus Auctus @tab
6490 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
6494 Climacus Deminutus @tab
6495 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
6500 @code{\[ g \pes a \virga b \]}
6504 Scandicus Auctus Descendens @tab
6505 @code{\[ g \pes a \pes \auctum \descendens b \]}
6509 Scandicus Deminutus @tab
6510 @code{\[ g \pes a \pes \deminutum b \]}
6515 @code{\[ g \oriscus a \pes \virga b \]}
6519 Salicus Auctus Descendens @tab
6520 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
6525 @code{\[ \stropha b \stropha b \stropha a \]}
6531 The following head prefixes are supported
6533 @cindex @code{\virga}
6535 @cindex @code{\stropha}
6537 @cindex @code{\inclinatum}
6539 @cindex @code{\auctum}
6541 @cindex @code{\descendens}
6543 @cindex @code{\ascendens}
6545 @cindex @code{\oriscus}
6547 @cindex @code{\quilisma}
6549 @cindex @code{\deminutum}
6552 Head prefixes can be accumulated, though restrictions apply. For
6553 example, either @code{\descendens} or @code{\ascendens} can be applied
6554 to a head, but not both to the same head.
6557 @cindex @code{\flexa}
6558 Two adjacent heads can be tied together with the @code{\pes} and
6559 @code{\flexa} infix commands for a rising and falling line of melody,
6564 @node Vaticana style contexts
6565 @subsection Vaticana style contexts
6567 @cindex VaticanaVoiceContext
6568 @cindex VaticanaStaffContext
6570 The predefined @code{VaticanaVoiceContext} and
6571 @code{VaticanaStaffContext} can be used to easily engrave a piece of
6572 Gregorian Chant in the style of the Editio Vaticana. These contexts
6573 initialize all relevant context properties and grob properties to
6574 proper values. With these contexts, you can immediately go ahead
6575 entering the chant, as the following short excerpt demonstrates
6577 @lilypond[quote,raggedright,verbatim,noindent]
6578 \include "gregorian-init.ly"
6581 \context VaticanaVoice = "cantus" {
6582 \override Score.BarNumber #'transparent = ##t
6584 \[ c'\melisma c' \flexa a \]
6585 \[ a \flexa \deminutum g\melismaEnd \]
6587 \[ f\melisma \pes a c' c' \pes d'\melismaEnd \]
6588 c' \divisioMinima \break
6589 \[ c'\melisma c' \flexa a \]
6590 \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
6593 \lyricsto "cantus" \new Lyrics {
6594 San- ctus, San- ctus, San- ctus
6601 @subsection Figured bass
6603 @cindex Basso continuo
6605 @c TODO: musicological blurb about FB
6608 LilyPond has limited support for figured bass
6610 @lilypond[quote,verbatim,fragment]
6612 \context Voice { \clef bass dis4 c d ais }
6613 \context FiguredBass \figures {
6614 < 6 >4 < 7 >8 < 6+ [_!] >
6620 The support for figured bass consists of two parts: there is an input
6621 mode, introduced by @code{\figures}, where you can enter bass figures
6622 as numbers, and there is a context called @internalsref{FiguredBass} that
6623 takes care of making @internalsref{BassFigure} objects.
6625 In figures input mode, a group of bass figures is delimited by
6626 @code{<} and @code{>}. The duration is entered after the @code{>>}
6630 @lilypond[quote,fragment]
6631 \context FiguredBass
6635 Accidentals are added when you append @code{-}, @code{!} and @code{+}
6641 @lilypond[quote,fragment]
6642 \context FiguredBass
6643 \figures { <4- 6+ 7!> }
6646 Spaces or dashes may be inserted by using @code{_}. Brackets are
6647 introduced with @code{[} and @code{]}
6652 @lilypond[quote,fragment]
6653 \context FiguredBass
6654 \figures { < [4 6] 8 [_! 12]> }
6657 Although the support for figured bass may superficially resemble chord
6658 support, it works much simpler. The @code{\figures} mode simply
6659 stores the numbers , and @internalsref{FiguredBass} context prints
6660 them as entered. There is no conversion to pitches, and no
6661 realizations of the bass are played in the MIDI file.
6663 Internally, the code produces markup texts. You can use any of the
6664 markup text properties to override formatting. For example, the
6665 vertical spacing of the figures may be set with @code{baseline-skip}.
6669 Program reference: @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
6670 and @internalsref{FiguredBass} context.
6674 Slash notation for alterations is not supported.
6676 @node Contemporary notation
6677 @section Contemporary notation
6679 In the 20th century, composers have greatly expanded the musical
6680 vocabulary. With this expansion, many innovations in musical notation
6681 have been tried. The book by Stone (1980) gives a comprehensive
6682 overview (see @ref{Literature list}). In general, the use of new,
6683 innovative notation makes a piece harder to understand and perform and
6684 its use should therefore be avoided if possible. For this reason,
6685 support for contemporary notation in LilyPond is limited.
6694 @subsection Clusters
6698 A cluster indicates a continuous range of pitches to be played. They
6699 can be denoted as the envelope of a set of notes. They are entered by
6700 applying the function @code{notes-to-clusters} to a sequence of
6703 @lilypond[quote,relative=2,verbatim]
6704 \applymusic #notes-to-clusters { <c e > <b f'> }
6707 The following example (from
6708 @inputfileref{input/regression,cluster.ly}) shows what the result
6711 @lilypondfile[quote]{cluster.ly}
6713 Ordinary notes and clusters can be put together in the same staff,
6714 even simultaneously. In such a case no attempt is made to
6715 automatically avoid collisions between ordinary notes and clusters.
6719 Program reference: @internalsref{ClusterSpanner},
6720 @internalsref{ClusterSpannerBeacon},
6721 @internalsref{Cluster_spanner_engraver}, and
6722 @internalsref{ClusterNoteEvent}.
6724 Examples: @inputfileref{input/regression,cluster.ly}.
6728 Music expressions like @code{<< @{ g8 e8 @} a4 >>} are not printed
6729 accurately. Use @code{<g a>8 <e a>8} instead.
6734 @subsection Fermatas
6740 Contemporary music notation frequently uses special fermata symbols to
6741 indicate fermatas of differing lengths. The following fermatas are
6744 @lilypond[quote,raggedright]
6766 \context Lyrics \lyrics {
6767 \override LyricText #'font-family = #'typewriter
6768 "shortfermata" "fermata" "longfermata" "verylongfermata"
6773 See @ref{Articulations} for general instructions how to apply scripts
6774 such as fermatas to notes.
6777 @node Educational use
6778 @section Educational use
6782 * Blank music paper::
6783 * Notation for excercises::
6784 * Easy Notation note heads::
6788 @subsection Balloon help
6790 Elements of notation can be marked and named with the help of a square
6791 balloon. The primary purpose of this feature is to explain notation.
6793 The following example demonstrates its use.
6795 @lilypond[quote,verbatim,fragment,raggedright,relative=2]
6798 #(add-balloon-text 'NoteHead "heads, or tails?"
6804 The function @code{add-balloon-text} takes the name of a grob, the
6805 label to print, and the position where to put the label relative to
6806 the object. In the above example, the text ``heads or tails?'' ends
6807 3 spaces below the `balloon.'
6810 @cindex notation, explaining
6814 Program reference: @internalsref{text-balloon-interface}.
6816 Examples: @inputfileref{input/regression,balloon.ly}.
6821 @node Blank music paper
6822 @subsection Blank music paper
6824 A blank music paper can be produced also by using invisible notes, and
6825 removing @code{Bar_number_engraver}.
6830 \repeat unfold 2 % Change this for more lines.
6835 \override TimeSignature #'transparent = ##t
6836 defaultBarType = #""
6837 \remove Bar_number_engraver
6839 \context Staff \emptymusic
6840 \context TabStaff \emptymusic
6845 @node Notation for excercises
6846 @subsection Notation for excercises
6850 Invisible (or transparent) notes can be useful, when weird tricks are
6851 needed; especially, a slur cannot be attach to a rest or spacer rest.
6855 blanknotes = { \override NoteHead #'transparent = ##t
6856 \override Stem #'transparent = ##t }
6857 unblanknotes = { \revert NoteHead #'transparent
6858 \revert Stem #'transparent }
6863 \blanknotes e4 f4 \unblanknotes
6869 @node Easy Notation note heads
6870 @subsection Easy Notation note heads
6872 @cindex easy notation
6875 The `easy play' note head includes a note name inside the head. It is
6876 used in music for beginners
6878 @lilypond[quote,raggedright,verbatim,fragment,staffsize=26]
6883 The command @code{\setEasyHeads} overrides settings for the
6884 @internalsref{NoteHead} object. To make the letters readable, it has
6885 to be printed in a large font size. To print with a larger font, see
6886 @ref{Setting global staff size}.
6891 If you view the result with Xdvi, staff lines may show through the
6892 letters. Printing the PostScript file obtained does produce the
6897 @cindex @code{\setEasyHeads}
6898 @code{\setEasyHeads}
6904 Entered music can also be converted to MIDI output. The performance
6905 is intended for proof-hearing the music for errors.
6907 Ties, dynamics and tempo changes are interpreted. Dynamic marks,
6908 crescendi and decrescendi translate into MIDI volume levels. Dynamic
6909 marks translate to a fixed fraction of the available MIDI volume
6910 range, crescendi and decrescendi make the volume vary linearly between
6911 their two extremities. The fractions can be adjusted by
6912 @code{dynamicAbsoluteVolumeFunction} in @internalsref{Voice} context.
6913 For each type of MIDI instrument, a volume range can be defined. This
6914 gives a basic equalizer control, which can enhance the quality of
6915 the MIDI output remarkably. The equalizer can be controlled by
6916 setting @code{instrumentEqualizer}.
6920 Many musically interesting effects, such as swing, articulation,
6921 slurring, etc., are not translated to MIDI.
6923 The MIDI output allocates a channel for each Staff, and one for global
6924 settings. Hence, the MIDI file should not have more than 15 staves
6925 (or 14 if you do not use drums). Other staves will remain silent.
6927 Not all MIDI players correctly handle tempo change in the MIDI
6928 output. Players that are known to work include
6929 @uref{http://timidity.sourceforge.net/,timidity}
6934 * MIDI instrument names::
6939 @subsection MIDI block
6943 The MIDI block is analogous to the paper block, but it is somewhat
6944 simpler. The @code{\midi} block can contain
6948 @item a @code{\tempo} definition, and
6949 @item context definitions.
6952 A number followed by a period is interpreted as a real number, so
6953 for setting the tempo for dotted notes, an extra space should be
6954 inserted, for example
6957 \midi @{ \tempo 4 . = 120 @}
6961 @cindex context definition
6963 Context definitions follow precisely the same syntax as within the
6964 \paper block. Translation modules for sound are called performers.
6965 The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
6968 @node MIDI instrument names
6969 @subsection MIDI instrument names
6971 @cindex instrument names
6972 @cindex @code{Staff.midiInstrument}
6974 The MIDI instrument name is set by the @code{Staff.midiInstrument}
6975 property. The instrument name should be chosen from the list in
6976 @ref{MIDI instruments}.
6980 If the selected string does not exactly match, the default is used,
6981 which is the Grand Piano.