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 automagically fill in these menus before saving changes
8 @c FIXME: singular vs. plural: Beams/Beam
12 @chapter Notation manual
14 This chapter describes all the different types of notation supported
15 by LilyPond. It is intended as a reference for users that are already
16 somewhat familiar with using LilyPond.
20 * Easier music entry::
34 * Contemporary notation::
42 @c FIXME: Note entry vs Music entry at top level menu is confusing.
48 The basic elements of any piece of music are the notes. This section
49 is about basic notation elements notes, rests and related constructs,
50 such as stems, tuplets and ties.
55 * Chromatic alterations::
70 A note is printed by specifying its pitch and then its duration:
71 @footnote{Notes constitute the most basic elements of LilyPond input,
72 but they do not form valid input on their own without a @code{\score}
73 block. However, for the sake of brevity and simplicity we will
74 generally omit @code{\score} blocks and @code{\paper} declarations in
77 @lilypond[fragment,verbatim]
86 @cindex Note specification
88 @cindex entering notes
90 The most common syntax for pitch entry is used in @code{\chords} and
91 @code{\notes} mode. In Note and Chord mode, pitches may be designated
92 by names. The notes are specified by the letters @code{a} through
93 @code{g}, while the octave is formed with notes ranging from @code{c}
94 to @code{b}. The pitch @code{c} is an octave below middle C and the
95 letters span the octave above that C:
97 @lilypond[fragment,verbatim]
99 a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
102 @cindex note names, Dutch
104 A sharp is formed by adding @code{-is} to the end of a pitch name and
105 a flat is formed by adding @code{-es}. Double sharps and double flats
106 are obtained by adding @code{-isis} or @code{-eses}. These
107 names are the Dutch note names. In Dutch, @code{aes} is contracted to
108 @code{as}, but both forms are accepted. Similarly, both
109 @code{es} and @code{ees} are accepted.
111 Half-flats and half-sharps are formed by adding @code{-eh} and
112 @code{-ih}; the following is a series of Cs with increasing pitches:
114 @cindex quarter tones
115 @cindex semi-flats, semi-sharps
117 @lilypond[verbatim,relative=2]
129 There are predefined sets of note names for various other languages.
130 To use them, include the language specific init file. For
131 example: @code{\include "english.ly"}. The available language files
132 and the note names they define are:
137 Note Names sharp flat
138 nederlands.ly c d e f g a bes b -is -es
139 english.ly c d e f g a bf b -s/-sharp -f/-flat
141 deutsch.ly c d e f g a b h -is -es
142 norsk.ly c d e f g a b h -iss/-is -ess/-es
143 svenska.ly c d e f g a b h -iss -ess
144 italiano.ly do re mi fa sol la sib si -d -b
145 catalan.ly do re mi fa sol la sib si -d/-s -b
146 espanol.ly do re mi fa sol la sib si -s -b
155 The optional octave specification takes the form of a series of
156 single quote (`@code{'}') characters or a series of comma
157 (`@code{,}') characters. Each @code{'} raises the pitch by one
158 octave; each @code{,} lowers the pitch by an octave:
160 @lilypond[fragment,verbatim,center]
161 c' c'' es' g' as' gisis' ais'
167 Notes can be hidden and unhidden with the following commands:
169 @cindex @code{\hideNotes}
171 @cindex @code{\unHideNotes}
177 Internals: @internalsref{NoteEvent}, and @internalsref{NoteHead}.
179 @node Chromatic alterations
180 @subsection Chromatic alterations
182 Normally accidentals are printed automatically, but you may also
183 print them manually. A reminder accidental
184 @cindex reminder accidental
186 can be forced by adding an exclamation mark @code{!}
187 after the pitch. A cautionary accidental
188 @cindex cautionary accidental
189 @cindex parenthesized accidental
190 (i.e. an accidental within parentheses) can be obtained by adding the
191 question mark `@code{?}' after the pitch:
193 @lilypond[fragment,verbatim]
194 cis' cis' cis'! cis'?
198 The automatic production of accidentals can be tuned in many
199 ways. For more information, refer to @ref{Accidentals}.
204 A chord is formed by a enclosing a set of pitches in @code{<} and
205 @code{>}. A chord may be followed by a duration, and a set of
206 articulations, just like simple notes.
216 Rests are entered like notes, with the note name @code{r}:
218 @lilypond[raggedright,verbatim]
222 Whole bar rests, centered in middle of the bar,
223 must be done with multi measure rests. They are discussed in
224 @ref{Multi measure rests}.
227 A rest's vertical position may be explicitly specified by entering a
228 note with the @code{\rest} keyword appended. This makes manual
229 formatting in polyphonic music easier. Rest collision testing will
230 leave these rests alone:
232 @lilypond[raggedright,verbatim]
238 Internals: @internalsref{RestEvent}, and @internalsref{Rest}.
245 @cindex Invisible rest
248 An invisible rest (also called a `skip') can be entered like a note
249 with note name `@code{s}' or with @code{\skip @var{duration}}:
251 @lilypond[raggedright,verbatim]
255 The @code{s} syntax is only available in note mode and chord mode. In
256 other situations, you should use the @code{\skip} command:
258 @lilypond[raggedright,verbatim]
261 { \time 4/8 \skip 2 \time 4/4 }
262 \notes\relative c'' { a2 a1 }
267 The skip command is merely an empty musical placeholder. It does not
268 produce any output, not even transparent output.
270 The @code{s} skip command does create @internalsref{Staff} and
271 @internalsref{Voice} when necessary, similar to note and rest
272 commands. For example, the following results in an empty staff.
274 @lilypond[raggedright,verbatim]
275 \score { \notes { s4 } }
278 The same fragment using @code{\skip} results in an empty page.
282 Internals: @internalsref{SkipEvent}, @internalsref{SkipMusic}.
287 @subsection Durations
293 In Note, Chord, and Lyrics mode, durations are designated by numbers
294 and dots: durations are entered as their reciprocal values. For example,
295 a quarter note is entered using a @code{4} (since it is a 1/4 note), while
296 a half note is entered using a @code{2} (since it is a 1/2 note). For notes
297 longer than a whole you must use variables:
301 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
303 r1 r2 r4 r8 r16 r32 r64 r64
308 \notes \relative c'' {
310 a1 a2 a4 a8 a16 a32 a64 a64
312 r1 r2 r4 r8 r16 r32 r64 r64
317 \remove "Clef_engraver"
318 \override StaffSymbol #'transparent = ##t
319 \override TimeSignature #'transparent = ##t
320 \consists "Pitch_squash_engraver"
327 If the duration is omitted then it is set to the previously entered
328 duration. The default for the first note is a quarter note. The duration
329 can be followed by dots (`@code{.}') in order to obtain dotted note
333 @lilypond[fragment,verbatim,center]
334 a' b' c''8 b' a'4 a'4. b'4.. c'8.
339 You can alter the length of duration by a fraction @var{N/M}
340 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
341 will not affect the appearance of the notes or rests produced.
342 In the following example, the first three notes take up exactly two
344 @lilypond[fragment,relative=2,verbatim]
346 a4*2/3 gis4*2/3 a4*2/3
353 Dots are normally moved up to avoid staff lines, except in polyphonic
354 situations. The following commands may be used to force a particular
357 @cindex @code{\dotsUp}
359 @cindex @code{\dotsDown}
361 @cindex @code{\dotsBoth}
366 Internals: @internalsref{Dots}, and @internalsref{DotColumn}.
371 Whenever a note is found, a @internalsref{Stem} object is created
372 automatically. For whole notes and rests, they are also created but
377 @cindex @code{\stemUp}
379 @cindex @code{\stemDown}
381 @cindex @code{\stemBoth}
392 A tie connects two adjacent note heads of the same pitch. The tie in
393 effect extends the length of a note. Ties should not be confused with
394 slurs, which indicate articulation, or phrasing slurs, which indicate
395 musical phrasing. A tie is entered using the tilde symbol `@code{~}':
397 @lilypond[fragment,verbatim,center]
398 e' ~ e' <c' e' g'> ~ <c' e' g'>
401 When a tie is applied to a chord, all note heads whose pitches match
402 are connected. When no note heads match, no ties will be created.
404 In its meaning a tie is just a way of extending a note duration, similar
405 to the augmentation dot; in the following example there are two ways of
406 notating exactly the same concept:
408 @lilypond[fragment,raggedright,quote]
409 \time 3/4 c'2. c'2 ~ c'4
411 If you need to tie a lot of notes over bars, it may be easier to use automatic
412 note splitting (see @ref{Automatic note splitting}).
417 @cindex @code{\tieUp}
419 @cindex @code{\tieDown}
421 @cindex @code{\tieBoth}
423 @cindex @code{\tieDotted}
425 @cindex @code{\tieSolid}
430 In this manual: @ref{Automatic note splitting}.
432 Internals: @internalsref{TieEvent}, @internalsref{Tie}.
434 Examples: if you want less ties created for a chord, see
435 @inputfileref{input/test,tie-sparse.ly}.
437 For tying only a subset of the note heads of a pair of chords, see
438 @inputfileref{input/regression,tie-chord-partial.ly}.
443 Switching staves when a tie is active will not produce a slanted tie.
445 Formatting of ties is a difficult subject. The results are often not
455 @cindex @code{\times}
457 Tuplets are made out of a music expression by multiplying all durations
460 @cindex @code{\times}
462 \times @var{fraction} @var{musicexpr}
466 The duration of @var{musicexpr} will be multiplied by the fraction.
467 The fraction's denominator will be printed over the notes, optionally
468 with a bracket. The most common tuplet is the triplet in which 3
469 notes have the length of 2, so the notes are 2/3 of their written
472 @lilypond[fragment,verbatim,center]
473 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
476 The property @code{tupletSpannerDuration} specifies how long each
477 bracket should last. With this, you can make lots of tuplets while
478 typing @code{\times} only once, saving lots of typing. In the next
479 example, there are two triplets shown, while @code{\times} was only
482 @lilypond[fragment,relative,raggedright,verbatim]
483 \set tupletSpannerDuration = #(ly:make-moment 1 4)
484 \times 2/3 { c'8 c c c c c }
487 The format of the number is determined by the property
488 @code{tupletNumberFormatFunction}. The default prints only the
489 denominator, but if it is set to the Scheme function
490 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
494 @cindex @code{tupletNumberFormatFunction}
495 @cindex tuplet formatting
500 @cindex @code{\tupletUp}
502 @cindex @code{\tupletDown}
504 @cindex @code{\tupletBoth}
509 Internals: @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
511 Examples: @inputfileref{input/regression,tuplet-nest.ly}.
515 Nested tuplets are not formatted automatically. In this case, outer
516 tuplet brackets should be moved manually, which is demonstrated in
517 @inputfileref{input/regression,tuplet-nest.ly}.
521 @node Easier music entry
522 @section Easier music entry
525 When entering music it is easy to introduce errors. This section deals
526 with tricks and features of the input language that were added solely
527 to help entering music, and find and correct mistakes.
529 It is also possible to use external programs, for example GUI
530 interfaces, or MIDI transcription programs, to enter or edit
531 music. Refer to the website for more information. Finally, there are
532 tools make debugging easier, by linking the input file and the output
533 shown on screen. See @ref{Point and click} for more information.
540 * Skipping corrected music::
541 * Automatic note splitting::
547 @node Relative octaves
548 @subsection Relative octaves
550 @cindex relative octave specification
552 Octaves are specified by adding @code{'} and @code{,} to pitch names.
553 When you copy existing music, it is easy to accidentally put a pitch
554 in the wrong octave and hard to find such an error. The relative
555 octave mode prevents these errors: a single error puts the rest of the
556 piece off by one octave:
558 @cindex @code{\relative}
560 \relative @var{startpitch} @var{musicexpr}
563 The octave of notes that appear in @var{musicexpr} are calculated as
564 follows: If no octave changing marks are used, the basic interval
565 between this and the last note is always taken to be a fourth or less
566 (; this distance is determined without regarding alterations: a
567 @code{fisis} following a @code{ceses} will be put above the
570 The octave changing marks @code{'} and @code{,} can be added to raise
571 or lower the pitch by an extra octave. Upon entering relative mode,
572 an absolute starting pitch must be specified that will act as the
573 predecessor of the first note of @var{musicexpr}.
575 Here is the relative mode shown in action:
576 @lilypond[fragment,raggedright,verbatim,center]
582 Octave changing marks are used for intervals greater than a fourth:
583 @lilypond[fragment,verbatim,center]
588 If the preceding item is a chord, the first note of the chord is used
589 to determine the first note of the next chord:
591 @lilypond[fragment,verbatim,center]
598 @cindex @code{\notes}
600 The pitch after the @code{\relative} contains a note name. To parse
601 the pitch as a note name, you have to be in note mode, so there must
602 be a surrounding @code{\notes} keyword (which is not
605 The relative conversion will not affect @code{\transpose},
606 @code{\chords} or @code{\relative} sections in its argument. If you
607 want to use relative within transposed music, you must place an
608 additional @code{\relative} inside the @code{\transpose}.
611 @subsection Octave check
614 Octave checks make octave errors easier to correct: a note may be
615 followed by @code{=}@var{quotes} which indicates what its absolute
616 octave should be. In the following example,
618 \relative c'' @{ c='' b=' d,='' @}
622 @c take care with @code, adds confusing quotes.
623 the d will generate a warning, because a d'' is expected, but a d' is
624 found. In the output, the octave is corrected this and the following
629 There is also a syntax that is separate from the notes.
634 This checks that @var{pitch} (without octave) yields @var{pitch} (with
635 octave) in \relative mode. If not, a warning is printed, and the
636 octave is corrected, for example, the first check is passed
637 successfully. The second check fails with an error message. The
638 octave is adjusted so the following notes are in the correct octave
649 The octave of a note following an octave check is determined with
650 respect to the note preceding it. In the next fragment, the last note
651 is a @code{a'}, above central C. Hence, the @code{\octave} check may
652 be deleted without changing the meaning of the piece.
654 @lilypond[verbatim,fragment]
663 @subsection Bar check
667 @cindex @code{barCheckSynchronize}
670 Bar checks help detect errors in the durations. A bar check is
671 entered using the bar symbol, `@code{|}'. Whenever it is encountered
672 during interpretation, it should fall on a measure boundary. If it
673 does not, a warning is printed. Depending on the value of
674 @code{barCheckSynchronize}, the beginning of the measure will be
677 In the next example, the second bar check will signal an error:
679 \time 3/4 c2 e4 | g2 |
682 Bar checks can also be used in lyrics, for example
687 Twin -- kle | Twin -- kle
692 @cindex skipTypesetting
694 Failed bar checks are caused by entering incorrect
695 durations. Incorrect durations often completely garble up the score,
696 especially if it is polyphonic, so you should start correcting the
697 score by scanning for failed bar checks and incorrect durations. To
698 speed up this process, you can use @code{skipTypesetting}, described
701 @node Skipping corrected music
702 @subsection Skipping corrected music
704 The property @code{Score.skipTypesetting} can be used to switch on and
705 off typesetting completely during the interpretation phase. When
706 typesetting is switched off, the music is processed much more quickly.
707 This can be used to skip over the parts of a score that have already
708 been checked for errors:
710 @lilypond[fragment,raggedright,verbatim]
712 \set Score.skipTypesetting = ##t
714 \set Score.skipTypesetting = ##f
718 @node Automatic note splitting
719 @subsection Automatic note splitting
721 Long notes can be converted automatically to tied notes. This is done
722 by replacing the @internalsref{Note_heads_engraver} by the
723 @internalsref{Completion_heads_engraver}.
724 In the following examples, notes crossing the barline are split and tied.
727 @lilypond[noindent,verbatim,relative=1]
729 \remove "Note_heads_engraver"
730 \consists "Completion_heads_engraver"
732 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
736 This engraver splits all running notes at the bar line, and inserts
737 ties. One of its uses is to debug complex scores: if the measures are
738 not entirely filled, then the ties exactly show how much each measure
743 Not all durations (especially those containing tuplets) can be
744 represented exactly; the engraver will not insert tuplets.
748 Examples: @inputfileref{input/regression,completion-heads.ly}.
750 Internals: @internalsref{Completion_heads_engraver}.
754 @section Staff notation
756 This section describes music notation that occurs on staff level,
757 such as keys, clefs and time signatures.
759 @cindex Staff notation
773 @subsection Staff symbol
775 @cindex adjusting staff symbol
777 Notes, dynamic signs, etc. are grouped
778 with a set of horizontal lines, into a staff (plural `staves'). In our
779 system, these lines are drawn using a separate layout object called
783 @cindex staff lines, setting number of
784 @cindex staff lines, setting thickness of
785 @cindex thickness of staff lines, setting
786 @cindex number of staff lines, setting
790 Internals: @internalsref{StaffSymbol}.
792 Examples: @inputfileref{input/test,staff-lines.ly},
793 @inputfileref{input/test,staff-size.ly}.
797 If a staff is ended halfway a piece, the staff symbol may not end
798 exactly on the barline.
802 @subsection Key signature
803 @cindex Key signature
807 The key signature indicates the scale in which a piece is played. It
808 is denoted by a set of alterations (flats or sharps) at the start of
813 Setting or changing the key signature is done with the @code{\key}
816 @code{\key} @var{pitch} @var{type}
819 @cindex @code{\minor}
820 @cindex @code{\major}
821 @cindex @code{\minor}
822 @cindex @code{\ionian}
823 @cindex @code{\locrian}
824 @cindex @code{\aeolian}
825 @cindex @code{\mixolydian}
826 @cindex @code{\lydian}
827 @cindex @code{\phrygian}
828 @cindex @code{\dorian}
830 Here, @var{type} should be @code{\major} or @code{\minor} to get
831 @var{pitch}-major or @var{pitch}-minor, respectively.
832 The standard mode names @code{\ionian},
833 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
834 @code{\phrygian}, and @code{\dorian} are also defined.
836 This command sets the context property
837 @internalsref{Staff}.@code{keySignature}. Non-standard key signatures
838 can be specified by setting this property directly.
840 Accidentals and key signatures often confuse new users, because
841 unaltered notes get natural signs depending on the keysignature. The
842 tutorial explains why this is so in @ref{More about pitches}.
846 The ordering of a key cancellation is wrong when it is combined with
847 repeat bar lines. The cancellation is also printed after a line break.
851 Internals: @internalsref{KeyChangeEvent}, and @internalsref{KeySignature}.
853 @cindex @code{keySignature}
860 The clef indicates which lines of the staff correspond to which
865 The clef can be set or changed with the @code{\clef} command:
866 @lilypond[fragment,verbatim]
867 \key f\major c''2 \clef alto g'2
870 Supported clef-names include:
871 @c Moved standard clefs to the top /MB
875 @item treble, violin, G, G2
888 G clef on 1st line, so-called French violin clef
893 @cindex mezzosoprano clef
896 @cindex baritone clef
899 @cindex varbaritone clef
908 By adding @code{_8} or @code{^8} to the clef name, the clef is
909 transposed one octave down or up, respectively, and @code{_15} and
910 @code{^15} transposes by two octaves. The argument @var{clefname}
911 must be enclosed in quotes when it contains underscores or digits. For
915 @cindex choral tenor clef
916 @lilypond[verbatim,fragment,relative]
920 This command is equivalent to setting @code{clefGlyph},
921 @code{clefPosition} (which controls the Y position of the clef),
922 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
923 when any of these properties are changed.
927 Internals: the object for this symbol is @internalsref{Clef}.
931 @node Ottava brackets
932 @subsection Ottava brackets
934 ``Ottava'' brackets introduce an extra transposition of an octave for
935 the staff. They are created by invoking the function
936 @code{set-octavation}:
942 @lilypond[verbatim,fragment]
951 The @code{set-octavation} function also takes -1 (for 8va bassa) and 2
952 (for 15ma) as arguments. Internally the function sets the properties
953 @code{ottavation} (eg. to @code{"8va"}) and
954 @code{centralCPosition}. For overriding the text of the bracket, set
955 @code{ottavation} after invoking @code{set-octavation}, i.e.,
959 \set Staff.ottavation = #"8"
964 Internals: @internalsref{OttavaBracket}.
966 Examples: @inputfileref{input/regression,ottava.ly},
967 @inputfileref{input/regression,ottava-broken.ly}.
971 @code{set-octavation} will get confused when clef changes happen
972 during an octavation bracket.
975 @subsection Time signature
976 @cindex Time signature
980 Time signature indicates the metrum of a piece: a regular pattern of
981 strong and weak beats. It is denoted by a fraction at the start of the
986 The time signature is set or changed by the @code{\time}
988 @lilypond[fragment,verbatim]
989 \time 2/4 c'2 \time 3/4 c'2.
992 The symbol that is printed can be customized with the @code{style}
993 property. Setting it to @code{#'()} uses fraction style for 4/4 and
994 2/2 time. There are many more options for its layout. See
995 @inputfileref{input/test,time.ly} for more examples.
998 This command sets the property @code{timeSignatureFraction},
999 @code{beatLength} and @code{measureLength} in the @code{Timing}
1000 context, which is normally aliased to @internalsref{Score}. The
1001 property @code{measureLength} determines where bar lines should be
1002 inserted, and how automatic beams should be generated. Changing the
1003 value of @code{timeSignatureFraction} also causes the symbol to be
1006 More options are available through the Scheme function
1007 @code{set-time-signature}. In combination with the
1008 @internalsref{Measure_grouping_engraver}, it will create
1009 @internalsref{MeasureGrouping} signs. Such signs ease reading
1010 rhythmically complex modern music. In the following example, the 9/8
1011 measure is subdivided in 2, 2, 2 and 3. This is passed to
1012 @code{set-time-signature} as the third argument @code{(2 2 2 3)}:
1015 \score { \notes \relative c'' {
1016 #(set-time-signature 9 8 '(2 2 2 3))
1017 g8[ g] d[ d] g[ g] a8[( bes g]) |
1018 #(set-time-signature 5 8 '(3 2))
1023 \translator { \StaffContext
1024 \consists "Measure_grouping_engraver"
1030 Internals: @internalsref{TimeSignature}, and @internalsref{Timing_engraver}.
1035 Automatic beaming does not use measure grouping specified with
1036 @code{set-time-signature}.
1038 @node Partial measures
1039 @subsection Partial measures
1042 @cindex partial measure
1043 @cindex measure, partial
1044 @cindex shorten measures
1045 @cindex @code{\partial}
1047 Partial measures, for example in upsteps, are entered using the
1048 @code{\partial} command:
1049 @lilypond[fragment,verbatim,relative=1]
1050 \partial 16*5 c16 cis d dis e | a2. c,4 | b2
1053 The syntax for this command is
1055 \partial @var{duration}
1057 This is internally translated into
1059 \set Timing.measurePosition = -@var{length of duration}
1062 The property @code{measurePosition} contains a rational number
1063 indicating how much of the measure has passed at this point.
1065 @node Unmetered music
1066 @subsection Unmetered music
1068 Bar lines and bar numbers are calculated automatically. For unmetered
1069 music (e.g. cadenzas), this is not desirable. By setting
1070 @code{Score.timing} to false, this automatic timing can be switched
1076 @cindex @code{\cadenzaOn}
1078 @cindex @code{\cadenzaOff}
1082 @subsection Bar lines
1086 @cindex measure lines
1090 Bar lines delimit measures, but are also used to indicate repeats.
1091 Normally, they are inserted automatically. Line breaks may only
1097 of barlines can be forced with the @code{\bar} command:
1099 @lilypond[relative=1,fragment,verbatim]
1103 The following bar types are available:
1104 @lilypond[fragment,relative,raggedright,verbatim]
1117 For allowing linebreaks, there is a special command,
1121 This will insert an invisible barline, and allow linebreaks at this
1124 In scores with many staves, a @code{\bar} command in one staff is
1125 automatically applied to all staves. The resulting bar lines are
1126 connected between different staves of a @internalsref{StaffGroup}:
1128 @lilypond[fragment,verbatim]
1129 << \context StaffGroup <<
1133 \new Staff { \clef bass c4 g e g } >>
1134 \new Staff { \clef bass c2 c2 } >>
1138 The command @code{\bar @var{bartype}} is a short cut for doing
1139 @code{\set Score.whichBar = @var{bartype}} Whenever
1140 @code{whichBar} is set to a string, a bar line of that type is
1141 created. At the start of a measure it is set to
1142 @code{defaultBarType}. The contents of @code{repeatCommands} are used
1143 to override default measure bars.
1145 Property @code{whichBar} can also be set directly, using @code{\set}
1146 or @code{\bar}. These settings take precedence over the automatic
1147 @code{whichBar} settings.
1150 @cindex repeatCommands
1151 @cindex defaultBarType
1153 You are encouraged to use @code{\repeat} for repetitions. See
1160 In this manual: @ref{Repeats}.
1163 Internals: the bar line objects that are created at
1164 @internalsref{Staff} level are called @internalsref{BarLine}, the bar
1165 lines that span staves are @internalsref{SpanBar}s.
1167 @cindex bar lines at start of system
1168 @cindex start of system
1170 The barlines at the start of each system are
1171 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
1172 @internalsref{SystemStartBracket}. Only one of these types is created
1173 in every context, and that type is determined by the property
1174 @code{systemStartDelimiter}.
1176 Examples: @inputfileref{input/test,bar-lines.ly},
1182 The easiest way to enter fragments with more than one voice on a staff
1183 is to split chords using the separator @code{\\}. You can use it for
1184 small, short-lived voices or for single chords:
1186 @lilypond[verbatim,fragment]
1187 \context Staff \relative c'' {
1188 c4 << { f d e } \\ { b c2 } >>
1189 c4 << g' \\ b, \\ f' \\ d >>
1193 The separator causes @internalsref{Voice} contexts@footnote{Polyphonic
1194 voices are sometimes called "layers" other notation packages}
1196 to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
1197 each of these contexts, vertical direction of slurs, stems, etc. is set
1200 @cindex @code{\voiceOne}
1201 @cindex @code{\voiceFour}
1203 This can also be done by instantiating @internalsref{Voice} contexts
1204 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1205 a stem directions and horizontal shift for each part:
1208 @lilypond[raggedright,verbatim]
1210 \context Staff << \new Voice { \voiceOne cis2 b }
1211 \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
1212 \new Voice { \voiceTwo fis4~ fis4 f ~ f } >>
1216 The command @code{\oneVoice} will revert back to the normal setting.
1217 @cindex @code{\oneVoice}
1220 Normally, note heads with a different number of dots are not merged, but
1221 when the object property @code{merge-differently-dotted} is set in
1222 the @internalsref{NoteCollision} object, they are merged:
1223 @lilypond[verbatim,fragment,raggedright]
1224 \relative c'' \context Voice << {
1226 \override Staff.NoteCollision
1227 #'merge-differently-dotted = ##t
1229 } \\ { g8.[ f16] g8.[ f16] }
1233 Similarly, you can merge half note heads with eighth notes, by setting
1234 @code{merge-differently-headed}:
1235 @lilypond[fragment,relative=2,verbatim]
1238 \override Staff.NoteCollision
1239 #'merge-differently-headed = ##t
1240 c8 c4. } \\ { c2 c2 } >>
1243 LilyPond also vertically shifts rests that are opposite of a stem:
1246 @lilypond[raggedright,fragment,verbatim]
1247 \context Voice << c''4 \\ r4 >>
1255 @cindex @code{\oneVoice}
1257 @cindex @code{\voiceOne}
1259 @cindex @code{\voiceTwo}
1261 @cindex @code{\voiceThree}
1263 @cindex @code{\voiceFour}
1267 The following commands specify in what chords of the current voice
1268 should be shifted: the outer voice has @code{\shiftOff}, and the inner
1269 voices have @code{\shiftOn}, @code{\shiftOnn}, etc.
1272 @cindex @code{\shiftOn}
1274 @cindex @code{\shiftOnn}
1276 @cindex @code{\shiftOnnn}
1278 @cindex @code{\shiftOff}
1285 Internals: the objects responsible for resolving collisions are
1286 @internalsref{NoteCollision} and @internalsref{RestCollision}.
1288 Examples: See also example files
1289 @inputfileref{input/regression,collision-dots.ly},
1290 @inputfileref{input/regression,collision-head-chords.ly},
1291 @inputfileref{input/regression,collision-heads.ly},
1292 @inputfileref{input/regression,collision-mesh.ly}, and
1293 @inputfileref{input/regression,collisions.ly}.
1298 Resolving collisions is a intricate subject, and only a few situations
1299 are handled. When LilyPond cannot cope, the @code{force-hshift}
1300 property of the @internalsref{NoteColumn} object and pitched rests can
1301 be used to override typesetting decisions.
1303 When using @code{merge-differently-headed} with an upstem 8th or a shorter
1304 note, and a downstem half note, the 8th note gets the wrong offset.
1306 There is no support for clusters where the same note occurs with
1307 different accidentals in the same chord. In this case, it is
1308 recommended to use enharmonic transcription, or to use special cluster
1309 notation (see @ref{Clusters}).
1314 Beams are used to group short notes into chunks that are aligned with
1315 the metrum. They are inserted automatically in most cases:
1317 @lilypond[fragment,verbatim,relative=2]
1318 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1321 When these automatic decisions are not good enough, beaming can be
1322 entered explicitly. It is also possible to define beaming patterns
1323 that differ from the defaults.
1325 Individual notes may be marked with @code{\noBeam}, to prevent them
1328 @lilypond[fragment,verbatim,relative=2]
1329 \time 2/4 c8 c\noBeam c c
1335 Internals: @internalsref{Beam}.
1338 @cindex Automatic beams
1341 * Setting automatic beam behavior::
1345 @subsection Manual beams
1346 @cindex beams, manual
1350 In some cases it may be necessary to override the automatic beaming
1351 algorithm. For example, the auto beamer will not put beams over rests
1352 or bar lines. Such beams are specified by manually: the begin and end
1353 point are marked with @code{[} and @code{]}:
1355 @lilypond[fragment,relative,verbatim]
1357 r4 r8[ g' a r8] r8 g[ | a] r8
1361 @cindex @code{stemLeftBeamCount}
1363 Normally, beaming patterns within a beam are determined automatically.
1364 When this mechanism fouls up, the properties
1365 @code{stemLeftBeamCount} and @code{stemRightBeamCount} can
1366 be used to control the beam subdivision on a stem. If either property
1367 is set, its value will be used only once, and then it is erased:
1369 @lilypond[fragment,relative,verbatim]
1372 f8[ r16 \set stemLeftBeamCount = #1 f g a]
1375 @cindex @code{stemRightBeamCount}
1378 The property @code{subdivideBeams} can be set in order to subdivide
1379 all 16th or shorter beams at beat positions, as defined by the
1380 @code{beatLength} property. This accomplishes the same effect as
1381 twiddling with @code{stemLeftBeamCount} and @code{stemRightBeamCount},
1382 but it take less typing:
1385 @lilypond[relative=1,verbatim,noindent]
1387 \set subdivideBeams = ##t
1389 \set Score.beatLength = #(ly:make-moment 1 8)
1392 @cindex subdivideBeams
1394 Kneed beams are inserted automatically, when a large gap is detected
1395 between the note heads. This behavior can be tuned through the object
1396 property @code{auto-knee-gap}.
1398 Normally, line breaks are forbidden when beams cross bar lines. This
1399 behavior can be changed by setting @code{allowBeamBreak}.
1401 @cindex @code{allowBeamBreak}
1402 @cindex beams and line breaks
1404 @cindex beams, kneed
1406 @cindex auto-knee-gap
1412 @cindex Frenched staves
1414 Automatically kneed beams cannot be used together with hidden staves.
1419 @node Setting automatic beam behavior
1420 @subsection Setting automatic beam behavior
1422 @cindex @code{autoBeamSettings}
1423 @cindex @code{(end * * * *)}
1424 @cindex @code{(begin * * * *)}
1425 @cindex automatic beams, tuning
1426 @cindex tuning automatic beaming
1428 @c [TODO: use \applycontext]
1430 In normal time signatures, automatic beams can start on any note but can
1431 only end in a few positions within the measure: beams can end on a beat,
1432 or at durations specified by the properties in
1433 @code{autoBeamSettings}. The defaults for @code{autoBeamSettings}
1434 are defined in @file{scm/auto-beam.scm}.
1436 The value of @code{autoBeamSettings} is changed with two functions:
1438 #(override-auto-beam-setting
1439 '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b}
1441 #(revert-auto-beam-setting '(@var{be} @var{p} @var{q} @var{n} @var{m}))
1443 Here, @var{be} is the symbol @code{begin} or @code{end}. It determines
1444 whether the rule applies to begin or end-points. The quantity
1445 @var{p}/@var{q} refers to the length of the beamed notes (and `@code{*
1446 *}' designates notes of any length), @var{n}/@var{M} refers to a time
1447 signature (wildcards `@code{* *}' may be entered to designate all time
1448 signatures), @var{a}/@var{b} is a duration. By default, this command
1449 changes settings for the current voice. It is also possible to adjust
1450 settings at higher contexts, by adding a @var{context} argument.
1452 For example, if automatic beams should end on every quarter note, use
1455 #(override-auto-beam-setting '(end * * * *) 1 4)
1457 Since the duration of a quarter note is 1/4 of a whole note, it is
1458 entered as @code{(ly:make-moment 1 4)}.
1460 The same syntax can be used to specify beam starting points. In this
1461 example, automatic beams can only end on a dotted quarter note:
1463 #(override-auto-beam-setting '(end * * * *) 3 8)
1465 In 4/4 time signature, this means that automatic beams could end only on
1466 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1467 3/8, has passed within the measure).
1469 Rules can also be restricted to specific time signatures. A rule that
1470 should only be applied in @var{N}/@var{M} time signature is formed by
1471 replacing the second asterisks by @var{N} and @var{M}. For example, a
1472 rule for 6/8 time exclusively looks like
1474 #(override-auto-beam-setting '(begin * * 6 8) @dots{})
1477 If a rule should be to applied only to certain types of beams, use the
1478 first pair of asterisks. Beams are classified according to the
1479 shortest note they contain. For a beam ending rule that only applies
1480 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1483 If a score ends while an automatic beam has not been ended and is still
1484 accepting notes, this last beam will not be typeset at all.
1486 @cindex automatic beam generation
1488 @cindex @code{autoBeaming}
1491 For melodies that have lyrics, you may want to switch off
1492 automatic beaming. This is done by setting @code{autoBeaming} to
1497 @cindex @code{\autoBeamOff}
1498 @code{\autoBeamOff},
1499 @cindex @code{\autoBeamOn}
1505 The rules for ending a beam depend on the shortest note in a beam.
1506 So, while it is possible to have different ending rules for eight
1507 beams and sixteenth beams, a beam that contains both eight and
1508 sixteenth notes will use the rules for the sixteenth beam.
1510 In the example below, the autobeamer makes eight beams and sixteenth
1511 end at 3 eights; the third beam can only be corrected by specifying
1514 @lilypond[raggedright,fragment,relative,noverbatim,quote]
1515 #(override-auto-beam-setting '(end * * * *) 3 8)
1516 % rather show case where it goes wrong
1517 %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
1518 \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
1520 It is not possible to specify beaming parameters that act differently in
1521 different parts of a measure. This means that it is not possible to use
1522 automatic beaming in irregular meters such as @code{5/8}.
1525 @section Accidentals
1528 This section describes how to change the way that accidentals are
1529 inserted automatically before the running notes.
1533 * Using the predefined accidental variables::
1534 * Customized accidental rules::
1537 @node Using the predefined accidental variables
1538 @subsection Using the predefined accidental variables
1541 Common rules for typesetting macros have been canned in a
1542 function. This function is called as follows:
1544 @cindex @code{set-accidental-style}
1546 #(set-accidental-style 'modern 'Voice)
1549 The function takes two arguments: a symbol that denotes the style (in
1550 the example, @code{modern}), and another symbol that denotes the
1551 context name (in this example, @code{Staff}). If no context name is
1552 supplied, @code{Staff} is the default.
1554 The following styles are supported:
1557 This is the default typesetting behaviour. It should correspond
1558 to 18th century common practice: Accidentals are
1559 remembered to the end of the measure in which they occur and
1560 only on their own octave.
1564 The normal behaviour is to remember the accidentals on
1565 Staff-level. This variable, however, typesets accidentals
1566 individually for each voice. Apart from that, the rule is similar to
1569 This leads to some weird and often unwanted results
1570 because accidentals from one voice do not get cancelled in other
1572 @lilypond[raggedright,relative,fragment,verbatim,quote]
1574 #(set-accidental-style 'voice)
1580 Hence you should only use @code{voice} if the voices
1581 are to be read solely by individual musicians. If the staff is to be
1582 used by one musician (e.g. a conductor) then you use
1583 @code{modern} or @code{modern-cautionary}
1587 @cindex @code{modern} style accidentals
1588 This rule corresponds to the common practice in the 20th
1590 This rule prints the same accidentals as @code{default}, but temporary
1591 accidentals also are cancelled in other octaves. Furthermore,
1592 in the same octave, they also get cancelled in the following
1595 @lilypond[raggedright,fragment,verbatim]
1596 #(set-accidental-style 'modern)
1597 cis' c'' cis'2 | c'' c'
1600 @item @code{modern-cautionary}
1601 @cindex @code{modern-cautionary}
1602 This rule is similar to @code{modern}, but the
1603 ``extra'' accidentals (the ones not typeset by
1604 @code{default}) are typeset as cautionary accidentals.
1605 They are printed in reduced size or with parentheses:
1606 @lilypond[raggedright,fragment,verbatim]
1607 #(set-accidental-style 'modern-cautionary)
1608 cis' c'' cis'2 | c'' c'
1611 @cindex @code{modern-voice}
1613 is used for multivoice accidentals to be read both by musicians
1614 playing one voice and musicians playing all voices. Accidentals are
1615 typeset for each voice, but they @emph{are} cancelled across voices in
1616 the same @internalsref{Staff}.
1618 @cindex @code{modern-voice-cautionary}
1619 @item modern-voice-cautionary
1620 is the same as @code{modern-voice}, but with the extra
1621 accidentals (the ones not typeset by @code{voice}) typeset
1622 as cautionaries. Even though all accidentals typeset by
1623 @code{default} @emph{are} typeset by this variable then
1624 some of them are typeset as cautionaries.
1627 @cindex @code{piano} accidentals
1628 20th century practice for piano notation. Very similar to
1629 @code{modern} but accidentals also get cancelled
1630 across the staves in the same @internalsref{GrandStaff} or
1631 @internalsref{PianoStaff}.
1633 @item piano-cautionary
1634 @cindex @code{#(set-accidental-style 'piano-cautionary)}
1635 As @code{#(set-accidental-style 'piano)' , str)} but with the extra accidentals
1636 typeset as cautionaries.
1639 @cindex @code{no-reset} accidental style
1640 Same as @code{default} but with accidentals lasting
1641 ``forever'' and not only until the next measure:
1642 @lilypond[raggedright,fragment,verbatim,relative]
1643 #(set-accidental-style 'no-reset)
1648 This is sort of the opposite of @code{no-reset}: Accidentals
1649 are not remembered at all---and hence all accidentals are
1650 typeset relative to the key signature, regardless of what was
1651 before in the music:
1653 @lilypond[raggedright,fragment,verbatim,relative]
1654 #(set-accidental-style 'forget)
1655 \key d\major c4 c cis cis d d dis dis
1659 @node Customized accidental rules
1660 @subsection Customized accidental rules
1662 For determining when to print an accidental, several different rules
1663 are tried. The rule that gives the highest number of accidentals is
1664 used. Each rule consists of
1667 In which context is the rule applied. For example, if
1668 @var{context} is @internalsref{Score} then all staves share
1669 accidentals, and if @var{context} is @internalsref{Staff} then all
1670 voices in the same staff share accidentals, but staves do not.
1673 Whether the accidental changes all octaves or only the current
1674 octave. Valid choices are
1678 This is the default algorithm. Accidentals are typeset if the note changes
1679 the accidental of that note in that octave. Accidentals lasts to the end of the measure
1680 and then as many measures as specified in the value. I.e. 1 means to the end
1681 of next measure, -1 means to the end of previous measure (that is: no duration at all), etc. #t means forever.
1683 Accidentals are typeset if the note is different from
1684 the previous note on the same pitch in any octave. The value has same meaning as in
1690 Over how many barlines the accidental lasts.
1691 If @var{laziness} is @code{-1} then the accidental is forget
1692 immediately, and if @var{laziness} is @code{#t} then the accidental
1699 Internals: @internalsref{Accidental_engraver},
1700 @internalsref{Accidental}, and @internalsref{AccidentalPlacement}.
1705 Currently the simultaneous notes are considered to be entered in
1706 sequential mode. This means that in a chord the accidentals are
1707 typeset as if the notes in the chord happened once at a time - in the
1708 order in which they appear in the input file.
1710 This is only a problem when there are simultaneous notes whose
1711 accidentals depend on each other. The problem only occurs when using
1712 non-default accidentals. In the default scheme, accidentals only
1713 depend on other accidentals with the same pitch on the same staff, so
1714 no conflicts possible.
1716 This example shows two examples of the same music giving different
1717 accidentals depending on the order in which the notes occur in the
1720 @lilypond[raggedright,fragment,verbatim]
1721 \set Staff.autoAccidentals = #'( Staff (any-octave . 0) )
1722 cis'4 <c'' c'> r2 | cis'4 <c' c''> r2
1723 | <cis' c''> r | <c'' cis'> r |
1726 This problem can be solved by manually inserting @code{!} and @code{?}
1727 for the problematic notes.
1729 @node Expressive marks
1730 @section Expressive marks
1733 @c todo: should change ordering
1734 @c where to put text spanners, metronome marks,
1743 * Analysis brackets::
1745 * Fingering instructions::
1756 A slur indicates that notes are to be played bound or @emph{legato}.
1760 They are entered using parentheses:
1761 @lilypond[relative=1,fragment,verbatim,center]
1762 f( g)( a) a8 b( a4 g2 f4)
1767 @c TODO: should explain that ^( and _( set directions
1768 @c should set attachments with ^ and _ ?
1770 Slurs avoid crossing stems, and are generally attached to note heads.
1771 However, in some situations with beams, slurs may be attached to stem
1772 ends. If you want to override this layout you can do this through the
1773 object property @code{attachment} of @internalsref{Slur} in
1774 @internalsref{Voice} context. Its value is a pair of symbols, specifying
1775 the attachment type of the left and right end points:
1777 @lilypond[fragment,relative,verbatim]
1779 \override Stem #'length = #5.5
1781 \override Slur #'attachment = #'(stem . stem)
1785 If a slur would strike through a stem or beam, the slur will be moved
1786 away upward or downward. If this happens, attaching the slur to the
1787 stems might look better:
1789 @lilypond[fragment,relative,verbatim]
1792 \override Slur #'attachment = #'(stem . stem)
1799 @cindex @code{\slurUp}
1801 @cindex @code{\slurDown}
1803 @cindex @code{\slurBoth}
1805 @cindex @code{\slurDotted}
1807 @cindex @code{\slurSolid}
1812 Internals: @seeinternals{Slur}, and @internalsref{SlurEvent}.
1817 Producing nice slurs is a difficult problem, and LilyPond currently
1818 uses a simple, empiric method to produce slurs. In some cases, its
1822 @cindex Adjusting slurs
1824 @node Phrasing slurs
1825 @subsection Phrasing slurs
1827 @cindex phrasing slurs
1828 @cindex phrasing marks
1830 A phrasing slur (or phrasing mark) connects chords and is used to
1831 indicate a musical sentence. It is started using @code{\(} and @code{\)}
1834 @lilypond[fragment,verbatim,center,relative]
1835 \time 6/4 c'\( d( e) f( e) d\)
1838 Typographically, the phrasing slur behaves almost exactly like a
1839 normal slur. However, they are treated as different objects. A
1840 @code{\slurUp} will have no effect on a phrasing slur; instead, you
1841 should use @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
1842 @code{\phrasingSlurBoth}.
1844 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth}
1845 will only affect normal slurs and not phrasing slurs.
1849 @cindex @code{\phrasingSlurUp}
1850 @code{\phrasingSlurUp},
1851 @cindex @code{\phrasingSlurDown}
1852 @code{\phrasingSlurDown},
1853 @cindex @code{\phrasingSlurBoth}
1854 @code{\phrasingSlurBoth}.
1858 Internals: see also @internalsref{PhrasingSlur}, and
1859 @internalsref{PhrasingSlurEvent}.
1863 Phrasing slurs have the same limitations in their formatting as normal
1864 slurs. Putting phrasing slurs over rests leads to spurious warnings.
1867 @subsection Breath marks
1869 Breath marks are entered using @code{\breathe}:
1872 @lilypond[fragment,relative,verbatim]
1876 The glyph of the breath mark can be tweaked by overriding the
1877 @code{text} property of the @code{BreathingSign} layout object with
1878 any markup text. For example,
1879 @lilypond[fragment,verbatim,relative]
1881 \override BreathingSign #'text
1882 = #(make-musicglyph-markup "scripts-rvarcomma")
1889 Internals: @internalsref{BreathingSign},
1890 @internalsref{BreathingSignEvent}.
1892 Examples: @inputfileref{input/regression,breathing-sign.ly}.
1895 @node Metronome marks
1896 @subsection Metronome marks
1899 @cindex beats per minute
1900 @cindex metronome marking
1902 Metronome settings can be entered as follows:
1904 \tempo @var{duration} = @var{perminute}
1907 In the MIDI output, they are interpreted as a tempo change, and in the
1908 paper output, a metronome marking is printed:
1909 @cindex @code{\tempo}
1910 @lilypond[fragment,verbatim]
1916 Internals: @internalsref{MetronomeChangeEvent}.
1921 @subsection Text spanners
1922 @cindex Text spanners
1924 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
1925 are written as texts, and extended over many measures with dotted
1926 lines. You can create such texts using text spanners: attach
1927 @code{\startTextSpan} and @code{\stopTextSpan} to the
1928 start and ending note of the spanner.
1930 The string to be printed, as well as the style, is set through object
1933 @lilypond[fragment,relative,verbatim]
1935 \override TextSpanner #'direction = #-1
1936 \override TextSpanner #'edge-text = #'("rall " . "")
1937 c2\startTextSpan b c\stopTextSpan a }
1943 Internals @internalsref{TextSpanEvent},
1944 @internalsref{TextSpanner}.
1946 Examples: @inputfileref{input/regression,text-spanner.ly}.
1949 @node Analysis brackets
1950 @subsection Analysis brackets
1952 @cindex phrasing brackets
1953 @cindex musicological analysis
1954 @cindex note grouping bracket
1956 Brackets are used in musical analysis to indicate structure in musical
1957 pieces. LilyPond supports a simple form of nested horizontal brackets.
1958 To use this, add the @internalsref{Horizontal_bracket_engraver} to
1959 @internalsref{Staff} context. A bracket is started with
1960 @code{\startGroup} and closed with @code{\stopGroup}:
1962 @lilypond[raggedright,verbatim]
1963 \score { \notes \relative c'' {
1964 c4\startGroup\startGroup
1967 c4\stopGroup\stopGroup
1969 \paper { \translator {
1970 \StaffContext \consists "Horizontal_bracket_engraver"
1976 Internals: @internalsref{HorizontalBracket},
1977 @internalsref{NoteGroupingEvent}.
1979 Examples: @inputfileref{input/regression,note-group-bracket.ly}.
1983 @subsection Articulations
1984 @cindex Articulations
1986 @cindex articulations
1990 A variety of symbols can appear above and below notes to indicate
1991 different characteristics of the performance. They are added to a note
1992 by adding a dash and the character signifying the
1993 articulation. They are demonstrated here:
1995 @lilypondfile[]{script-abbreviations.ly}
1997 The meanings of these shorthands can be changed: see
1998 @file{ly/script-init.ly} for examples.
2001 The script is automatically placed, but if you need to force
2002 directions, you can use @code{_} to force them down, or @code{^} to
2004 @lilypond[fragment,verbatim]
2008 Other symbols can be added using the syntax
2009 @var{note}@code{\}@var{name}, e.g. @code{c4\fermata}. Again, they
2010 can be forced up or down using @code{^} and @code{_},
2013 @lilypond[verbatim,fragment,relative=2]
2014 c\fermata c^\fermata c_\fermata
2021 @cindex staccatissimo
2030 @cindex organ pedal marks
2039 @cindex prallmordent
2043 @cindex thumb marking
2048 @lilypondfile[]{script-chart.ly}
2053 @cindex @code{\scriptUp}
2055 @cindex @code{\scriptDown}
2057 @cindex @code{\scriptBoth}
2062 Internals: @internalsref{ScriptEvent}, and @internalsref{Script}.
2066 These note ornaments appear in the printed output but have no
2067 effect on the MIDI rendering of the music.
2070 @node Fingering instructions
2071 @subsection Fingering instructions
2075 Fingering instructions can be entered using
2077 @var{note}-@var{digit}
2079 For finger changes, use markup texts:
2081 @lilypond[verbatim,raggedright,fragment]
2082 c'4-1 c'4-2 c'4-3 c'4-4
2083 c'^\markup { \fontsize #-3 \number "2-3" }
2086 @cindex finger change
2091 You can use the thumb-script to indicate that a note should be
2092 played with the thumb (e.g. in cello music):
2094 @lilypond[verbatim,raggedright,fragment]
2095 <a' a''-3>8(_\thumb <b' b''-3>)_\thumb
2096 <c'' c'''-3>(_\thumb <d'' d'''-3>)_\thumb
2099 Fingerings for chords can also be added to individual notes
2100 of the chord by adding them after the pitches:
2101 @lilypond[verbatim,raggedright,fragment,relative=1]
2102 < c-1 e-2 g-3 b-5 > 4
2106 In this case, setting @code{fingeringOrientations} will put fingerings next
2109 @lilypond[verbatim,raggedright,fragment,relative=1]
2110 \set fingeringOrientations = #'(left down)
2111 <c-1 es-2 g-4 bes-5 > 4
2112 \set fingeringOrientations = #'(up right down)
2113 <c-1 es-2 g-4 bes-5 > 4
2116 By using single note chords, fingering instructions can be put close
2117 to note heads in monophonic music.
2121 Internals: @internalsref{FingerEvent}, and @internalsref{Fingering}.
2123 Examples: @inputfileref{input/regression,finger-chords.ly}.
2126 @subsection Text scripts
2127 @cindex Text scripts
2129 @cindex text items, non-empty
2130 @cindex non-empty texts
2132 It is possible to place arbitrary strings of text or markup text (see
2133 @ref{Text markup}) above or below notes by using a string:
2134 @code{c^"text"}. By default, these indications do not influence the
2135 note spacing, but by using the command @code{\fatText}, the widths
2136 will be taken into account:
2138 @lilypond[fragment,raggedright,verbatim] \relative c' {
2139 c4^"longtext" \fatText c4_"longlongtext" c4 }
2142 It is possible to use @TeX{} commands in the strings, but this should
2143 be avoided because the exact dimensions of the string can then no
2148 @cindex @code{\fatText}
2150 @cindex @code{\emptyText}
2155 In this manual: @ref{Text markup}.
2157 Internals: @internalsref{TextScriptEvent}, @internalsref{TextScript}.
2163 @subsection Grace notes
2166 @c should have blurb about accaciatura / appogiatura
2168 @cindex @code{\grace}
2172 Grace notes are ornaments that are written out. The most common ones
2173 are acciaccatura, which should be played as very short. It is denoted
2174 by a slurred small note with a slashed stem. The appoggiatura is a
2175 grace note that takes a fixed fraction of the main note, is and
2176 denoted as a slurred note in small print without a slash.
2177 They are entered with the commands @code{\acciaccatura} and
2178 @code{\appoggiatura}, as demonstrated in the following example:
2181 @cindex appoggiatura
2182 @cindex acciaccatura
2184 @lilypond[relative=2,verbatim,fragment]
2185 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
2186 \acciaccatura { g16[ f] } e4
2189 Both are special forms of the @code{\grace} command. By prefixing this
2190 keyword to a music expression, a new one is formed, which will be
2191 printed in a smaller font and takes up no logical time in a measure.
2192 @lilypond[relative=2,verbatim,fragment]
2194 \grace { c16[ d16] } c2 c4
2198 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
2199 @code{\grace} command does not start a slur.
2201 Internally, timing for grace notes is done using a second, `grace'
2202 time. Every point in time consists of two rational numbers: one
2203 denotes the logical time, one denotes the grace timing. The above
2204 example is shown here with timing tuples:
2206 @lilypond[raggedright]
2209 c4 \grace c16 c4 \grace {
2212 \new Lyrics \lyrics {
2215 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
2216 \markup { (\fraction 1 4 , 0 ) } 4
2218 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2219 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2221 \markup { ( \fraction 2 4 , 0 ) }
2226 The placement of grace notes is synchronized between different staves.
2227 In the following example, there are two sixteenth graces notes for
2228 every eighth grace note:
2230 @lilypond[relative=2,verbatim,fragment]
2231 << \new Staff { e4 \grace { c16[ d e f] } e4 }
2232 \new Staff { c'4 \grace { g8[ b] } c4 } >>
2237 If you want to end a note with a grace, then the standard trick
2238 is to put the grace notes after a ``space note'', e.g.
2239 @lilypond[fragment,verbatim,relative=2]
2242 { s2 \grace { c16[ d] } } >>
2248 By adjusting the duration of the skip note (here it is a half-note),
2249 the space between the main-note and the grace is adjusted.
2252 A @code{\grace} section will introduce special typesetting settings,
2253 for example, to produce smaller type, and set directions. Hence, when
2254 introducing layout tweaks, they should be inside the grace section,
2256 @lilypond[fragment,verbatim,relative=1]
2259 \override Stem #'direction = #-1
2261 \revert Stem #'direction
2268 The overrides should also be reverted inside the grace section.
2270 If the layout of grace sections must be changed throughout the music,
2271 then this can be accomplished through the function
2272 @code{add-grace-property}. The following example
2273 undefines the Stem direction grace section, so stems do not always
2278 #(add-grace-property "Voice" Stem direction '())
2284 Another option is to change the variables @code{startGraceMusic},
2285 @code{stopGraceMusic}, @code{startAccacciaturaMusic},
2286 @code{stopAccacciaturaMusic}, @code{startAppoggiaturaMusic},
2287 @code{stopAppoggiaturaMusic}. More information is in the file
2288 @file{ly/grace-init.ly}.
2293 Internals: @internalsref{GraceMusic}.
2297 A score that starts with an @code{\grace} section needs an explicit
2298 @code{\context Voice} declaration, otherwise the main note and grace
2299 note end up on different staves.
2301 Grace note synchronization can also lead to surprises. Staff notation,
2302 such as key signatures, barlines, etc. are also synchronized. Take
2303 care when you mix staves with grace notes and staves without, for example,
2305 @lilypond[relative=2,verbatim,fragment]
2306 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2307 \new Staff { c4 \bar "|:" d4 } >>
2310 Grace sections should only be used within sequential music
2311 expressions. Nesting or juxtaposing grace sections is not supported,
2312 and might produce crashes or other errors.
2316 @subsection Glissando
2319 @cindex @code{\glissando}
2321 A glissando is a smooth change in pitch. It is denoted by a line or a
2322 wavy line between two notes.
2326 A glissando line can be requested by attaching a @code{\glissando} to
2329 @lilypond[fragment,relative,verbatim]
2335 Internals: @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2340 Adding additional texts (such as @emph{gliss.}) is not supported.
2344 @subsection Dynamics
2357 @cindex @code{\ffff}
2367 Absolute dynamic marks are specified using a command after a note:
2368 @code{c4\ff}. The available dynamic marks are @code{\ppp},
2369 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2370 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2371 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}:
2373 @lilypond[verbatim,raggedright,fragment,relative]
2374 c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2380 @cindex @code{\decr}
2381 @cindex @code{\rced}
2388 A crescendo mark is started with @code{\<} and terminated with
2389 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2390 with @code{\!}. Because these marks are bound to notes, if you must
2391 use spacer notes if multiple marks during one note are needed:
2393 @lilypond[fragment,verbatim,center,quote]
2394 c''\< c''\! d''\decr e''\rced
2395 << f''1 { s4 s4\< s4\! \> s4\! } >>
2397 This may give rise to very short hairpins. Use @code{minimum-length}
2398 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2402 \override Staff.Hairpin #'minimum-length = #5
2405 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2406 is an example how to do it:
2408 @lilypond[fragment,relative=2,verbatim]
2409 c4 \cresc c4 c c c \endcresc c4
2415 You can also supply your own texts:
2416 @lilypond[fragment,relative,verbatim]
2418 \set crescendoText = \markup { \italic "cresc. poco" }
2419 \set crescendoSpanner = #'dashed-line
2429 @cindex @code{\dynamicUp}
2431 @cindex @code{\dynamicDown}
2432 @code{\dynamicDown},
2433 @cindex @code{\dynamicBoth}
2434 @code{\dynamicBoth}.
2436 @cindex direction, of dynamics
2440 Internals: @internalsref{CrescendoEvent}, @internalsref{DecrescendoEvent}, and
2441 @internalsref{AbsoluteDynamicEvent}.
2443 Dynamics are objects of @internalsref{DynamicText} and
2444 @internalsref{Hairpin}. Vertical positioning of these symbols is
2445 handled by the @internalsref{DynamicLineSpanner} object.
2447 If you want to adjust padding or vertical direction of the dynamics, you
2448 must set properties for the @internalsref{DynamicLineSpanner} object.
2456 @cindex @code{\repeat}
2459 Repetition is a central concept in music, and multiple notations exist
2460 for repetitions. In LilyPond, most of these notations can be captured
2461 in a uniform syntax. One of the advantages is that they can be
2462 rendered in MIDI accurately.
2464 The following types of repetition are supported:
2468 Repeated music is fully written (played) out. Useful for MIDI
2469 output, and entering repetitive music.
2472 This is the normal notation: Repeats are not written out, but
2473 alternative endings (voltas) are printed, left to right.
2477 Alternative endings are written stacked. This has limited use but may be
2478 used to typeset two lines of lyrics in songs with repeats, see
2479 @inputfileref{input,star-spangled-banner.ly}.
2487 Make beat or measure repeats. These look like percent signs.
2493 * Repeats and MIDI::
2494 * Manual repeat commands::
2496 * Tremolo subdivisions::
2501 @subsection Repeat syntax
2505 LilyPond has one syntactic construct for specifying different types of
2506 repeats. The syntax is
2509 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2512 If you have alternative endings, you may add
2513 @cindex @code{\alternative}
2515 \alternative @code{@{} @var{alternative1}
2517 @var{alternative3} @dots{} @code{@}}
2519 where each @var{alternative} is a music expression. If you do not
2520 give enough alternatives for all of the repeats, then the first
2521 alternative is assumed to be played more than once.
2523 Normal notation repeats are used like this:
2524 @lilypond[fragment,verbatim,relative=1]
2526 \repeat volta 2 { c4 d e f }
2527 \repeat volta 2 { f e d c }
2530 With alternative endings:
2531 @lilypond[fragment,verbatim,relative=1]
2533 \repeat volta 2 {c4 d e f}
2534 \alternative { {d2 d} {f f,} }
2538 @lilypond[fragment,verbatim,relative=1]
2541 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2542 \alternative { { g4 g g } { a | a a a a | b2. } }
2548 If you do a nested repeat like
2557 then it is ambiguous to which @code{\repeat} the @code{\alternative}
2558 belongs. This ambiguity is resolved by always having the
2559 @code{\alternative} belong to the inner @code{\repeat}. For clarity,
2560 it is advisable to use braces in such situations.
2563 @node Repeats and MIDI
2564 @subsection Repeats and MIDI
2566 @cindex expanding repeats
2568 For instructions on how to unfold repeats for MIDI output, see the
2569 example file @inputfileref{input/test,unfold-all-repeats.ly}.
2574 Timing information is not remembered at the start of an alternative,
2575 so after a repeat timing information must be reset by hand, for
2576 example by setting @code{Score.measurePosition} or entering
2577 @code{\partial}. Similarly, slurs or ties are also not repeated.
2580 @node Manual repeat commands
2581 @subsection Manual repeat commands
2583 @cindex @code{repeatCommands}
2585 The property @code{repeatCommands} can be used to control the layout of
2586 repeats. Its value is a Scheme list of repeat commands, where each repeat
2590 @item the symbol @code{start-repeat},
2591 which prints a @code{|:} bar line,
2592 @item the symbol @code{end-repeat},
2593 which prints a @code{:|} bar line,
2594 @item the list @code{(volta @var{text})},
2595 which prints a volta bracket saying @var{text}: The text can be specified as
2596 a text string or as a markup text, see @ref{Text markup}. Do not
2597 forget to change the font, as the default number font does not contain
2598 alphabetic characters. Or,
2599 @item the list @code{(volta #f)}, which
2600 stops a running volta bracket:
2603 @lilypond[verbatim,fragment,relative=2]
2605 \set Score.repeatCommands = #'((volta "93") end-repeat)
2607 \set Score.repeatCommands = #'((volta #f))
2614 Internals: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2615 @internalsref{VoltaRepeatedMusic},
2616 @internalsref{UnfoldedRepeatedMusic}, and
2617 @internalsref{FoldedRepeatedMusic}.
2619 @node Tremolo repeats
2620 @subsection Tremolo repeats
2621 @cindex tremolo beams
2623 To place tremolo marks between notes, use @code{\repeat} with tremolo
2625 @lilypond[verbatim,raggedright]
2627 \context Voice \notes\relative c' {
2628 \repeat "tremolo" 8 { c16 d16 }
2629 \repeat "tremolo" 4 { c16 d16 }
2630 \repeat "tremolo" 2 { c16 d16 }
2635 Tremolo marks can also be put on a single note. In this case, the
2636 note should not be surrounded by braces.
2637 @lilypond[verbatim,raggedright]
2638 \repeat "tremolo" 4 c16
2641 A similar mechanism is the tremolo subdivision, described in
2642 @ref{Tremolo subdivisions}.
2646 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
2648 Internals: tremolo beams are @internalsref{Beam} objects. Single stem
2649 tremolos are @internalsref{StemTremolo}s. The music expression is
2650 @internalsref{TremoloEvent}.
2652 Example files: @inputfileref{input/regression,chord-tremolo.ly},
2653 @inputfileref{input/regression,stem-tremolo.ly}.
2655 @node Tremolo subdivisions
2656 @subsection Tremolo subdivisions
2657 @cindex tremolo marks
2658 @cindex @code{tremoloFlags}
2660 Tremolo marks can be printed on a single note by adding
2661 `@code{:}[@var{length}]' after the note. The length must be at least 8.
2662 A @var{length} value of 8 gives one line across the note stem. If the
2663 length is omitted, then then the last value (stored in
2664 @code{tremoloFlags}) is used:
2666 @lilypond[verbatim,fragment,center]
2667 c'2:8 c':32 | c': c': |
2670 @c [TODO : stok is te kort bij 32en]
2674 Tremolos in this style do not carry over into the MIDI output.
2678 In this manual: @ref{Tremolo repeats}.
2680 Elsewhere: @internalsref{StemTremolo}, @internalsref{TremoloEvent}.
2682 @node Measure repeats
2683 @subsection Measure repeats
2685 @cindex percent repeats
2686 @cindex measure repeats
2688 In the @code{percent} style, a note pattern can be repeated. It is
2689 printed once, and then the pattern is replaced with a special sign.
2690 Patterns of a one and two measures are replaced by percent-like signs,
2691 patterns that divide the measure length are replaced by slashes:
2693 @lilypond[verbatim,raggedright]
2694 \context Voice { \repeat "percent" 4 { c'4 }
2695 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
2701 Internals: @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
2702 @internalsref{PercentRepeatedMusic}, and
2703 @internalsref{DoublePercentRepeat}.
2707 @node Rhythmic music
2708 @section Rhythmic music
2712 * Showing melody rhythms::
2713 * Entering percussion::
2714 * Percussion staves::
2718 @node Showing melody rhythms
2719 @subsection Showing melody rhythms
2721 Sometimes you might want to show only the rhythm of a melody. This
2722 can be done with the rhythmic staff. All pitches of notes on such a
2723 staff are squashed, and the staff itself has a single line:
2725 @lilypond[fragment,relative,verbatim]
2726 \context RhythmicStaff {
2728 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
2734 Internals: @internalsref{RhythmicStaff}.
2736 Examples: @inputfileref{input/regression,rhythmic-staff.ly}.
2739 @node Entering percussion
2740 @subsection Entering percussion
2747 Percussion notes may be entered in @code{\drums} mode, which is
2748 similar to @code{notes}. Each piece of percussion has a full name and
2749 an abbreviated name, and both be used in input files:
2751 @lilypond[raggedright]
2752 \drums { hihat4 hh4 }
2755 The complete list of drum names is in the init file
2756 @file{ly/drumpitch-init.ly}.
2757 @c TODO: properly document this.
2761 Internals: @internalsref{DrumNoteEvent}.
2763 @node Percussion staves
2764 @subsection Percussion staves
2768 A percussion part for more than one instrument typically uses a
2769 multiline staff where each position in the staff refers to one piece
2773 To typeset the music, the notes must be interpreted in a
2774 @internalsref{DrumStaff} and @internalsref{DrumVoice} contexts:
2777 @lilypond[raggedright,verbatim,quote]
2778 up = \drums { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2779 down = \drums { bassdrum4 snare8 bd r bd sn4 }
2782 << \new DrumVoice { \voiceOne \up }
2783 \new DrumVoice { \voiceTwo \down }
2787 The above example shows verbose polyphonic notation. The short
2788 polyphonic notation, described in @ref{Polyphony}, can also be used if
2789 the @internalsref{DrumVoices} are instantiated by hand first. For example,
2792 \drums \new DrumStaff <<
2793 \context DrumVoice = "1" { s1 *2 }
2794 \context DrumVoice = "2" { s1 *2 }
2798 { \repeat unfold 16 hh16 }
2807 There are also other layout possibilities. To use these, set the
2808 property @code{drumStyleTable} in context @internalsref{DrumVoice}.
2809 The following variables have been predefined:
2813 is the default. It typesets a typical drum kit on a five-line staff
2816 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
2817 bd sn ss tomh tommh tomml toml tomfh tomfl }
2818 mus = \drums { cymc cyms cymr hh | hhc hho hhho hhp | \break cb hc
2819 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
2821 << \new DrumStaff\with {
2822 \remove Bar_engraver
2823 \remove Time_signature_engraver
2824 \override Stem #'transparent = ##t
2825 \override Stem #'Y-extent-callback = ##f
2826 minimumVerticalExtent = #'(-4.0 . 5.0)
2828 \context Lyrics \nam
2831 %% need to do this, because of indented @itemize
2833 \translator { \ScoreContext
2834 \override BarNumber #'transparent =##T
2838 The drum scheme supports six different toms. When there fewer toms, simply
2839 select the toms that produce the desired result, i.e. to get toms on
2840 the three middle lines you use @code{tommh}, @code{tomml} and
2843 @item timbales-style
2844 to typeset timbales on a two line staff:
2846 @lilypond[raggedright]
2847 nam = \lyrics { timh ssh timl ssl cb }
2848 mus = \drums { timh ssh timl ssl cb s16 }
2851 \context DrumStaff \with {
2852 \remove Bar_engraver
2853 \remove Time_signature_engraver
2854 \override Stem #'transparent = ##t
2855 \override Stem #'Y-extent-callback = ##f
2856 \override StaffSymbol #'line-count = #2
2857 \override StaffSymbol #'staff-space = #2
2858 minimumVerticalExtent = #'(-3.0 . 4.0)
2859 drumStyleTable = #timbales-style
2861 \context Lyrics \nam
2866 to typeset congas on a two line staff:
2868 @lilypond[raggedright]
2869 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
2870 mus = \drums { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
2873 \context DrumStaff\with {
2874 \remove Bar_engraver
2875 \remove Time_signature_engraver
2876 drumStyleTable = #congas-style
2877 \override StaffSymbol #'line-count = #2
2879 %% this sucks; it will lengthen stems.
2880 \override StaffSymbol #'staff-space = #2
2881 \override Stem #'transparent = ##t
2882 \override Stem #'Y-extent-callback = ##f
2884 \context Lyrics \nam
2889 to typeset bongos on a two line staff:
2891 @lilypond[raggedright]
2892 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
2893 mus = \drums { boh boho bohm ssh bol bolo bolm ssl s16 }
2896 \context DrumStaff\with {
2897 \remove Bar_engraver
2898 \remove Time_signature_engraver
2899 \override StaffSymbol #'line-count = #2
2900 drumStyleTable = #bongos-style
2902 %% this sucks; it will lengthen stems.
2903 \override StaffSymbol #'staff-space = #2
2904 \override Stem #'transparent = ##t
2905 \override Stem #'Y-extent-callback = ##f
2907 \context Lyrics \nam
2912 @item percussion-style
2913 to typeset all kinds of simple percussion on one line staves:
2914 @lilypond[raggedright]
2915 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
2916 mus = \drums { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
2919 \context DrumStaff\with{
2920 \remove Bar_engraver
2921 drumStyleTable = #percussion-style
2922 \override StaffSymbol #'line-count = #1
2923 \remove Time_signature_engraver
2924 \override Stem #'transparent = ##t
2925 \override Stem #'Y-extent-callback = ##f
2927 \context Lyrics \nam
2933 If you do not like any of the predefined lists you can define your own
2934 list at the top of your file:
2936 @lilypond[raggedright,verbatim]
2938 (bassdrum default #f -1)
2939 (snare default #f 0)
2941 (pedalhihat xcircle "stopped" 2)
2942 (lowtom diamond #f 3)
2944 up = \drums { hh8 hh hh hh hhp4 hhp }
2945 down = \drums { bd4 sn bd toml8 toml }
2948 \set DrumStaff.drumStyleTable
2949 = #(alist->hash-table mydrums)
2950 \new DrumVoice { \voiceOne \up }
2951 \new DrumVoice { \voiceTwo \down }
2959 Init files: @file{ly/drumpitch-init.ly}.
2961 Internals: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
2965 Short polyphonic notation, @code{<< @dots{} \\ @dots{} >>}, does not
2966 work for @internalsref{DrumVoices}.
2968 Because general MIDI does not contain rimshots the sidestick is used
2969 for this purpose instead.
2972 @section Piano music
2974 Piano staves are two normal staves coupled with a brace. The staves
2975 are largely independent, but sometimes voices can cross between the
2976 two staves. The same notation is also used for harps and other key
2977 instruments. The @internalsref{PianoStaff} is especially built to
2978 handle this cross-staffing behavior. In this section we discuss the
2979 @internalsref{PianoStaff} and some other pianistic peculiarities.
2983 * Automatic staff changes::
2984 * Manual staff switches::
2987 * Staff switch lines::
2992 There is no support for putting chords across staves. You can get
2993 this result by increasing the length of the stem in the lower stave so
2994 it reaches the stem in the upper stave, or vice versa. An example is
2995 included with the distribution as
2996 @inputfileref{input/test,stem-cross-staff.ly}.
2998 Dynamics are not centered, but kludges do exist. See
2999 @inputfileref{input/template,piano-dynamics.ly}.
3001 @cindex cross staff stem
3002 @cindex stem, cross staff
3004 The distance between the two staves is normally fixed across the
3005 entire score. It is possible to tune this per system, but it does
3006 require arcane command incantations. See
3007 @inputfileref{input/test,piano-staff-distance.ly}.
3014 @node Automatic staff changes
3015 @subsection Automatic staff changes
3016 @cindex Automatic staff changes
3018 Voices can switch automatically between the top and the bottom
3019 staff. The syntax for this is
3021 \autochange \context Voice @{ @dots{}@var{music}@dots{} @}
3023 The two staffs of the piano staff must be named @code{up} and
3026 The autochanger switches on basis of pitch (central C is the turning
3027 point), and it looks ahead skipping over rests to switch in
3028 advance. Here is a practical example:
3030 @lilypond[verbatim,raggedright,quote]
3031 \score { \notes \context PianoStaff <<
3032 \context Staff = "up" {
3033 \autochange \new Voice \relative c' {
3034 g4 a b c d r4 a g } }
3035 \context Staff = "down" {
3042 In this example, spacer rests are used to prevent the bottom staff from
3043 terminating too soon.
3048 In this manual: @ref{Manual staff switches}.
3050 Internals: @internalsref{AutoChangeMusic}.
3056 The staff switches often do not end up in optimal places. For high
3057 quality output, staff switches should be specified manually.
3061 @node Manual staff switches
3062 @subsection Manual staff switches
3064 @cindex manual staff switches
3065 @cindex staff switch, manual
3067 Voices can be switched between staves manually, using the following command:
3069 \change Staff = @var{staffname} @var{music}
3073 The string @var{staffname} is the name of the staff. It switches the
3074 current voice from its current staff to the Staff called
3075 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3084 Pianos have pedals that alter the way sound are produced. Generally, a
3085 piano has three pedals, sustain, una corda, and sostenuto.
3089 Piano pedal instruction can be expressed by attaching
3090 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3091 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3094 @lilypond[fragment,verbatim]
3095 c'4\sustainDown c'4\sustainUp
3098 What is printed can be modified by setting @code{pedal@var{X}Strings},
3099 where @var{X} is one of the pedal types: @code{Sustain},
3100 @code{Sostenuto} or @code{UnaCorda}. Refer to the generated
3101 documentation of @internalsref{SustainPedal} for more information.
3103 Pedals can also be indicated by a sequence of brackets, by setting the
3104 @code{pedalSustainStyle} property to @code{bracket} objects:
3106 @lilypond[fragment,verbatim]
3107 \set Staff.pedalSustainStyle = #'bracket
3108 c''4\sustainDown d''4 e''4
3109 a'4\sustainUp\sustainDown
3110 f'4 g'4 a'4\sustainUp
3113 A third style of pedal notation is a mixture of text and brackets,
3114 obtained by setting the @code{pedalSustainStyle} style property to
3117 @lilypond[fragment,verbatim]
3118 \set Staff.pedalSustainStyle = #'mixed
3119 c''4\sustainDown d''4 e''4
3120 c'4\sustainUp\sustainDown
3121 f'4 g'4 a'4\sustainUp
3124 The default `*Ped' style for sustain and damper pedals corresponds to
3125 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
3128 @lilypond[fragment,verbatim]
3129 c''4\sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4\sostenutoUp
3132 For fine-tuning of the appearance of a pedal bracket, the properties
3133 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3134 @code{PianoPedalBracket} objects (see
3135 @internalsref{PianoPedalBracket} in the Program reference) can be modified. For example, the
3136 bracket may be extended to the end of the note head:
3138 @lilypond[fragment,verbatim]
3139 \override Staff.PianoPedalBracket
3140 #'shorten-pair = #'(0 . -1.0)
3141 c''4\sostenutoDown d''4 e''4 c'4
3142 f'4 g'4 a'4\sostenutoUp
3146 @subsection Arpeggio
3149 @cindex broken arpeggio
3150 @cindex @code{\arpeggio}
3152 You can specify an arpeggio sign on a chord by attaching an
3153 @code{\arpeggio} to a chord:
3156 @lilypond[fragment,relative,verbatim]
3160 When an arpeggio crosses staves, you attach an arpeggio to the chords
3161 in both staves, and set
3162 @internalsref{PianoStaff}.@code{connectArpeggios}:
3164 @lilypond[fragment,relative,verbatim]
3165 \context PianoStaff <<
3166 \set PianoStaff.connectArpeggios = ##t
3167 \new Staff { <c' e g c>\arpeggio }
3168 \new Staff { \clef bass <c,, e g>\arpeggio }
3172 The direction of the arpeggio is sometimes denoted by adding an
3173 arrowhead to the wiggly line. This can be typeset by setting
3174 @code{arpeggio-direction}:
3176 @lilypond[fragment,relative,verbatim]
3178 \override Arpeggio #'arpeggio-direction = #1
3180 \override Arpeggio #'arpeggio-direction = #-1
3185 A square bracket on the left indicates that the player should not
3186 arpeggiate the chord. To draw these brackets, set the
3187 @code{print-function} property of @code{Arpeggio} or
3188 @code{PianoStaff.Arpeggio} objects to @code{\arpeggioBracket}, and use
3189 @code{\arpeggio} statements within the chords as before:
3191 @lilypond[fragment,relative,verbatim]
3192 \override PianoStaff.Arpeggio
3193 #'print-function = \arpeggioBracket
3199 @cindex @code{\arpeggioBracket}
3200 @code{\arpeggioBracket},
3201 @cindex @code{\arpeggio}
3206 Internals: @internalsref{ArpeggioEvent} music expressions lead to
3207 @internalsref{Arpeggio} objects. Cross staff arpeggios are
3208 @internalsref{PianoStaff}.@internalsref{Arpeggio}.
3212 It is not possible to mix connected arpeggios and unconnected
3213 arpeggios in one @internalsref{PianoStaff} at the same time.
3215 @node Staff switch lines
3216 @subsection Staff switch lines
3219 @cindex follow voice
3220 @cindex staff switching
3223 @cindex @code{followVoice}
3225 Whenever a voice switches to another staff a line connecting the notes
3226 can be printed automatically. This is enabled if the property
3227 @code{PianoStaff.followVoice} is set to true:
3229 @lilypond[fragment,relative,verbatim]
3230 \context PianoStaff <<
3231 \set PianoStaff.followVoice = ##t
3232 \context Staff \context Voice {
3237 \context Staff=two { \clef bass \skip 1*2 }
3241 The associated object is @internalsref{VoiceFollower}.
3245 @cindex @code{\showStaffSwitch}
3246 @code{\showStaffSwitch},
3247 @cindex @code{\hideStaffSwitch}
3248 @code{\hideStaffSwitch}.
3252 @section Vocal music
3254 This section discusses how to enter and print lyrics.
3258 * The Lyrics context::
3263 @node Entering lyrics
3264 @subsection Entering lyrics
3268 @cindex @code{\lyrics}
3271 Lyrics are entered in a special input mode. This mode is is introduced
3272 by the keyword @code{\lyrics}. In this mode you can enter lyrics, with
3273 punctuation and accents without any hassle. Syllables are entered like
3274 notes, but with pitches replaced by text. For example,
3276 \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
3279 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3280 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3281 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3282 any 8-bit character with ASCII code over 127, or a two-character
3283 combination of a backslash followed by one of @code{`}, @code{'},
3284 @code{"}, or @code{^}.
3286 Subsequent characters of a word can be any character that is not a digit
3287 and not white space. One important consequence of this is that a word
3288 can end with @code{@}}. The following example is usually a bug. The
3289 syllable includes a @code{@}}, and hence the opening brace is not balanced:
3291 \lyrics @{ twinkle@}
3294 @cindex @code{\property}, in @code{\lyrics}
3295 Similarly, a period following a alphabetic sequence, is included in
3296 the resulting string. As a consequence, spaces must be inserted around
3299 \override Score . LyricText #'font-shape = #'italic
3303 @cindex spaces, in lyrics
3304 @cindex quotes, in lyrics
3306 Any @code{_} character which appears in an unquoted word is converted
3307 to a space. This provides a mechanism for introducing spaces into words
3308 without using quotes. Quoted words can also be used in Lyrics mode to
3309 specify words that cannot be written with the above rules:
3312 \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3316 Hyphens can be entered as ordinary hyphens at the end of a syllable, i.e.
3321 These will be attached to the end of the first syllable.
3323 Centered hyphens are entered using the special `@code{-}@code{-}' lyric
3324 as a separate word between syllables. The hyphen will have variable
3325 length depending on the space between the syllables and it will be
3326 centered between the syllables.
3331 When a lyric is sung over many notes (this is called a melisma), this is
3332 indicated with a horizontal line centered between a syllable and the
3333 next one. Such a line is called an extender line, and it is entered as
3338 Internals: @internalsref{LyricEvent}, @internalsref{HyphenEvent}, and
3339 @internalsref{ExtenderEvent}.
3341 Examples: @inputfileref{input/test,lyric-hyphen-retain.ly}.
3345 The definition of lyrics mode is too complex.
3349 @node The Lyrics context
3350 @subsection The Lyrics context
3352 Lyrics are printed by interpreting them in a @internalsref{Lyrics} context:
3354 \context Lyrics \lyrics @dots{}
3357 @cindex automatic syllable durations
3358 @cindex @code{\lyricsto}
3359 @cindex lyrics and melodies
3361 This will place the lyrics according to the durations that were
3362 entered. The lyrics can also be aligned under a given melody
3363 automatically. In this case, it is no longer necessary to enter the
3364 correct duration for each syllable. This is achieved by combining the
3365 melody and the lyrics with the @code{\lyricsto} expression:
3367 \lyricsto @var{name} \new Lyrics @dots{}
3370 This aligns the lyrics to the
3372 notes of the @internalsref{Voice} context called @var{name}, which has
3373 to exist. Therefore, normally the @code{Voice} is specified first, and
3374 then the lyrics are specified with @code{\lyricsto}.
3376 For different or more complex orderings, the best way is to setup the
3377 hierarchy of staves and lyrics first, e.g.
3379 \context ChoirStaff \notes <<
3380 \context Lyrics = sopranoLyrics @{ s1 @}
3381 \context Voice = soprano @{ @emph{music} @}
3382 \context Lyrics = tenorLyrics @{ s1 @}
3383 \context Voice = tenor @{ @emph{music} @}
3386 and then combine the appropriate melodies and lyric lines:
3388 \lyricsto "soprano" \new Lyrics @emph{the lyrics}
3392 The final input would resemble
3395 << \context ChoirStaff \notes << @emph{setup the music} >>
3396 \lyricsto "soprano" @emph{etc}
3397 \lyricsto "alto" @emph{etc}
3403 The @code{\lyricsto} command detects melismata: it only puts one
3404 syllable under a tied or slurred group of notes. If you want to force
3405 an unslurred group of notes to be a melisma, then insert
3406 @code{\melisma} after the first note of the group, and
3407 @code{\melismaEnd} after the last one, e.g.
3409 @lilypond[relative=1,raggedright,fragment,verbatim]
3410 << \context Voice = "lala" { \time 3/4
3416 \lyricsto "lala" \new Lyrics \lyrics {
3421 In addition, notes are considered a melisma if they are manually
3422 beamed, and automatic beaming (see @ref{Setting automatic beam
3423 behavior}) is switched off. The criteria for deciding melismata
3424 can be tuned with the property @code{melismaBusyProperties}. See
3425 @internalsref{Melisma_translator} for more information.
3427 When multiple stanzas are put on the same melody, it can happen that
3428 two stanzas have melismata in different locations. This can be
3429 remedied by switching off melismata for one
3430 @internalsref{Lyrics}. This is achieved by setting
3431 the @code{ignoreMelismata} property to @code{#t}. An example is shown
3432 in @inputfileref{input/regression,lyric-combine-new.ly}.
3435 @cindex choral score
3437 A complete example of a SATB score setup is in the file
3438 @inputfileref{input/template,satb.ly}.
3443 @code{\melisma}, @code{\melismaEnd}
3444 @cindex @code{\melismaEnd}
3445 @cindex @code{\melisma}
3449 Internals: Music expressions: @internalsref{LyricCombineMusic},
3450 Contexts: @internalsref{Lyrics}, @internalsref{Melisma_translator}.
3452 Examples: @inputfileref{input/template,satb.ly},
3453 @inputfileref{input/regression,lyric-combine-new.ly}.
3457 Melismata are not detected automatically, and extender lines must be
3461 For proper processing of extender lines, the
3462 @internalsref{Lyrics} and @internalsref{Voice} should be
3463 linked. This can be achieved either by using @code{\lyricsto} or by
3464 setting corresponding names for both contexts. The latter is explained
3465 in @ref{More stanzas}.
3468 @subsection More stanzas
3470 @cindex phrasing, in lyrics
3473 The lyrics should be aligned with the note heads of the melody. To
3474 achieve this, each line of lyrics should be marked to correspond with
3475 the melodic line. This is done automatically when @code{\lyricsto},
3476 but it can also be done manually.
3478 To this end, give the @internalsref{Voice} context an identity:
3480 \context Voice = duet @{
3485 Then set the @internalsref{Lyrics} contexts to names starting with
3486 that identity followed by a dash. In the preceding example, the
3487 @internalsref{Voice} identity is @code{duet}, so the identities of the
3488 @internalsref{Lyrics}s are marked @code{duet-1} and @code{duet-2}:
3490 \context Lyrics = "duet-1" @{
3491 Hi, my name is bert. @}
3492 \context Lyrics = "duet-2" @{
3493 Ooooo, ch\'e -- ri, je t'aime. @}
3496 The complete example is shown here:
3497 @lilypond[raggedright,verbatim]
3499 << \notes \relative c'' \context Voice = duet { \time 3/4
3501 \lyrics << \lyricsto "duet" \new Lyrics {
3503 \set vocNam = "Bert"
3504 Hi, my name is bert. }
3505 \lyricsto "duet" \new Lyrics {
3507 \set vocNam = "Ernie"
3508 Ooooo, ch\'e -- ri, je t'aime.
3514 @cindex stanza number
3515 @cindex singer's names
3516 @cindex name of singer
3518 Stanza numbers can be added by setting @code{stanza}, e.g.
3526 Notice how dots are surrounded with spaces in @code{\lyrics} mode, to
3527 prevent @code{stanza} being interpreted as a single
3530 This example also demonstrates how names of the singers can be added
3531 using @code{vocalName} analogous to instrument annotations for staves.
3532 A short version may be entered as @code{vocNam}.
3534 To make empty spaces in lyrics, use @code{\skip}.
3539 Internals: Layout objects @internalsref{LyricText} and
3540 @internalsref{VocalName}. Music expressions:
3541 @internalsref{LyricEvent}.
3547 Input for lyrics introduces a syntactical ambiguity:
3554 is interpreted as assigning a string identifier @code{\foo} such that
3555 it contains @code{"bar"}. However, it could also be interpreted as
3556 making or a music identifier @code{\foo} containing the syllable
3557 `bar'. The force the latter interpretation, use
3567 The term @emph{ambitus} (plural: ambituses) denotes a range of pitches
3568 for a given voice in a part of music. It also may denote the pitch
3569 range that a musical instrument is capable of playing. Most musical
3570 instruments have their ambitus standardized (or at least there is
3571 agreement upon the minimal ambitus of a particular type of
3572 instrument), such that a composer or arranger of a piece of music can
3573 easily meet the ambitus constraints of the targeted instrument.
3574 However, the ambitus of the human voice depends on individual
3575 physiological state, including education and training of the voice.
3576 Therefore, a singer potentially has to check for each piece of music
3577 if the ambitus of that piece meets his individual capabilities. This
3578 is why the ambitus of a piece may be of particular value to vocal
3581 The ambitus is typically notated on a per-voice basis at the very
3582 beginning of a piece, e.g. nearby the initial clef or time signature of
3583 each staff. The range is graphically specified by two noteheads, that
3584 represent the minimum and maximum pitch. Some publishers use a textual
3585 notation: they put the range in words in front of the corresponding
3586 staff. LilyPond only supports the graphical ambitus notation.
3588 To apply, add the @internalsref{Ambitus_engraver} to the
3589 @internalsref{Voice} context, i.e.
3595 \consists Ambitus_engraver
3600 This results in the following output:
3602 @lilypond[raggedright]
3603 upper = \notes \relative c {
3606 as'' c e2 bes f cis d4 e f2 g
3608 lower = \notes \relative c {
3611 e'4 b g a c es fis a cis b a g f e d2
3614 \context ChoirStaff {
3616 \new Staff { \upper }
3617 \new Staff { \lower }
3623 \consists Ambitus_engraver
3629 If you have multiple voices in a single staff, and you want a single
3630 ambitus per staff rather than per each voice, then add the
3631 @internalsref{Ambitus_engraver} to the @internalsref{Staff} context
3632 rather than to the @internalsref{Voice} context.
3634 It is possible to tune individual ambituses for multiple voices on a
3635 single staff, for example by erasing or shifting them horizontally. An
3636 example is in @inputfileref{input/test,ambitus-mixed.ly}.
3640 Internals: @internalsref{Ambitus}.
3642 Examples: @inputfileref{input/regression,ambitus.ly},
3643 @inputfileref{input/test,ambitus-mixed.ly}.
3647 There is no collision handling in the case of multiple per-voice
3653 Tablature notation is used for notating music for plucked string
3654 instruments. It notates pitches not by using note heads, but by
3655 indicating on which string and fret a note must be played. LilyPond
3656 offers limited support for tablature.
3659 * Tablatures basic::
3660 * Non-guitar tablatures::
3663 @node Tablatures basic
3664 @subsection Tablatures basic
3665 @cindex Tablatures basic
3667 The string number associated to a note is given as a backslash
3668 followed by a number, e.g. @code{c4\3} for a C quarter on the third
3669 string. By default, string 1 is the highest one, and the tuning
3670 defaults to the standard guitar tuning (with 6 strings). The notes
3671 are printed as tablature, by using @internalsref{TabStaff} and
3672 @internalsref{TabVoice} contexts:
3674 @lilypond[fragment,verbatim]
3675 \notes \context TabStaff {
3683 When no string is specified, the first string that does not give a
3684 fret number less than @code{minimumFret} is selected. The default
3685 value for @code{minimumFret} is 0:
3689 e8 fis gis a b cis' dis' e'
3690 \set TabStaff.minimumFret = #8
3691 e8 fis gis a b cis' dis' e'
3696 e8 fis gis a b cis' dis' e'
3697 \set TabStaff.minimumFret = #8
3698 e8 fis gis a b cis' dis' e'
3701 \context StaffGroup <<
3702 \context Staff { \clef "G_8" \frag }
3703 \context TabStaff { \frag }
3710 Internals: @internalsref{TabStaff}, @internalsref{TabVoice}, and
3711 @internalsref{StringNumberEvent}.
3715 Chords are not handled in a special way, and hence the automatic
3716 string selector may easily select the same string to two notes in a
3720 @node Non-guitar tablatures
3721 @subsection Non-guitar tablatures
3722 @cindex Non-guitar tablatures
3724 You can change the number of strings, by setting the number of lines
3725 in the @internalsref{TabStaff}.
3727 You can change the tuning of the strings. A string tuning is given as
3728 a Scheme list with one integer number for each string, the number
3729 being the pitch (measured in semitones relative to central C) of an
3730 open string. The numbers specified for @code{stringTuning} are the
3731 numbers of semitones to subtract or add, starting the specified pitch
3732 by default middle C, in string order. Thus, the notes are e, a, d, and
3735 @lilypond[fragment,verbatim]
3736 \context TabStaff <<
3737 \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
3740 a,4 c' a e' e c' a e'
3745 It is possible to change the Scheme function to format the tablature
3746 note text. The default is @code{fret-number-tablature-format}, which
3747 uses the fret number. For instruments that do not use this notation,
3748 you can create a special tablature formatting function. This function
3749 takes three argument: string number, string tuning and note pitch.
3753 No guitar special effects have been implemented.
3758 @section Chord names
3761 LilyPond has support for both printing chord names. Chords may be
3762 entered in musical chord notation, i.e. @code{< .. >}, but they can
3763 also be entered by name. Internally, the chords are represented as a
3764 set of pitches, so they can be transposed:
3767 @lilypond[verbatim,raggedright]
3768 twoWays = \notes \transpose c c' {
3778 << \context ChordNames \twoWays
3779 \context Voice \twoWays >> }
3782 This example also shows that the chord printing routines do not try to
3783 be intelligent. The last chord (@code{f bes d}) is not interpreted as
3789 * Printing chord names::
3794 @subsection Chords mode
3797 Chord mode is a mode where you can input sets of pitches using common
3798 names. It is introduced by the keyword @code{\chords}.
3799 In chords mode, a chord is entered by the root, which is entered
3800 like a common pitch:
3801 @lilypond[fragment,verbatim,quote,relative=1]
3802 \chords { es4. d8 c2 }
3807 Other chords may be entered by suffixing a colon, and introducing a
3808 modifier, and optionally, a number:
3810 @lilypond[fragment,verbatim,quote]
3811 \chords { e1:m e1:7 e1:m7 }
3813 The first number following the root is taken to be the `type' of the
3814 chord, thirds are added to the root until it reaches the specified
3816 @lilypond[fragment,verbatim]
3817 \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
3820 @cindex root of chord
3821 @cindex additions, in chords
3822 @cindex removals, in chords
3824 More complex chords may also be constructed adding separate steps
3825 to a chord. Additions are added after the number following
3826 the colon, and are separated by dots:
3828 @lilypond[verbatim,fragment,quote]
3829 \chords { c:5.6 c:3.7.8 c:3.6.13 }
3831 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
3833 @lilypond[verbatim,fragment,quote]
3834 \chords { c:7+ c:5+.3- c:3-.5-.7- }
3836 Removals are specified similarly, and are introduced by a caret. They
3837 must come after the additions:
3838 @lilypond[verbatim,fragment]
3839 \chords { c^3 c:7^5 c:9^3.5 }
3842 Modifiers can be used to change pitches. The following modifiers are
3846 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
3848 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
3851 is the augmented chord. This modifier raises the 5th step.
3853 is the major 7th chord. This modifier raises the 7th step if present.
3855 is the suspended 4th or 2nd. This modifier removes the 3rd
3856 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
3859 Modifiers can be mixed with additions:
3860 @lilypond[verbatim,fragment]
3861 \chords { c:sus4 c:7sus4 c:dim7 c:m6 }
3864 @cindex modifiers, in chords.
3871 Since an unaltered 11 does not sound good when combined with an
3872 unaltered 13, the 11 is removed in this case (unless it is added
3875 @lilypond[fragment,verbatim]
3876 \chords { c:13 c:13.11 c:m13 }
3881 An inversion (putting one pitch of the chord on the bottom), as well
3882 as bass notes, can be specified by appending
3883 @code{/}@var{pitch} to the chord:
3884 @lilypond[fragment,verbatim,center]
3885 \chords { c1 c/g c/f }
3889 A bass note can be added instead of transposed out of the chord,
3890 by using @code{/+}@var{pitch}.
3892 @lilypond[fragment,verbatim,center]
3893 \chords { c1 c/+g c/+f }
3896 Chords is a mode similar to @code{\lyrics}, @code{\notes} etc. Most
3897 of the commands continue to work, for example, @code{r} and
3898 @code{\skip} can be used to insert rests and spaces, and property
3899 commands may be used to change various settings.
3905 Each step can only be present in a chord once. The following
3906 simply produces the augmented chord, since @code{5+} is interpreted
3909 @lilypond[verbatim,fragment]
3910 \chords { c:5.5-.5+ }
3914 @node Printing chord names
3915 @subsection Printing chord names
3917 @cindex printing chord names
3921 For displaying printed chord names, use the @internalsref{ChordNames} context.
3922 The chords may be entered either using the notation
3923 described above, or directly using @code{<} and @code{>}:
3925 @lilypond[verbatim,raggedright]
3927 \chords {a1 b c} <d' f' a'> <e' g' b'>
3931 \context ChordNames \scheme
3932 \context Staff \scheme
3937 You can make the chord changes stand out by setting
3938 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
3939 display chord names when there is a change in the chords scheme and at
3940 the start of a new line:
3942 @lilypond[verbatim,linewidth=9\cm]
3944 c1:m c:m \break c:m c:m d
3948 \context ChordNames {
3949 \set chordChanges = ##t
3951 \context Staff \transpose c c' \scheme
3956 The default chord name layout is a system for Jazz music, proposed by
3957 Klaus Ignatzek (see @ref{Literature list}). It can be tuned through the
3958 following properties:
3961 @cindex chordNameExceptions
3962 @item chordNameExceptions
3963 This is a list that contains the chords that have special formatting.
3965 @inputfileref{input/regression,chord-name-exceptions.ly}.
3966 @cindex exceptions, chord names.
3969 @cindex majorSevenSymbol
3970 @item majorSevenSymbol
3971 This property contains the markup object used for the 7th step, when
3972 it is major. Predefined options are @code{whiteTriangleMarkup} and
3973 @code{blackTriangleMarkup}. See
3974 @inputfileref{input/regression,chord-name-major7.ly} for an example.
3976 @cindex chordNameSeparator
3977 @item chordNameSeparator
3978 Different parts of a chord name are normally separated by a
3979 slash. By setting @code{chordNameSeparator}, you can specify other
3981 @lilypond[fragment,verbatim]
3982 \context ChordNames \chords {
3984 \set chordNameSeparator
3985 = \markup { \typewriter "|" }
3989 @cindex chordRootNamer
3990 @item chordRootNamer
3991 The root of a chord is usually printed as a letter with an optional
3992 alteration. The transformation from pitch to letter is done by this
3993 function. Special note names (for example, the German ``H'' for a
3994 B-chord) can be produced by storing a new function in this property.
3996 The pre-defined variables @code{\germanChords},
3997 @code{\semiGermanChords} set these variables.
4000 @cindex chordNoteNamer
4001 @item chordNoteNamer
4002 The default is to print single pitch, e.g. the bass note, using the
4003 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
4004 to a specialized function to change this behavior. For example, the
4005 base can be printed in lower case.
4010 There are also two other chord name schemes implemented: an alternate
4011 Jazz chord notation, and a systematic scheme called Banter chords. The
4012 alternate jazz notation is also shown on the chart in @ref{Chord name
4013 chart}. Turning on these styles is described in the input file
4014 @inputfileref{input/test,chord-names-jazz.ly}.
4018 @cindex chords, jazz
4023 @cindex @code{\germanChords}
4024 @code{\germanChords},
4025 @cindex @code{\semiGermanChords}
4026 @code{\semiGermanChords}.
4033 Examples: @inputfileref{input/regression,chord-name-major7.ly},
4034 @inputfileref{input/regression,chord-name-exceptions.ly},
4035 @inputfileref{input/test,chord-names-jazz.ly},
4036 @inputfileref{input/test,chord-names-german.ly}.
4038 Init files: @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
4043 Chord names are determined solely from the list of pitches. Chord
4044 inversions are not identified, and neither are added bass notes. This
4045 may result in strange chord names when chords are entered with the
4046 @code{< .. >} syntax.
4051 @node Orchestral music
4052 @section Orchestral music
4054 @cindex Writing parts
4056 Orchestral music involves some special notation, both in the full
4057 score and the individual parts. This section explains how to tackle
4058 some common problems in orchestral music.
4063 * Multiple staff contexts::
4066 * Instrument names::
4068 * Multi measure rests::
4069 * Automatic part combining::
4071 * Different editions from one source::
4072 * Quoting other voices::
4073 * Sound output for transposing instruments::
4076 @node Multiple staff contexts
4077 @subsection Multiple staff contexts
4079 Polyphonic scores consist of many staves. These staves can be
4080 constructed in three different ways:
4082 @item The group is started with a brace at the left. This is done with the
4083 @internalsref{GrandStaff} context.
4084 @item The group is started with a bracket. This is done with the
4085 @internalsref{StaffGroup} context
4086 @item The group is started with a vertical line. This is the default
4090 @cindex Staff, multiple
4091 @cindex bracket, vertical
4092 @cindex brace, vertical
4099 @node Rehearsal marks
4100 @subsection Rehearsal marks
4101 @cindex Rehearsal marks
4103 @cindex @code{\mark}
4105 To print a rehearsal mark, use the @code{\mark} command:
4106 @lilypond[fragment,verbatim]
4117 (The letter I is skipped in accordance with engraving traditions.)
4119 The mark is incremented automatically if you use @code{\mark
4120 \default}, but you can also use an integer argument to set the mark
4121 manually. The value to use is stored in the property
4122 @code{rehearsalMark}.
4124 The style is defined by the property @code{markFormatter}. It is a
4125 function taking the current mark (an integer) and the current context
4126 as argument. It should return a markup object. In the following
4127 example, @code{markFormatter} is set to a canned procedure. After a
4128 few measures, it is set to function that produces a boxed number.
4130 @lilypond[verbatim,fragment,relative=1]
4131 \set Score.markFormatter = #format-mark-numbers
4134 \set Score.markFormatter
4135 = #(lambda (mark context)
4136 (make-bold-markup (make-box-markup (number->string mark))))
4141 The file @file{scm/translation-functions.scm} contains the definitions
4142 of @code{format-mark-numbers} (the default format) and
4143 @code{format-mark-letters}. They can be used as inspiration for other
4144 formatting functions.
4147 @cindex coda on bar line
4148 @cindex segno on bar line
4149 @cindex fermata on bar line
4150 @cindex bar lines, symbols on
4152 The @code{\mark} command can also be used to put signs like coda,
4153 segno and fermatas on a barline. Use @code{\markup} to
4154 to access the appropriate symbol:
4156 @lilypond[fragment,verbatim,relative=1]
4157 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4161 In this case, during line breaks, marks must also be printed at the
4162 end of the line, and not at the beginning. Use the following to force
4165 \override Score.RehearsalMark
4166 #'break-visibility = #begin-of-line-invisible
4172 @cindex barlines, putting symbols on
4176 Internals: @internalsref{MarkEvent}, @internalsref{RehearsalMark}.
4178 Init files: @file{scm/translation-functions.scm} contains the
4179 definition of @code{format-mark-numbers} and
4180 @code{format-mark-letters}. They can be used as inspiration for other
4181 formatting functions.
4183 Examples: @inputfileref{input/regression,rehearsal-mark-letter.ly},
4184 @inputfileref{input/regression,rehearsal-mark-number.ly}.
4188 @subsection Bar numbers
4192 @cindex measure numbers
4193 @cindex currentBarNumber
4195 Bar numbers are printed by default at the start of the line. The
4196 number itself is stored in the
4197 @code{currentBarNumber} property,
4198 which is normally updated automatically for every measure.
4200 Bar numbers can be typeset at regular intervals instead of at the
4201 beginning of each line. This is illustrated in the following example,
4202 whose source is available as
4203 @inputfileref{input/test,bar-number-regular-interval.ly}:
4205 @lilypondfile[]{bar-number-regular-interval.ly}
4210 Internals: @internalsref{BarNumber}.
4212 Examples: @inputfileref{input/test,bar-number-every-five-reset.ly},
4213 and @inputfileref{input/test,bar-number-regular-interval.ly}.
4217 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4218 there is one at the top. To solve this, the
4219 @code{padding} property of @internalsref{BarNumber} can be
4220 used to position the number correctly.
4222 @node Instrument names
4223 @subsection Instrument names
4225 In an orchestral score, instrument names are printed left side of the
4228 This can be achieved by setting @internalsref{Staff}.@code{instrument}
4229 and @internalsref{Staff}.@code{instr}. This will print a string before
4230 the start of the staff. For the first start, @code{instrument} is
4231 used, for the next ones @code{instr} is used:
4234 @lilypond[verbatim,raggedright]
4235 \set Staff.instrument = "ploink " { c''4 }
4239 You can also use markup texts to construct more complicated instrument
4243 @lilypond[fragment,verbatim,raggedright]
4245 \set Staff.instrument = \markup {
4246 \column < "Clarinetti"
4259 Internals: @internalsref{InstrumentName}.
4263 When you put a name on a grand staff or piano staff the width of the
4264 brace is not taken into account. You must add extra spaces to the end of
4265 the name to avoid a collision.
4268 @subsection Transpose
4270 @cindex transposition of pitches
4271 @cindex @code{\transpose}
4273 A music expression can be transposed with @code{\transpose}. The syntax
4276 \transpose @var{from} @var{to} @var{musicexpr}
4279 This means that @var{musicexpr} is transposed by the interval between
4280 the pitches @var{from} and @var{to}: any note with pitch @code{from}
4281 is changed to @code{to}.
4284 For example, consider a piece written in the key of D major. If
4285 this piece is a little too low for its performer, it can be
4286 transposed up to E major with
4288 \tranpose d e @dots{}
4291 Consider a part written for violin (a C instrument). If
4292 this part is to be played on the A clarinet, the following
4293 transposition will produce the appropriate part
4296 \transpose a c @dots{}
4299 Since @var{from} and @var{to} are pitches, @code{\transpose} must be
4300 inside a @code{\notes} section. @code{\transpose} distinguishes
4301 between enharmonic pitches: both @code{\transpose c cis} or
4302 @code{\transpose c des} will transpose up half a tone. The first
4303 version will print sharps and the second version will print flats:
4305 @lilypond[raggedright,verbatim]
4306 mus =\notes { \key d \major cis d fis g }
4307 \score { \notes \context Staff {
4310 \transpose c g' \mus
4311 \transpose c f' \mus
4318 Internals: @internalsref{TransposedMusic}, and
4319 @internalsref{UntransposableMusic}.
4323 If you want to use both @code{\transpose} and @code{\relative}, then
4324 you must put @code{\transpose} outside of @code{\relative}, since
4325 @code{\relative} will have no effect music that appears inside a
4331 @node Multi measure rests
4332 @subsection Multi measure rests
4333 @cindex multi measure rests
4334 @cindex Rests, multi measure
4338 Multi measure rests are entered using `@code{R}'. It is specifically
4339 meant for full bar rests and for entering parts: the rest can expand
4340 to fill a score with rests, or it can be printed as a single
4341 multimeasure rest. This expansion is controlled by the property
4342 @code{Score.skipBars}. If this is set to true, empty measures will not
4343 be expanded, and the appropriate number is added automatically:
4345 @lilypond[fragment,verbatim]
4346 \time 4/4 r1 | R1 | R1*2
4347 \set Score.skipBars = ##t R1*17 R1*4
4350 The @code{1} in @code{R1} is similar to the duration notation used for
4351 notes. Hence, for time signatures other than 4/4, you must enter other
4352 durations. This can be done with augmentation dots or fractions:
4354 @lilypond[fragment,verbatim]
4355 \set Score.skipBars = ##t
4363 An @code{R} spanning a single measure is printed as either a whole rest
4364 or a breve, centered in the measure regardless of the time signature.
4366 @cindex text on multi-measure rest
4367 @cindex script on multi-measure rest
4368 @cindex fermata on multi-measure rest
4370 Texts can be added to multi-measure rests by using the
4371 @var{note}-@code{markup} syntax (see @ref{Text markup}). In this case, the number is
4372 replaced. If you need both texts and the number, you must add the
4373 number by hand. A variable (@code{\fermataMarkup}) is provided for
4377 @lilypond[verbatim,fragment]
4379 R2._\markup { "Ad lib" }
4383 If you want to have a text on the left end of a multi-measure rest,
4384 attach the text to a zero-length skip note, i.e.
4392 @cindex whole rests for a full measure
4396 Internals: @internalsref{MultiMeasureRestEvent},
4397 @internalsref{MultiMeasureTextEvent},
4398 @internalsref{MultiMeasureRestMusicGroup}, and
4399 @internalsref{MultiMeasureRest}.
4401 The layout object @internalsref{MultiMeasureRestNumber} is for the
4402 default number, and @internalsref{MultiMeasureRestText} for user
4407 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
4408 over multi-measure rests.
4410 @cindex condensing rests
4412 There is no way to automatically condense multiple rests into a single
4413 multimeasure rest. Multi measure rests do not take part in rest
4416 Be careful when entering multimeasure rests followed by whole
4417 notes. The following will enter two notes lasting four measures each:
4421 When @code{skipBars} is set, then the result will look OK, but the
4422 bar numbering will be off.
4424 @node Automatic part combining
4425 @subsection Automatic part combining
4426 @cindex automatic part combining
4427 @cindex part combiner
4430 Automatic part combining is used to merge two parts of music onto a
4431 staff. It is aimed at typesetting orchestral scores. When the two
4432 parts are identical for a period of time, only one is shown. In
4433 places where the two parts differ, they are typeset as separate
4434 voices, and stem directions are set automatically. Also, solo and
4435 @emph{a due} parts are identified and can be marked.
4439 The syntax for part combining is
4442 \partcombine @var{musicexpr1} @var{musicexpr2}
4445 The music expressions will be interpreted as @internalsref{Voice} contexts.
4447 The following example demonstrates the basic functionality of the part
4448 combiner: putting parts on one staff, and setting stem directions and
4451 @lilypond[verbatim,raggedright,fragment,relative=1]
4452 \new Staff \partcombine
4461 The first @code{g} appears only once, although it was
4462 specified twice (once in each part). Stem, slur and tie directions are
4463 set automatically, depending whether there is a solo or unisono. The
4464 first part (with context called @code{one}) always gets up stems, and
4465 `solo', while the second (called @code{two}) always gets down stems and
4468 If you just want the merging parts, and not the textual markings, you
4469 may set the property @var{soloADue} to false:
4471 @lilypond[verbatim,raggedright,fragment,relative=1]
4473 \set Staff.soloADue = ##f
4485 Internals: @internalsref{PartCombineMusic},
4486 @internalsref{SoloOneEvent}, and
4487 @internalsref{SoloTwoEvent}, and
4488 @internalsref{UnisonoEvent}.
4492 In @code{soloADue} mode, when the two voices play the same notes on and
4493 off, the part combiner may typeset @code{a2} more than once in a
4496 @code{\partcombine} can not be inside @code{\times}.
4498 Internally, the @code{\partcombine} interprets both arguments as
4499 @code{Voice}s named @code{one} and @code{two}, and then decides when
4500 the parts can be combined. Consequently, if the arguments switch to
4501 differently named @internalsref{Voice} contexts, then the events in
4502 those will be ignored.
4505 @subsection Hiding staves
4507 @cindex Frenched scores
4508 @cindex Hiding staves
4510 In orchestral scores, staff lines that only have rests are usually
4511 removed. This saves some space. This style is called `French Score'.
4512 For @internalsref{Lyrics}, @internalsref{Lyrics},
4513 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
4514 switched on by default. When these line of these contexts turn out
4515 empty after the line-breaking process, they are removed.
4517 For normal staves, a specialized @internalsref{Staff} context is
4518 available, which does the same: staves containing nothing (or only
4519 multi measure rests) are removed. The context definition is stored in
4520 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
4521 in this example disappears in the second line:
4526 \notes \relative c' <<
4527 \new Staff { e4 f g a \break c1 }
4528 \new Staff { c4 d e f \break R1 }
4532 \translator { \RemoveEmptyStaffContext }
4537 The first page shows all staffs in full. If they should be removed
4538 from the first page too, set @code{remove-first} to false
4539 in @internalsref{RemoveEmptyVerticalGroup}.
4541 Another application is making ossia sections, i.e. alternative
4542 melodies on a separate piece of staff, with help of a Frenched
4543 staff. See @inputfileref{input/test,ossia.ly} for an example.
4546 @node Different editions from one source
4547 @subsection Different editions from one source
4549 The @code{\tag} command marks music expressions with a name. These
4550 tagged expressions can be filtered out later. With this mechanism it
4551 is possible to make different versions of the same music source.
4553 In the following example, we see two versions of a piece of music, one
4554 for the full score, and one with cue notes for the instrumental part:
4570 The same can be applied to articulations, texts, etc.: they are
4573 -\tag #@var{your-tag}
4575 to an articulation, for example,
4580 This defines a note with a conditional fingering indication.
4582 By applying the @code{remove-tag} function, tagged expressions can be
4583 filtered. For example,
4587 \apply #(remove-tag 'score) @var{the music}
4588 \apply #(remove-tag 'part) @var{the music}
4593 @lilypondfile[]{tag-filter.ly}
4595 The argument of the @code{\tag} command should be a symbol, or a list
4596 of symbols, for example,
4598 \tag #'(original-part transposed-part) @dots{}
4603 Examples: @inputfileref{input/regression,tag-filter.ly}.
4606 @node Quoting other voices
4607 @subsection Quoting other voices
4615 @node Sound output for transposing instruments
4616 @subsection Sound output for transposing instruments
4618 When you want to make a MIDI file from a score containing transposed
4619 and untransposed instruments, you have to instruct LilyPond the pitch
4620 offset (in semitones) for the transposed instruments. This is done
4621 using the @code{transposing} property. It does not affect printed
4624 @cindex @code{transposing}
4627 \set Staff.instrument = #"Cl. in B-flat"
4628 \set Staff.transposing = #-2
4632 @node Ancient notation
4633 @section Ancient notation
4635 @cindex Vaticana, Editio
4636 @cindex Medicaea, Editio
4641 @c [TODO: write more comprehensive introduction on ancient notation]
4643 Support for ancient notation is still under heavy development.
4644 Regardless of all of the current limitations (see the bugs section
4645 below for details), it includes features for mensural
4646 notation and Gregorian Chant notation. There is also limited support
4647 for figured bass notation.
4649 Many graphical objects provide a @code{style} property, see
4650 @ref{Ancient note heads}, @ref{Ancient accidentals}, @ref{Ancient
4651 rests}, @ref{Ancient clefs}, @ref{Ancient flags} and @ref{Ancient time
4652 signatures}. By manipulating such a grob property, the typographical
4653 appearance of the affected graphical objects can be accomodated for a
4654 specific notation flavour without need for introducing any new
4658 Other aspects of ancient notation can not that easily be expressed as
4659 in terms of just changing a style property of a graphical object.
4660 Therefore, some notational concepts are introduced specifically for
4661 ancient notation, see @ref{Custodes}, @ref{Divisiones},
4662 @ref{Ligatures}, and @ref{Figured bass}.
4666 * Ancient note heads::
4667 * Ancient accidentals::
4671 * Ancient time signatures::
4676 * Vaticana style contexts::
4679 If this all is way too much of documentation for you, and you just
4680 want to dive into typesetting without worrying too much about the
4681 details on how to customize a context, then you may have a look at the
4682 predefined contexts (see @ref{Vaticana style contexts}). Use them to
4683 set up predefined style-specific voice and staff contexts, and
4684 directly go ahead with the note entry.
4688 Ligatures need special spacing that has not yet been implemented. As
4689 a result, there is too much space between ligatures most of the time,
4690 and line breaking often is unsatisfactory. Also, lyrics do not
4691 correctly align with ligatures.
4693 Accidentals must not be printed within a ligature, but instead need to
4694 be collected and printed in front of it.
4696 Augmentum dots within ligatures are not handled correctly.
4699 @node Ancient note heads
4700 @subsection Ancient note heads
4706 For ancient notation, a note head style other than the @code{default}
4707 style may be chosen. This is accomplished by setting the @code{style}
4708 property of the NoteHead object to the desired value (@code{baroque},
4709 @code{neo_mensural} or @code{mensural}). The @code{baroque} style
4710 differs from the @code{default} style only in using a square shape for
4711 @code{\breve} note heads. The @code{neo_mensural} style differs from
4712 the @code{baroque} style in that it uses rhomboidal heads for whole
4713 notes and all smaller durations. Stems are centered on the note
4714 heads. This style is in particular useful when transcribing mensural
4715 music, e.g. for the incipit. The @code{mensural} style finally
4716 produces note heads that mimick the look of note heads in historic
4717 printings of the 16th century.
4719 The following example demonstrates the @code{neo_mensural} style:
4721 @lilypond[fragment,raggedright,verbatim]
4722 \override NoteHead #'style = #'neo_mensural
4723 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
4726 When typesetting a piece in Gregorian Chant notation, a Gregorian
4727 ligature engraver will automatically select the proper note heads,
4728 such there is no need to explicitly set the note head style. Still,
4729 the note head style can be set e.g. to @code{vaticana_punctum} to
4730 produce punctum neumes. Similarly, a mensural ligature engraver is
4731 used to automatically assemble mensural ligatures. See
4732 @ref{Ligatures} for how ligature engravers work.
4737 @ref{Percussion staves} use note head styles of their own that are
4738 frequently used in contemporary music notation.
4740 Examples: @inputfileref{input/regression,note-head-style.ly} gives an
4741 overview over all available note head styles.
4744 @node Ancient accidentals
4745 @subsection Ancient accidentals
4751 Use the @code{style} property of grob @internalsref{Accidental} to
4752 select ancient accidentals. Supported styles are
4753 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
4755 @lilypond[raggedright,staffsize=26]
4763 { " " \musicglyph #"accidentals-vaticana-1"
4764 " " \musicglyph #"accidentals-vaticana0" }
4768 { " " \musicglyph #"accidentals-medicaea-1" }
4772 { " " \musicglyph #"accidentals-hufnagel-1" }
4776 { " " \musicglyph #"accidentals-mensural-1"
4777 " " \musicglyph #"accidentals-mensural1" }
4786 \remove "Bar_number_engraver"
4790 \remove "Clef_engraver"
4791 \remove "Key_engraver"
4792 \remove "Time_signature_engraver"
4793 \remove "Staff_symbol_engraver"
4794 minimumVerticalExtent = ##f
4800 As shown, not all accidentals are supported by each style. When
4801 trying to access an unsupported accidental, LilyPond will switch to a
4802 different style, as demonstrated in
4803 @inputfileref{input/test,ancient-accidentals.ly}.
4805 Similarly to local accidentals, the style of the key signature can be
4806 controlled by the @code{style} property of the
4807 @internalsref{KeySignature} grob.
4811 In this manual: @ref{Pitches}, @ref{Chromatic alterations} and
4812 @ref{Accidentals} give a general introduction into the use of
4813 accidentals. @ref{Key signature} gives a general introduction into
4814 the use of key signatures.
4816 Internals: @internalsref{KeySignature}.
4818 Examples: @inputfileref{input/test,ancient-accidentals.ly}.
4821 @subsection Ancient rests
4827 Use the @code{style} property of grob @internalsref{Rest} to select
4828 ancient accidentals. Supported styles are @code{classical},
4829 @code{neo_mensural} and @code{mensural}. @code{classical} differs
4830 from the @code{default} style only in that the quarter rest looks like
4831 a horizontally mirrored 8th rest. The @code{neo_mensural} style suits
4832 well for e.g. the incipit of a transcribed mensural piece of music.
4833 The @code{mensural} style finally mimicks the appearance of rests as
4834 in historic prints of the 16th century.
4836 The following example demonstrates the @code{neo_mensural} style:
4838 @lilypond[fragment,raggedright,verbatim]
4839 \override Rest #'style = #'neo_mensural
4840 r\longa r\breve r1 r2 r4 r8 r16
4843 There are no 32th and 64th rests specifically for the mensural or
4844 neo-mensural style. Instead, the rests from the default style will be
4845 taken. See @inputfileref{input/test,rests.ly} for a chart of all
4848 There are no rests in Gregorian Chant notation; instead, it uses
4853 In this manual: @ref{Rests} gives a general introduction into the use of rests.
4857 @subsection Ancient clefs
4863 LilyPond supports a variety of clefs, many of them ancient.
4865 The following table shows all ancient clefs that are supported via the
4866 @code{\clef} command. Some of the clefs use the same glyph, but
4867 differ only with respect to the line they are printed on. In such
4868 cases, a trailing number in the name is used to enumerate these clefs.
4869 Still, you can manually force a clef glyph to be typeset on an
4870 arbitrary line, as described in @ref{Clef}. The note printed to the
4871 right side of each clef in the example column denotes the @code{c'}
4872 with respect to that clef.
4874 @multitable @columnfractions .3 .3 .3 .1
4878 @b{Description} @tab
4879 @b{Supported Clefs} @tab
4883 @code{clefs-neo_mensural_c} @tab
4884 modern style mensural C clef @tab
4885 @code{neo_mensural_c1}, @code{neo_mensural_c2},
4886 @code{neo_mensural_c3}, @code{neo_mensural_c4} @tab
4887 @lilypond[relative,notime]
4888 \override Staff.TimeSignature #'transparent = ##t
4889 \clef "neo_mensural_c2" c
4893 @code{clefs-petrucci_c1}
4894 @code{clefs-petrucci_c2}
4895 @code{clefs-petrucci_c3}
4896 @code{clefs-petrucci_c4}
4897 @code{clefs-petrucci_c5}
4900 petrucci style mensural C clefs, for use on different stafflines
4901 (the examples shows the 2nd staffline C clef).
4911 @lilypond[relative,notime]
4912 \override Staff.TimeSignature #'transparent = ##t
4913 \clef "petrucci_c2" c
4917 @code{clefs-petrucci_f} @tab
4918 petrucci style mensural F clef @tab
4919 @code{petrucci_f} @tab
4920 @lilypond[relative,notime]
4921 \override Staff.TimeSignature #'transparent = ##t
4922 \clef "petrucci_f" c
4926 @code{clefs-petrucci_g} @tab
4927 petrucci style mensural G clef @tab
4928 @code{petrucci_g} @tab
4929 @lilypond[relative,notime]
4930 \override Staff.TimeSignature #'transparent = ##t
4931 \clef "petrucci_g" c
4935 @code{clefs-mensural_c} @tab
4936 historic style mensural C clef @tab
4937 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
4938 @code{mensural_c4} @tab
4939 @lilypond[relative,notime]
4940 \override Staff.TimeSignature #'transparent = ##t
4941 \clef "mensural_c2" c
4945 @code{clefs-mensural_f} @tab
4946 historic style mensural F clef @tab
4947 @code{mensural_f} @tab
4948 @lilypond[relative,notime]
4949 \override Staff.TimeSignature #'transparent = ##t
4950 \clef "mensural_f" c
4954 @code{clefs-mensural_g} @tab
4955 historic style mensural G clef @tab
4956 @code{mensural_g} @tab
4957 @lilypond[relative,notime]
4958 \override Staff.TimeSignature #'transparent = ##t
4959 \clef "mensural_g" c
4963 @code{clefs-vaticana_do} @tab
4964 Editio Vaticana style do clef @tab
4965 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
4966 @lilypond[relative,notime]
4967 \override Staff.StaffSymbol #'line-count = #4
4968 \override Staff.TimeSignature #'transparent = ##t
4969 \clef "vaticana_do2" c
4973 @code{clefs-vaticana_fa} @tab
4974 Editio Vaticana style fa clef @tab
4975 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
4976 @lilypond[relative,notime]
4977 \override Staff.StaffSymbol #'line-count = #4
4978 \override Staff.TimeSignature #'transparent = ##t
4979 \clef "vaticana_fa2" c
4983 @code{clefs-medicaea_do} @tab
4984 Editio Medicaea style do clef @tab
4985 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
4986 @lilypond[relative,notime]
4987 \override Staff.StaffSymbol #'line-count = #4
4988 \override Staff.TimeSignature #'transparent = ##t
4989 \clef "medicaea_do2" c
4993 @code{clefs-medicaea_fa} @tab
4994 Editio Medicaea style fa clef @tab
4995 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
4996 @lilypond[relative,notime]
4997 \override Staff.StaffSymbol #'line-count = #4
4998 \override Staff.TimeSignature #'transparent = ##t
4999 \clef "medicaea_fa2" c
5003 @code{clefs-hufnagel_do} @tab
5004 historic style hufnagel do clef @tab
5005 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
5006 @lilypond[relative,notime]
5007 \override Staff.StaffSymbol #'line-count = #4
5008 \override Staff.TimeSignature #'transparent = ##t
5009 \clef "hufnagel_do2" c
5013 @code{clefs-hufnagel_fa} @tab
5014 historic style hufnagel fa clef @tab
5015 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
5016 @lilypond[relative,notime]
5017 \override Staff.StaffSymbol #'line-count = #4
5018 \override Staff.TimeSignature #'transparent = ##t
5019 \clef "hufnagel_fa2" c
5023 @code{clefs-hufnagel_do_fa} @tab
5024 historic style hufnagel combined do/fa clef @tab
5025 @code{hufnagel_do_fa} @tab
5026 @lilypond[relative,notime]
5027 \override Staff.TimeSignature #'transparent = ##t
5028 \clef "hufnagel_do_fa" c
5033 @c --- This should go somewhere else: ---
5034 @c @item modern style percussion clef (glyph: @code{clefs-percussion})
5037 @c @code{percussion}
5039 @c @lilypond{\override Staff.TimeSignature #'transparent = ##t \clef "percussion" c'}
5041 @c @item modern style tab clef (glyph: @code{clefs-tab})
5046 @c @lilypond{\context Staff \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #6 \override Staff.TimeSignature #'transparent = ##t \clef "tab" c'}
5048 @emph{Modern style} means ``as is typeset in contemporary editions of
5049 transcribed mensural music''.
5051 @emph{Petrucci style} means ``inspired by printings published by the
5052 famous engraver Petrucci (1466-1539)''.
5054 @emph{Historic style} means ``as was typeset or written in historic
5055 editions (other than those of Petrucci)''.
5057 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
5059 Petrucci used C clefs with differently balanced left-side vertical
5060 beams, depending on which staffline it is printed.
5064 In this manual: for the percussion clef, see @ref{Percussion staves}.
5065 For the @code{TAB} clef, see @ref{Tablatures}.
5067 Internals: for modern clefs, see @ref{Clef}.
5071 The mensural g clef is temporarily mapped to the Petrucci g clef,
5072 until a new mensural g clef will have been implemented.
5077 @subsection Ancient flags
5083 Use the @code{flag-style} property of grob @internalsref{Stem} to
5084 select ancient flags. Besides the @code{default} flag style,
5085 only @code{mensural} style is supported:
5087 @lilypond[fragment,raggedright,verbatim]
5088 \override Stem #'flag-style = #'mensural
5089 \override Stem #'thickness = #1.0
5090 \override NoteHead #'style = #'mensural
5092 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
5093 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5096 Note that the innermost flare of each mensural flag always is
5097 vertically aligned with a staff line. If you do not like this
5098 behaviour, you can set the @code{adjust-if-on-staffline} property of
5099 grob @internalsref{Stem} to @code{##f}. Then, the vertical position
5100 of the end of each flare is different between notes on staff lines and
5101 notes between staff lines:
5103 @lilypond[fragment,raggedright]
5104 \override Stem #'flag-style = #'mensural
5105 \override Stem #'thickness = #1.0
5106 \override Stem #'adjust-if-on-staffline = ##f
5107 \override NoteHead #'style = #'mensural
5109 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
5110 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5113 There is no particular flag style for neo-mensural notation. Hence,
5114 when typesetting e.g. the incipit of a transcibed piece of mensural
5115 music, the default flag style should be used. There are no flags in
5116 Gregorian Chant notation.
5119 @node Ancient time signatures
5120 @subsection Ancient time signatures
5122 @cindex time signatures
5126 There is limited support for mensural time signatures. The
5127 glyphs are hard-wired to particular time fractions. In other words,
5128 to get a particular mensural signature glyph with the @code{\time n/m}
5129 command, @code{n} and @code{m} have to be chosen according to the
5135 \set Score.timing = ##f
5136 \set Score.barAlways = ##t
5137 s_\markup { "$\\backslash$time 4/4" }
5138 ^\markup { " " \musicglyph #"timesig-neo_mensural4/4" }
5140 s_\markup { "$\\backslash$time 2/2" }
5141 ^\markup { " " \musicglyph #"timesig-neo_mensural2/2" }
5143 s_\markup { "$\\backslash$time 6/4" }
5144 ^\markup { " " \musicglyph #"timesig-neo_mensural6/4" }
5146 s_\markup { "$\\backslash$time 6/8" }
5147 ^\markup { " " \musicglyph #"timesig-neo_mensural6/8" }
5149 s_\markup { "$\\backslash$time 3/2" }
5150 ^\markup { " " \musicglyph #"timesig-neo_mensural3/2" }
5152 s_\markup { "$\\backslash$time 3/4" }
5153 ^\markup { " " \musicglyph #"timesig-neo_mensural3/4" }
5155 s_\markup { "$\\backslash$time 9/4" }
5156 ^\markup { " " \musicglyph #"timesig-neo_mensural9/4" }
5158 s_\markup { "$\\backslash$time 9/8" }
5159 ^\markup { " " \musicglyph #"timesig-neo_mensural9/8" }
5161 s_\markup { "$\\backslash$time 4/8" }
5162 ^\markup { " " \musicglyph #"timesig-neo_mensural4/8" }
5164 s_\markup { "$\\backslash$time 2/4" }
5165 ^\markup { " " \musicglyph #"timesig-neo_mensural2/4" }
5173 \remove Staff_symbol_engraver
5174 \remove Clef_engraver
5175 \remove Time_signature_engraver
5181 Use the @code{style} property of grob @internalsref{TimeSignature} to
5182 select ancient time signatures. Supported styles are
5183 @code{neo_mensural} and @code{mensural}. The above table uses the
5184 @code{neo_mensural} style. This style is appropriate e.g. for the
5185 incipit of transcriptions of mensural pieces. The @code{mensural}
5186 style mimicks the look of historical printings of the 16th century.
5188 @inputfileref{input/test,time.ly} gives an overview over all available
5189 ancient and modern styles.
5193 Internals: @ref{Time signature} gives a general introduction into the use of time
5198 Mensural signature glyphs are mapped to time fractions in a
5199 hard-wired way. This mapping is sensible, but still arbitrary: given
5200 a mensural time signature, the time fraction represents a modern meter
5201 that usually will be a good choice when transcribing a mensural piece
5202 of music. For a particular piece of mensural music, however, the
5203 mapping may be unsatisfactory. In particular, the mapping assumes a
5204 fixed transcription of durations (e.g. brevis = half note in 2/2,
5205 i.e. 4:1). Some glyphs (such as the alternate glyph for 6/8 meter)
5206 are not at all accessible through the @code{\time} command.
5208 Mensural time signatures are supported typographically, but not yet
5209 musically. The internal representation of durations is
5210 based on a purely binary system; a ternary division such as 1 brevis =
5211 3 semibrevis (tempus perfectum) or 1 semibrevis = 3 minima (cum
5212 prolatione maiori) is not correctly handled: event times in ternary
5213 modes will be badly computed, resulting e.g. in horizontally
5214 misaligned note heads, and bar checks are likely to erroneously fail.
5216 The syntax and semantics of the @code{\time} command for mensural
5217 music is subject to change.
5220 @subsection Custodes
5225 A @emph{custos} (plural: @emph{custodes}; latin word for `guard') is a
5226 symbol that appears at the end of a staff. It anticipates the pitch
5227 of the first note(s) of the following line and thus helps the player
5228 or singer to manage line breaks during performance, thus enhancing
5229 readability of a score.
5231 Custodes were frequently used in music notation until the 17th
5232 century. Nowadays, they have survived only in a few particular forms
5233 of musical notation such as contemporary editions of Gregorian chant
5234 like the @emph{editio vaticana}. There are different custos glyphs
5235 used in different flavours of notational style.
5239 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
5240 @internalsref{Staff} context when declaring the @code{\paper} block,
5241 as shown in the following example:
5247 \consists Custos_engraver
5248 Custos \override #'style = #'mensural
5253 The result looks like this:
5259 \override Staff.Custos #'style = #'mensural
5266 \consists Custos_engraver
5273 The custos glyph is selected by the @code{style} property. The styles
5274 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
5275 @code{mensural}. They are demonstrated in the following fragment:
5285 { " " \musicglyph #"custodes-vaticana-u0" }
5289 { " " \musicglyph #"custodes-medicaea-u0" }
5293 { " " \musicglyph #"custodes-hufnagel-u0" }
5297 { " " \musicglyph #"custodes-mensural-u0" }
5306 \remove "Bar_number_engraver"
5310 \remove "Clef_engraver"
5311 \remove "Key_engraver"
5312 \remove "Time_signature_engraver"
5313 \remove "Staff_symbol_engraver"
5314 minimumVerticalExtent = ##f
5320 If the boolean property @code{adjust-if-on-staffline} is set to
5321 @code{#t} (which it is by default), lily typesets slightly different
5322 variants of the custos glyph, depending on whether the custos, is
5323 typeset on or between stafflines. The glyph will
5324 optically fit well into the staff, with the appendage on the right of
5325 the custos always ending at the same vertical position between two
5326 stafflines regardless of the pitch. If you set
5327 @code{adjust-if-on-staffline} to @code{#f}, then
5328 a compromise between both forms is used.
5330 Just like stems can be attached to noteheads in two directions
5331 @emph{up} and @emph{down}, each custos glyph is available with its
5332 appendage pointing either up or down. If the pitch of a custos is
5333 above a selectable position, the appendage will point downwards; if
5334 the pitch is below this position, the appendage will point upwards.
5335 Use property @code{neutral-position} to select this position. By
5336 default, it is set to @code{0}, such that the neutral position is the
5337 center of the staff. Use property @code{neutral-direction} to control
5338 what happens if a custos is typeset on the neutral position itself.
5339 By default, this property is set to @code{-1}, such that the appendage
5340 will point downwards. If set to @code{1}, the appendage will point
5341 upwards. Other values such as @code{0} are reserved for future
5342 extensions and should not be used.
5346 Internals: @internalsref{Custos}.
5348 Examples: @inputfileref{input/regression,custos.ly}.
5352 @subsection Divisiones
5358 A @emph{divisio} (plural: @emph{divisiones}; latin word for
5359 `division') is a staff context symbol that is used to structure
5360 Gregorian music into phrases and sections. The musical meaning of
5361 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
5362 can be characterized as short, medium and long pause, somewhat like
5363 @ref{Breath marks}. The @emph{finalis} sign not only marks the end of
5364 a chant, but is also frequently used within a single
5365 antiphonal/responsorial chant to mark the end of each section.
5369 To use divisiones, include the file @code{gregorian-init.ly}. It
5370 contains definitions that you can apply by just inserting
5371 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
5372 and @code{\finalis} at proper places in the input. Some editions use
5373 @emph{virgula} or @emph{caesura} instead of divisio minima.
5374 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
5377 @lilypondfile[]{divisiones.ly}
5381 @cindex @code{\virgula}
5383 @cindex @code{\caesura}
5385 @cindex @code{\divisioMinima}
5386 @code{\divisioMinima},
5387 @cindex @code{\divisioMaior}
5388 @code{\divisioMaior},
5389 @cindex @code{\divisioMaxima}
5390 @code{\divisioMaxima},
5391 @cindex @code{\finalis}
5396 In this manual: @ref{Breath marks}.
5398 Internals: @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}.
5400 Examples: @inputfileref{input/test,divisiones.ly}.
5403 @subsection Ligatures
5407 @c TODO: Should double check if I recalled things correctly when I wrote
5408 @c down the following paragraph by heart.
5410 In musical terminology, a ligature is a coherent graphical symbol that
5411 represents at least two distinct notes. Ligatures originally appeared
5412 in the manuscripts of Gregorian chant notation roughly since the 9th
5413 century as an allusion to the accent symbols of greek lyric poetry to
5414 denote ascending or descending sequences of notes. Both, the shape
5415 and the exact meaning of ligatures changed tremendously during the
5416 following centuries: In early notation, ligatures were used for
5417 monophonic tunes (Gregorian chant) and very soon denoted also the way
5418 of performance in the sense of articulation. With upcoming
5419 multiphony, the need for a metric system arised, since multiple voices
5420 of a piece have to be synchronized some way. New notation systems
5421 were invented that used the manifold shapes of ligatures to now denote
5422 rhythmical patterns (e.g. black mensural notation, mannered notation,
5423 ars nova). With the invention of the metric system of the white
5424 mensural notation, the need for ligatures to denote such patterns
5425 disappeared. Nevertheless, ligatures were still in use in the
5426 mensural system for a couple of decades until they finally disappeared
5427 during the late 16th / early 17th century. Still, ligatures have
5428 survived in contemporary editions of Gregorian chant such as the
5429 Editio Vaticana from 1905/08.
5433 Syntactically, ligatures are simply enclosed by @code{\[} and
5434 @code{\]}. Some ligature styles (such as Editio Vaticana) may need
5435 additional input syntax specific for this particular type of ligature.
5436 By default, the @internalsref{LigatureBracket} engraver just puts a
5437 square bracket above the ligature:
5439 @lilypond[raggedright,verbatim]
5441 \notes \transpose c c' {
5449 To select a specific style of ligatures, a proper ligature engraver
5450 has to be added to the @internalsref{Voice} context, as explained in
5451 the following subsections. Only white mensural ligatures
5452 are supported with certain limitations. Support for Editio Vaticana
5453 will be added in the future.
5456 * White mensural ligatures::
5457 * Gregorian square neumes ligatures::
5460 @node White mensural ligatures
5461 @subsubsection White mensural ligatures
5463 @cindex Mensural ligatures
5464 @cindex White mensural ligatures
5466 There is limited support for white mensural ligatures. The
5467 implementation is still experimental; it may output strange
5468 warnings or even crash in some cases or produce weird results on more
5473 To engrave white mensural ligatures, in the paper block the
5474 @internalsref{Mensural_ligature_engraver} has to be put into the
5475 @internalsref{Voice} context, and remove the
5476 @internalsref{Ligature_bracket_engraver}:
5482 \remove Ligature_bracket_engraver
5483 \consists Mensural_ligature_engraver
5488 There is no additional input language to describe the shape of a
5489 white mensural ligature. The shape is rather determined solely from
5490 the pitch and duration of the enclosed notes. While this approach may
5491 take a new user a while to get accustomed, it has the great advantage
5492 that the full musical information of the ligature is known internally.
5493 This is not only required for correct MIDI output, but also allows for
5494 automatic transcription of the ligatures.
5499 \set Score.timing = ##f
5500 \set Score.defaultBarType = "empty"
5501 \override NoteHead #'style = #'neo_mensural
5502 \override Staff.TimeSignature #'style = #'neo_mensural
5504 \[ g\longa c\breve a\breve f\breve d'\longa \]
5506 \[ e1 f1 a\breve g\longa \]
5508 @lilypond[raggedright]
5510 \notes \transpose c c' {
5511 \set Score.timing = ##f
5512 \set Score.defaultBarType = "empty"
5513 \override NoteHead #'style = #'neo_mensural
5514 \override Staff.TimeSignature #'style = #'neo_mensural
5516 \[ g\longa c\breve a\breve f\breve d'\longa \]
5518 \[ e1 f1 a\breve g\longa \]
5523 \remove Ligature_bracket_engraver
5524 \consists Mensural_ligature_engraver
5530 Without replacing @internalsref{Ligature_bracket_engraver} with
5531 @internalsref{Mensural_ligature_engraver}, the same music transcribes
5534 @lilypond[raggedright]
5536 \notes \transpose c c' {
5537 \set Score.timing = ##f
5538 \set Score.defaultBarType = "empty"
5539 \override NoteHead #'style = #'neo_mensural
5540 \override Staff.TimeSignature #'style = #'neo_mensural
5542 \[ g\longa c\breve a\breve f\breve d'\longa \]
5544 \[ e1 f1 a\breve g\longa \]
5550 @node Gregorian square neumes ligatures
5551 @subsubsection Gregorian square neumes ligatures
5553 @cindex Square neumes ligatures
5554 @cindex Gregorian square neumes ligatures
5556 Gregorian square neumes notation (following the style of the Editio
5557 Vaticana) is under heavy development, but not yet really usable for
5558 production purposes. Core ligatures can already be typeset, but
5559 essential issues for serious typesetting are still under development,
5560 such as (among others) horizontal alignment of multiple ligatures,
5561 lyrics alignment and proper accidentals handling. Still, this section
5562 gives a sneak preview of what Gregorian chant may look like once it
5565 The following table contains the extended neumes table of the 2nd
5566 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
5567 1983 by the monks of Solesmes.
5569 @multitable @columnfractions .4 .2 .2 .2
5572 @b{Neuma aut@*Neumarum Elementa} @tab
5573 @b{Figurae@*Rectae} @tab
5574 @b{Figurae@*Liquescentes Auctae} @tab
5575 @b{Figurae@*Liquescentes Deminutae}
5577 @c TODO: \paper block is identical in all of the below examples.
5578 @c Therefore, it should somehow be included rather than duplicated all
5581 @c why not make identifiers in ly/engraver-init.ly? --hwn
5583 @c Because it's just used to typeset plain notes without
5584 @c a staff for demonstration purposes rather than something
5585 @c special of Gregorian chant notation. --jr
5590 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.5\cm]
5591 \include "gregorian-init.ly"
5593 \notes \transpose c c' {
5596 \noBreak s^\markup {"a"} \noBreak
5598 % Punctum Inclinatum
5600 \noBreak s^\markup {"b"}
5606 \remove "Bar_number_engraver"
5610 \remove "Clef_engraver"
5611 \remove "Key_engraver"
5612 \override StaffSymbol #'transparent = ##t
5613 \remove "Time_signature_engraver"
5614 \remove "Bar_engraver"
5615 minimumVerticalExtent = ##f
5619 \remove Ligature_bracket_engraver
5620 \consists Vaticana_ligature_engraver
5621 \override NoteHead #'style = #'vaticana_punctum
5622 \override Stem #'transparent = ##t
5628 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.5\cm]
5629 \include "gregorian-init.ly"
5631 \notes \transpose c c' {
5632 % Punctum Auctum Ascendens
5633 \[ \auctum \ascendens b \]
5634 \noBreak s^\markup {"c"} \noBreak
5636 % Punctum Auctum Descendens
5637 \[ \auctum \descendens b \]
5638 \noBreak s^\markup {"d"} \noBreak
5640 % Punctum Inclinatum Auctum
5641 \[ \inclinatum \auctum b \]
5642 \noBreak s^\markup {"e"}
5648 \remove "Bar_number_engraver"
5652 \remove "Clef_engraver"
5653 \remove "Key_engraver"
5654 \override StaffSymbol #'transparent = ##t
5655 \remove "Time_signature_engraver"
5656 \remove "Bar_engraver"
5657 minimumVerticalExtent = ##f
5661 \remove Ligature_bracket_engraver
5662 \consists Vaticana_ligature_engraver
5663 \override NoteHead #'style = #'vaticana_punctum
5664 \override Stem #'transparent = ##t
5670 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5671 \include "gregorian-init.ly"
5673 \notes \transpose c c' {
5674 % Punctum Inclinatum Parvum
5675 \[ \inclinatum \deminutum b \]
5676 \noBreak s^\markup {"f"}
5682 \remove "Bar_number_engraver"
5686 \remove "Clef_engraver"
5687 \remove "Key_engraver"
5688 \override StaffSymbol #'transparent = ##t
5689 \remove "Time_signature_engraver"
5690 \remove "Bar_engraver"
5691 minimumVerticalExtent = ##f
5695 \remove Ligature_bracket_engraver
5696 \consists Vaticana_ligature_engraver
5697 \override NoteHead #'style = #'vaticana_punctum
5698 \override Stem #'transparent = ##t
5707 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5708 \include "gregorian-init.ly"
5710 \notes \transpose c c' {
5713 \noBreak s^\markup {"g"}
5719 \remove "Bar_number_engraver"
5723 \remove "Clef_engraver"
5724 \remove "Key_engraver"
5725 \override StaffSymbol #'transparent = ##t
5726 \remove "Time_signature_engraver"
5727 \remove "Bar_engraver"
5728 minimumVerticalExtent = ##f
5732 \remove Ligature_bracket_engraver
5733 \consists Vaticana_ligature_engraver
5734 \override NoteHead #'style = #'vaticana_punctum
5735 \override Stem #'transparent = ##t
5744 @code{3. Apostropha vel Stropha}
5746 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5747 \include "gregorian-init.ly"
5749 \notes \transpose c c' {
5752 \noBreak s^\markup {"h"}
5758 \remove "Bar_number_engraver"
5762 \remove "Clef_engraver"
5763 \remove "Key_engraver"
5764 \override StaffSymbol #'transparent = ##t
5765 \remove "Time_signature_engraver"
5766 \remove "Bar_engraver"
5767 minimumVerticalExtent = ##f
5771 \remove Ligature_bracket_engraver
5772 \consists Vaticana_ligature_engraver
5773 \override NoteHead #'style = #'vaticana_punctum
5774 \override Stem #'transparent = ##t
5780 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5781 \include "gregorian-init.ly"
5783 \notes \transpose c c' {
5785 \[ \stropha \auctum b \]
5786 \noBreak s^\markup {"i"}
5792 \remove "Bar_number_engraver"
5796 \remove "Clef_engraver"
5797 \remove "Key_engraver"
5798 \override StaffSymbol #'transparent = ##t
5799 \remove "Time_signature_engraver"
5800 \remove "Bar_engraver"
5801 minimumVerticalExtent = ##f
5805 \remove Ligature_bracket_engraver
5806 \consists Vaticana_ligature_engraver
5807 \override NoteHead #'style = #'vaticana_punctum
5808 \override Stem #'transparent = ##t
5818 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5819 \include "gregorian-init.ly"
5821 \notes \transpose c c' {
5824 \noBreak s^\markup {"j"}
5830 \remove "Bar_number_engraver"
5834 \remove "Clef_engraver"
5835 \remove "Key_engraver"
5836 \override StaffSymbol #'transparent = ##t
5837 \remove "Time_signature_engraver"
5838 \remove "Bar_engraver"
5839 minimumVerticalExtent = ##f
5843 \remove Ligature_bracket_engraver
5844 \consists Vaticana_ligature_engraver
5845 \override NoteHead #'style = #'vaticana_punctum
5846 \override Stem #'transparent = ##t
5855 @code{5. Clivis vel Flexa}
5857 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5858 \include "gregorian-init.ly"
5860 \notes \transpose c c' {
5869 \remove "Bar_number_engraver"
5873 \remove "Clef_engraver"
5874 \remove "Key_engraver"
5875 \override StaffSymbol #'transparent = ##t
5876 \remove "Time_signature_engraver"
5877 \remove "Bar_engraver"
5878 minimumVerticalExtent = ##f
5882 \remove Ligature_bracket_engraver
5883 \consists Vaticana_ligature_engraver
5884 \override NoteHead #'style = #'vaticana_punctum
5885 \override Stem #'transparent = ##t
5891 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.0\cm]
5892 \include "gregorian-init.ly"
5894 \notes \transpose c c' {
5895 % Clivis Aucta Descendens
5896 \[ b \flexa \auctum \descendens g \]
5897 \noBreak s^\markup {"l"} \noBreak
5899 % Clivis Aucta Ascendens
5900 \[ b \flexa \auctum \ascendens g \]
5901 \noBreak s^\markup {"m"}
5907 \remove "Bar_number_engraver"
5911 \remove "Clef_engraver"
5912 \remove "Key_engraver"
5913 \override StaffSymbol #'transparent = ##t
5914 \remove "Time_signature_engraver"
5915 \remove "Bar_engraver"
5916 minimumVerticalExtent = ##f
5920 \remove Ligature_bracket_engraver
5921 \consists Vaticana_ligature_engraver
5922 \override NoteHead #'style = #'vaticana_punctum
5923 \override Stem #'transparent = ##t
5929 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5930 \include "gregorian-init.ly"
5932 \notes \transpose c c' {
5934 \[ b \flexa \deminutum g \]
5941 \remove "Bar_number_engraver"
5945 \remove "Clef_engraver"
5946 \remove "Key_engraver"
5947 \override StaffSymbol #'transparent = ##t
5948 \remove "Time_signature_engraver"
5949 \remove "Bar_engraver"
5950 minimumVerticalExtent = ##f
5954 \remove Ligature_bracket_engraver
5955 \consists Vaticana_ligature_engraver
5956 \override NoteHead #'style = #'vaticana_punctum
5957 \override Stem #'transparent = ##t
5964 @code{6. Podatus vel Pes}
5966 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5967 \include "gregorian-init.ly"
5969 \notes \transpose c c' {
5978 \remove "Bar_number_engraver"
5982 \remove "Clef_engraver"
5983 \remove "Key_engraver"
5984 \override StaffSymbol #'transparent = ##t
5985 \remove "Time_signature_engraver"
5986 \remove "Bar_engraver"
5987 minimumVerticalExtent = ##f
5991 \remove Ligature_bracket_engraver
5992 \consists Vaticana_ligature_engraver
5993 \override NoteHead #'style = #'vaticana_punctum
5994 \override Stem #'transparent = ##t
6000 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6001 \include "gregorian-init.ly"
6003 \notes \transpose c c' {
6004 % Pes Auctus Descendens
6005 \[ g \pes \auctum \descendens b \]
6006 \noBreak s^\markup {"p"} \noBreak
6008 % Pes Auctus Ascendens
6009 \[ g \pes \auctum \ascendens b \]
6010 \noBreak s^\markup {"q"}
6016 \remove "Bar_number_engraver"
6020 \remove "Clef_engraver"
6021 \remove "Key_engraver"
6022 \override StaffSymbol #'transparent = ##t
6023 \remove "Time_signature_engraver"
6024 \remove "Bar_engraver"
6025 minimumVerticalExtent = ##f
6029 \remove Ligature_bracket_engraver
6030 \consists Vaticana_ligature_engraver
6031 \override NoteHead #'style = #'vaticana_punctum
6032 \override Stem #'transparent = ##t
6038 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6039 \include "gregorian-init.ly"
6041 \notes \transpose c c' {
6043 \[ g \pes \deminutum b \]
6050 \remove "Bar_number_engraver"
6054 \remove "Clef_engraver"
6055 \remove "Key_engraver"
6056 \override StaffSymbol #'transparent = ##t
6057 \remove "Time_signature_engraver"
6058 \remove "Bar_engraver"
6059 minimumVerticalExtent = ##f
6063 \remove Ligature_bracket_engraver
6064 \consists Vaticana_ligature_engraver
6065 \override NoteHead #'style = #'vaticana_punctum
6066 \override Stem #'transparent = ##t
6073 @code{7. Pes Quassus}
6075 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6076 \include "gregorian-init.ly"
6078 \notes \transpose c c' {
6080 \[ \oriscus g \pes \virga b \]
6087 \remove "Bar_number_engraver"
6091 \remove "Clef_engraver"
6092 \remove "Key_engraver"
6093 \override StaffSymbol #'transparent = ##t
6094 \remove "Time_signature_engraver"
6095 \remove "Bar_engraver"
6096 minimumVerticalExtent = ##f
6100 \remove Ligature_bracket_engraver
6101 \consists Vaticana_ligature_engraver
6102 \override NoteHead #'style = #'vaticana_punctum
6103 \override Stem #'transparent = ##t
6109 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6110 \include "gregorian-init.ly"
6112 \notes \transpose c c' {
6113 % Pes Quassus Auctus Descendens
6114 \[ \oriscus g \pes \auctum \descendens b \]
6121 \remove "Bar_number_engraver"
6125 \remove "Clef_engraver"
6126 \remove "Key_engraver"
6127 \override StaffSymbol #'transparent = ##t
6128 \remove "Time_signature_engraver"
6129 \remove "Bar_engraver"
6130 minimumVerticalExtent = ##f
6134 \remove Ligature_bracket_engraver
6135 \consists Vaticana_ligature_engraver
6136 \override NoteHead #'style = #'vaticana_punctum
6137 \override Stem #'transparent = ##t
6145 @code{8. Quilisma Pes}
6147 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6148 \include "gregorian-init.ly"
6150 \notes \transpose c c' {
6152 \[ \quilisma g \pes b \]
6159 \remove "Bar_number_engraver"
6163 \remove "Clef_engraver"
6164 \remove "Key_engraver"
6165 \override StaffSymbol #'transparent = ##t
6166 \remove "Time_signature_engraver"
6167 \remove "Bar_engraver"
6168 minimumVerticalExtent = ##f
6172 \remove Ligature_bracket_engraver
6173 \consists Vaticana_ligature_engraver
6174 \override NoteHead #'style = #'vaticana_punctum
6175 \override Stem #'transparent = ##t
6181 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6182 \include "gregorian-init.ly"
6184 \notes \transpose c c' {
6185 % Quilisma Pes Auctus Descendens
6186 \[ \quilisma g \pes \auctum \descendens b \]
6193 \remove "Bar_number_engraver"
6197 \remove "Clef_engraver"
6198 \remove "Key_engraver"
6199 \override StaffSymbol #'transparent = ##t
6200 \remove "Time_signature_engraver"
6201 \remove "Bar_engraver"
6202 minimumVerticalExtent = ##f
6206 \remove Ligature_bracket_engraver
6207 \consists Vaticana_ligature_engraver
6208 \override NoteHead #'style = #'vaticana_punctum
6209 \override Stem #'transparent = ##t
6217 @code{9. Podatus Initio Debilis}
6219 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6220 \include "gregorian-init.ly"
6222 \notes \transpose c c' {
6223 % Pes Initio Debilis
6224 \[ \deminutum g \pes b \]
6231 \remove "Bar_number_engraver"
6235 \remove "Clef_engraver"
6236 \remove "Key_engraver"
6237 \override StaffSymbol #'transparent = ##t
6238 \remove "Time_signature_engraver"
6239 \remove "Bar_engraver"
6240 minimumVerticalExtent = ##f
6244 \remove Ligature_bracket_engraver
6245 \consists Vaticana_ligature_engraver
6246 \override NoteHead #'style = #'vaticana_punctum
6247 \override Stem #'transparent = ##t
6253 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6254 \include "gregorian-init.ly"
6256 \notes \transpose c c' {
6257 % Pes Auctus Descendens Initio Debilis
6258 \[ \deminutum g \pes \auctum \descendens b \]
6265 \remove "Bar_number_engraver"
6269 \remove "Clef_engraver"
6270 \remove "Key_engraver"
6271 \override StaffSymbol #'transparent = ##t
6272 \remove "Time_signature_engraver"
6273 \remove "Bar_engraver"
6274 minimumVerticalExtent = ##f
6278 \remove Ligature_bracket_engraver
6279 \consists Vaticana_ligature_engraver
6280 \override NoteHead #'style = #'vaticana_punctum
6281 \override Stem #'transparent = ##t
6291 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6292 \include "gregorian-init.ly"
6294 \notes \transpose c c' {
6296 \[ a \pes b \flexa g \]
6303 \remove "Bar_number_engraver"
6307 \remove "Clef_engraver"
6308 \remove "Key_engraver"
6309 \override StaffSymbol #'transparent = ##t
6310 \remove "Time_signature_engraver"
6311 \remove "Bar_engraver"
6312 minimumVerticalExtent = ##f
6316 \remove Ligature_bracket_engraver
6317 \consists Vaticana_ligature_engraver
6318 \override NoteHead #'style = #'vaticana_punctum
6319 \override Stem #'transparent = ##t
6325 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6326 \include "gregorian-init.ly"
6328 \notes \transpose c c' {
6329 % Torculus Auctus Descendens
6330 \[ a \pes b \flexa \auctum \descendens g \]
6337 \remove "Bar_number_engraver"
6341 \remove "Clef_engraver"
6342 \remove "Key_engraver"
6343 \override StaffSymbol #'transparent = ##t
6344 \remove "Time_signature_engraver"
6345 \remove "Bar_engraver"
6346 minimumVerticalExtent = ##f
6350 \remove Ligature_bracket_engraver
6351 \consists Vaticana_ligature_engraver
6352 \override NoteHead #'style = #'vaticana_punctum
6353 \override Stem #'transparent = ##t
6359 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6360 \include "gregorian-init.ly"
6362 \notes \transpose c c' {
6363 % Torculus Deminutus
6364 \[ a \pes b \flexa \deminutum g \]
6371 \remove "Bar_number_engraver"
6375 \remove "Clef_engraver"
6376 \remove "Key_engraver"
6377 \override StaffSymbol #'transparent = ##t
6378 \remove "Time_signature_engraver"
6379 \remove "Bar_engraver"
6380 minimumVerticalExtent = ##f
6384 \remove Ligature_bracket_engraver
6385 \consists Vaticana_ligature_engraver
6386 \override NoteHead #'style = #'vaticana_punctum
6387 \override Stem #'transparent = ##t
6394 @code{11. Torculus Initio Debilis}
6396 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6397 \include "gregorian-init.ly"
6399 \notes \transpose c c' {
6400 % Torculus Initio Debilis
6401 \[ \deminutum a \pes b \flexa g \]
6408 \remove "Bar_number_engraver"
6412 \remove "Clef_engraver"
6413 \remove "Key_engraver"
6414 \override StaffSymbol #'transparent = ##t
6415 \remove "Time_signature_engraver"
6416 \remove "Bar_engraver"
6417 minimumVerticalExtent = ##f
6421 \remove Ligature_bracket_engraver
6422 \consists Vaticana_ligature_engraver
6423 \override NoteHead #'style = #'vaticana_punctum
6424 \override Stem #'transparent = ##t
6430 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6431 \include "gregorian-init.ly"
6433 \notes \transpose c c' {
6434 % Torculus Auctus Descendens Initio Debilis
6435 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6442 \remove "Bar_number_engraver"
6446 \remove "Clef_engraver"
6447 \remove "Key_engraver"
6448 \override StaffSymbol #'transparent = ##t
6449 \remove "Time_signature_engraver"
6450 \remove "Bar_engraver"
6451 minimumVerticalExtent = ##f
6455 \remove Ligature_bracket_engraver
6456 \consists Vaticana_ligature_engraver
6457 \override NoteHead #'style = #'vaticana_punctum
6458 \override Stem #'transparent = ##t
6464 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6465 \include "gregorian-init.ly"
6467 \notes \transpose c c' {
6468 % Torculus Deminutus Initio Debilis
6469 \[ \deminutum a \pes b \flexa \deminutum g \]
6476 \remove "Bar_number_engraver"
6480 \remove "Clef_engraver"
6481 \remove "Key_engraver"
6482 \override StaffSymbol #'transparent = ##t
6483 \remove "Time_signature_engraver"
6484 \remove "Bar_engraver"
6485 minimumVerticalExtent = ##f
6489 \remove Ligature_bracket_engraver
6490 \consists Vaticana_ligature_engraver
6491 \override NoteHead #'style = #'vaticana_punctum
6492 \override Stem #'transparent = ##t
6499 @code{12. Porrectus}
6501 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6502 \include "gregorian-init.ly"
6504 \notes \transpose c c' {
6506 \[ a \flexa g \pes b \]
6513 \remove "Bar_number_engraver"
6517 \remove "Clef_engraver"
6518 \remove "Key_engraver"
6519 \override StaffSymbol #'transparent = ##t
6520 \remove "Time_signature_engraver"
6521 \remove "Bar_engraver"
6522 minimumVerticalExtent = ##f
6526 \remove Ligature_bracket_engraver
6527 \consists Vaticana_ligature_engraver
6528 \override NoteHead #'style = #'vaticana_punctum
6529 \override Stem #'transparent = ##t
6535 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6536 \include "gregorian-init.ly"
6538 \notes \transpose c c' {
6539 % Porrectus Auctus Descendens
6540 \[ a \flexa g \pes \auctum \descendens b \]
6547 \remove "Bar_number_engraver"
6551 \remove "Clef_engraver"
6552 \remove "Key_engraver"
6553 \override StaffSymbol #'transparent = ##t
6554 \remove "Time_signature_engraver"
6555 \remove "Bar_engraver"
6556 minimumVerticalExtent = ##f
6560 \remove Ligature_bracket_engraver
6561 \consists Vaticana_ligature_engraver
6562 \override NoteHead #'style = #'vaticana_punctum
6563 \override Stem #'transparent = ##t
6569 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6570 \include "gregorian-init.ly"
6572 \notes \transpose c c' {
6573 % Porrectus Deminutus
6574 \[ a \flexa g \pes \deminutum b \]
6581 \remove "Bar_number_engraver"
6585 \remove "Clef_engraver"
6586 \remove "Key_engraver"
6587 \override StaffSymbol #'transparent = ##t
6588 \remove "Time_signature_engraver"
6589 \remove "Bar_engraver"
6590 minimumVerticalExtent = ##f
6594 \remove Ligature_bracket_engraver
6595 \consists Vaticana_ligature_engraver
6596 \override NoteHead #'style = #'vaticana_punctum
6597 \override Stem #'transparent = ##t
6606 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6607 \include "gregorian-init.ly"
6609 \notes \transpose c c' {
6611 \[ \virga b \inclinatum a \inclinatum g \]
6618 \remove "Bar_number_engraver"
6622 \remove "Clef_engraver"
6623 \remove "Key_engraver"
6624 \override StaffSymbol #'transparent = ##t
6625 \remove "Time_signature_engraver"
6626 \remove "Bar_engraver"
6627 minimumVerticalExtent = ##f
6631 \remove Ligature_bracket_engraver
6632 \consists Vaticana_ligature_engraver
6633 \override NoteHead #'style = #'vaticana_punctum
6634 \override Stem #'transparent = ##t
6640 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6641 \include "gregorian-init.ly"
6643 \notes \transpose c c' {
6645 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6652 \remove "Bar_number_engraver"
6656 \remove "Clef_engraver"
6657 \remove "Key_engraver"
6658 \override StaffSymbol #'transparent = ##t
6659 \remove "Time_signature_engraver"
6660 \remove "Bar_engraver"
6661 minimumVerticalExtent = ##f
6665 \remove Ligature_bracket_engraver
6666 \consists Vaticana_ligature_engraver
6667 \override NoteHead #'style = #'vaticana_punctum
6668 \override Stem #'transparent = ##t
6674 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6675 \include "gregorian-init.ly"
6677 \notes \transpose c c' {
6678 % Climacus Deminutus
6679 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6686 \remove "Bar_number_engraver"
6690 \remove "Clef_engraver"
6691 \remove "Key_engraver"
6692 \override StaffSymbol #'transparent = ##t
6693 \remove "Time_signature_engraver"
6694 \remove "Bar_engraver"
6695 minimumVerticalExtent = ##f
6699 \remove Ligature_bracket_engraver
6700 \consists Vaticana_ligature_engraver
6701 \override NoteHead #'style = #'vaticana_punctum
6702 \override Stem #'transparent = ##t
6709 @code{14. Scandicus}
6711 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6712 \include "gregorian-init.ly"
6714 \notes \transpose c c' {
6716 \[ g \pes a \virga b \]
6723 \remove "Bar_number_engraver"
6727 \remove "Clef_engraver"
6728 \remove "Key_engraver"
6729 \override StaffSymbol #'transparent = ##t
6730 \remove "Time_signature_engraver"
6731 \remove "Bar_engraver"
6732 minimumVerticalExtent = ##f
6736 \remove Ligature_bracket_engraver
6737 \consists Vaticana_ligature_engraver
6738 \override NoteHead #'style = #'vaticana_punctum
6739 \override Stem #'transparent = ##t
6745 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6746 \include "gregorian-init.ly"
6748 \notes \transpose c c' {
6749 % Scandicus Auctus Descendens
6750 \[ g \pes a \pes \auctum \descendens b \]
6757 \remove "Bar_number_engraver"
6761 \remove "Clef_engraver"
6762 \remove "Key_engraver"
6763 \override StaffSymbol #'transparent = ##t
6764 \remove "Time_signature_engraver"
6765 \remove "Bar_engraver"
6766 minimumVerticalExtent = ##f
6770 \remove Ligature_bracket_engraver
6771 \consists Vaticana_ligature_engraver
6772 \override NoteHead #'style = #'vaticana_punctum
6773 \override Stem #'transparent = ##t
6779 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6780 \include "gregorian-init.ly"
6782 \notes \transpose c c' {
6783 % Scandicus Deminutus
6784 \[ g \pes a \pes \deminutum b \]
6791 \remove "Bar_number_engraver"
6795 \remove "Clef_engraver"
6796 \remove "Key_engraver"
6797 \override StaffSymbol #'transparent = ##t
6798 \remove "Time_signature_engraver"
6799 \remove "Bar_engraver"
6800 minimumVerticalExtent = ##f
6804 \remove Ligature_bracket_engraver
6805 \consists Vaticana_ligature_engraver
6806 \override NoteHead #'style = #'vaticana_punctum
6807 \override Stem #'transparent = ##t
6816 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6817 \include "gregorian-init.ly"
6819 \notes \transpose c c' {
6821 \[ g \oriscus a \pes \virga b \]
6828 \remove "Bar_number_engraver"
6832 \remove "Clef_engraver"
6833 \remove "Key_engraver"
6834 \override StaffSymbol #'transparent = ##t
6835 \remove "Time_signature_engraver"
6836 \remove "Bar_engraver"
6837 minimumVerticalExtent = ##f
6841 \remove Ligature_bracket_engraver
6842 \consists Vaticana_ligature_engraver
6843 \override NoteHead #'style = #'vaticana_punctum
6844 \override Stem #'transparent = ##t
6850 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6851 \include "gregorian-init.ly"
6853 \notes \transpose c c' {
6854 % Salicus Auctus Descendens
6855 \[ g \oriscus a \pes \auctum \descendens b \]
6862 \remove "Bar_number_engraver"
6866 \remove "Clef_engraver"
6867 \remove "Key_engraver"
6868 \override StaffSymbol #'transparent = ##t
6869 \remove "Time_signature_engraver"
6870 \remove "Bar_engraver"
6871 minimumVerticalExtent = ##f
6875 \remove Ligature_bracket_engraver
6876 \consists Vaticana_ligature_engraver
6877 \override NoteHead #'style = #'vaticana_punctum
6878 \override Stem #'transparent = ##t
6888 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6889 \include "gregorian-init.ly"
6891 \notes \transpose c c' {
6893 \[ \stropha b \stropha b \stropha a \]
6900 \remove "Bar_number_engraver"
6904 \remove "Clef_engraver"
6905 \remove "Key_engraver"
6906 \override StaffSymbol #'transparent = ##t
6907 \remove "Time_signature_engraver"
6908 \remove "Bar_engraver"
6909 minimumVerticalExtent = ##f
6913 \remove Ligature_bracket_engraver
6914 \consists Vaticana_ligature_engraver
6915 \override NoteHead #'style = #'vaticana_punctum
6916 \override Stem #'transparent = ##t
6928 Unlike most other neumes notation systems, the input language for
6929 neumes does not necessarily reflect directly the typographical
6930 appearance, but is designed to solely focuse on musical meaning. For
6931 example, @code{\[ a \pes b \flexa g \]} produces a Torculus consisting
6932 of three Punctum heads, while @code{\[ a \flexa g \pes b \]} produces
6933 a Porrectus with a curved flexa shape and only a single Punctum head.
6934 There is no command to explicitly typeset the curved flexa shape; the
6935 decision of when to typeset a curved flexa shape is purely taken from
6936 the musical input. The idea of this approach is to separate the
6937 musical aspects of the input from the notation style of the output.
6938 This way, the same input can be reused to typeset the same music in a
6939 different style of Gregorian chant notation such as Hufnagel (also
6940 known as German gothic neumes) or Medicaea (kind of a very simple
6941 forerunner of the Editio Vaticana). As soon as Hufnagel ligature
6942 engraver and Medicaea ligature engraver will have been implemented, it
6943 will be as simple as replacing the ligature engraver in the
6944 @internalsref{Voice} context to get the desired notation style from
6947 The following table shows the code fragments that produce the
6948 ligatures in the above neumes table. The letter in the first column
6949 in each line of the below table indicates to which ligature in the
6950 above table it refers. The second column gives the name of the
6951 ligature. The third column shows the code fragment that produces this
6952 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
6954 @multitable @columnfractions .1 .4 .5
6968 Punctum Inclinatum @tab
6969 @code{\[ \inclinatum b \]}
6973 Punctum Auctum Ascendens @tab
6974 @code{\[ \auctum \ascendens b \]}
6978 Punctum Auctum Descendens @tab
6979 @code{\[ \auctum \descendens b \]}
6983 Punctum Inclinatum Auctum @tab
6984 @code{\[ \inclinatum \auctum b \]}
6988 Punctum Inclinatum Parvum @tab
6989 @code{\[ \inclinatum \deminutum b \]}
6994 @code{\[ \virga b \]}
6999 @code{\[ \stropha b \]}
7004 @code{\[ \stropha \auctum b \]}
7009 @code{\[ \oriscus b \]}
7013 Clivis vel Flexa @tab
7014 @code{\[ b \flexa g \]}
7018 Clivis Aucta Descendens @tab
7019 @code{\[ b \flexa \auctum \descendens g \]}
7023 Clivis Aucta Ascendens @tab
7024 @code{\[ b \flexa \auctum \ascendens g \]}
7029 @code{\[ b \flexa \deminutum g \]}
7033 Podatus vel Pes @tab
7034 @code{\[ g \pes b \]}
7038 Pes Auctus Descendens @tab
7039 @code{\[ g \pes \auctum \descendens b \]}
7043 Pes Auctus Ascendens @tab
7044 @code{\[ g \pes \auctum \ascendens b \]}
7049 @code{\[ g \pes \deminutum b \]}
7054 @code{\[ \oriscus g \pes \virga b \]}
7058 Pes Quassus Auctus Descendens @tab
7059 @code{\[ \oriscus g \pes \auctum \descendens b \]}
7064 @code{\[ \quilisma g \pes b \]}
7068 Quilisma Pes Auctus Descendens @tab
7069 @code{\[ \quilisma g \pes \auctum \descendens b \]}
7073 Pes Initio Debilis @tab
7074 @code{\[ \deminutum g \pes b \]}
7078 Pes Auctus Descendens Initio Debilis @tab
7079 @code{\[ \deminutum g \pes \auctum \descendens b \]}
7084 @code{\[ a \pes b \flexa g \]}
7088 Torculus Auctus Descendens @tab
7089 @code{\[ a \pes b \flexa \auctum \descendens g \]}
7093 Torculus Deminutus @tab
7094 @code{\[ a \pes b \flexa \deminutum g \]}
7098 Torculus Initio Debilis @tab
7099 @code{\[ \deminutum a \pes b \flexa g \]}
7103 Torculus Auctus Descendens Initio Debilis @tab
7104 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
7108 Torculus Deminutus Initio Debilis @tab
7109 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
7114 @code{\[ a \flexa g \pes b \]}
7118 Porrectus Auctus Descendens @tab
7119 @code{\[ a \flexa g \pes \auctum \descendens b \]}
7123 Porrectus Deminutus @tab
7124 @code{\[ a \flexa g \pes \deminutum b \]}
7129 @code{\[ \virga b \inclinatum a \inclinatum g \]}
7133 Climacus Auctus @tab
7134 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
7138 Climacus Deminutus @tab
7139 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
7144 @code{\[ g \pes a \virga b \]}
7148 Scandicus Auctus Descendens @tab
7149 @code{\[ g \pes a \pes \auctum \descendens b \]}
7153 Scandicus Deminutus @tab
7154 @code{\[ g \pes a \pes \deminutum b \]}
7159 @code{\[ g \oriscus a \pes \virga b \]}
7163 Salicus Auctus Descendens @tab
7164 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
7169 @code{\[ \stropha b \stropha b \stropha a \]}
7175 The following head prefixes are supported:
7177 @cindex @code{\virga}
7179 @cindex @code{\stropha}
7181 @cindex @code{\inclinatum}
7183 @cindex @code{\auctum}
7185 @cindex @code{\descendens}
7187 @cindex @code{\ascendens}
7189 @cindex @code{\oriscus}
7191 @cindex @code{\quilisma}
7193 @cindex @code{\deminutum}
7196 Head prefixes can be accumulated, though restrictions apply. For
7197 example, either @code{\descendens} or @code{\ascendens} can be applied
7198 to a head, but not both to the same head.
7201 @cindex @code{\flexa}
7202 Two adjacent heads can be tied together with the @code{\pes} and
7203 @code{\flexa} infix commands for a rising and falling line of melody,
7208 Trigonus: apply equal spacing, regardless of pitch.
7211 @subsection Figured bass
7213 @cindex Basso continuo
7215 @c TODO: musicological blurb about FB
7219 LilyPond has limited support for figured bass:
7221 @lilypond[verbatim,fragment]
7223 \context Voice \notes { \clef bass dis4 c d ais}
7224 \context FiguredBass
7226 < 6 >4 < 7 >8 < 6+ [_!] >
7232 The support for figured bass consists of two parts: there is an input
7233 mode, introduced by @code{\figures}, where you can enter bass figures
7234 as numbers, and there is a context called @internalsref{FiguredBass} that
7235 takes care of making @internalsref{BassFigure} objects.
7237 In figures input mode, a group of bass figures is delimited by
7238 @code{<} and @code{>}. The duration is entered after the @code{>>}:
7243 \context FiguredBass
7247 Accidentals are added when you append @code{-}, @code{!} and @code{+}
7254 \context FiguredBass
7255 \figures { <4- 6+ 7!> }
7258 Spaces or dashes may be inserted by using @code{_}. Brackets are
7259 introduced with @code{[} and @code{]}:
7265 \context FiguredBass
7266 \figures { < [4 6] 8 [_! 12]> }
7269 Although the support for figured bass may superficially resemble chord
7270 support, it works much simpler. The @code{\figures} mode simply
7271 stores the numbers , and @internalsref{FiguredBass} context prints
7272 them as entered. There is no conversion to pitches, and no
7273 realizations of the bass are played in the MIDI file.
7275 Internally, the code produces markup texts. You can use any of the
7276 markup text properties to override formatting. For example, the
7277 vertical spacing of the figures may be set with @code{baseline-skip}.
7281 Internals: @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
7282 and @internalsref{FiguredBass} context.
7286 Slash notation for alterations is not supported.
7289 @node Vaticana style contexts
7290 @subsection Vaticana style contexts
7292 @cindex VaticanaVoiceContext
7293 @cindex VaticanaStaffContext
7295 The predefined @code{VaticanaVoiceContext} and
7296 @code{VaticanaStaffContext} can be used to easily engrave a piece of
7297 Gregorian Chant in the style of the Editio Vaticana. These contexts
7298 initialize all relevant context properties and grob properties to
7299 proper values. With these contexts, you can immediately go ahead
7300 entering the chant, as the following short excerpt demonstrates:
7302 @lilypond[raggedright,verbatim,noindent]
7303 \include "gregorian-init.ly"
7306 \context VaticanaVoice = "cantus" {
7307 \override Score.BarNumber #'transparent = ##t
7309 \[ c'\melisma c' \flexa a \] \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
7310 \[ f\melisma \pes a c' c' \pes d'\melismaEnd \] c' \divisioMinima \break
7311 \[ c'\melisma c' \flexa a \] \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
7314 \lyricsto "cantus" \new Lyrics \lyrics {
7315 San- ctus, San- ctus, San- ctus
7321 @node Contemporary notation
7322 @section Contemporary notation
7324 In the 20th century, composers have greatly expanded the musical
7325 vocabulary. With this expansion, many innovations in musical notation
7326 have been tried. The book by Stone (1980) gives a comprehensive
7327 overview (see @ref{Literature list}). In general, the use of new,
7328 innovative notation makes a piece harder to understand and perform and
7329 its use should therefore be avoided if possible. For this reason,
7330 support for contemporary notation in LilyPond is limited.
7339 @subsection Clusters
7343 In musical terminology, a @emph{cluster} denotes a range of
7344 simultaneously sounding pitches that may change over time. The set of
7345 available pitches to apply usually depends on the accoustic source.
7346 Thus, in piano music, a cluster typically consists of a continous range
7347 of the semitones as provided by the piano's fixed set of a chromatic
7348 scale. In choral music, each singer of the choir typically may sing an
7349 arbitrary pitch within the cluster's range that is not bound to any
7350 diatonic, chromatic or other scale. In electronic music, a cluster
7351 (theoretically) may even cover a continuous range of pitches, thus
7352 resulting in coloured noise, such as pink noise.
7354 Clusters can be denoted in the context of ordinary staff notation by
7355 engraving simple geometrical shapes that replace ordinary notation of
7356 notes. Ordinary notes as musical events specify starting time and
7357 duration of pitches; however, the duration of a note is expressed by the
7358 shape of the note head rather than by the horizontal graphical extent of
7359 the note symbol. In contrast, the shape of a cluster geometrically
7360 describes the development of a range of pitches (vertical extent) over
7361 time (horizontal extent). Still, the geometrical shape of a cluster
7362 covers the area in wich any single pitch contained in the cluster would
7363 be notated as an ordinary note. From this point of view, it is
7364 reasonable to specify a cluster as the envelope of a set of notes.
7368 A cluster is engraved as the envelope of a set of
7369 cluster-notes. Cluster notes are created by applying the function
7370 @code{notes-to-clusters} to a sequence of chords, e.g.
7372 @lilypond[relative=1,verbatim]
7373 \apply #notes-to-clusters { <c e > <b f'> }
7376 The following example (from
7377 @inputfileref{input/regression,cluster.ly}) shows what the result
7380 @lilypondfile[]{cluster.ly}
7382 By default, @internalsref{Cluster_spanner_engraver} is in the
7383 @internalsref{Voice} context. This allows putting ordinary notes and
7384 clusters together in the same staff, even simultaneously. In such a
7385 case no attempt is made to automatically avoid collisions between
7386 ordinary notes and clusters.
7390 Internals: @internalsref{ClusterSpanner},
7391 @internalsref{ClusterSpannerBeacon},
7392 @internalsref{Cluster_spanner_engraver}, and
7393 @internalsref{ClusterNoteEvent}.
7395 Examples: @inputfileref{input/regression,cluster.ly}.
7399 Music expressions like @code{<< @{ g8 e8 @} a4 >>} are not printed
7400 accurately. Use @code{<g a>8 <e a>8} instead.
7405 @subsection Fermatas
7411 Contemporary music notation frequently uses special fermata symbols to
7412 indicate fermatas of differing lengths.
7416 The following are supported
7418 @lilypond[raggedright]
7420 << \addlyrics \notes {
7440 \context Lyrics \lyrics {
7441 "shortfermata" "fermata" "longfermata" "verylongfermata"
7446 See @ref{Articulations} for general instructions how to apply scripts
7447 such as fermatas to a @code{\notes@{@}} block.
7450 @node Special notation
7451 @section Special notation
7455 * Easy Notation note heads::
7459 @subsection Balloon help
7461 Elements of notation can be marked and named with the help of a square
7462 balloon. The primary purpose of this feature is to explain notation.
7464 The following example demonstrates its use.
7466 @lilypond[verbatim,fragment,raggedright,relative=1]
7469 #(add-balloon-text 'NoteHead "heads, or tails?"
7475 The function @code{add-balloon-text} takes the name of a grob, the
7476 label to print and where to put the label relative to the object. In
7477 the above example, the text ``heads or tails?'' ends 3 spaces below
7481 @cindex notation, explaining
7485 Internals: @internalsref{text-balloon-interface}.
7487 Examples: @inputfileref{input/regression,balloon.ly}.
7489 @node Easy Notation note heads
7490 @subsection Easy Notation note heads
7492 @cindex easy notation
7495 The `easy play' note head includes a note name inside the head. It is
7496 used in music aimed at beginners:
7498 @lilypond[raggedright,verbatim,staffsize=26]
7500 \notes { c'2 e'4 f' | g'1 }
7501 \paper { \translator { \EasyNotation } }
7505 The @code{EasyNotation} variable overrides a @internalsref{Score} @c
7506 context. To make the letters readable, it has to be printed in a
7507 large font size. To print with a larger font, see @ref{Font Size}.
7512 If you view the result with Xdvi, then staff lines may show through
7513 the letters. Printing the PostScript file obtained does produce the
7519 @section Tuning output
7521 There are situations where default layout decisions are not
7522 sufficient. In this section we discuss ways to override these
7525 Formatting is internally done by manipulating so called objects
7526 (graphic objects). Each object carries with it a set of properties
7527 (object or layout properties) specific to that object. For example, a
7528 stem object has properties that specify its direction, length and
7531 The most direct way of tuning the output is by altering the values of
7532 these properties. There are two ways of doing that: first, you can
7533 temporarily change the definition of one type of object, thus
7534 affecting a whole set of objects. Second, you can select one specific
7535 object, and set a layout property in that object.
7537 Do not confuse layout properties with translation
7538 properties. Translation properties always use a mixed caps style
7539 naming, and are manipulated using @code{\set} and @code{\unset}:
7541 \set Context.propertyName = @var{value}
7544 Layout properties are use Scheme style variable naming, i.e. lower
7545 case words separated with dashes. They are symbols, and should always
7546 be quoted using @code{#'}. For example, this could be an imaginary
7547 layout property name:
7549 #'layout-property-name
7554 The introduction of the @ref{Technical manual} gives a more in-depth
7555 treatment of the difference between translation and layout.
7559 * Constructing a tweak::
7566 @node Tuning objects
7567 @subsection Tuning objects
7569 @cindex object description
7571 The definition of an object is a list of default object
7572 properties. For example, the definition of the Stem object (available
7573 in @file{scm/define-grobs.scm}), includes the following definitions
7574 for @internalsref{Stem}:
7578 (beamed-lengths . (3.5 3.5 3.5 4.5 5.0))
7579 (Y-extent-callback . ,Stem::height)
7584 Adding variables on top of this existing definition overrides the
7585 system default, and alters the resulting appearance of the layout
7591 Changing a variable for only one object is commonly achieved with
7595 \once \override @var{context}.@var{objectname}
7596 @var{symbol} = @var{value}
7598 Here @var{symbol} is a Scheme expression of symbol type, @var{context}
7599 and @var{objectname} is a string and @var{value} is a Scheme expression.
7600 This command applies a setting only during one moment in the score.
7602 In the following example, only one @internalsref{Stem} object is
7603 changed from its original setting:
7605 @lilypond[verbatim,fragment,relative=1]
7607 \once \override Voice.Stem #'thickness = #4
7611 @cindex @code{\once}
7613 For changing more objects, the same command, without @code{\once} can
7616 \override @var{context}.@var{objectname} @var{symbol} = @var{value}
7618 This command adds @code{@var{symbol} = @var{value}} to the definition
7619 of @var{objectname} in the context @var{context}, and this definition
7620 stays in place until it is removed.
7622 An existing definition may be removed by the following command:
7625 \property @var{context}.@var{objectname} \revert @var{symbol}
7630 @lilypond[verbatim,quote]
7631 c'4 \override Stem #'thickness = #4.0
7633 c'4 \revert Stem #'thickness
7637 The following example gives exactly the same result as the previous
7638 one (assuming the system default for stem thickness is 1.3):
7640 @lilypond[verbatim,quote]
7641 c'4 \override Stem #'thickness = #4.0
7643 c'4 \override Stem #'thickness = #1.3
7647 Reverting a setting which was not set in the first place has no
7653 Internals: @internalsref{OverrideProperty}, @internalsref{RevertProperty},
7654 @internalsref{PropertySet}, @internalsref{All-backend-properties}, and
7655 @internalsref{All-layout-objects}.
7660 The backend is not very strict in type-checking object properties.
7661 Cyclic references in Scheme values for properties can cause hangs
7665 * Constructing a tweak::
7671 @node Constructing a tweak
7672 @subsection Constructing a tweak
7675 @cindex internal documentation
7676 @cindex finding graphical objects
7677 @cindex graphical object descriptions
7679 @cindex @code{\override}
7681 @cindex internal documentation
7685 Three pieces of information are required to use @code{\override} and
7686 @code{\set}: the name of the layout object, the context and the name
7687 of the property. We demonstrate how to glean this information from
7688 the notation manual and the generated documentation.
7690 The generated documentation is a set of HTML pages which should be
7691 included if you installed a binary distribution, typically in
7692 @file{/usr/share/doc/lilypond}. They are also available on the web:
7693 go to the @uref{http://lilypond.org,LilyPond website}, click
7694 ``Documentation'', select the correct version, and click then
7695 ``Program reference.'' It is advisable to bookmark the local HTML
7696 files. They will load faster than the ones on the web. If you use the
7697 version from the web, you must check whether the documentation matches
7698 the program version: it is generated from the definitions that the
7699 program uses, and therefore it is strongly tied to the LilyPond
7703 @c [TODO: revise for new site.]
7705 Suppose we want to move the fingering indication in the fragment below:
7707 @lilypond[relative=2,verbatim]
7713 If you visit the documentation of @code{Fingering} (in @ref{Fingering
7714 instructions}), you will notice that there is written:
7719 Internals: @internalsref{FingerEvent} and @internalsref{Fingering}.
7726 In other words, the fingerings once entered, are internally stored as
7727 @code{FingerEvent} music objects. When printed, a @code{Fingering}
7728 layout object is created for every @code{FingerEvent}.
7730 The Fingering object has a number of different functions, and each of
7731 those is captured in an interface. The interfaces are listed under
7732 @internalsref{Fingering} in the program reference.
7736 The @code{Fingering} object has a fixed size
7737 (@internalsref{item-interface}), the symbol is a piece of text
7738 (@internalsref{text-interface}), whose font can be set
7739 (@internalsref{font-interface}). It is centered horizontally
7740 (@internalsref{self-alignment-interface}), it is placed next to other
7741 objects (@internalsref{side-position-interface}) vertically, and its
7742 placement is coordinated with other scripts
7743 (@internalsref{text-script-interface}). It also has the standard
7744 @internalsref{grob-interface} (grob stands for Graphical object)
7746 @cindex graphical object
7747 @cindex layout object
7748 @cindex object, layout
7749 with all the variables that come with
7750 it. Finally, it denotes a fingering instruction, so it has
7751 @internalsref{finger-interface}.
7753 For the vertical placement, we have to look under
7754 @code{side-position-interface}:
7756 @code{side-position-interface}
7758 Position a victim object (this one) next to other objects (the
7759 support). In this case, the property @code{direction} signifies where to put the
7760 victim object relative to the support (left or right, up or down?)
7765 below this description, the variable @code{padding} is described as
7769 (dimension, in staff space)
7771 add this much extra space between objects that are next to each
7772 other. Default value: @code{0.6}
7776 By increasing the value of @code{padding}, we can move away the
7777 fingering. The following command inserts 3 staff spaces of white
7778 between the note and the fingering:
7780 \once \override Fingering #'padding = #3
7783 Inserting this command before the Fingering object is created,
7784 i.e. before @code{c2}, yields the following result:
7786 @lilypond[relative=2,fragment,verbatim]
7787 \once \override Fingering
7794 The context name @code{Voice} in the example above can be determined
7795 as follows. In the documentation for @internalsref{Fingering}, it says
7797 Fingering grobs are created by: @internalsref{Fingering_engraver} @c
7800 Clicking @code{Fingering_engraver} shows the documentation of
7801 the module responsible for interpreting the fingering instructions and
7802 translating them to a @code{Fingering} object. Such a module is called
7803 an @emph{engraver}. The documentation of the @code{Fingering_engraver}
7806 Fingering_engraver is part of contexts: Voice
7808 so tuning the settings for Fingering should be done with
7810 \override Fingering @dots{}
7813 Of course, the tweak may also done in a larger context than
7814 @code{Voice}, for example, @internalsref{Staff} or
7815 @internalsref{Score}.
7819 Internals: the program reference also contains alphabetical lists of
7820 @internalsref{Contexts}, @internalsref{All-layout-objects} and
7821 @internalsref{Music-expressions}, so you can also find which objects
7822 to tweak by browsing the internals document.
7826 @subsection Applyoutput
7828 The most versatile way of tuning an object is @code{\applyoutput}. Its
7831 \applyoutput @var{proc}
7835 where @var{proc} is a Scheme function, taking three arguments.
7837 When interpreted, the function @var{proc} is called for every layout
7838 object found in the context, with the following arguments:
7840 @item the layout object itself,
7841 @item the context where the layout object was created, and
7842 @item the context where @code{\applyoutput} is processed.
7846 In addition, the cause of the layout object, i.e. the music
7847 expression or object that was responsible for creating it, is in the
7848 object property @code{cause}. For example, for a note head, this is a
7849 @internalsref{NoteHead} event, and for a @internalsref{Stem} object,
7850 this is a @internalsref{NoteHead} object.
7852 Here is a simple example of @code{\applyoutput}; it blanks note-heads on the
7855 (define (blanker grob grob-origin context)
7856 (if (and (memq (ly:grob-property grob 'interfaces)
7857 note-head-interface)
7858 (eq? (ly:grob-property grob 'staff-position) 0))
7860 (ly:grob-set-property! grob 'transparent #t)))
7865 @node Font selection
7866 @subsection Font selection
7868 The most common thing to change about the appearance of fonts is their
7869 size. The font size of any context can be easily changed by setting
7870 the @code{fontSize} property for that context. Its value is a number:
7871 negative numbers make the font smaller, positive numbers larger. An
7872 example is given below:
7874 @lilypond[fragment,relative=1,verbatim,quote]
7875 c4 c4 \set fontSize = #-1
7878 This command will set @code{font-size} (see below), and does
7879 not change the size of variable symbols, such as beams or slurs.
7881 One of the uses of @code{fontSize} is to get smaller symbols for cue
7882 notes. An elaborate example of those is in
7883 @inputfileref{input/test,cue-notes.ly}.
7885 @cindex magnification
7888 The font used for printing a object can be selected by setting
7889 @code{font-name}, e.g.
7891 \override Staff.TimeSignature
7892 #'font-name = #"cmr17"
7896 Any font can be used, as long as it is available to @TeX{}. Possible
7897 fonts include foreign fonts or fonts that do not belong to the
7898 Computer Modern font family. The size of fonts selected in this way
7899 can be changed with the @code{font-magnification} property. For
7900 example, @code{2.0} blows up all letters by a factor 2 in both
7904 @cindex font magnification
7906 Font selection for the standard fonts, @TeX{}'s Computer Modern fonts,
7907 can also be adjusted with a more fine-grained mechanism. By setting
7908 the object properties described below, you can select a different font;
7909 all three mechanisms work for every object that supports
7910 @code{font-interface}:
7915 is a symbol indicating the general class of the typeface. Supported are
7916 @code{roman} (Computer Modern), @code{braces} (for piano staff
7917 braces), @code{music} (the standard music font, including ancient
7918 glyphs), @code{dynamic} (for dynamic signs) and @code{typewriter}.
7921 is a symbol indicating the shape of the font, there are typically several
7922 font shapes available for each font family. Choices are @code{italic},
7923 @code{caps} and @code{upright}.
7926 is a symbol indicating the series of the font. There are typically several
7927 font series for each font family and shape. Choices are @code{medium}
7932 For any of these properties, the value @code{*} (i.e. the symbol
7933 @code{*}, entered as @code{#'*}), acts as a wildcard. This can be used
7934 to override default setting, which are always present. For example:
7936 \override Lyrics .LyricText #'font-series = #'bold
7937 \override Lyrics .LyricText #'font-family = #'typewriter
7938 \override Lyrics .LyricText #'font-shape = #'*
7941 @cindex @code{font-style}
7943 The font size is set by modifying the @code{font-size} property. Its
7944 value is a number indicating the size relative to the standard size.
7945 Each step up is an increase of approximately 12% of the font size. Six
7946 steps is exactly a factor two. The Scheme function @code{magstep}
7947 converts a @code{font-size} number to a scaling factor.
7949 LilyPond has fonts in different design sizes: the music fonts for
7950 smaller sizes are chubbier, while the text fonts are relatively wider.
7951 Font size changes are achieved by scaling the design size that is
7952 closest to the desired size.
7954 The @code{font-size} mechanism does not work for fonts selected
7955 through @code{font-name}. These may be scaled with
7956 @code{font-magnification}.
7960 The following commands set @code{fontSize} for the current voice.
7962 @cindex @code{\tiny}
7964 @cindex @code{\small}
7966 @cindex @code{\normalsize}
7971 Init files: @file{ly/declarations-init.ly} contains hints how new
7972 fonts may be added to LilyPond.
7976 There is no style sheet provided for other fonts besides the @TeX{}
7977 Computer Modern family.
7979 @cindex font selection
7980 @cindex font magnification
7981 @cindex @code{font-interface}
7985 @section Text markup
7990 @cindex typeset text
7992 LilyPond has an internal mechanism to typeset texts. You can access it
7993 with the keyword @code{\markup}. Within markup mode, you can enter texts
7994 similar to lyrics: simply enter them, surrounded by spaces:
7997 @lilypond[verbatim,fragment,relative=1]
7998 c1^\markup { hello }
7999 c1_\markup { hi there }
8000 c1^\markup { hi \bold there, is \italic anyone home? }
8003 @cindex font switching
8005 The markup in the example demonstrates font switching commands. The
8006 command @code{\bold} and @code{\italic} only apply to the first
8007 following word; enclose a set of texts with braces to apply a command
8010 \markup @{ \bold @{ hi there @} @}
8014 For clarity, you can also do this for single arguments, e.g.
8017 \markup { is \italic { anyone } home }
8020 @cindex font size, texts
8023 In markup mode you can compose expressions, similar to mathematical
8024 expressions, XML documents and music expressions. The braces group
8025 notes into horizontal lines. Other types of lists also exist: you can
8026 stack expressions grouped with @code{<}, and @code{>} vertically with
8027 the command @code{\column}. Similarly, @code{\center} aligns texts by
8030 @lilypond[verbatim,fragment,relative=1]
8031 c1^\markup { \column < a bbbb c > }
8032 c1^\markup { \center < a bbbb c > }
8033 c1^\markup { \line < a b c > }
8037 Markups can be stored in variables, and these variables
8038 may be attached to notes, like
8040 allegro = \markup { \bold \large { Allegro } }
8041 \notes { a^\allegro b c d }
8045 Some objects have alignment procedures of their own, which cancel out
8046 any effects of alignments applied to their markup arguments as a
8047 whole. For example, the @internalsref{RehearsalMark} is horizontally
8048 centered, so using @code{\mark \markup @{ \left-align .. @}} has no
8049 effect. Similarly, whole texts over notes cannot be moved vertically
8050 with @code{\raise}. For moving and aligning complete objects, grob
8051 properties should be used.
8057 Init files: @file{scm/new-markup.scm}.
8062 Text layout is ultimately done by @TeX{}, which does kerning of
8063 letters. LilyPond does not account for kerning, so texts will be
8064 spaced slightly too wide.
8066 Syntax errors for markup mode are confusing.
8068 Markup texts cannot be used in the titling of the @code{\header}
8069 field. Titles are made by La@TeX{}, so La@TeX{} commands should be used
8075 * Overview of text markup commands::
8076 * Markup construction in scheme::
8077 * Markup command definition::
8080 @node Overview of text markup commands
8081 @subsection Overview of text markup commands
8083 @include markup-commands.tely
8085 @node Markup construction in scheme
8086 @subsection Markup construction in scheme
8088 @cindex defining markup commands
8090 The @code{markup} macro builds markup expressions in Scheme while
8091 providing a LilyPond-like syntax. For example,
8093 (markup #:column (#:line (#:bold #:italic "hello" #:raise 0.4 "world")
8094 #:bigger #:line ("foo" "bar" "baz")))
8100 \markup \column < @{ \bold \italic "hello" \raise #0.4 "world" @}
8101 \bigger @{ foo bar baz @} >
8105 This example exposes the main translation rules between regular
8106 LilyPond markup syntax and scheme markup syntax, which are summed up
8108 @multitable @columnfractions .5 .5
8109 @item @b{LilyPond} @tab @b{Scheme}
8110 @item @code{\command} @tab @code{#:command}
8111 @item @code{\variable} @tab @code{variable}
8112 @item @code{@{ ... @}} @tab @code{#:line ( ... )}
8113 @item @code{\center < ... >} @tab @code{#:center ( ... )}
8114 @item @code{string} @tab @code{"string"}
8115 @item @code{#scheme-arg} @tab @code{scheme-arg}
8118 Besides, the whole scheme language is accessible inside the
8119 @code{markup} macro: thus, one may use function calls inside
8120 @code{markup} in order to manipulate character strings for
8121 instance. This proves useful when defining new markup commands (see
8122 @ref{Markup command definition}).
8126 One can not feed the @code{#:line} (resp @code{#:center},
8127 @code{#:column}) command with a variable or the result of a function
8130 (markup #:line (fun-that-returns-markups))
8132 is illegal. One should use the @code{make-line-markup} (resp
8133 @code{make-center-markup}, @code{make-column-markup}) function
8136 (markup (make-line-markup (fun-that-returns-markups)))
8139 @node Markup command definition
8140 @subsection Markup command definition
8142 New markup commands can be defined thanks to the @code{def-markup-command} scheme macro.
8144 (def-markup-command (@var{command-name} @var{paper} @var{props} @var{arg1} @var{arg2} ...)
8145 (@var{arg1-type?} @var{arg2-type?} ...)
8148 @var{argi}: i@var{th} command argument
8149 @var{argi-type?}: a type predicate for the i@var{th} argument
8150 @var{paper}: the `paper' definition
8151 @var{props}: a list of alists, containing all active properties.
8154 As a simple example, we show how to add a @code{\smallcaps} command,
8155 which selects @TeX{}'s small caps font. Normally, we could select the
8156 small caps font as follows:
8159 \markup { \override #'(font-shape . caps) Text-in-caps }
8162 This selects the caps font by setting the @code{font-shape} property to
8163 @code{#'caps} for interpreting @code{Text-in-caps}.
8165 To make the above available as @code{\smallcaps} command, we have to
8166 define a function using @code{def-markup-command}. The command should
8167 take a single argument, of markup type. Therefore, the start of the
8168 definition should read
8170 (def-markup-command (smallcaps paper props argument) (markup?)
8175 What follows is the content of the command: we should interpret
8176 the @code{argument} as a markup, i.e.
8179 (interpret-markup paper @dots{} argument)
8183 This interpretation should add @code{'(font-shape . caps)} to the active
8184 properties, so we substitute the the following for the @dots{} in the
8188 (cons (list '(font-shape . caps) ) props)
8192 The variable @code{props} is a list of alists, and we prepend to it by
8193 consing a list with the extra setting.
8195 However, suppose that we are using a font that does not have a
8196 small-caps variant. In that case, we have to fake the small caps font,
8197 by setting a string in upcase, with the first letter a little larger:
8200 #(def-markup-command (smallcaps paper props str) (string?)
8201 "Print the string argument in small caps. Syntax: \\smallcaps #\"string\""
8202 (interpret-markup paper props
8205 (if (= (string-length s) 0)
8207 (markup #:large (string-upcase (substring s 0 1))
8208 #:translate (cons -0.6 0)
8209 #:tiny (string-upcase (substring s 1)))))
8210 (string-split str #\Space)))))
8213 The @code{smallcaps} command first splits its string argument into
8214 tokens separated by spaces (@code{(string-split str #\Space)}); for
8215 each token, a markup is built with the first letter made large and
8216 upcased (@code{#:large (string-upcase (substring s 0 1))}), and a
8217 second markup built with the following letters made tiny and upcased
8218 (@code{#:tiny (string-upcase (substring s 1))}). As LilyPond
8219 introduces a space between markups on a line, the second markup is
8220 translated to the left (@code{#:translate (cons -0.6 0) ...}). Then,
8221 the markups built for each token are put in a line
8222 (@code{(make-line-markup ...)}). Finally, the resulting markup is
8223 passed to the @code{interpret-markup} function, with the @code{paper}
8224 and @code{props} arguments.
8226 Finally, suppose that we are typesetting a recitative in an opera, and
8227 we would like to define a command that will show character names in a
8228 custom manner. Names should be printed with small caps and translated a
8229 bit to the left and top. We will define a @code{\character} command
8230 that takes into account the needed translation, and uses the newly
8231 defined @code{\smallcaps} command:
8234 #(def-markup-command (character paper props name) (string?)
8235 "Print the character name in small caps, translated to the left and
8236 top. Syntax: \\character #\"name\""
8237 (interpret-markup paper props
8238 (markup "" #:translate (cons -4 2) #:smallcaps name)))
8241 There is one complication that needs explanation: texts above and below
8242 the staff are moved vertically to be at a certain distance (the
8243 @code{padding} property) from the staff and the notes. To make sure
8244 that this mechanism does not annihilate the vertical effect of our
8245 @code{#:translate}, we add an empty string (@code{""}) before the
8246 translated text. Now the @code{""} will be put above the notes, and the
8247 @code{name} is moved in relation to that empty string. The net effect is
8248 that the text is moved to the upper left.
8250 The final result is as follows:
8254 c''^\markup \character #"Cleopatra"
8255 e'^\markup \character #"Giulio Cesare"
8260 @lilypond[raggedright]
8261 #(def-markup-command (smallcaps paper props str) (string?)
8262 "Print the string argument in small caps. Syntax: \\smallcaps #\"string\""
8263 (interpret-markup paper props
8266 (if (= (string-length s) 0)
8268 (markup #:large (string-upcase (substring s 0 1))
8269 #:translate (cons -0.6 0)
8270 #:tiny (string-upcase (substring s 1)))))
8271 (string-split str #\Space)))))
8273 #(def-markup-command (character paper props name) (string?)
8274 "Print the character name in small caps, translated to the left and
8275 top. Syntax: \\character #\"name\""
8276 (interpret-markup paper props
8277 (markup "" #:translate (cons -4 0) #:smallcaps name)))
8281 c''^\markup \character #"Cleopatra"
8282 e'^\markup \character #"Giulio Cesare"
8290 @section Global layout
8292 The global layout determined by three factors: the page layout, the
8293 line breaks and the spacing. These all influence each other. The
8294 choice of spacing determines how densely each system of music is set,
8295 which influences where line breaks breaks are chosen, and thus
8296 ultimately how many pages a piece of music takes. This section
8297 explains how to tune the algorithm for spacing.
8299 Globally spoken, this procedure happens in three steps: first,
8300 flexible distances (``springs'') are chosen, based on durations. All
8301 possible line breaking combination are tried, and the one with the
8302 best results---a layout that has uniform density and requires as
8303 little stretching or cramping as possible---is chosen. When the score
8304 is processed by @TeX{}, each page is filled with systems, and page breaks
8305 are chosen whenever the page gets full.
8310 * Vertical spacing::
8311 * Horizontal spacing::
8318 @node Vertical spacing
8319 @subsection Vertical spacing
8321 @cindex vertical spacing
8322 @cindex distance between staves
8323 @cindex staff distance
8324 @cindex between staves, distance
8325 @cindex staffs per page
8326 @cindex space between staves
8328 The height of each system is determined automatically by LilyPond, to
8329 keep systems from bumping into each other, some minimum distances are
8330 set. By changing these, you can put staves closer together, and thus
8331 put more systems onto one page.
8333 Normally staves are stacked vertically. To make
8334 staves maintain a distance, their vertical size is padded. This is
8335 done with the property @code{minimumVerticalExtent}. It takes a pair
8336 of numbers, so if you want to make it smaller from its, then you could
8339 \set Staff.minimumVerticalExtent = #'(-4 . 4)
8341 This sets the vertical size of the current staff to 4 staff spaces on
8342 either side of the center staff line. The argument of
8343 @code{minimumVerticalExtent} is interpreted as an interval, where the
8344 center line is the 0, so the first number is generally negative. The
8345 staff can be made larger at the bottom by setting it to @code{(-6
8348 The piano staves are handled a little differently: to make cross-staff
8349 beaming work correctly, it is necessary that the distance between staves
8350 is fixed beforehand. This is also done with a
8351 @internalsref{VerticalAlignment} object, created in
8352 @internalsref{PianoStaff}. In this object the distance between the
8353 staves is fixed by setting @code{forced-distance}. If you want to
8354 override this, use a @code{\translator} block as follows:
8359 \override VerticalAlignment #'forced-distance = #9
8364 This would bring the staves together at a distance of 9 staff spaces,
8365 measured from the center line of each staff.
8369 Internals: Vertical alignment of staves is handled by the
8370 @internalsref{VerticalAlignment} object.
8375 @node Horizontal spacing
8376 @subsection Horizontal Spacing
8378 The spacing engine translates differences in durations into
8379 stretchable distances (``springs'') of differing lengths. Longer
8380 durations get more space, shorter durations get less. The shortest
8381 durations get a fixed amount of space (which is controlled by
8382 @code{shortest-duration-space} in the @internalsref{SpacingSpanner} object).
8383 The longer the duration, the more space it gets: doubling a
8384 duration adds a fixed amount (this amount is controlled by
8385 @code{spacing-increment}) of space to the note.
8387 For example, the following piece contains lots of half, quarter and
8388 8th notes, the eighth note is followed by 1 note head width (NHW).
8389 The quarter note is followed by 2 NHW, the half by 3 NHW, etc.
8390 @lilypond[fragment,verbatim,relative=1] c2 c4. c8 c4. c8 c4. c8 c8
8394 Normally, @code{shortest-duration-space} is set to 1.2, which is the
8395 width of a note head, and @code{shortest-duration-space} is set to
8396 2.0, meaning that the shortest note gets 2 NHW (i.e. 2 times
8397 @code{shortest-duration-space}) of space. For normal notes, this space
8398 is always counted from the left edge of the symbol, so the shortest
8399 notes are generally followed by one NHW of space.
8401 If one would follow the above procedure exactly, then adding a single
8402 32th note to a score that uses 8th and 16th notes, would widen up the
8403 entire score a lot. The shortest note is no longer a 16th, but a 32nd,
8404 thus adding 1 NHW to every note. To prevent this, the
8405 shortest duration for spacing is not the shortest note in the score,
8406 but the most commonly found shortest note. Notes that are even
8407 shorter this are followed by a space that is proportional to their
8408 duration relative to the common shortest note. So if we were to add
8409 only a few 16th notes to the example above, they would be followed by
8412 @lilypond[fragment,verbatim,relative=2]
8413 c2 c4. c8 c4. c16[ c] c4. c8 c8 c8 c4 c4 c4
8416 The most common shortest duration is determined as follows: in every
8417 measure, the shortest duration is determined. The most common short
8418 duration, is taken as the basis for the spacing, with the stipulation
8419 that this shortest duration should always be equal to or shorter than
8420 1/8th note. The shortest duration is printed when you run lilypond
8421 with @code{--verbose}. These durations may also be customized. If you
8422 set the @code{common-shortest-duration} in
8423 @internalsref{SpacingSpanner}, then this sets the base duration for
8424 spacing. The maximum duration for this base (normally 1/8th), is set
8425 through @code{base-shortest-duration}.
8427 @cindex @code{common-shortest-duration}
8428 @cindex @code{base-shortest-duration}
8429 @cindex @code{stem-spacing-correction}
8430 @cindex @code{spacing}
8432 In the introduction it was explained that stem directions influence
8433 spacing. This is controlled with @code{stem-spacing-correction}
8434 property in @internalsref{NoteSpacing}, which are generated for every
8435 @internalsref{Voice} context. The @code{StaffSpacing} object
8436 (generated at @internalsref{Staff} context) contains the same property
8437 for controlling the stem/barline spacing. The following example
8438 shows these corrections, once with default settings, and once with
8439 exaggerated corrections:
8445 \override Staff.NoteSpacing #'stem-spacing-correction
8447 \override Staff.StaffSpacing #'stem-spacing-correction
8452 \paper { raggedright = ##t } }
8455 @cindex SpacingSpanner, overriding properties
8457 Properties of the @internalsref{SpacingSpanner} must be overridden
8458 from the @code{\paper} block, since the @internalsref{SpacingSpanner} is
8459 created before any property commands are interpreted.
8461 \paper @{ \translator @{
8463 SpacingSpanner \override #'spacing-increment = #3.0
8470 Internals: @internalsref{SpacingSpanner}, @internalsref{NoteSpacing},
8471 @internalsref{StaffSpacing}, @internalsref{SeparationItem}, and
8472 @internalsref{SeparatingGroupSpanner}.
8476 Spacing is determined on a score wide basis. If you have a score that
8477 changes its character (measured in durations) halfway during the
8478 score, the part containing the longer durations will be spaced too
8481 There is no convenient mechanism to manually override spacing.
8486 @subsection Font size
8487 @cindex font size, setting
8488 @cindex staff size, setting
8489 @cindex @code{paper} file
8491 The Feta font provides musical symbols at eight seven different
8492 sizes. Each font is tuned for a different staff size: at smaller sizes
8493 the font gets heavier, to match the relatively heavier staff lines.
8494 The recommended font sizes are listed in the following table:
8496 @multitable @columnfractions .25 .25 .25 .25
8499 @tab @b{staff height (pt)}
8500 @tab @b{staff height (mm)}
8542 @c modern rental material ?
8546 These fonts are available in any sizes. The context property
8547 @code{fontSize} and the layout property @code{staff-space} (in
8548 @internalsref{StaffSymbol}) can be used to tune size for individual
8549 staffs. The size of individual staffs are relative to the global size,
8550 which can be set in the following manner:
8553 #(set-global-staff-size 14)
8556 This sets the global default size to 14pt staff height, and scales all
8562 @subsection Line breaking
8565 @cindex breaking lines
8567 Line breaks are normally computed automatically. They are chosen such
8568 that lines look neither cramped nor loose, and that consecutive lines
8569 have similar density.
8571 Occasionally you might want to override the automatic breaks; you can
8572 do this by specifying @code{\break}. This will force a line break at
8573 this point. Line breaks can only occur at places where there are bar
8574 lines. If you want to have a line break where there is no bar line,
8575 you can force an invisible bar line by entering @code{\bar
8576 ""}. Similarly, @code{\noBreak} forbids a line break at a
8580 @cindex regular line breaks
8581 @cindex four bar music.
8583 For linebreaks at regular intervals use @code{\break} separated by
8584 skips and repeated with @code{\repeat}:
8586 << \repeat unfold 7 @{
8587 s1 \noBreak s1 \noBreak
8588 s1 \noBreak s1 \break @}
8589 @emph{the real music}
8594 This makes the following 28 measures (assuming 4/4 time) be broken every
8595 4 measures, and only there.
8599 @code{\break}, @code{\noBreak}
8600 @cindex @code{\break}
8601 @cindex @code{\noBreak}
8605 Internals: @internalsref{BreakEvent}.
8609 @subsection Page layout
8612 @cindex breaking pages
8614 @cindex @code{indent}
8615 @cindex @code{linewidth}
8617 The most basic settings influencing the spacing are @code{indent} and
8618 @code{linewidth}. They are set in the @code{\paper} block. They
8619 control the indentation of the first line of music, and the lengths of
8622 If @code{raggedright} is set to true in the @code{\paper}
8623 block, then the lines are justified at their natural length. This
8624 useful for short fragments, and for checking how tight the natural
8628 @cindex vertical spacing
8630 The page layout process happens outside the LilyPond formatting
8631 engine: variables controlling page layout are passed to the output,
8632 and are further interpreted by @code{lilypond} wrapper program. It
8633 responds to the following variables in the @code{\paper} block. The
8634 variable @code{textheight} sets the total height of the music on each
8635 page. The spacing between systems is controlled with
8636 @code{interscoreline}, its default is 16pt. The distance between the
8637 score lines will stretch in order to fill the full page
8638 @code{interscorelinefill} is set to a positive number. In that case
8639 @code{interscoreline} specifies the minimum spacing.
8641 @cindex @code{textheight}
8642 @cindex @code{interscoreline}
8643 @cindex @code{interscorelinefill}
8645 If the variable @code{lastpagefill} is defined,
8646 @c fixme: this should only be done if lastpagefill= #t
8647 systems are evenly distributed vertically on the last page. This
8648 might produce ugly results in case there are not enough systems on the
8649 last page. The @command{lilypond-book} command ignores
8650 @code{lastpagefill}. See @ref{lilypond-book manual} for more
8653 @cindex @code{lastpagefill}
8655 Page breaks are normally computed by @TeX{}, so they are not under
8656 direct control of LilyPond. However, you can insert a commands into
8657 the @file{.tex} output to instruct @TeX{} where to break pages. This
8658 is done by setting the @code{between-systems-strings} on the
8659 @internalsref{NonMusicalPaperColumn} where the system is broken.
8660 An example is shown in @inputfileref{input/regression,between-systems.ly}.
8661 The predefined command @code{\newpage} also does this.
8665 @cindex @code{papersize}
8667 To change the paper size, use the following Scheme code:
8670 #(set-paper-size "a4")
8677 @cindex @code{\newpage}
8683 In this manual: @ref{Invoking lilypond}.
8685 Examples: @inputfileref{input/regression,between-systems.ly}.
8687 Internals: @internalsref{NonMusicalPaperColumn}.
8691 LilyPond has no concept of page layout, which makes it difficult to
8692 reliably choose page breaks in longer pieces.
8701 Entered music can also be converted to MIDI output. The performance
8702 is good enough for proof-hearing the music for errors.
8704 Ties, dynamics and tempo changes are interpreted. Dynamic marks,
8705 crescendi and decrescendi translate into MIDI volume levels. Dynamic
8706 marks translate to a fixed fraction of the available MIDI volume
8707 range, crescendi and decrescendi make the volume vary linearly between
8708 their two extremities. The fractions can be adjusted by
8709 @code{dynamicAbsoluteVolumeFunction} in @internalsref{Voice} context.
8710 For each type of MIDI instrument, a volume range can be defined. This
8711 gives a basic equalizer control, which can enhance the quality of
8712 the MIDI output remarkably. The equalizer can be controlled by
8713 setting @code{instrumentEqualizer}.
8717 Many musically interesting effects, such as swing, articulation,
8718 slurring, etc., are not translated to MIDI.
8720 Since slurs are not interpreted, @code{\lyricsto} and
8721 @code{\addlyrics} sections will be interpreted wrongly.
8723 The MIDI output allocates a channel for each Staff, and one for global
8724 settings. Hence, the MIDI file should not have more than 15 staves
8725 (or 14 if you do not use drums).
8730 * MIDI instrument names::
8735 @subsection MIDI block
8739 The MIDI block is analogous to the paper block, but it is somewhat
8740 simpler. The @code{\midi} block can contain:
8744 @item a @code{\tempo} definition, and
8745 @item context definitions.
8748 Assignments in the @code{\midi} block are not allowed.
8750 A number followed by a period is interpreted as a real number, so
8751 for setting the tempo for dotted notes, an extra space should be
8752 inserted, for example:
8755 \midi @{ \tempo 4 . = 120 @}
8759 @cindex context definition
8761 Context definitions follow precisely the same syntax as within the
8762 \paper block. Translation modules for sound are called performers.
8763 The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
8766 @node MIDI instrument names
8767 @subsection MIDI instrument names
8769 @cindex instrument names
8770 @cindex @code{Staff.midiInstrument}
8772 The MIDI instrument name is set by the @code{Staff.midiInstrument}
8773 property. The instrument name should be chosen from the list in
8774 @ref{MIDI instruments}.
8778 If the selected string does not exactly match, then the default is
8779 used, which is the Grand Piano.