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 bar line 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 bar line.
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 key signature. 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} (e.g. 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
1092 happen on bar lines.
1097 of bar lines can be forced with the @code{\bar} command:
1099 @lilypond[relative=1,fragment,verbatim]
1103 The following bar types are available:
1105 @lilypond[fragment,relative,raggedright,verbatim]
1119 For allowing line breaks, there is a special command,
1123 This will insert an invisible bar line, and allow linebreaks at this
1126 In scores with many staves, a @code{\bar} command in one staff is
1127 automatically applied to all staves. The resulting bar lines are
1128 connected between different staves of a @internalsref{StaffGroup}:
1130 @lilypond[fragment,verbatim]
1131 << \context StaffGroup <<
1135 \new Staff { \clef bass c4 g e g } >>
1136 \new Staff { \clef bass c2 c2 } >>
1140 The command @code{\bar @var{bartype}} is a short cut for doing
1141 @code{\set Score.whichBar = @var{bartype}} Whenever
1142 @code{whichBar} is set to a string, a bar line of that type is
1143 created. At the start of a measure it is set to
1144 @code{defaultBarType}. The contents of @code{repeatCommands} are used
1145 to override default measure bars.
1147 Property @code{whichBar} can also be set directly, using @code{\set}
1148 or @code{\bar}. These settings take precedence over the automatic
1149 @code{whichBar} settings.
1152 @cindex repeatCommands
1153 @cindex defaultBarType
1155 You are encouraged to use @code{\repeat} for repetitions. See
1162 In this manual: @ref{Repeats}.
1165 Internals: the bar line objects that are created at
1166 @internalsref{Staff} level are called @internalsref{BarLine}, the bar
1167 lines that span staves are @internalsref{SpanBar}s.
1169 @cindex bar lines at start of system
1170 @cindex start of system
1172 The bar lines at the start of each system are
1173 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
1174 @internalsref{SystemStartBracket}. Only one of these types is created
1175 in every context, and that type is determined by the property
1176 @code{systemStartDelimiter}.
1178 Examples: @inputfileref{input/test,bar-lines.ly},
1184 The easiest way to enter fragments with more than one voice on a staff
1185 is to split chords using the separator @code{\\}. You can use it for
1186 small, short-lived voices or for single chords:
1188 @lilypond[verbatim,fragment]
1189 \context Staff \relative c'' {
1190 c4 << { f d e } \\ { b c2 } >>
1191 c4 << g' \\ b, \\ f' \\ d >>
1195 The separator causes @internalsref{Voice} contexts@footnote{Polyphonic
1196 voices are sometimes called "layers" other notation packages}
1198 to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
1199 each of these contexts, vertical direction of slurs, stems, etc. is set
1202 @cindex @code{\voiceOne}
1203 @cindex @code{\voiceFour}
1205 This can also be done by instantiating @internalsref{Voice} contexts
1206 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1207 a stem directions and horizontal shift for each part:
1210 @lilypond[raggedright,verbatim]
1212 \context Staff << \new Voice { \voiceOne cis2 b }
1213 \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
1214 \new Voice { \voiceTwo fis4~ fis4 f ~ f } >>
1218 The command @code{\oneVoice} will revert back to the normal setting.
1219 @cindex @code{\oneVoice}
1222 Normally, note heads with a different number of dots are not merged, but
1223 when the object property @code{merge-differently-dotted} is set in
1224 the @internalsref{NoteCollision} object, they are merged:
1225 @lilypond[verbatim,fragment,raggedright]
1226 \relative c'' \context Voice << {
1228 \override Staff.NoteCollision
1229 #'merge-differently-dotted = ##t
1231 } \\ { g8.[ f16] g8.[ f16] }
1235 Similarly, you can merge half note heads with eighth notes, by setting
1236 @code{merge-differently-headed}:
1237 @lilypond[fragment,relative=2,verbatim]
1240 \override Staff.NoteCollision
1241 #'merge-differently-headed = ##t
1242 c8 c4. } \\ { c2 c2 } >>
1245 LilyPond also vertically shifts rests that are opposite of a stem:
1248 @lilypond[raggedright,fragment,verbatim]
1249 \context Voice << c''4 \\ r4 >>
1257 @cindex @code{\oneVoice}
1259 @cindex @code{\voiceOne}
1261 @cindex @code{\voiceTwo}
1263 @cindex @code{\voiceThree}
1265 @cindex @code{\voiceFour}
1269 The following commands specify in what chords of the current voice
1270 should be shifted: the outer voice has @code{\shiftOff}, and the inner
1271 voices have @code{\shiftOn}, @code{\shiftOnn}, etc.
1274 @cindex @code{\shiftOn}
1276 @cindex @code{\shiftOnn}
1278 @cindex @code{\shiftOnnn}
1280 @cindex @code{\shiftOff}
1287 Internals: the objects responsible for resolving collisions are
1288 @internalsref{NoteCollision} and @internalsref{RestCollision}.
1290 Examples: See also example files
1291 @inputfileref{input/regression,collision-dots.ly},
1292 @inputfileref{input/regression,collision-head-chords.ly},
1293 @inputfileref{input/regression,collision-heads.ly},
1294 @inputfileref{input/regression,collision-mesh.ly}, and
1295 @inputfileref{input/regression,collisions.ly}.
1300 Resolving collisions is a intricate subject, and only a few situations
1301 are handled. When LilyPond cannot cope, the @code{force-hshift}
1302 property of the @internalsref{NoteColumn} object and pitched rests can
1303 be used to override typesetting decisions.
1305 When using @code{merge-differently-headed} with an upstem 8th or a shorter
1306 note, and a downstem half note, the 8th note gets the wrong offset.
1308 There is no support for clusters where the same note occurs with
1309 different accidentals in the same chord. In this case, it is
1310 recommended to use enharmonic transcription, or to use special cluster
1311 notation (see @ref{Clusters}).
1316 Beams are used to group short notes into chunks that are aligned with
1317 the metrum. They are inserted automatically in most cases:
1319 @lilypond[fragment,verbatim,relative=2]
1320 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1323 When these automatic decisions are not good enough, beaming can be
1324 entered explicitly. It is also possible to define beaming patterns
1325 that differ from the defaults.
1327 Individual notes may be marked with @code{\noBeam}, to prevent them
1330 @lilypond[fragment,verbatim,relative=2]
1331 \time 2/4 c8 c\noBeam c c
1337 Internals: @internalsref{Beam}.
1340 @cindex Automatic beams
1343 * Setting automatic beam behavior::
1347 @subsection Manual beams
1348 @cindex beams, manual
1352 In some cases it may be necessary to override the automatic beaming
1353 algorithm. For example, the auto beamer will not put beams over rests
1354 or bar lines. Such beams are specified by manually: the begin and end
1355 point are marked with @code{[} and @code{]}:
1357 @lilypond[fragment,relative,verbatim]
1359 r4 r8[ g' a r8] r8 g[ | a] r8
1363 @cindex @code{stemLeftBeamCount}
1365 Normally, beaming patterns within a beam are determined automatically.
1366 When this mechanism fouls up, the properties
1367 @code{stemLeftBeamCount} and @code{stemRightBeamCount} can
1368 be used to control the beam subdivision on a stem. If either property
1369 is set, its value will be used only once, and then it is erased:
1371 @lilypond[fragment,relative,verbatim]
1374 f8[ r16 \set stemLeftBeamCount = #1 f g a]
1377 @cindex @code{stemRightBeamCount}
1380 The property @code{subdivideBeams} can be set in order to subdivide
1381 all 16th or shorter beams at beat positions, as defined by the
1382 @code{beatLength} property. This accomplishes the same effect as
1383 twiddling with @code{stemLeftBeamCount} and @code{stemRightBeamCount},
1384 but it take less typing:
1387 @lilypond[relative=1,verbatim,noindent]
1389 \set subdivideBeams = ##t
1391 \set Score.beatLength = #(ly:make-moment 1 8)
1394 @cindex subdivideBeams
1396 Kneed beams are inserted automatically, when a large gap is detected
1397 between the note heads. This behavior can be tuned through the object
1398 property @code{auto-knee-gap}.
1400 Normally, line breaks are forbidden when beams cross bar lines. This
1401 behavior can be changed by setting @code{allowBeamBreak}.
1403 @cindex @code{allowBeamBreak}
1404 @cindex beams and line breaks
1406 @cindex beams, kneed
1408 @cindex auto-knee-gap
1414 @cindex Frenched staves
1416 Automatically kneed beams cannot be used together with hidden staves.
1421 @node Setting automatic beam behavior
1422 @subsection Setting automatic beam behavior
1424 @cindex @code{autoBeamSettings}
1425 @cindex @code{(end * * * *)}
1426 @cindex @code{(begin * * * *)}
1427 @cindex automatic beams, tuning
1428 @cindex tuning automatic beaming
1430 @c [TODO: use \applycontext]
1432 In normal time signatures, automatic beams can start on any note but can
1433 only end in a few positions within the measure: beams can end on a beat,
1434 or at durations specified by the properties in
1435 @code{autoBeamSettings}. The defaults for @code{autoBeamSettings}
1436 are defined in @file{scm/auto-beam.scm}.
1438 The value of @code{autoBeamSettings} is changed with two functions:
1440 #(override-auto-beam-setting
1441 '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b}
1443 #(revert-auto-beam-setting '(@var{be} @var{p} @var{q} @var{n} @var{m}))
1445 Here, @var{be} is the symbol @code{begin} or @code{end}. It determines
1446 whether the rule applies to begin or end-points. The quantity
1447 @var{p}/@var{q} refers to the length of the beamed notes (and `@code{*
1448 *}' designates notes of any length), @var{n}/@var{M} refers to a time
1449 signature (wildcards `@code{* *}' may be entered to designate all time
1450 signatures), @var{a}/@var{b} is a duration. By default, this command
1451 changes settings for the current voice. It is also possible to adjust
1452 settings at higher contexts, by adding a @var{context} argument.
1454 For example, if automatic beams should end on every quarter note, use
1457 #(override-auto-beam-setting '(end * * * *) 1 4)
1459 Since the duration of a quarter note is 1/4 of a whole note, it is
1460 entered as @code{(ly:make-moment 1 4)}.
1462 The same syntax can be used to specify beam starting points. In this
1463 example, automatic beams can only end on a dotted quarter note:
1465 #(override-auto-beam-setting '(end * * * *) 3 8)
1467 In 4/4 time signature, this means that automatic beams could end only on
1468 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1469 3/8, has passed within the measure).
1471 Rules can also be restricted to specific time signatures. A rule that
1472 should only be applied in @var{N}/@var{M} time signature is formed by
1473 replacing the second asterisks by @var{N} and @var{M}. For example, a
1474 rule for 6/8 time exclusively looks like
1476 #(override-auto-beam-setting '(begin * * 6 8) @dots{})
1479 If a rule should be to applied only to certain types of beams, use the
1480 first pair of asterisks. Beams are classified according to the
1481 shortest note they contain. For a beam ending rule that only applies
1482 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1485 If a score ends while an automatic beam has not been ended and is still
1486 accepting notes, this last beam will not be typeset at all.
1488 @cindex automatic beam generation
1490 @cindex @code{autoBeaming}
1493 For melodies that have lyrics, you may want to switch off
1494 automatic beaming. This is done by setting @code{autoBeaming} to
1499 @cindex @code{\autoBeamOff}
1500 @code{\autoBeamOff},
1501 @cindex @code{\autoBeamOn}
1507 The rules for ending a beam depend on the shortest note in a beam.
1508 So, while it is possible to have different ending rules for eight
1509 beams and sixteenth beams, a beam that contains both eight and
1510 sixteenth notes will use the rules for the sixteenth beam.
1512 In the example below, the auto beamer makes eight beams and sixteenth
1513 end at 3 eights; the third beam can only be corrected by specifying
1516 @lilypond[raggedright,fragment,relative,noverbatim,quote]
1517 #(override-auto-beam-setting '(end * * * *) 3 8)
1518 % rather show case where it goes wrong
1519 %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
1520 \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
1522 It is not possible to specify beaming parameters that act differently in
1523 different parts of a measure. This means that it is not possible to use
1524 automatic beaming in irregular meters such as @code{5/8}.
1527 @section Accidentals
1530 This section describes how to change the way that accidentals are
1531 inserted automatically before the running notes.
1535 * Using the predefined accidental variables::
1536 * Customized accidental rules::
1539 @node Using the predefined accidental variables
1540 @subsection Using the predefined accidental variables
1543 Common rules for typesetting macros have been canned in a
1544 function. This function is called as follows:
1546 @cindex @code{set-accidental-style}
1548 #(set-accidental-style 'modern 'Voice)
1551 The function takes two arguments: a symbol that denotes the style (in
1552 the example, @code{modern}), and another symbol that denotes the
1553 context name (in this example, @code{Staff}). If no context name is
1554 supplied, @code{Staff} is the default.
1556 The following styles are supported:
1559 This is the default typesetting behavior. It should correspond
1560 to 18th century common practice: Accidentals are
1561 remembered to the end of the measure in which they occur and
1562 only on their own octave.
1566 The normal behavior is to remember the accidentals on
1567 Staff-level. This variable, however, typesets accidentals
1568 individually for each voice. Apart from that, the rule is similar to
1571 This leads to some weird and often unwanted results
1572 because accidentals from one voice do not get canceled in other
1574 @lilypond[raggedright,relative,fragment,verbatim,quote]
1576 #(set-accidental-style 'voice)
1582 Hence you should only use @code{voice} if the voices
1583 are to be read solely by individual musicians. If the staff is to be
1584 used by one musician (e.g. a conductor) then you use
1585 @code{modern} or @code{modern-cautionary}
1589 @cindex @code{modern} style accidentals
1590 This rule corresponds to the common practice in the 20th
1592 This rule prints the same accidentals as @code{default}, but temporary
1593 accidentals also are canceled in other octaves. Furthermore,
1594 in the same octave, they also get canceled in the following
1597 @lilypond[raggedright,fragment,verbatim]
1598 #(set-accidental-style 'modern)
1599 cis' c'' cis'2 | c'' c'
1602 @item @code{modern-cautionary}
1603 @cindex @code{modern-cautionary}
1604 This rule is similar to @code{modern}, but the
1605 ``extra'' accidentals (the ones not typeset by
1606 @code{default}) are typeset as cautionary accidentals.
1607 They are printed in reduced size or with parentheses:
1608 @lilypond[raggedright,fragment,verbatim]
1609 #(set-accidental-style 'modern-cautionary)
1610 cis' c'' cis'2 | c'' c'
1613 @cindex @code{modern-voice}
1615 is used for multivoice accidentals to be read both by musicians
1616 playing one voice and musicians playing all voices. Accidentals are
1617 typeset for each voice, but they @emph{are} cancelled across voices in
1618 the same @internalsref{Staff}.
1620 @cindex @code{modern-voice-cautionary}
1621 @item modern-voice-cautionary
1622 is the same as @code{modern-voice}, but with the extra
1623 accidentals (the ones not typeset by @code{voice}) typeset
1624 as cautionaries. Even though all accidentals typeset by
1625 @code{default} @emph{are} typeset by this variable then
1626 some of them are typeset as cautionaries.
1629 @cindex @code{piano} accidentals
1630 20th century practice for piano notation. Very similar to
1631 @code{modern} but accidentals also get cancelled
1632 across the staves in the same @internalsref{GrandStaff} or
1633 @internalsref{PianoStaff}.
1635 @item piano-cautionary
1636 @cindex @code{#(set-accidental-style 'piano-cautionary)}
1637 As @code{#(set-accidental-style 'piano)' , str)} but with the extra accidentals
1638 typeset as cautionaries.
1641 @cindex @code{no-reset} accidental style
1642 Same as @code{default} but with accidentals lasting
1643 ``forever'' and not only until the next measure:
1644 @lilypond[raggedright,fragment,verbatim,relative]
1645 #(set-accidental-style 'no-reset)
1650 This is sort of the opposite of @code{no-reset}: Accidentals
1651 are not remembered at all---and hence all accidentals are
1652 typeset relative to the key signature, regardless of what was
1653 before in the music:
1655 @lilypond[raggedright,fragment,verbatim,relative]
1656 #(set-accidental-style 'forget)
1657 \key d\major c4 c cis cis d d dis dis
1661 @node Customized accidental rules
1662 @subsection Customized accidental rules
1664 For determining when to print an accidental, several different rules
1665 are tried. The rule that gives the highest number of accidentals is
1666 used. Each rule consists of
1669 In which context is the rule applied. For example, if
1670 @var{context} is @internalsref{Score} then all staves share
1671 accidentals, and if @var{context} is @internalsref{Staff} then all
1672 voices in the same staff share accidentals, but staves do not.
1675 Whether the accidental changes all octaves or only the current
1676 octave. Valid choices are
1680 This is the default algorithm. Accidentals are typeset if the note changes
1681 the accidental of that note in that octave. Accidentals lasts to the end of the measure
1682 and then as many measures as specified in the value. I.e. 1 means to the end
1683 of next measure, -1 means to the end of previous measure (that is: no duration at all), etc. #t means forever.
1685 Accidentals are typeset if the note is different from
1686 the previous note on the same pitch in any octave. The value has same meaning as in
1692 Over how many barlines the accidental lasts.
1693 If @var{laziness} is @code{-1} then the accidental is forget
1694 immediately, and if @var{laziness} is @code{#t} then the accidental
1701 Internals: @internalsref{Accidental_engraver},
1702 @internalsref{Accidental}, and @internalsref{AccidentalPlacement}.
1707 Currently the simultaneous notes are considered to be entered in
1708 sequential mode. This means that in a chord the accidentals are
1709 typeset as if the notes in the chord happened once at a time - in the
1710 order in which they appear in the input file.
1712 This is only a problem when there are simultaneous notes whose
1713 accidentals depend on each other. The problem only occurs when using
1714 non-default accidentals. In the default scheme, accidentals only
1715 depend on other accidentals with the same pitch on the same staff, so
1716 no conflicts possible.
1718 This example shows two examples of the same music giving different
1719 accidentals depending on the order in which the notes occur in the
1722 @lilypond[raggedright,fragment,verbatim]
1723 \set Staff.autoAccidentals = #'( Staff (any-octave . 0) )
1724 cis'4 <c'' c'> r2 | cis'4 <c' c''> r2
1725 | <cis' c''> r | <c'' cis'> r |
1728 This problem can be solved by manually inserting @code{!} and @code{?}
1729 for the problematic notes.
1731 @node Expressive marks
1732 @section Expressive marks
1735 @c todo: should change ordering
1736 @c where to put text spanners, metronome marks,
1745 * Analysis brackets::
1747 * Fingering instructions::
1758 A slur indicates that notes are to be played bound or @emph{legato}.
1762 They are entered using parentheses:
1763 @lilypond[relative=1,fragment,verbatim,center]
1764 f( g)( a) a8 b( a4 g2 f4)
1769 @c TODO: should explain that ^( and _( set directions
1770 @c should set attachments with ^ and _ ?
1772 Slurs avoid crossing stems, and are generally attached to note heads.
1773 However, in some situations with beams, slurs may be attached to stem
1774 ends. If you want to override this layout you can do this through the
1775 object property @code{attachment} of @internalsref{Slur} in
1776 @internalsref{Voice} context. Its value is a pair of symbols, specifying
1777 the attachment type of the left and right end points:
1779 @lilypond[fragment,relative,verbatim]
1781 \override Stem #'length = #5.5
1783 \override Slur #'attachment = #'(stem . stem)
1787 If a slur would strike through a stem or beam, the slur will be moved
1788 away upward or downward. If this happens, attaching the slur to the
1789 stems might look better:
1791 @lilypond[fragment,relative,verbatim]
1794 \override Slur #'attachment = #'(stem . stem)
1801 @cindex @code{\slurUp}
1803 @cindex @code{\slurDown}
1805 @cindex @code{\slurBoth}
1807 @cindex @code{\slurDotted}
1809 @cindex @code{\slurSolid}
1814 Internals: @seeinternals{Slur}, and @internalsref{SlurEvent}.
1819 Producing nice slurs is a difficult problem, and LilyPond currently
1820 uses a simple, empiric method to produce slurs. In some cases, its
1824 @cindex Adjusting slurs
1826 @node Phrasing slurs
1827 @subsection Phrasing slurs
1829 @cindex phrasing slurs
1830 @cindex phrasing marks
1832 A phrasing slur (or phrasing mark) connects chords and is used to
1833 indicate a musical sentence. It is started using @code{\(} and @code{\)}
1836 @lilypond[fragment,verbatim,center,relative]
1837 \time 6/4 c'\( d( e) f( e) d\)
1840 Typographically, the phrasing slur behaves almost exactly like a
1841 normal slur. However, they are treated as different objects. A
1842 @code{\slurUp} will have no effect on a phrasing slur; instead, you
1843 should use @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
1844 @code{\phrasingSlurBoth}.
1846 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth}
1847 will only affect normal slurs and not phrasing slurs.
1851 @cindex @code{\phrasingSlurUp}
1852 @code{\phrasingSlurUp},
1853 @cindex @code{\phrasingSlurDown}
1854 @code{\phrasingSlurDown},
1855 @cindex @code{\phrasingSlurBoth}
1856 @code{\phrasingSlurBoth}.
1860 Internals: see also @internalsref{PhrasingSlur}, and
1861 @internalsref{PhrasingSlurEvent}.
1865 Phrasing slurs have the same limitations in their formatting as normal
1866 slurs. Putting phrasing slurs over rests leads to spurious warnings.
1869 @subsection Breath marks
1871 Breath marks are entered using @code{\breathe}:
1874 @lilypond[fragment,relative,verbatim]
1878 The glyph of the breath mark can be tweaked by overriding the
1879 @code{text} property of the @code{BreathingSign} layout object with
1880 any markup text. For example,
1881 @lilypond[fragment,verbatim,relative]
1883 \override BreathingSign #'text
1884 = #(make-musicglyph-markup "scripts-rvarcomma")
1891 Internals: @internalsref{BreathingSign},
1892 @internalsref{BreathingSignEvent}.
1894 Examples: @inputfileref{input/regression,breathing-sign.ly}.
1897 @node Metronome marks
1898 @subsection Metronome marks
1901 @cindex beats per minute
1902 @cindex metronome marking
1904 Metronome settings can be entered as follows:
1906 \tempo @var{duration} = @var{perminute}
1909 In the MIDI output, they are interpreted as a tempo change, and in the
1910 paper output, a metronome marking is printed:
1911 @cindex @code{\tempo}
1912 @lilypond[fragment,verbatim]
1918 Internals: @internalsref{MetronomeChangeEvent}.
1923 @subsection Text spanners
1924 @cindex Text spanners
1926 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
1927 are written as texts, and extended over many measures with dotted
1928 lines. You can create such texts using text spanners: attach
1929 @code{\startTextSpan} and @code{\stopTextSpan} to the
1930 start and ending note of the spanner.
1932 The string to be printed, as well as the style, is set through object
1935 @lilypond[fragment,relative,verbatim]
1937 \override TextSpanner #'direction = #-1
1938 \override TextSpanner #'edge-text = #'("rall " . "")
1939 c2\startTextSpan b c\stopTextSpan a }
1945 Internals @internalsref{TextSpanEvent},
1946 @internalsref{TextSpanner}.
1948 Examples: @inputfileref{input/regression,text-spanner.ly}.
1951 @node Analysis brackets
1952 @subsection Analysis brackets
1954 @cindex phrasing brackets
1955 @cindex musicological analysis
1956 @cindex note grouping bracket
1958 Brackets are used in musical analysis to indicate structure in musical
1959 pieces. LilyPond supports a simple form of nested horizontal brackets.
1960 To use this, add the @internalsref{Horizontal_bracket_engraver} to
1961 @internalsref{Staff} context. A bracket is started with
1962 @code{\startGroup} and closed with @code{\stopGroup}:
1964 @lilypond[raggedright,verbatim]
1965 \score { \notes \relative c'' {
1966 c4\startGroup\startGroup
1969 c4\stopGroup\stopGroup
1971 \paper { \translator {
1972 \StaffContext \consists "Horizontal_bracket_engraver"
1978 Internals: @internalsref{HorizontalBracket},
1979 @internalsref{NoteGroupingEvent}.
1981 Examples: @inputfileref{input/regression,note-group-bracket.ly}.
1985 @subsection Articulations
1986 @cindex Articulations
1988 @cindex articulations
1992 A variety of symbols can appear above and below notes to indicate
1993 different characteristics of the performance. They are added to a note
1994 by adding a dash and the character signifying the
1995 articulation. They are demonstrated here:
1997 @lilypondfile[]{script-abbreviations.ly}
1999 The meanings of these shorthands can be changed: see
2000 @file{ly/script-init.ly} for examples.
2003 The script is automatically placed, but if you need to force
2004 directions, you can use @code{_} to force them down, or @code{^} to
2006 @lilypond[fragment,verbatim]
2010 Other symbols can be added using the syntax
2011 @var{note}@code{\}@var{name}, e.g. @code{c4\fermata}. Again, they
2012 can be forced up or down using @code{^} and @code{_},
2015 @lilypond[verbatim,fragment,relative=2]
2016 c\fermata c^\fermata c_\fermata
2023 @cindex staccatissimo
2032 @cindex organ pedal marks
2041 @cindex prallmordent
2045 @cindex thumb marking
2050 @lilypondfile[]{script-chart.ly}
2055 @cindex @code{\scriptUp}
2057 @cindex @code{\scriptDown}
2059 @cindex @code{\scriptBoth}
2064 Internals: @internalsref{ScriptEvent}, and @internalsref{Script}.
2068 These note ornaments appear in the printed output but have no
2069 effect on the MIDI rendering of the music.
2072 @node Fingering instructions
2073 @subsection Fingering instructions
2077 Fingering instructions can be entered using
2079 @var{note}-@var{digit}
2081 For finger changes, use markup texts:
2083 @lilypond[verbatim,raggedright,fragment]
2084 c'4-1 c'4-2 c'4-3 c'4-4
2085 c'^\markup { \fontsize #-3 \number "2-3" }
2088 @cindex finger change
2093 You can use the thumb-script to indicate that a note should be
2094 played with the thumb (e.g. in cello music):
2096 @lilypond[verbatim,raggedright,fragment]
2097 <a' a''-3>8(_\thumb <b' b''-3>)_\thumb
2098 <c'' c'''-3>(_\thumb <d'' d'''-3>)_\thumb
2101 Fingerings for chords can also be added to individual notes
2102 of the chord by adding them after the pitches:
2103 @lilypond[verbatim,raggedright,fragment,relative=1]
2104 < c-1 e-2 g-3 b-5 > 4
2108 In this case, setting @code{fingeringOrientations} will put fingerings next
2111 @lilypond[verbatim,raggedright,fragment,relative=1]
2112 \set fingeringOrientations = #'(left down)
2113 <c-1 es-2 g-4 bes-5 > 4
2114 \set fingeringOrientations = #'(up right down)
2115 <c-1 es-2 g-4 bes-5 > 4
2118 By using single note chords, fingering instructions can be put close
2119 to note heads in monophonic music.
2123 Internals: @internalsref{FingerEvent}, and @internalsref{Fingering}.
2125 Examples: @inputfileref{input/regression,finger-chords.ly}.
2128 @subsection Text scripts
2129 @cindex Text scripts
2131 @cindex text items, non-empty
2132 @cindex non-empty texts
2134 It is possible to place arbitrary strings of text or markup text (see
2135 @ref{Text markup}) above or below notes by using a string:
2136 @code{c^"text"}. By default, these indications do not influence the
2137 note spacing, but by using the command @code{\fatText}, the widths
2138 will be taken into account:
2140 @lilypond[fragment,raggedright,verbatim] \relative c' {
2141 c4^"longtext" \fatText c4_"longlongtext" c4 }
2144 It is possible to use @TeX{} commands in the strings, but this should
2145 be avoided because the exact dimensions of the string can then no
2150 @cindex @code{\fatText}
2152 @cindex @code{\emptyText}
2157 In this manual: @ref{Text markup}.
2159 Internals: @internalsref{TextScriptEvent}, @internalsref{TextScript}.
2165 @subsection Grace notes
2168 @c should have blurb about accaciatura / appogiatura
2170 @cindex @code{\grace}
2174 Grace notes are ornaments that are written out. The most common ones
2175 are acciaccatura, which should be played as very short. It is denoted
2176 by a slurred small note with a slashed stem. The appoggiatura is a
2177 grace note that takes a fixed fraction of the main note, is and
2178 denoted as a slurred note in small print without a slash.
2179 They are entered with the commands @code{\acciaccatura} and
2180 @code{\appoggiatura}, as demonstrated in the following example:
2183 @cindex appoggiatura
2184 @cindex acciaccatura
2186 @lilypond[relative=2,verbatim,fragment]
2187 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
2188 \acciaccatura { g16[ f] } e4
2191 Both are special forms of the @code{\grace} command. By prefixing this
2192 keyword to a music expression, a new one is formed, which will be
2193 printed in a smaller font and takes up no logical time in a measure.
2194 @lilypond[relative=2,verbatim,fragment]
2196 \grace { c16[ d16] } c2 c4
2200 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
2201 @code{\grace} command does not start a slur.
2203 Internally, timing for grace notes is done using a second, `grace'
2204 time. Every point in time consists of two rational numbers: one
2205 denotes the logical time, one denotes the grace timing. The above
2206 example is shown here with timing tuples:
2208 @lilypond[raggedright]
2211 c4 \grace c16 c4 \grace {
2214 \new Lyrics \lyrics {
2217 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
2218 \markup { (\fraction 1 4 , 0 ) } 4
2220 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2221 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2223 \markup { ( \fraction 2 4 , 0 ) }
2228 The placement of grace notes is synchronized between different staves.
2229 In the following example, there are two sixteenth graces notes for
2230 every eighth grace note:
2232 @lilypond[relative=2,verbatim,fragment]
2233 << \new Staff { e4 \grace { c16[ d e f] } e4 }
2234 \new Staff { c'4 \grace { g8[ b] } c4 } >>
2239 If you want to end a note with a grace, then the standard trick
2240 is to put the grace notes after a ``space note'', e.g.
2241 @lilypond[fragment,verbatim,relative=2]
2244 { s2 \grace { c16[ d] } } >>
2250 By adjusting the duration of the skip note (here it is a half-note),
2251 the space between the main-note and the grace is adjusted.
2254 A @code{\grace} section will introduce special typesetting settings,
2255 for example, to produce smaller type, and set directions. Hence, when
2256 introducing layout tweaks, they should be inside the grace section,
2258 @lilypond[fragment,verbatim,relative=1]
2261 \override Stem #'direction = #-1
2263 \revert Stem #'direction
2270 The overrides should also be reverted inside the grace section.
2272 If the layout of grace sections must be changed throughout the music,
2273 then this can be accomplished through the function
2274 @code{add-grace-property}. The following example
2275 undefines the Stem direction grace section, so stems do not always
2280 #(add-grace-property "Voice" Stem direction '())
2286 Another option is to change the variables @code{startGraceMusic},
2287 @code{stopGraceMusic}, @code{startAccacciaturaMusic},
2288 @code{stopAccacciaturaMusic}, @code{startAppoggiaturaMusic},
2289 @code{stopAppoggiaturaMusic}. More information is in the file
2290 @file{ly/grace-init.ly}.
2295 Internals: @internalsref{GraceMusic}.
2299 A score that starts with an @code{\grace} section needs an explicit
2300 @code{\context Voice} declaration, otherwise the main note and grace
2301 note end up on different staves.
2303 Grace note synchronization can also lead to surprises. Staff notation,
2304 such as key signatures, barlines, etc. are also synchronized. Take
2305 care when you mix staves with grace notes and staves without, for example,
2307 @lilypond[relative=2,verbatim,fragment]
2308 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2309 \new Staff { c4 \bar "|:" d4 } >>
2312 Grace sections should only be used within sequential music
2313 expressions. Nesting or juxtaposing grace sections is not supported,
2314 and might produce crashes or other errors.
2318 @subsection Glissando
2321 @cindex @code{\glissando}
2323 A glissando is a smooth change in pitch. It is denoted by a line or a
2324 wavy line between two notes.
2328 A glissando line can be requested by attaching a @code{\glissando} to
2331 @lilypond[fragment,relative,verbatim]
2337 Internals: @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2342 Adding additional texts (such as @emph{gliss.}) is not supported.
2346 @subsection Dynamics
2359 @cindex @code{\ffff}
2369 Absolute dynamic marks are specified using a command after a note:
2370 @code{c4\ff}. The available dynamic marks are @code{\ppp},
2371 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2372 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2373 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}:
2375 @lilypond[verbatim,raggedright,fragment,relative]
2376 c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2382 @cindex @code{\decr}
2383 @cindex @code{\rced}
2390 A crescendo mark is started with @code{\<} and terminated with
2391 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2392 with @code{\!}. Because these marks are bound to notes, if you must
2393 use spacer notes if multiple marks during one note are needed:
2395 @lilypond[fragment,verbatim,center,quote]
2396 c''\< c''\! d''\decr e''\rced
2397 << f''1 { s4 s4\< s4\! \> s4\! } >>
2399 This may give rise to very short hairpins. Use @code{minimum-length}
2400 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2404 \override Staff.Hairpin #'minimum-length = #5
2407 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2408 is an example how to do it:
2410 @lilypond[fragment,relative=2,verbatim]
2411 c4 \cresc c4 c c c \endcresc c4
2417 You can also supply your own texts:
2418 @lilypond[fragment,relative,verbatim]
2420 \set crescendoText = \markup { \italic "cresc. poco" }
2421 \set crescendoSpanner = #'dashed-line
2431 @cindex @code{\dynamicUp}
2433 @cindex @code{\dynamicDown}
2434 @code{\dynamicDown},
2435 @cindex @code{\dynamicBoth}
2436 @code{\dynamicBoth}.
2438 @cindex direction, of dynamics
2442 Internals: @internalsref{CrescendoEvent}, @internalsref{DecrescendoEvent}, and
2443 @internalsref{AbsoluteDynamicEvent}.
2445 Dynamics are objects of @internalsref{DynamicText} and
2446 @internalsref{Hairpin}. Vertical positioning of these symbols is
2447 handled by the @internalsref{DynamicLineSpanner} object.
2449 If you want to adjust padding or vertical direction of the dynamics, you
2450 must set properties for the @internalsref{DynamicLineSpanner} object.
2458 @cindex @code{\repeat}
2461 Repetition is a central concept in music, and multiple notations exist
2462 for repetitions. In LilyPond, most of these notations can be captured
2463 in a uniform syntax. One of the advantages is that they can be
2464 rendered in MIDI accurately.
2466 The following types of repetition are supported:
2470 Repeated music is fully written (played) out. Useful for MIDI
2471 output, and entering repetitive music.
2474 This is the normal notation: Repeats are not written out, but
2475 alternative endings (voltas) are printed, left to right.
2479 Alternative endings are written stacked. This has limited use but may be
2480 used to typeset two lines of lyrics in songs with repeats, see
2481 @inputfileref{input,star-spangled-banner.ly}.
2489 Make beat or measure repeats. These look like percent signs.
2495 * Repeats and MIDI::
2496 * Manual repeat commands::
2498 * Tremolo subdivisions::
2503 @subsection Repeat syntax
2507 LilyPond has one syntactic construct for specifying different types of
2508 repeats. The syntax is
2511 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2514 If you have alternative endings, you may add
2515 @cindex @code{\alternative}
2517 \alternative @code{@{} @var{alternative1}
2519 @var{alternative3} @dots{} @code{@}}
2521 where each @var{alternative} is a music expression. If you do not
2522 give enough alternatives for all of the repeats, then the first
2523 alternative is assumed to be played more than once.
2525 Normal notation repeats are used like this:
2526 @lilypond[fragment,verbatim,relative=1]
2528 \repeat volta 2 { c4 d e f }
2529 \repeat volta 2 { f e d c }
2532 With alternative endings:
2533 @lilypond[fragment,verbatim,relative=1]
2535 \repeat volta 2 {c4 d e f}
2536 \alternative { {d2 d} {f f,} }
2540 @lilypond[fragment,verbatim,relative=1]
2543 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2544 \alternative { { g4 g g } { a | a a a a | b2. } }
2550 If you do a nested repeat like
2559 then it is ambiguous to which @code{\repeat} the @code{\alternative}
2560 belongs. This ambiguity is resolved by always having the
2561 @code{\alternative} belong to the inner @code{\repeat}. For clarity,
2562 it is advisable to use braces in such situations.
2565 @node Repeats and MIDI
2566 @subsection Repeats and MIDI
2568 @cindex expanding repeats
2570 For instructions on how to unfold repeats for MIDI output, see the
2571 example file @inputfileref{input/test,unfold-all-repeats.ly}.
2576 Timing information is not remembered at the start of an alternative,
2577 so after a repeat timing information must be reset by hand, for
2578 example by setting @code{Score.measurePosition} or entering
2579 @code{\partial}. Similarly, slurs or ties are also not repeated.
2582 @node Manual repeat commands
2583 @subsection Manual repeat commands
2585 @cindex @code{repeatCommands}
2587 The property @code{repeatCommands} can be used to control the layout of
2588 repeats. Its value is a Scheme list of repeat commands, where each repeat
2592 @item the symbol @code{start-repeat},
2593 which prints a @code{|:} bar line,
2594 @item the symbol @code{end-repeat},
2595 which prints a @code{:|} bar line,
2596 @item the list @code{(volta @var{text})},
2597 which prints a volta bracket saying @var{text}: The text can be specified as
2598 a text string or as a markup text, see @ref{Text markup}. Do not
2599 forget to change the font, as the default number font does not contain
2600 alphabetic characters. Or,
2601 @item the list @code{(volta #f)}, which
2602 stops a running volta bracket:
2605 @lilypond[verbatim,fragment,relative=2]
2607 \set Score.repeatCommands = #'((volta "93") end-repeat)
2609 \set Score.repeatCommands = #'((volta #f))
2616 Internals: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2617 @internalsref{VoltaRepeatedMusic},
2618 @internalsref{UnfoldedRepeatedMusic}, and
2619 @internalsref{FoldedRepeatedMusic}.
2621 @node Tremolo repeats
2622 @subsection Tremolo repeats
2623 @cindex tremolo beams
2625 To place tremolo marks between notes, use @code{\repeat} with tremolo
2627 @lilypond[verbatim,raggedright]
2629 \context Voice \notes\relative c' {
2630 \repeat "tremolo" 8 { c16 d16 }
2631 \repeat "tremolo" 4 { c16 d16 }
2632 \repeat "tremolo" 2 { c16 d16 }
2637 Tremolo marks can also be put on a single note. In this case, the
2638 note should not be surrounded by braces.
2639 @lilypond[verbatim,raggedright]
2640 \repeat "tremolo" 4 c16
2643 A similar mechanism is the tremolo subdivision, described in
2644 @ref{Tremolo subdivisions}.
2648 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
2650 Internals: tremolo beams are @internalsref{Beam} objects. Single stem
2651 tremolos are @internalsref{StemTremolo}s. The music expression is
2652 @internalsref{TremoloEvent}.
2654 Example files: @inputfileref{input/regression,chord-tremolo.ly},
2655 @inputfileref{input/regression,stem-tremolo.ly}.
2657 @node Tremolo subdivisions
2658 @subsection Tremolo subdivisions
2659 @cindex tremolo marks
2660 @cindex @code{tremoloFlags}
2662 Tremolo marks can be printed on a single note by adding
2663 `@code{:}[@var{length}]' after the note. The length must be at least 8.
2664 A @var{length} value of 8 gives one line across the note stem. If the
2665 length is omitted, then then the last value (stored in
2666 @code{tremoloFlags}) is used:
2668 @lilypond[verbatim,fragment,center]
2669 c'2:8 c':32 | c': c': |
2672 @c [TODO : stok is te kort bij 32en]
2676 Tremolos in this style do not carry over into the MIDI output.
2680 In this manual: @ref{Tremolo repeats}.
2682 Elsewhere: @internalsref{StemTremolo}, @internalsref{TremoloEvent}.
2684 @node Measure repeats
2685 @subsection Measure repeats
2687 @cindex percent repeats
2688 @cindex measure repeats
2690 In the @code{percent} style, a note pattern can be repeated. It is
2691 printed once, and then the pattern is replaced with a special sign.
2692 Patterns of a one and two measures are replaced by percent-like signs,
2693 patterns that divide the measure length are replaced by slashes:
2695 @lilypond[verbatim,raggedright]
2696 \context Voice { \repeat "percent" 4 { c'4 }
2697 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
2703 Internals: @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
2704 @internalsref{PercentRepeatedMusic}, and
2705 @internalsref{DoublePercentRepeat}.
2709 @node Rhythmic music
2710 @section Rhythmic music
2714 * Showing melody rhythms::
2715 * Entering percussion::
2716 * Percussion staves::
2720 @node Showing melody rhythms
2721 @subsection Showing melody rhythms
2723 Sometimes you might want to show only the rhythm of a melody. This
2724 can be done with the rhythmic staff. All pitches of notes on such a
2725 staff are squashed, and the staff itself has a single line:
2727 @lilypond[fragment,relative,verbatim]
2728 \context RhythmicStaff {
2730 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
2736 Internals: @internalsref{RhythmicStaff}.
2738 Examples: @inputfileref{input/regression,rhythmic-staff.ly}.
2741 @node Entering percussion
2742 @subsection Entering percussion
2749 Percussion notes may be entered in @code{\drums} mode, which is
2750 similar to @code{notes}. Each piece of percussion has a full name and
2751 an abbreviated name, and both be used in input files:
2753 @lilypond[raggedright]
2754 \drums { hihat4 hh4 }
2757 The complete list of drum names is in the init file
2758 @file{ly/drumpitch-init.ly}.
2759 @c TODO: properly document this.
2763 Internals: @internalsref{DrumNoteEvent}.
2765 @node Percussion staves
2766 @subsection Percussion staves
2770 A percussion part for more than one instrument typically uses a
2771 multiline staff where each position in the staff refers to one piece
2775 To typeset the music, the notes must be interpreted in a
2776 @internalsref{DrumStaff} and @internalsref{DrumVoice} contexts:
2779 @lilypond[raggedright,verbatim,quote]
2780 up = \drums { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2781 down = \drums { bassdrum4 snare8 bd r bd sn4 }
2784 << \new DrumVoice { \voiceOne \up }
2785 \new DrumVoice { \voiceTwo \down }
2789 The above example shows verbose polyphonic notation. The short
2790 polyphonic notation, described in @ref{Polyphony}, can also be used if
2791 the @internalsref{DrumVoices} are instantiated by hand first. For example,
2794 \drums \new DrumStaff <<
2795 \context DrumVoice = "1" { s1 *2 }
2796 \context DrumVoice = "2" { s1 *2 }
2800 { \repeat unfold 16 hh16 }
2809 There are also other layout possibilities. To use these, set the
2810 property @code{drumStyleTable} in context @internalsref{DrumVoice}.
2811 The following variables have been predefined:
2815 is the default. It typesets a typical drum kit on a five-line staff
2818 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
2819 bd sn ss tomh tommh tomml toml tomfh tomfl }
2820 mus = \drums { cymc cyms cymr hh | hhc hho hhho hhp | \break cb hc
2821 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
2823 << \new DrumStaff\with {
2824 \remove Bar_engraver
2825 \remove Time_signature_engraver
2826 \override Stem #'transparent = ##t
2827 \override Stem #'Y-extent-callback = ##f
2828 minimumVerticalExtent = #'(-4.0 . 5.0)
2830 \context Lyrics \nam
2833 %% need to do this, because of indented @itemize
2835 \translator { \ScoreContext
2836 \override BarNumber #'transparent =##T
2840 The drum scheme supports six different toms. When there fewer toms, simply
2841 select the toms that produce the desired result, i.e. to get toms on
2842 the three middle lines you use @code{tommh}, @code{tomml} and
2845 @item timbales-style
2846 to typeset timbales on a two line staff:
2848 @lilypond[raggedright]
2849 nam = \lyrics { timh ssh timl ssl cb }
2850 mus = \drums { timh ssh timl ssl cb s16 }
2853 \context DrumStaff \with {
2854 \remove Bar_engraver
2855 \remove Time_signature_engraver
2856 \override Stem #'transparent = ##t
2857 \override Stem #'Y-extent-callback = ##f
2858 \override StaffSymbol #'line-count = #2
2859 \override StaffSymbol #'staff-space = #2
2860 minimumVerticalExtent = #'(-3.0 . 4.0)
2861 drumStyleTable = #timbales-style
2863 \context Lyrics \nam
2868 to typeset congas on a two line staff:
2870 @lilypond[raggedright]
2871 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
2872 mus = \drums { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
2875 \context DrumStaff\with {
2876 \remove Bar_engraver
2877 \remove Time_signature_engraver
2878 drumStyleTable = #congas-style
2879 \override StaffSymbol #'line-count = #2
2881 %% this sucks; it will lengthen stems.
2882 \override StaffSymbol #'staff-space = #2
2883 \override Stem #'transparent = ##t
2884 \override Stem #'Y-extent-callback = ##f
2886 \context Lyrics \nam
2891 to typeset bongos on a two line staff:
2893 @lilypond[raggedright]
2894 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
2895 mus = \drums { boh boho bohm ssh bol bolo bolm ssl s16 }
2898 \context DrumStaff\with {
2899 \remove Bar_engraver
2900 \remove Time_signature_engraver
2901 \override StaffSymbol #'line-count = #2
2902 drumStyleTable = #bongos-style
2904 %% this sucks; it will lengthen stems.
2905 \override StaffSymbol #'staff-space = #2
2906 \override Stem #'transparent = ##t
2907 \override Stem #'Y-extent-callback = ##f
2909 \context Lyrics \nam
2914 @item percussion-style
2915 to typeset all kinds of simple percussion on one line staves:
2916 @lilypond[raggedright]
2917 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
2918 mus = \drums { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
2921 \context DrumStaff\with{
2922 \remove Bar_engraver
2923 drumStyleTable = #percussion-style
2924 \override StaffSymbol #'line-count = #1
2925 \remove Time_signature_engraver
2926 \override Stem #'transparent = ##t
2927 \override Stem #'Y-extent-callback = ##f
2929 \context Lyrics \nam
2935 If you do not like any of the predefined lists you can define your own
2936 list at the top of your file:
2938 @lilypond[raggedright,verbatim]
2940 (bassdrum default #f -1)
2941 (snare default #f 0)
2943 (pedalhihat xcircle "stopped" 2)
2944 (lowtom diamond #f 3)
2946 up = \drums { hh8 hh hh hh hhp4 hhp }
2947 down = \drums { bd4 sn bd toml8 toml }
2950 \set DrumStaff.drumStyleTable
2951 = #(alist->hash-table mydrums)
2952 \new DrumVoice { \voiceOne \up }
2953 \new DrumVoice { \voiceTwo \down }
2961 Init files: @file{ly/drumpitch-init.ly}.
2963 Internals: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
2967 Short polyphonic notation, @code{<< @dots{} \\ @dots{} >>}, does not
2968 work for @internalsref{DrumVoices}.
2970 Because general MIDI does not contain rimshots the sidestick is used
2971 for this purpose instead.
2974 @section Piano music
2976 Piano staves are two normal staves coupled with a brace. The staves
2977 are largely independent, but sometimes voices can cross between the
2978 two staves. The same notation is also used for harps and other key
2979 instruments. The @internalsref{PianoStaff} is especially built to
2980 handle this cross-staffing behavior. In this section we discuss the
2981 @internalsref{PianoStaff} and some other pianistic peculiarities.
2985 * Automatic staff changes::
2986 * Manual staff switches::
2989 * Staff switch lines::
2994 There is no support for putting chords across staves. You can get
2995 this result by increasing the length of the stem in the lower stave so
2996 it reaches the stem in the upper stave, or vice versa. An example is
2997 included with the distribution as
2998 @inputfileref{input/test,stem-cross-staff.ly}.
3000 Dynamics are not centered, but kludges do exist. See
3001 @inputfileref{input/template,piano-dynamics.ly}.
3003 @cindex cross staff stem
3004 @cindex stem, cross staff
3006 The distance between the two staves is normally fixed across the
3007 entire score. It is possible to tune this per system, but it does
3008 require arcane command incantations. See
3009 @inputfileref{input/test,piano-staff-distance.ly}.
3016 @node Automatic staff changes
3017 @subsection Automatic staff changes
3018 @cindex Automatic staff changes
3020 Voices can switch automatically between the top and the bottom
3021 staff. The syntax for this is
3023 \autochange \context Voice @{ @dots{}@var{music}@dots{} @}
3025 The two staffs of the piano staff must be named @code{up} and
3028 The autochanger switches on basis of pitch (central C is the turning
3029 point), and it looks ahead skipping over rests to switch in
3030 advance. Here is a practical example:
3032 @lilypond[verbatim,raggedright,quote]
3033 \score { \notes \context PianoStaff <<
3034 \context Staff = "up" {
3035 \autochange \new Voice \relative c' {
3036 g4 a b c d r4 a g } }
3037 \context Staff = "down" {
3044 In this example, spacer rests are used to prevent the bottom staff from
3045 terminating too soon.
3050 In this manual: @ref{Manual staff switches}.
3052 Internals: @internalsref{AutoChangeMusic}.
3058 The staff switches often do not end up in optimal places. For high
3059 quality output, staff switches should be specified manually.
3063 @node Manual staff switches
3064 @subsection Manual staff switches
3066 @cindex manual staff switches
3067 @cindex staff switch, manual
3069 Voices can be switched between staves manually, using the following command:
3071 \change Staff = @var{staffname} @var{music}
3075 The string @var{staffname} is the name of the staff. It switches the
3076 current voice from its current staff to the Staff called
3077 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3086 Pianos have pedals that alter the way sound are produced. Generally, a
3087 piano has three pedals, sustain, una corda, and sostenuto.
3091 Piano pedal instruction can be expressed by attaching
3092 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3093 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3096 @lilypond[fragment,verbatim]
3097 c'4\sustainDown c'4\sustainUp
3100 What is printed can be modified by setting @code{pedal@var{X}Strings},
3101 where @var{X} is one of the pedal types: @code{Sustain},
3102 @code{Sostenuto} or @code{UnaCorda}. Refer to the generated
3103 documentation of @internalsref{SustainPedal} for more information.
3105 Pedals can also be indicated by a sequence of brackets, by setting the
3106 @code{pedalSustainStyle} property to @code{bracket} objects:
3108 @lilypond[fragment,verbatim]
3109 \set Staff.pedalSustainStyle = #'bracket
3110 c''4\sustainDown d''4 e''4
3111 a'4\sustainUp\sustainDown
3112 f'4 g'4 a'4\sustainUp
3115 A third style of pedal notation is a mixture of text and brackets,
3116 obtained by setting the @code{pedalSustainStyle} style property to
3119 @lilypond[fragment,verbatim]
3120 \set Staff.pedalSustainStyle = #'mixed
3121 c''4\sustainDown d''4 e''4
3122 c'4\sustainUp\sustainDown
3123 f'4 g'4 a'4\sustainUp
3126 The default `*Ped' style for sustain and damper pedals corresponds to
3127 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
3130 @lilypond[fragment,verbatim]
3131 c''4\sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4\sostenutoUp
3134 For fine-tuning of the appearance of a pedal bracket, the properties
3135 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3136 @code{PianoPedalBracket} objects (see
3137 @internalsref{PianoPedalBracket} in the Program reference) can be modified. For example, the
3138 bracket may be extended to the end of the note head:
3140 @lilypond[fragment,verbatim]
3141 \override Staff.PianoPedalBracket
3142 #'shorten-pair = #'(0 . -1.0)
3143 c''4\sostenutoDown d''4 e''4 c'4
3144 f'4 g'4 a'4\sostenutoUp
3148 @subsection Arpeggio
3151 @cindex broken arpeggio
3152 @cindex @code{\arpeggio}
3154 You can specify an arpeggio sign on a chord by attaching an
3155 @code{\arpeggio} to a chord:
3158 @lilypond[fragment,relative,verbatim]
3162 When an arpeggio crosses staves, you attach an arpeggio to the chords
3163 in both staves, and set
3164 @internalsref{PianoStaff}.@code{connectArpeggios}:
3166 @lilypond[fragment,relative,verbatim]
3167 \context PianoStaff <<
3168 \set PianoStaff.connectArpeggios = ##t
3169 \new Staff { <c' e g c>\arpeggio }
3170 \new Staff { \clef bass <c,, e g>\arpeggio }
3174 The direction of the arpeggio is sometimes denoted by adding an
3175 arrowhead to the wiggly line:
3177 @lilypond[fragment,relative,verbatim]
3186 A square bracket on the left indicates that the player should not
3187 arpeggiate the chord:
3189 @lilypond[fragment,relative,verbatim]
3196 @cindex @code{\arpeggio}
3198 @cindex @code{\arpeggioUp}
3200 @cindex @code{\arpeggioDown}
3202 @cindex @code{\arpeggioBoth}
3203 @code{\arpeggioBoth},
3204 @cindex @code{\arpeggioBracket}
3205 @code{\arpeggioBracket}.
3209 Internals: @internalsref{ArpeggioEvent} music expressions lead to
3210 @internalsref{Arpeggio} objects. Cross staff arpeggios are
3211 @internalsref{PianoStaff}.@internalsref{Arpeggio}.
3215 It is not possible to mix connected arpeggios and unconnected
3216 arpeggios in one @internalsref{PianoStaff} at the same time.
3218 @node Staff switch lines
3219 @subsection Staff switch lines
3222 @cindex follow voice
3223 @cindex staff switching
3226 @cindex @code{followVoice}
3228 Whenever a voice switches to another staff a line connecting the notes
3229 can be printed automatically. This is enabled if the property
3230 @code{PianoStaff.followVoice} is set to true:
3232 @lilypond[fragment,relative,verbatim]
3233 \context PianoStaff <<
3234 \set PianoStaff.followVoice = ##t
3235 \context Staff \context Voice {
3240 \context Staff=two { \clef bass \skip 1*2 }
3244 The associated object is @internalsref{VoiceFollower}.
3248 @cindex @code{\showStaffSwitch}
3249 @code{\showStaffSwitch},
3250 @cindex @code{\hideStaffSwitch}
3251 @code{\hideStaffSwitch}.
3255 @section Vocal music
3257 This section discusses how to enter and print lyrics.
3261 * The Lyrics context::
3266 @node Entering lyrics
3267 @subsection Entering lyrics
3271 @cindex @code{\lyrics}
3274 Lyrics are entered in a special input mode. This mode is is introduced
3275 by the keyword @code{\lyrics}. In this mode you can enter lyrics, with
3276 punctuation and accents without any hassle. Syllables are entered like
3277 notes, but with pitches replaced by text. For example,
3279 \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
3282 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3283 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3284 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3285 any 8-bit character with ASCII code over 127, or a two-character
3286 combination of a backslash followed by one of @code{`}, @code{'},
3287 @code{"}, or @code{^}.
3289 Subsequent characters of a word can be any character that is not a digit
3290 and not white space. One important consequence of this is that a word
3291 can end with @code{@}}. The following example is usually a bug. The
3292 syllable includes a @code{@}}, and hence the opening brace is not balanced:
3294 \lyrics @{ twinkle@}
3297 @cindex @code{\property}, in @code{\lyrics}
3298 Similarly, a period following a alphabetic sequence, is included in
3299 the resulting string. As a consequence, spaces must be inserted around
3302 \override Score . LyricText #'font-shape = #'italic
3306 @cindex spaces, in lyrics
3307 @cindex quotes, in lyrics
3309 Any @code{_} character which appears in an unquoted word is converted
3310 to a space. This provides a mechanism for introducing spaces into words
3311 without using quotes. Quoted words can also be used in Lyrics mode to
3312 specify words that cannot be written with the above rules:
3315 \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3319 Hyphens can be entered as ordinary hyphens at the end of a syllable, i.e.
3324 These will be attached to the end of the first syllable.
3326 Centered hyphens are entered using the special `@code{-}@code{-}' lyric
3327 as a separate word between syllables. The hyphen will have variable
3328 length depending on the space between the syllables and it will be
3329 centered between the syllables.
3334 When a lyric is sung over many notes (this is called a melisma), this is
3335 indicated with a horizontal line centered between a syllable and the
3336 next one. Such a line is called an extender line, and it is entered as
3341 Internals: @internalsref{LyricEvent}, @internalsref{HyphenEvent}, and
3342 @internalsref{ExtenderEvent}.
3344 Examples: @inputfileref{input/test,lyric-hyphen-retain.ly}.
3348 The definition of lyrics mode is too complex.
3352 @node The Lyrics context
3353 @subsection The Lyrics context
3355 Lyrics are printed by interpreting them in a @internalsref{Lyrics} context:
3357 \context Lyrics \lyrics @dots{}
3360 @cindex automatic syllable durations
3361 @cindex @code{\lyricsto}
3362 @cindex lyrics and melodies
3364 This will place the lyrics according to the durations that were
3365 entered. The lyrics can also be aligned under a given melody
3366 automatically. In this case, it is no longer necessary to enter the
3367 correct duration for each syllable. This is achieved by combining the
3368 melody and the lyrics with the @code{\lyricsto} expression:
3370 \lyricsto @var{name} \new Lyrics @dots{}
3373 This aligns the lyrics to the
3375 notes of the @internalsref{Voice} context called @var{name}, which has
3376 to exist. Therefore, normally the @code{Voice} is specified first, and
3377 then the lyrics are specified with @code{\lyricsto}.
3379 For different or more complex orderings, the best way is to setup the
3380 hierarchy of staves and lyrics first, e.g.
3382 \context ChoirStaff \notes <<
3383 \context Lyrics = sopranoLyrics @{ s1 @}
3384 \context Voice = soprano @{ @emph{music} @}
3385 \context Lyrics = tenorLyrics @{ s1 @}
3386 \context Voice = tenor @{ @emph{music} @}
3389 and then combine the appropriate melodies and lyric lines:
3391 \lyricsto "soprano" \new Lyrics @emph{the lyrics}
3395 The final input would resemble
3398 << \context ChoirStaff \notes << @emph{setup the music} >>
3399 \lyricsto "soprano" @emph{etc}
3400 \lyricsto "alto" @emph{etc}
3406 The @code{\lyricsto} command detects melismata: it only puts one
3407 syllable under a tied or slurred group of notes. If you want to force
3408 an unslurred group of notes to be a melisma, then insert
3409 @code{\melisma} after the first note of the group, and
3410 @code{\melismaEnd} after the last one, e.g.
3412 @lilypond[relative=1,raggedright,fragment,verbatim]
3413 << \context Voice = "lala" { \time 3/4
3419 \lyricsto "lala" \new Lyrics \lyrics {
3424 In addition, notes are considered a melisma if they are manually
3425 beamed, and automatic beaming (see @ref{Setting automatic beam
3426 behavior}) is switched off. The criteria for deciding melismata
3427 can be tuned with the property @code{melismaBusyProperties}. See
3428 @internalsref{Melisma_translator} for more information.
3430 When multiple stanzas are put on the same melody, it can happen that
3431 two stanzas have melismata in different locations. This can be
3432 remedied by switching off melismata for one
3433 @internalsref{Lyrics}. This is achieved by setting
3434 the @code{ignoreMelismata} property to @code{#t}. An example is shown
3435 in @inputfileref{input/regression,lyric-combine-new.ly}.
3438 @cindex choral score
3440 A complete example of a SATB score setup is in the file
3441 @inputfileref{input/template,satb.ly}.
3446 @code{\melisma}, @code{\melismaEnd}
3447 @cindex @code{\melismaEnd}
3448 @cindex @code{\melisma}
3452 Internals: Music expressions: @internalsref{LyricCombineMusic},
3453 Contexts: @internalsref{Lyrics}, @internalsref{Melisma_translator}.
3455 Examples: @inputfileref{input/template,satb.ly},
3456 @inputfileref{input/regression,lyric-combine-new.ly}.
3460 Melismata are not detected automatically, and extender lines must be
3464 For proper processing of extender lines, the
3465 @internalsref{Lyrics} and @internalsref{Voice} should be
3466 linked. This can be achieved either by using @code{\lyricsto} or by
3467 setting corresponding names for both contexts. The latter is explained
3468 in @ref{More stanzas}.
3471 @subsection More stanzas
3473 @cindex phrasing, in lyrics
3476 The lyrics should be aligned with the note heads of the melody. To
3477 achieve this, each line of lyrics should be marked to correspond with
3478 the melodic line. This is done automatically when @code{\lyricsto},
3479 but it can also be done manually.
3481 To this end, give the @internalsref{Voice} context an identity:
3483 \context Voice = duet @{
3488 Then set the @internalsref{Lyrics} contexts to names starting with
3489 that identity followed by a dash. In the preceding example, the
3490 @internalsref{Voice} identity is @code{duet}, so the identities of the
3491 @internalsref{Lyrics}s are marked @code{duet-1} and @code{duet-2}:
3493 \context Lyrics = "duet-1" @{
3494 Hi, my name is bert. @}
3495 \context Lyrics = "duet-2" @{
3496 Ooooo, ch\'e -- ri, je t'aime. @}
3499 The complete example is shown here:
3500 @lilypond[raggedright,verbatim]
3502 << \notes \relative c'' \context Voice = duet { \time 3/4
3504 \lyrics << \lyricsto "duet" \new Lyrics {
3506 \set vocNam = "Bert"
3507 Hi, my name is bert. }
3508 \lyricsto "duet" \new Lyrics {
3510 \set vocNam = "Ernie"
3511 Ooooo, ch\'e -- ri, je t'aime.
3517 @cindex stanza number
3518 @cindex singer's names
3519 @cindex name of singer
3521 Stanza numbers can be added by setting @code{stanza}, e.g.
3529 Notice how dots are surrounded with spaces in @code{\lyrics} mode, to
3530 prevent @code{stanza} being interpreted as a single
3533 This example also demonstrates how names of the singers can be added
3534 using @code{vocalName} analogous to instrument annotations for staves.
3535 A short version may be entered as @code{vocNam}.
3537 To make empty spaces in lyrics, use @code{\skip}.
3542 Internals: Layout objects @internalsref{LyricText} and
3543 @internalsref{VocalName}. Music expressions:
3544 @internalsref{LyricEvent}.
3550 Input for lyrics introduces a syntactical ambiguity:
3557 is interpreted as assigning a string identifier @code{\foo} such that
3558 it contains @code{"bar"}. However, it could also be interpreted as
3559 making or a music identifier @code{\foo} containing the syllable
3560 `bar'. The force the latter interpretation, use
3570 The term @emph{ambitus} (plural: ambituses) denotes a range of pitches
3571 for a given voice in a part of music. It also may denote the pitch
3572 range that a musical instrument is capable of playing. Most musical
3573 instruments have their ambitus standardized (or at least there is
3574 agreement upon the minimal ambitus of a particular type of
3575 instrument), such that a composer or arranger of a piece of music can
3576 easily meet the ambitus constraints of the targeted instrument.
3577 However, the ambitus of the human voice depends on individual
3578 physiological state, including education and training of the voice.
3579 Therefore, a singer potentially has to check for each piece of music
3580 if the ambitus of that piece meets his individual capabilities. This
3581 is why the ambitus of a piece may be of particular value to vocal
3584 The ambitus is typically notated on a per-voice basis at the very
3585 beginning of a piece, e.g. nearby the initial clef or time signature of
3586 each staff. The range is graphically specified by two noteheads, that
3587 represent the minimum and maximum pitch. Some publishers use a textual
3588 notation: they put the range in words in front of the corresponding
3589 staff. LilyPond only supports the graphical ambitus notation.
3591 To apply, add the @internalsref{Ambitus_engraver} to the
3592 @internalsref{Voice} context, i.e.
3598 \consists Ambitus_engraver
3603 This results in the following output:
3605 @lilypond[raggedright]
3606 upper = \notes \relative c {
3609 as'' c e2 bes f cis d4 e f2 g
3611 lower = \notes \relative c {
3614 e'4 b g a c es fis a cis b a g f e d2
3617 \context ChoirStaff {
3619 \new Staff { \upper }
3620 \new Staff { \lower }
3626 \consists Ambitus_engraver
3632 If you have multiple voices in a single staff, and you want a single
3633 ambitus per staff rather than per each voice, then add the
3634 @internalsref{Ambitus_engraver} to the @internalsref{Staff} context
3635 rather than to the @internalsref{Voice} context.
3637 It is possible to tune individual ambituses for multiple voices on a
3638 single staff, for example by erasing or shifting them horizontally. An
3639 example is in @inputfileref{input/test,ambitus-mixed.ly}.
3643 Internals: @internalsref{Ambitus}.
3645 Examples: @inputfileref{input/regression,ambitus.ly},
3646 @inputfileref{input/test,ambitus-mixed.ly}.
3650 There is no collision handling in the case of multiple per-voice
3656 Tablature notation is used for notating music for plucked string
3657 instruments. It notates pitches not by using note heads, but by
3658 indicating on which string and fret a note must be played. LilyPond
3659 offers limited support for tablature.
3662 * Tablatures basic::
3663 * Non-guitar tablatures::
3666 @node Tablatures basic
3667 @subsection Tablatures basic
3668 @cindex Tablatures basic
3670 The string number associated to a note is given as a backslash
3671 followed by a number, e.g. @code{c4\3} for a C quarter on the third
3672 string. By default, string 1 is the highest one, and the tuning
3673 defaults to the standard guitar tuning (with 6 strings). The notes
3674 are printed as tablature, by using @internalsref{TabStaff} and
3675 @internalsref{TabVoice} contexts:
3677 @lilypond[fragment,verbatim]
3678 \notes \context TabStaff {
3686 When no string is specified, the first string that does not give a
3687 fret number less than @code{minimumFret} is selected. The default
3688 value for @code{minimumFret} is 0:
3692 e8 fis gis a b cis' dis' e'
3693 \set TabStaff.minimumFret = #8
3694 e8 fis gis a b cis' dis' e'
3699 e8 fis gis a b cis' dis' e'
3700 \set TabStaff.minimumFret = #8
3701 e8 fis gis a b cis' dis' e'
3704 \context StaffGroup <<
3705 \context Staff { \clef "G_8" \frag }
3706 \context TabStaff { \frag }
3713 Internals: @internalsref{TabStaff}, @internalsref{TabVoice}, and
3714 @internalsref{StringNumberEvent}.
3718 Chords are not handled in a special way, and hence the automatic
3719 string selector may easily select the same string to two notes in a
3723 @node Non-guitar tablatures
3724 @subsection Non-guitar tablatures
3725 @cindex Non-guitar tablatures
3727 You can change the number of strings, by setting the number of lines
3728 in the @internalsref{TabStaff}.
3730 You can change the tuning of the strings. A string tuning is given as
3731 a Scheme list with one integer number for each string, the number
3732 being the pitch (measured in semitones relative to central C) of an
3733 open string. The numbers specified for @code{stringTuning} are the
3734 numbers of semitones to subtract or add, starting the specified pitch
3735 by default middle C, in string order. Thus, the notes are e, a, d, and
3738 @lilypond[fragment,verbatim]
3739 \context TabStaff <<
3740 \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
3743 a,4 c' a e' e c' a e'
3748 It is possible to change the Scheme function to format the tablature
3749 note text. The default is @code{fret-number-tablature-format}, which
3750 uses the fret number. For instruments that do not use this notation,
3751 you can create a special tablature formatting function. This function
3752 takes three argument: string number, string tuning and note pitch.
3756 No guitar special effects have been implemented.
3761 @section Chord names
3764 LilyPond has support for both printing chord names. Chords may be
3765 entered in musical chord notation, i.e. @code{< .. >}, but they can
3766 also be entered by name. Internally, the chords are represented as a
3767 set of pitches, so they can be transposed:
3770 @lilypond[verbatim,raggedright]
3771 twoWays = \notes \transpose c c' {
3781 << \context ChordNames \twoWays
3782 \context Voice \twoWays >> }
3785 This example also shows that the chord printing routines do not try to
3786 be intelligent. The last chord (@code{f bes d}) is not interpreted as
3792 * Printing chord names::
3797 @subsection Chords mode
3800 Chord mode is a mode where you can input sets of pitches using common
3801 names. It is introduced by the keyword @code{\chords}.
3802 In chords mode, a chord is entered by the root, which is entered
3803 like a common pitch:
3804 @lilypond[fragment,verbatim,quote,relative=1]
3805 \chords { es4. d8 c2 }
3810 Other chords may be entered by suffixing a colon, and introducing a
3811 modifier, and optionally, a number:
3813 @lilypond[fragment,verbatim,quote]
3814 \chords { e1:m e1:7 e1:m7 }
3816 The first number following the root is taken to be the `type' of the
3817 chord, thirds are added to the root until it reaches the specified
3819 @lilypond[fragment,verbatim]
3820 \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
3823 @cindex root of chord
3824 @cindex additions, in chords
3825 @cindex removals, in chords
3827 More complex chords may also be constructed adding separate steps
3828 to a chord. Additions are added after the number following
3829 the colon, and are separated by dots:
3831 @lilypond[verbatim,fragment,quote]
3832 \chords { c:5.6 c:3.7.8 c:3.6.13 }
3834 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
3836 @lilypond[verbatim,fragment,quote]
3837 \chords { c:7+ c:5+.3- c:3-.5-.7- }
3839 Removals are specified similarly, and are introduced by a caret. They
3840 must come after the additions:
3841 @lilypond[verbatim,fragment]
3842 \chords { c^3 c:7^5 c:9^3.5 }
3845 Modifiers can be used to change pitches. The following modifiers are
3849 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
3851 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
3854 is the augmented chord. This modifier raises the 5th step.
3856 is the major 7th chord. This modifier raises the 7th step if present.
3858 is the suspended 4th or 2nd. This modifier removes the 3rd
3859 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
3862 Modifiers can be mixed with additions:
3863 @lilypond[verbatim,fragment]
3864 \chords { c:sus4 c:7sus4 c:dim7 c:m6 }
3867 @cindex modifiers, in chords.
3874 Since an unaltered 11 does not sound good when combined with an
3875 unaltered 13, the 11 is removed in this case (unless it is added
3878 @lilypond[fragment,verbatim]
3879 \chords { c:13 c:13.11 c:m13 }
3884 An inversion (putting one pitch of the chord on the bottom), as well
3885 as bass notes, can be specified by appending
3886 @code{/}@var{pitch} to the chord:
3887 @lilypond[fragment,verbatim,center]
3888 \chords { c1 c/g c/f }
3892 A bass note can be added instead of transposed out of the chord,
3893 by using @code{/+}@var{pitch}.
3895 @lilypond[fragment,verbatim,center]
3896 \chords { c1 c/+g c/+f }
3899 Chords is a mode similar to @code{\lyrics}, @code{\notes} etc. Most
3900 of the commands continue to work, for example, @code{r} and
3901 @code{\skip} can be used to insert rests and spaces, and property
3902 commands may be used to change various settings.
3908 Each step can only be present in a chord once. The following
3909 simply produces the augmented chord, since @code{5+} is interpreted
3912 @lilypond[verbatim,fragment]
3913 \chords { c:5.5-.5+ }
3917 @node Printing chord names
3918 @subsection Printing chord names
3920 @cindex printing chord names
3924 For displaying printed chord names, use the @internalsref{ChordNames} context.
3925 The chords may be entered either using the notation
3926 described above, or directly using @code{<} and @code{>}:
3928 @lilypond[verbatim,raggedright]
3930 \chords {a1 b c} <d' f' a'> <e' g' b'>
3934 \context ChordNames \scheme
3935 \context Staff \scheme
3940 You can make the chord changes stand out by setting
3941 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
3942 display chord names when there is a change in the chords scheme and at
3943 the start of a new line:
3945 @lilypond[verbatim,linewidth=9\cm]
3947 c1:m c:m \break c:m c:m d
3951 \context ChordNames {
3952 \set chordChanges = ##t
3954 \context Staff \transpose c c' \scheme
3959 The default chord name layout is a system for Jazz music, proposed by
3960 Klaus Ignatzek (see @ref{Literature list}). It can be tuned through the
3961 following properties:
3964 @cindex chordNameExceptions
3965 @item chordNameExceptions
3966 This is a list that contains the chords that have special formatting.
3968 @inputfileref{input/regression,chord-name-exceptions.ly}.
3969 @cindex exceptions, chord names.
3972 @cindex majorSevenSymbol
3973 @item majorSevenSymbol
3974 This property contains the markup object used for the 7th step, when
3975 it is major. Predefined options are @code{whiteTriangleMarkup} and
3976 @code{blackTriangleMarkup}. See
3977 @inputfileref{input/regression,chord-name-major7.ly} for an example.
3979 @cindex chordNameSeparator
3980 @item chordNameSeparator
3981 Different parts of a chord name are normally separated by a
3982 slash. By setting @code{chordNameSeparator}, you can specify other
3984 @lilypond[fragment,verbatim]
3985 \context ChordNames \chords {
3987 \set chordNameSeparator
3988 = \markup { \typewriter "|" }
3992 @cindex chordRootNamer
3993 @item chordRootNamer
3994 The root of a chord is usually printed as a letter with an optional
3995 alteration. The transformation from pitch to letter is done by this
3996 function. Special note names (for example, the German ``H'' for a
3997 B-chord) can be produced by storing a new function in this property.
3999 The pre-defined variables @code{\germanChords},
4000 @code{\semiGermanChords} set these variables.
4003 @cindex chordNoteNamer
4004 @item chordNoteNamer
4005 The default is to print single pitch, e.g. the bass note, using the
4006 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
4007 to a specialized function to change this behavior. For example, the
4008 base can be printed in lower case.
4013 There are also two other chord name schemes implemented: an alternate
4014 Jazz chord notation, and a systematic scheme called Banter chords. The
4015 alternate jazz notation is also shown on the chart in @ref{Chord name
4016 chart}. Turning on these styles is described in the input file
4017 @inputfileref{input/test,chord-names-jazz.ly}.
4021 @cindex chords, jazz
4026 @cindex @code{\germanChords}
4027 @code{\germanChords},
4028 @cindex @code{\semiGermanChords}
4029 @code{\semiGermanChords}.
4036 Examples: @inputfileref{input/regression,chord-name-major7.ly},
4037 @inputfileref{input/regression,chord-name-exceptions.ly},
4038 @inputfileref{input/test,chord-names-jazz.ly},
4039 @inputfileref{input/test,chord-names-german.ly}.
4041 Init files: @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
4046 Chord names are determined solely from the list of pitches. Chord
4047 inversions are not identified, and neither are added bass notes. This
4048 may result in strange chord names when chords are entered with the
4049 @code{< .. >} syntax.
4054 @node Orchestral music
4055 @section Orchestral music
4057 @cindex Writing parts
4059 Orchestral music involves some special notation, both in the full
4060 score and the individual parts. This section explains how to tackle
4061 some common problems in orchestral music.
4066 * Multiple staff contexts::
4069 * Instrument names::
4071 * Instrument transpositions::
4072 * Multi measure rests::
4073 * Automatic part combining::
4075 * Different editions from one source::
4076 * Quoting other voices::
4079 @node Multiple staff contexts
4080 @subsection Multiple staff contexts
4082 Polyphonic scores consist of many staves. These staves can be
4083 constructed in three different ways:
4085 @item The group is started with a brace at the left. This is done with the
4086 @internalsref{GrandStaff} context.
4087 @item The group is started with a bracket. This is done with the
4088 @internalsref{StaffGroup} context
4089 @item The group is started with a vertical line. This is the default
4093 @cindex Staff, multiple
4094 @cindex bracket, vertical
4095 @cindex brace, vertical
4102 @node Rehearsal marks
4103 @subsection Rehearsal marks
4104 @cindex Rehearsal marks
4106 @cindex @code{\mark}
4108 To print a rehearsal mark, use the @code{\mark} command:
4109 @lilypond[fragment,verbatim]
4120 (The letter I is skipped in accordance with engraving traditions.)
4122 The mark is incremented automatically if you use @code{\mark
4123 \default}, but you can also use an integer argument to set the mark
4124 manually. The value to use is stored in the property
4125 @code{rehearsalMark}.
4127 The style is defined by the property @code{markFormatter}. It is a
4128 function taking the current mark (an integer) and the current context
4129 as argument. It should return a markup object. In the following
4130 example, @code{markFormatter} is set to a canned procedure. After a
4131 few measures, it is set to function that produces a boxed number.
4133 @lilypond[verbatim,fragment,relative=1]
4134 \set Score.markFormatter = #format-mark-numbers
4137 \set Score.markFormatter
4138 = #(lambda (mark context)
4139 (make-bold-markup (make-box-markup (number->string mark))))
4144 The file @file{scm/translation-functions.scm} contains the definitions
4145 of @code{format-mark-numbers} (the default format) and
4146 @code{format-mark-letters}. They can be used as inspiration for other
4147 formatting functions.
4150 @cindex coda on bar line
4151 @cindex segno on bar line
4152 @cindex fermata on bar line
4153 @cindex bar lines, symbols on
4155 The @code{\mark} command can also be used to put signs like coda,
4156 segno and fermatas on a barline. Use @code{\markup} to
4157 to access the appropriate symbol:
4159 @lilypond[fragment,verbatim,relative=1]
4160 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4164 In this case, during line breaks, marks must also be printed at the
4165 end of the line, and not at the beginning. Use the following to force
4168 \override Score.RehearsalMark
4169 #'break-visibility = #begin-of-line-invisible
4175 @cindex barlines, putting symbols on
4179 Internals: @internalsref{MarkEvent}, @internalsref{RehearsalMark}.
4181 Init files: @file{scm/translation-functions.scm} contains the
4182 definition of @code{format-mark-numbers} and
4183 @code{format-mark-letters}. They can be used as inspiration for other
4184 formatting functions.
4186 Examples: @inputfileref{input/regression,rehearsal-mark-letter.ly},
4187 @inputfileref{input/regression,rehearsal-mark-number.ly}.
4191 @subsection Bar numbers
4195 @cindex measure numbers
4196 @cindex currentBarNumber
4198 Bar numbers are printed by default at the start of the line. The
4199 number itself is stored in the
4200 @code{currentBarNumber} property,
4201 which is normally updated automatically for every measure.
4203 Bar numbers can be typeset at regular intervals instead of at the
4204 beginning of each line. This is illustrated in the following example,
4205 whose source is available as
4206 @inputfileref{input/test,bar-number-regular-interval.ly}:
4208 @lilypondfile[]{bar-number-regular-interval.ly}
4213 Internals: @internalsref{BarNumber}.
4215 Examples: @inputfileref{input/test,bar-number-every-five-reset.ly},
4216 and @inputfileref{input/test,bar-number-regular-interval.ly}.
4220 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4221 there is one at the top. To solve this, the
4222 @code{padding} property of @internalsref{BarNumber} can be
4223 used to position the number correctly.
4225 @node Instrument names
4226 @subsection Instrument names
4228 In an orchestral score, instrument names are printed left side of the
4231 This can be achieved by setting @internalsref{Staff}.@code{instrument}
4232 and @internalsref{Staff}.@code{instr}. This will print a string before
4233 the start of the staff. For the first start, @code{instrument} is
4234 used, for the next ones @code{instr} is used:
4237 @lilypond[verbatim,raggedright]
4238 \set Staff.instrument = "ploink " { c''4 }
4242 You can also use markup texts to construct more complicated instrument
4246 @lilypond[fragment,verbatim,raggedright]
4248 \set Staff.instrument = \markup {
4249 \column < "Clarinetti"
4262 Internals: @internalsref{InstrumentName}.
4266 When you put a name on a grand staff or piano staff the width of the
4267 brace is not taken into account. You must add extra spaces to the end of
4268 the name to avoid a collision.
4271 @subsection Transpose
4273 @cindex transposition of pitches
4274 @cindex @code{\transpose}
4276 A music expression can be transposed with @code{\transpose}. The syntax
4279 \transpose @var{from} @var{to} @var{musicexpr}
4282 This means that @var{musicexpr} is transposed by the interval between
4283 the pitches @var{from} and @var{to}: any note with pitch @code{from}
4284 is changed to @code{to}.
4287 For example, consider a piece written in the key of D major. If
4288 this piece is a little too low for its performer, it can be
4289 transposed up to E major with
4291 \tranpose d e @dots{}
4294 Consider a part written for violin (a C instrument). If
4295 this part is to be played on the A clarinet, the following
4296 transposition will produce the appropriate part
4299 \transpose a c @dots{}
4302 Since @var{from} and @var{to} are pitches, @code{\transpose} must be
4303 inside a @code{\notes} section. @code{\transpose} distinguishes
4304 between enharmonic pitches: both @code{\transpose c cis} or
4305 @code{\transpose c des} will transpose up half a tone. The first
4306 version will print sharps and the second version will print flats:
4308 @lilypond[raggedright,verbatim]
4309 mus =\notes { \key d \major cis d fis g }
4310 \score { \notes \context Staff {
4313 \transpose c g' \mus
4314 \transpose c f' \mus
4321 Internals: @internalsref{TransposedMusic}, and
4322 @internalsref{UntransposableMusic}.
4326 If you want to use both @code{\transpose} and @code{\relative}, then
4327 you must put @code{\transpose} outside of @code{\relative}, since
4328 @code{\relative} will have no effect music that appears inside a
4331 @node Instrument transpositions
4332 @subsection Instrument transpositions
4334 The key of a transposing instrument can also be specified. This
4335 applies to many wind instruments, for example, clarinets (B-flat, A and
4336 E-flat), horn (F) and trumpet (B-flat, C, D and E-flat).
4340 The transposition is entered after the keyword @code{\transposition}:
4343 \transposition bes %% B-flat clarinet
4346 This command sets the property @code{instrumentTuning}. The value of
4347 this property is used for MIDI output and quotations. It does not
4348 affect how notes are printed in the current staff.
4350 @cindex transposition, MIDI
4351 @cindex transposition, instrument
4354 @node Multi measure rests
4355 @subsection Multi measure rests
4356 @cindex multi measure rests
4357 @cindex Rests, multi measure
4361 Multi measure rests are entered using `@code{R}'. It is specifically
4362 meant for full bar rests and for entering parts: the rest can expand
4363 to fill a score with rests, or it can be printed as a single
4364 multimeasure rest. This expansion is controlled by the property
4365 @code{Score.skipBars}. If this is set to true, empty measures will not
4366 be expanded, and the appropriate number is added automatically:
4368 @lilypond[fragment,verbatim]
4369 \time 4/4 r1 | R1 | R1*2
4370 \set Score.skipBars = ##t R1*17 R1*4
4373 The @code{1} in @code{R1} is similar to the duration notation used for
4374 notes. Hence, for time signatures other than 4/4, you must enter other
4375 durations. This can be done with augmentation dots or fractions:
4377 @lilypond[fragment,verbatim]
4378 \set Score.skipBars = ##t
4386 An @code{R} spanning a single measure is printed as either a whole rest
4387 or a breve, centered in the measure regardless of the time signature.
4389 @cindex text on multi-measure rest
4390 @cindex script on multi-measure rest
4391 @cindex fermata on multi-measure rest
4393 Texts can be added to multi-measure rests by using the
4394 @var{note}-@code{markup} syntax (see @ref{Text markup}). In this case, the number is
4395 replaced. If you need both texts and the number, you must add the
4396 number by hand. A variable (@code{\fermataMarkup}) is provided for
4400 @lilypond[verbatim,fragment]
4402 R2._\markup { "Ad lib" }
4406 If you want to have a text on the left end of a multi-measure rest,
4407 attach the text to a zero-length skip note, i.e.
4415 @cindex whole rests for a full measure
4419 Internals: @internalsref{MultiMeasureRestEvent},
4420 @internalsref{MultiMeasureTextEvent},
4421 @internalsref{MultiMeasureRestMusicGroup}, and
4422 @internalsref{MultiMeasureRest}.
4424 The layout object @internalsref{MultiMeasureRestNumber} is for the
4425 default number, and @internalsref{MultiMeasureRestText} for user
4430 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
4431 over multi-measure rests.
4433 @cindex condensing rests
4435 There is no way to automatically condense multiple rests into a single
4436 multimeasure rest. Multi measure rests do not take part in rest
4439 Be careful when entering multimeasure rests followed by whole
4440 notes. The following will enter two notes lasting four measures each:
4444 When @code{skipBars} is set, then the result will look OK, but the
4445 bar numbering will be off.
4447 @node Automatic part combining
4448 @subsection Automatic part combining
4449 @cindex automatic part combining
4450 @cindex part combiner
4453 Automatic part combining is used to merge two parts of music onto a
4454 staff. It is aimed at typesetting orchestral scores. When the two
4455 parts are identical for a period of time, only one is shown. In
4456 places where the two parts differ, they are typeset as separate
4457 voices, and stem directions are set automatically. Also, solo and
4458 @emph{a due} parts are identified and can be marked.
4462 The syntax for part combining is
4465 \partcombine @var{musicexpr1} @var{musicexpr2}
4468 The music expressions will be interpreted as @internalsref{Voice} contexts.
4470 The following example demonstrates the basic functionality of the part
4471 combiner: putting parts on one staff, and setting stem directions and
4474 @lilypond[verbatim,raggedright,fragment,relative=1]
4475 \new Staff \partcombine
4484 The first @code{g} appears only once, although it was
4485 specified twice (once in each part). Stem, slur and tie directions are
4486 set automatically, depending whether there is a solo or unisono. The
4487 first part (with context called @code{one}) always gets up stems, and
4488 `solo', while the second (called @code{two}) always gets down stems and
4491 If you just want the merging parts, and not the textual markings, you
4492 may set the property @var{soloADue} to false:
4494 @lilypond[verbatim,raggedright,fragment,relative=1]
4496 \set Staff.soloADue = ##f
4508 Internals: @internalsref{PartCombineMusic},
4509 @internalsref{SoloOneEvent}, and
4510 @internalsref{SoloTwoEvent}, and
4511 @internalsref{UnisonoEvent}.
4515 In @code{soloADue} mode, when the two voices play the same notes on and
4516 off, the part combiner may typeset @code{a2} more than once in a
4519 @code{\partcombine} can not be inside @code{\times}.
4521 Internally, the @code{\partcombine} interprets both arguments as
4522 @code{Voice}s named @code{one} and @code{two}, and then decides when
4523 the parts can be combined. Consequently, if the arguments switch to
4524 differently named @internalsref{Voice} contexts, then the events in
4525 those will be ignored.
4528 @subsection Hiding staves
4530 @cindex Frenched scores
4531 @cindex Hiding staves
4533 In orchestral scores, staff lines that only have rests are usually
4534 removed. This saves some space. This style is called `French Score'.
4535 For @internalsref{Lyrics},
4536 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
4537 switched on by default. When these line of these contexts turn out
4538 empty after the line-breaking process, they are removed.
4540 For normal staves, a specialized @internalsref{Staff} context is
4541 available, which does the same: staves containing nothing (or only
4542 multi measure rests) are removed. The context definition is stored in
4543 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
4544 in this example disappears in the second line:
4549 \notes \relative c' <<
4550 \new Staff { e4 f g a \break c1 }
4551 \new Staff { c4 d e f \break R1 }
4555 \translator { \RemoveEmptyStaffContext }
4560 The first page shows all staffs in full. If they should be removed
4561 from the first page too, set @code{remove-first} to false
4562 in @internalsref{RemoveEmptyVerticalGroup}.
4564 Another application is making ossia sections, i.e. alternative
4565 melodies on a separate piece of staff, with help of a Frenched
4566 staff. See @inputfileref{input/test,ossia.ly} for an example.
4569 @node Different editions from one source
4570 @subsection Different editions from one source
4572 The @code{\tag} command marks music expressions with a name. These
4573 tagged expressions can be filtered out later. With this mechanism it
4574 is possible to make different versions of the same music source.
4576 In the following example, we see two versions of a piece of music, one
4577 for the full score, and one with cue notes for the instrumental part:
4593 The same can be applied to articulations, texts, etc.: they are
4596 -\tag #@var{your-tag}
4598 to an articulation, for example,
4603 This defines a note with a conditional fingering indication.
4605 By applying the @code{remove-tag} function, tagged expressions can be
4606 filtered. For example,
4610 \apply #(remove-tag 'score) @var{the music}
4611 \apply #(remove-tag 'part) @var{the music}
4616 @lilypondfile[]{tag-filter.ly}
4618 The argument of the @code{\tag} command should be a symbol, or a list
4619 of symbols, for example,
4621 \tag #'(original-part transposed-part) @dots{}
4626 Examples: @inputfileref{input/regression,tag-filter.ly}.
4629 @node Quoting other voices
4630 @subsection Quoting other voices
4632 With quotations, fragments of other parts can be inserted into a part
4633 directly. Before a part can be quoted, it must be marked especially as
4634 quotable. This is done with code @code{\addquote} command. The
4635 quotation may then be done with @code{\quote}
4638 \addquote @var{name} @var{music}
4639 \quote @var{name} @var{duration}
4644 Here, @var{name} is an identifying string. The @var{music} is any kind
4645 of music. This is an example of @code{\addquote}:
4648 \addquote clarinet \notes\relative c' {
4653 During a part, a piece of music can be quoted with the @code{\quote}
4660 This would cite 3 quarter notes (a dotted half note) of the previously
4661 added clarinet voice.
4663 Quotations take into account the transposition both source and target
4664 instruments, if they are specified using the @code{\transposition} command.
4666 @lilypond[verbatim fragment]
4667 \addquote clarinet \notes\relative c' {
4673 e'8 f'8 \quote clarinet 2
4679 Only the contents of the first @internalsref{Voice} occurring in an
4680 @code{\addquote} command will be considered for quotation, so
4681 @var{music} can not contain @code{\new} and @code{\context Voice}
4682 statements that would switch to a different Voice.
4687 In this manual: @ref{Instrument transpositions}.
4689 Examples: @inputfileref{input/regression,quote.ly}
4690 @inputfileref{input/regression,quote-transposition.ly}
4692 Internals: @internalsref{QuoteMusic}.
4698 @node Ancient notation
4699 @section Ancient notation
4701 @cindex Vaticana, Editio
4702 @cindex Medicaea, Editio
4707 @c [TODO: write more comprehensive introduction on ancient notation]
4709 Support for ancient notation is still under heavy development.
4710 Regardless of all of the current limitations (see the bugs section
4711 below for details), it includes features for mensural
4712 notation and Gregorian Chant notation. There is also limited support
4713 for figured bass notation.
4715 Many graphical objects provide a @code{style} property, see
4716 @ref{Ancient note heads}, @ref{Ancient accidentals}, @ref{Ancient
4717 rests}, @ref{Ancient clefs}, @ref{Ancient flags} and @ref{Ancient time
4718 signatures}. By manipulating such a grob property, the typographical
4719 appearance of the affected graphical objects can be accomodated for a
4720 specific notation flavour without need for introducing any new
4724 Other aspects of ancient notation can not that easily be expressed as
4725 in terms of just changing a style property of a graphical object.
4726 Therefore, some notational concepts are introduced specifically for
4727 ancient notation, see @ref{Custodes}, @ref{Divisiones},
4728 @ref{Ligatures}, and @ref{Figured bass}.
4732 * Ancient note heads::
4733 * Ancient accidentals::
4737 * Ancient time signatures::
4742 * Vaticana style contexts::
4745 If this all is way too much of documentation for you, and you just
4746 want to dive into typesetting without worrying too much about the
4747 details on how to customize a context, then you may have a look at the
4748 predefined contexts (see @ref{Vaticana style contexts}). Use them to
4749 set up predefined style-specific voice and staff contexts, and
4750 directly go ahead with the note entry.
4754 Ligatures need special spacing that has not yet been implemented. As
4755 a result, there is too much space between ligatures most of the time,
4756 and line breaking often is unsatisfactory. Also, lyrics do not
4757 correctly align with ligatures.
4759 Accidentals must not be printed within a ligature, but instead need to
4760 be collected and printed in front of it.
4762 Augmentum dots within ligatures are not handled correctly.
4765 @node Ancient note heads
4766 @subsection Ancient note heads
4772 For ancient notation, a note head style other than the @code{default}
4773 style may be chosen. This is accomplished by setting the @code{style}
4774 property of the NoteHead object to the desired value (@code{baroque},
4775 @code{neo_mensural} or @code{mensural}). The @code{baroque} style
4776 differs from the @code{default} style only in using a square shape for
4777 @code{\breve} note heads. The @code{neo_mensural} style differs from
4778 the @code{baroque} style in that it uses rhomboidal heads for whole
4779 notes and all smaller durations. Stems are centered on the note
4780 heads. This style is in particular useful when transcribing mensural
4781 music, e.g. for the incipit. The @code{mensural} style finally
4782 produces note heads that mimick the look of note heads in historic
4783 printings of the 16th century.
4785 The following example demonstrates the @code{neo_mensural} style:
4787 @lilypond[fragment,raggedright,verbatim]
4788 \override NoteHead #'style = #'neo_mensural
4789 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
4792 When typesetting a piece in Gregorian Chant notation, a Gregorian
4793 ligature engraver will automatically select the proper note heads,
4794 such there is no need to explicitly set the note head style. Still,
4795 the note head style can be set e.g. to @code{vaticana_punctum} to
4796 produce punctum neumes. Similarly, a mensural ligature engraver is
4797 used to automatically assemble mensural ligatures. See
4798 @ref{Ligatures} for how ligature engravers work.
4803 @ref{Percussion staves} use note head styles of their own that are
4804 frequently used in contemporary music notation.
4806 Examples: @inputfileref{input/regression,note-head-style.ly} gives an
4807 overview over all available note head styles.
4810 @node Ancient accidentals
4811 @subsection Ancient accidentals
4817 Use the @code{style} property of grob @internalsref{Accidental} to
4818 select ancient accidentals. Supported styles are
4819 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
4821 @lilypond[raggedright,staffsize=26]
4829 { " " \musicglyph #"accidentals-vaticana-1"
4830 " " \musicglyph #"accidentals-vaticana0" }
4834 { " " \musicglyph #"accidentals-medicaea-1" }
4838 { " " \musicglyph #"accidentals-hufnagel-1" }
4842 { " " \musicglyph #"accidentals-mensural-1"
4843 " " \musicglyph #"accidentals-mensural1" }
4852 \remove "Bar_number_engraver"
4856 \remove "Clef_engraver"
4857 \remove "Key_engraver"
4858 \remove "Time_signature_engraver"
4859 \remove "Staff_symbol_engraver"
4860 minimumVerticalExtent = ##f
4866 As shown, not all accidentals are supported by each style. When
4867 trying to access an unsupported accidental, LilyPond will switch to a
4868 different style, as demonstrated in
4869 @inputfileref{input/test,ancient-accidentals.ly}.
4871 Similarly to local accidentals, the style of the key signature can be
4872 controlled by the @code{style} property of the
4873 @internalsref{KeySignature} grob.
4877 In this manual: @ref{Pitches}, @ref{Chromatic alterations} and
4878 @ref{Accidentals} give a general introduction into the use of
4879 accidentals. @ref{Key signature} gives a general introduction into
4880 the use of key signatures.
4882 Internals: @internalsref{KeySignature}.
4884 Examples: @inputfileref{input/test,ancient-accidentals.ly}.
4887 @subsection Ancient rests
4893 Use the @code{style} property of grob @internalsref{Rest} to select
4894 ancient accidentals. Supported styles are @code{classical},
4895 @code{neo_mensural} and @code{mensural}. @code{classical} differs
4896 from the @code{default} style only in that the quarter rest looks like
4897 a horizontally mirrored 8th rest. The @code{neo_mensural} style suits
4898 well for e.g. the incipit of a transcribed mensural piece of music.
4899 The @code{mensural} style finally mimicks the appearance of rests as
4900 in historic prints of the 16th century.
4902 The following example demonstrates the @code{neo_mensural} style:
4904 @lilypond[fragment,raggedright,verbatim]
4905 \override Rest #'style = #'neo_mensural
4906 r\longa r\breve r1 r2 r4 r8 r16
4909 There are no 32th and 64th rests specifically for the mensural or
4910 neo-mensural style. Instead, the rests from the default style will be
4911 taken. See @inputfileref{input/test,rests.ly} for a chart of all
4914 There are no rests in Gregorian Chant notation; instead, it uses
4919 In this manual: @ref{Rests} gives a general introduction into the use of rests.
4923 @subsection Ancient clefs
4929 LilyPond supports a variety of clefs, many of them ancient.
4931 The following table shows all ancient clefs that are supported via the
4932 @code{\clef} command. Some of the clefs use the same glyph, but
4933 differ only with respect to the line they are printed on. In such
4934 cases, a trailing number in the name is used to enumerate these clefs.
4935 Still, you can manually force a clef glyph to be typeset on an
4936 arbitrary line, as described in @ref{Clef}. The note printed to the
4937 right side of each clef in the example column denotes the @code{c'}
4938 with respect to that clef.
4940 @multitable @columnfractions .3 .3 .3 .1
4944 @b{Description} @tab
4945 @b{Supported Clefs} @tab
4949 @code{clefs-neo_mensural_c} @tab
4950 modern style mensural C clef @tab
4951 @code{neo_mensural_c1}, @code{neo_mensural_c2},
4952 @code{neo_mensural_c3}, @code{neo_mensural_c4} @tab
4953 @lilypond[relative,notime]
4954 \override Staff.TimeSignature #'transparent = ##t
4955 \clef "neo_mensural_c2" c
4959 @code{clefs-petrucci_c1}
4960 @code{clefs-petrucci_c2}
4961 @code{clefs-petrucci_c3}
4962 @code{clefs-petrucci_c4}
4963 @code{clefs-petrucci_c5}
4966 petrucci style mensural C clefs, for use on different stafflines
4967 (the examples shows the 2nd staffline C clef).
4977 @lilypond[relative,notime]
4978 \override Staff.TimeSignature #'transparent = ##t
4979 \clef "petrucci_c2" c
4983 @code{clefs-petrucci_f} @tab
4984 petrucci style mensural F clef @tab
4985 @code{petrucci_f} @tab
4986 @lilypond[relative,notime]
4987 \override Staff.TimeSignature #'transparent = ##t
4988 \clef "petrucci_f" c
4992 @code{clefs-petrucci_g} @tab
4993 petrucci style mensural G clef @tab
4994 @code{petrucci_g} @tab
4995 @lilypond[relative,notime]
4996 \override Staff.TimeSignature #'transparent = ##t
4997 \clef "petrucci_g" c
5001 @code{clefs-mensural_c} @tab
5002 historic style mensural C clef @tab
5003 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
5004 @code{mensural_c4} @tab
5005 @lilypond[relative,notime]
5006 \override Staff.TimeSignature #'transparent = ##t
5007 \clef "mensural_c2" c
5011 @code{clefs-mensural_f} @tab
5012 historic style mensural F clef @tab
5013 @code{mensural_f} @tab
5014 @lilypond[relative,notime]
5015 \override Staff.TimeSignature #'transparent = ##t
5016 \clef "mensural_f" c
5020 @code{clefs-mensural_g} @tab
5021 historic style mensural G clef @tab
5022 @code{mensural_g} @tab
5023 @lilypond[relative,notime]
5024 \override Staff.TimeSignature #'transparent = ##t
5025 \clef "mensural_g" c
5029 @code{clefs-vaticana_do} @tab
5030 Editio Vaticana style do clef @tab
5031 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
5032 @lilypond[relative,notime]
5033 \override Staff.StaffSymbol #'line-count = #4
5034 \override Staff.TimeSignature #'transparent = ##t
5035 \clef "vaticana_do2" c
5039 @code{clefs-vaticana_fa} @tab
5040 Editio Vaticana style fa clef @tab
5041 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
5042 @lilypond[relative,notime]
5043 \override Staff.StaffSymbol #'line-count = #4
5044 \override Staff.TimeSignature #'transparent = ##t
5045 \clef "vaticana_fa2" c
5049 @code{clefs-medicaea_do} @tab
5050 Editio Medicaea style do clef @tab
5051 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
5052 @lilypond[relative,notime]
5053 \override Staff.StaffSymbol #'line-count = #4
5054 \override Staff.TimeSignature #'transparent = ##t
5055 \clef "medicaea_do2" c
5059 @code{clefs-medicaea_fa} @tab
5060 Editio Medicaea style fa clef @tab
5061 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
5062 @lilypond[relative,notime]
5063 \override Staff.StaffSymbol #'line-count = #4
5064 \override Staff.TimeSignature #'transparent = ##t
5065 \clef "medicaea_fa2" c
5069 @code{clefs-hufnagel_do} @tab
5070 historic style hufnagel do clef @tab
5071 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
5072 @lilypond[relative,notime]
5073 \override Staff.StaffSymbol #'line-count = #4
5074 \override Staff.TimeSignature #'transparent = ##t
5075 \clef "hufnagel_do2" c
5079 @code{clefs-hufnagel_fa} @tab
5080 historic style hufnagel fa clef @tab
5081 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
5082 @lilypond[relative,notime]
5083 \override Staff.StaffSymbol #'line-count = #4
5084 \override Staff.TimeSignature #'transparent = ##t
5085 \clef "hufnagel_fa2" c
5089 @code{clefs-hufnagel_do_fa} @tab
5090 historic style hufnagel combined do/fa clef @tab
5091 @code{hufnagel_do_fa} @tab
5092 @lilypond[relative,notime]
5093 \override Staff.TimeSignature #'transparent = ##t
5094 \clef "hufnagel_do_fa" c
5099 @c --- This should go somewhere else: ---
5100 @c @item modern style percussion clef (glyph: @code{clefs-percussion})
5103 @c @code{percussion}
5105 @c @lilypond{\override Staff.TimeSignature #'transparent = ##t \clef "percussion" c'}
5107 @c @item modern style tab clef (glyph: @code{clefs-tab})
5112 @c @lilypond{\context Staff \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #6 \override Staff.TimeSignature #'transparent = ##t \clef "tab" c'}
5114 @emph{Modern style} means ``as is typeset in contemporary editions of
5115 transcribed mensural music''.
5117 @emph{Petrucci style} means ``inspired by printings published by the
5118 famous engraver Petrucci (1466-1539)''.
5120 @emph{Historic style} means ``as was typeset or written in historic
5121 editions (other than those of Petrucci)''.
5123 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
5125 Petrucci used C clefs with differently balanced left-side vertical
5126 beams, depending on which staffline it is printed.
5130 In this manual: for the percussion clef, see @ref{Percussion staves}.
5131 For the @code{TAB} clef, see @ref{Tablatures}.
5133 Internals: for modern clefs, see @ref{Clef}.
5137 The mensural g clef is temporarily mapped to the Petrucci g clef,
5138 until a new mensural g clef will have been implemented.
5143 @subsection Ancient flags
5149 Use the @code{flag-style} property of grob @internalsref{Stem} to
5150 select ancient flags. Besides the @code{default} flag style,
5151 only @code{mensural} style is supported:
5153 @lilypond[fragment,raggedright,verbatim]
5154 \override Stem #'flag-style = #'mensural
5155 \override Stem #'thickness = #1.0
5156 \override NoteHead #'style = #'mensural
5158 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
5159 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5162 Note that the innermost flare of each mensural flag always is
5163 vertically aligned with a staff line. If you do not like this
5164 behaviour, you can set the @code{adjust-if-on-staffline} property of
5165 grob @internalsref{Stem} to @code{##f}. Then, the vertical position
5166 of the end of each flare is different between notes on staff lines and
5167 notes between staff lines:
5169 @lilypond[fragment,raggedright]
5170 \override Stem #'flag-style = #'mensural
5171 \override Stem #'thickness = #1.0
5172 \override Stem #'adjust-if-on-staffline = ##f
5173 \override NoteHead #'style = #'mensural
5175 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
5176 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5179 There is no particular flag style for neo-mensural notation. Hence,
5180 when typesetting e.g. the incipit of a transcibed piece of mensural
5181 music, the default flag style should be used. There are no flags in
5182 Gregorian Chant notation.
5185 @node Ancient time signatures
5186 @subsection Ancient time signatures
5188 @cindex time signatures
5192 There is limited support for mensural time signatures. The
5193 glyphs are hard-wired to particular time fractions. In other words,
5194 to get a particular mensural signature glyph with the @code{\time n/m}
5195 command, @code{n} and @code{m} have to be chosen according to the
5201 \set Score.timing = ##f
5202 \set Score.barAlways = ##t
5203 s_\markup { "$\\backslash$time 4/4" }
5204 ^\markup { " " \musicglyph #"timesig-neo_mensural4/4" }
5206 s_\markup { "$\\backslash$time 2/2" }
5207 ^\markup { " " \musicglyph #"timesig-neo_mensural2/2" }
5209 s_\markup { "$\\backslash$time 6/4" }
5210 ^\markup { " " \musicglyph #"timesig-neo_mensural6/4" }
5212 s_\markup { "$\\backslash$time 6/8" }
5213 ^\markup { " " \musicglyph #"timesig-neo_mensural6/8" }
5215 s_\markup { "$\\backslash$time 3/2" }
5216 ^\markup { " " \musicglyph #"timesig-neo_mensural3/2" }
5218 s_\markup { "$\\backslash$time 3/4" }
5219 ^\markup { " " \musicglyph #"timesig-neo_mensural3/4" }
5221 s_\markup { "$\\backslash$time 9/4" }
5222 ^\markup { " " \musicglyph #"timesig-neo_mensural9/4" }
5224 s_\markup { "$\\backslash$time 9/8" }
5225 ^\markup { " " \musicglyph #"timesig-neo_mensural9/8" }
5227 s_\markup { "$\\backslash$time 4/8" }
5228 ^\markup { " " \musicglyph #"timesig-neo_mensural4/8" }
5230 s_\markup { "$\\backslash$time 2/4" }
5231 ^\markup { " " \musicglyph #"timesig-neo_mensural2/4" }
5239 \remove Staff_symbol_engraver
5240 \remove Clef_engraver
5241 \remove Time_signature_engraver
5247 Use the @code{style} property of grob @internalsref{TimeSignature} to
5248 select ancient time signatures. Supported styles are
5249 @code{neo_mensural} and @code{mensural}. The above table uses the
5250 @code{neo_mensural} style. This style is appropriate e.g. for the
5251 incipit of transcriptions of mensural pieces. The @code{mensural}
5252 style mimicks the look of historical printings of the 16th century.
5254 @inputfileref{input/test,time.ly} gives an overview over all available
5255 ancient and modern styles.
5259 Internals: @ref{Time signature} gives a general introduction into the use of time
5264 Mensural signature glyphs are mapped to time fractions in a
5265 hard-wired way. This mapping is sensible, but still arbitrary: given
5266 a mensural time signature, the time fraction represents a modern meter
5267 that usually will be a good choice when transcribing a mensural piece
5268 of music. For a particular piece of mensural music, however, the
5269 mapping may be unsatisfactory. In particular, the mapping assumes a
5270 fixed transcription of durations (e.g. brevis = half note in 2/2,
5271 i.e. 4:1). Some glyphs (such as the alternate glyph for 6/8 meter)
5272 are not at all accessible through the @code{\time} command.
5274 Mensural time signatures are supported typographically, but not yet
5275 musically. The internal representation of durations is
5276 based on a purely binary system; a ternary division such as 1 brevis =
5277 3 semibrevis (tempus perfectum) or 1 semibrevis = 3 minima (cum
5278 prolatione maiori) is not correctly handled: event times in ternary
5279 modes will be badly computed, resulting e.g. in horizontally
5280 misaligned note heads, and bar checks are likely to erroneously fail.
5282 The syntax and semantics of the @code{\time} command for mensural
5283 music is subject to change.
5286 @subsection Custodes
5291 A @emph{custos} (plural: @emph{custodes}; latin word for `guard') is a
5292 symbol that appears at the end of a staff. It anticipates the pitch
5293 of the first note(s) of the following line and thus helps the player
5294 or singer to manage line breaks during performance, thus enhancing
5295 readability of a score.
5297 Custodes were frequently used in music notation until the 17th
5298 century. Nowadays, they have survived only in a few particular forms
5299 of musical notation such as contemporary editions of Gregorian chant
5300 like the @emph{editio vaticana}. There are different custos glyphs
5301 used in different flavours of notational style.
5305 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
5306 @internalsref{Staff} context when declaring the @code{\paper} block,
5307 as shown in the following example:
5313 \consists Custos_engraver
5314 Custos \override #'style = #'mensural
5319 The result looks like this:
5325 \override Staff.Custos #'style = #'mensural
5332 \consists Custos_engraver
5339 The custos glyph is selected by the @code{style} property. The styles
5340 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
5341 @code{mensural}. They are demonstrated in the following fragment:
5351 { " " \musicglyph #"custodes-vaticana-u0" }
5355 { " " \musicglyph #"custodes-medicaea-u0" }
5359 { " " \musicglyph #"custodes-hufnagel-u0" }
5363 { " " \musicglyph #"custodes-mensural-u0" }
5372 \remove "Bar_number_engraver"
5376 \remove "Clef_engraver"
5377 \remove "Key_engraver"
5378 \remove "Time_signature_engraver"
5379 \remove "Staff_symbol_engraver"
5380 minimumVerticalExtent = ##f
5386 If the boolean property @code{adjust-if-on-staffline} is set to
5387 @code{#t} (which it is by default), lily typesets slightly different
5388 variants of the custos glyph, depending on whether the custos, is
5389 typeset on or between stafflines. The glyph will
5390 optically fit well into the staff, with the appendage on the right of
5391 the custos always ending at the same vertical position between two
5392 stafflines regardless of the pitch. If you set
5393 @code{adjust-if-on-staffline} to @code{#f}, then
5394 a compromise between both forms is used.
5396 Just like stems can be attached to noteheads in two directions
5397 @emph{up} and @emph{down}, each custos glyph is available with its
5398 appendage pointing either up or down. If the pitch of a custos is
5399 above a selectable position, the appendage will point downwards; if
5400 the pitch is below this position, the appendage will point upwards.
5401 Use property @code{neutral-position} to select this position. By
5402 default, it is set to @code{0}, such that the neutral position is the
5403 center of the staff. Use property @code{neutral-direction} to control
5404 what happens if a custos is typeset on the neutral position itself.
5405 By default, this property is set to @code{-1}, such that the appendage
5406 will point downwards. If set to @code{1}, the appendage will point
5407 upwards. Other values such as @code{0} are reserved for future
5408 extensions and should not be used.
5412 Internals: @internalsref{Custos}.
5414 Examples: @inputfileref{input/regression,custos.ly}.
5418 @subsection Divisiones
5424 A @emph{divisio} (plural: @emph{divisiones}; latin word for
5425 `division') is a staff context symbol that is used to structure
5426 Gregorian music into phrases and sections. The musical meaning of
5427 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
5428 can be characterized as short, medium and long pause, somewhat like
5429 @ref{Breath marks}. The @emph{finalis} sign not only marks the end of
5430 a chant, but is also frequently used within a single
5431 antiphonal/responsorial chant to mark the end of each section.
5435 To use divisiones, include the file @code{gregorian-init.ly}. It
5436 contains definitions that you can apply by just inserting
5437 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
5438 and @code{\finalis} at proper places in the input. Some editions use
5439 @emph{virgula} or @emph{caesura} instead of divisio minima.
5440 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
5443 @lilypondfile[]{divisiones.ly}
5447 @cindex @code{\virgula}
5449 @cindex @code{\caesura}
5451 @cindex @code{\divisioMinima}
5452 @code{\divisioMinima},
5453 @cindex @code{\divisioMaior}
5454 @code{\divisioMaior},
5455 @cindex @code{\divisioMaxima}
5456 @code{\divisioMaxima},
5457 @cindex @code{\finalis}
5462 In this manual: @ref{Breath marks}.
5464 Internals: @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}.
5466 Examples: @inputfileref{input/test,divisiones.ly}.
5469 @subsection Ligatures
5473 @c TODO: Should double check if I recalled things correctly when I wrote
5474 @c down the following paragraph by heart.
5476 In musical terminology, a ligature is a coherent graphical symbol that
5477 represents at least two distinct notes. Ligatures originally appeared
5478 in the manuscripts of Gregorian chant notation roughly since the 9th
5479 century as an allusion to the accent symbols of greek lyric poetry to
5480 denote ascending or descending sequences of notes. Both, the shape
5481 and the exact meaning of ligatures changed tremendously during the
5482 following centuries: In early notation, ligatures were used for
5483 monophonic tunes (Gregorian chant) and very soon denoted also the way
5484 of performance in the sense of articulation. With upcoming
5485 multiphony, the need for a metric system arised, since multiple voices
5486 of a piece have to be synchronized some way. New notation systems
5487 were invented that used the manifold shapes of ligatures to now denote
5488 rhythmical patterns (e.g. black mensural notation, mannered notation,
5489 ars nova). With the invention of the metric system of the white
5490 mensural notation, the need for ligatures to denote such patterns
5491 disappeared. Nevertheless, ligatures were still in use in the
5492 mensural system for a couple of decades until they finally disappeared
5493 during the late 16th / early 17th century. Still, ligatures have
5494 survived in contemporary editions of Gregorian chant such as the
5495 Editio Vaticana from 1905/08.
5499 Syntactically, ligatures are simply enclosed by @code{\[} and
5500 @code{\]}. Some ligature styles (such as Editio Vaticana) may need
5501 additional input syntax specific for this particular type of ligature.
5502 By default, the @internalsref{LigatureBracket} engraver just puts a
5503 square bracket above the ligature:
5505 @lilypond[raggedright,verbatim]
5507 \notes \transpose c c' {
5515 To select a specific style of ligatures, a proper ligature engraver
5516 has to be added to the @internalsref{Voice} context, as explained in
5517 the following subsections. Only white mensural ligatures
5518 are supported with certain limitations. Support for Editio Vaticana
5519 will be added in the future.
5522 * White mensural ligatures::
5523 * Gregorian square neumes ligatures::
5526 @node White mensural ligatures
5527 @subsubsection White mensural ligatures
5529 @cindex Mensural ligatures
5530 @cindex White mensural ligatures
5532 There is limited support for white mensural ligatures. The
5533 implementation is still experimental; it may output strange
5534 warnings or even crash in some cases or produce weird results on more
5539 To engrave white mensural ligatures, in the paper block the
5540 @internalsref{Mensural_ligature_engraver} has to be put into the
5541 @internalsref{Voice} context, and remove the
5542 @internalsref{Ligature_bracket_engraver}:
5548 \remove Ligature_bracket_engraver
5549 \consists Mensural_ligature_engraver
5554 There is no additional input language to describe the shape of a
5555 white mensural ligature. The shape is rather determined solely from
5556 the pitch and duration of the enclosed notes. While this approach may
5557 take a new user a while to get accustomed, it has the great advantage
5558 that the full musical information of the ligature is known internally.
5559 This is not only required for correct MIDI output, but also allows for
5560 automatic transcription of the ligatures.
5565 \set Score.timing = ##f
5566 \set Score.defaultBarType = "empty"
5567 \override NoteHead #'style = #'neo_mensural
5568 \override Staff.TimeSignature #'style = #'neo_mensural
5570 \[ g\longa c\breve a\breve f\breve d'\longa \]
5572 \[ e1 f1 a\breve g\longa \]
5574 @lilypond[raggedright]
5576 \notes \transpose c c' {
5577 \set Score.timing = ##f
5578 \set Score.defaultBarType = "empty"
5579 \override NoteHead #'style = #'neo_mensural
5580 \override Staff.TimeSignature #'style = #'neo_mensural
5582 \[ g\longa c\breve a\breve f\breve d'\longa \]
5584 \[ e1 f1 a\breve g\longa \]
5589 \remove Ligature_bracket_engraver
5590 \consists Mensural_ligature_engraver
5596 Without replacing @internalsref{Ligature_bracket_engraver} with
5597 @internalsref{Mensural_ligature_engraver}, the same music transcribes
5600 @lilypond[raggedright]
5602 \notes \transpose c c' {
5603 \set Score.timing = ##f
5604 \set Score.defaultBarType = "empty"
5605 \override NoteHead #'style = #'neo_mensural
5606 \override Staff.TimeSignature #'style = #'neo_mensural
5608 \[ g\longa c\breve a\breve f\breve d'\longa \]
5610 \[ e1 f1 a\breve g\longa \]
5616 @node Gregorian square neumes ligatures
5617 @subsubsection Gregorian square neumes ligatures
5619 @cindex Square neumes ligatures
5620 @cindex Gregorian square neumes ligatures
5622 Gregorian square neumes notation (following the style of the Editio
5623 Vaticana) is under heavy development, but not yet really usable for
5624 production purposes. Core ligatures can already be typeset, but
5625 essential issues for serious typesetting are still under development,
5626 such as (among others) horizontal alignment of multiple ligatures,
5627 lyrics alignment and proper accidentals handling. Still, this section
5628 gives a sneak preview of what Gregorian chant may look like once it
5631 The following table contains the extended neumes table of the 2nd
5632 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
5633 1983 by the monks of Solesmes.
5635 @multitable @columnfractions .4 .2 .2 .2
5638 @b{Neuma aut@*Neumarum Elementa} @tab
5639 @b{Figurae@*Rectae} @tab
5640 @b{Figurae@*Liquescentes Auctae} @tab
5641 @b{Figurae@*Liquescentes Deminutae}
5643 @c TODO: \paper block is identical in all of the below examples.
5644 @c Therefore, it should somehow be included rather than duplicated all
5647 @c why not make identifiers in ly/engraver-init.ly? --hwn
5649 @c Because it's just used to typeset plain notes without
5650 @c a staff for demonstration purposes rather than something
5651 @c special of Gregorian chant notation. --jr
5656 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.5\cm]
5657 \include "gregorian-init.ly"
5659 \notes \transpose c c' {
5662 \noBreak s^\markup {"a"} \noBreak
5664 % Punctum Inclinatum
5666 \noBreak s^\markup {"b"}
5672 \remove "Bar_number_engraver"
5676 \remove "Clef_engraver"
5677 \remove "Key_engraver"
5678 \override StaffSymbol #'transparent = ##t
5679 \remove "Time_signature_engraver"
5680 \remove "Bar_engraver"
5681 minimumVerticalExtent = ##f
5685 \remove Ligature_bracket_engraver
5686 \consists Vaticana_ligature_engraver
5687 \override NoteHead #'style = #'vaticana_punctum
5688 \override Stem #'transparent = ##t
5694 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.5\cm]
5695 \include "gregorian-init.ly"
5697 \notes \transpose c c' {
5698 % Punctum Auctum Ascendens
5699 \[ \auctum \ascendens b \]
5700 \noBreak s^\markup {"c"} \noBreak
5702 % Punctum Auctum Descendens
5703 \[ \auctum \descendens b \]
5704 \noBreak s^\markup {"d"} \noBreak
5706 % Punctum Inclinatum Auctum
5707 \[ \inclinatum \auctum b \]
5708 \noBreak s^\markup {"e"}
5714 \remove "Bar_number_engraver"
5718 \remove "Clef_engraver"
5719 \remove "Key_engraver"
5720 \override StaffSymbol #'transparent = ##t
5721 \remove "Time_signature_engraver"
5722 \remove "Bar_engraver"
5723 minimumVerticalExtent = ##f
5727 \remove Ligature_bracket_engraver
5728 \consists Vaticana_ligature_engraver
5729 \override NoteHead #'style = #'vaticana_punctum
5730 \override Stem #'transparent = ##t
5736 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5737 \include "gregorian-init.ly"
5739 \notes \transpose c c' {
5740 % Punctum Inclinatum Parvum
5741 \[ \inclinatum \deminutum b \]
5742 \noBreak s^\markup {"f"}
5748 \remove "Bar_number_engraver"
5752 \remove "Clef_engraver"
5753 \remove "Key_engraver"
5754 \override StaffSymbol #'transparent = ##t
5755 \remove "Time_signature_engraver"
5756 \remove "Bar_engraver"
5757 minimumVerticalExtent = ##f
5761 \remove Ligature_bracket_engraver
5762 \consists Vaticana_ligature_engraver
5763 \override NoteHead #'style = #'vaticana_punctum
5764 \override Stem #'transparent = ##t
5773 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5774 \include "gregorian-init.ly"
5776 \notes \transpose c c' {
5779 \noBreak s^\markup {"g"}
5785 \remove "Bar_number_engraver"
5789 \remove "Clef_engraver"
5790 \remove "Key_engraver"
5791 \override StaffSymbol #'transparent = ##t
5792 \remove "Time_signature_engraver"
5793 \remove "Bar_engraver"
5794 minimumVerticalExtent = ##f
5798 \remove Ligature_bracket_engraver
5799 \consists Vaticana_ligature_engraver
5800 \override NoteHead #'style = #'vaticana_punctum
5801 \override Stem #'transparent = ##t
5810 @code{3. Apostropha vel Stropha}
5812 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5813 \include "gregorian-init.ly"
5815 \notes \transpose c c' {
5818 \noBreak s^\markup {"h"}
5824 \remove "Bar_number_engraver"
5828 \remove "Clef_engraver"
5829 \remove "Key_engraver"
5830 \override StaffSymbol #'transparent = ##t
5831 \remove "Time_signature_engraver"
5832 \remove "Bar_engraver"
5833 minimumVerticalExtent = ##f
5837 \remove Ligature_bracket_engraver
5838 \consists Vaticana_ligature_engraver
5839 \override NoteHead #'style = #'vaticana_punctum
5840 \override Stem #'transparent = ##t
5846 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5847 \include "gregorian-init.ly"
5849 \notes \transpose c c' {
5851 \[ \stropha \auctum b \]
5852 \noBreak s^\markup {"i"}
5858 \remove "Bar_number_engraver"
5862 \remove "Clef_engraver"
5863 \remove "Key_engraver"
5864 \override StaffSymbol #'transparent = ##t
5865 \remove "Time_signature_engraver"
5866 \remove "Bar_engraver"
5867 minimumVerticalExtent = ##f
5871 \remove Ligature_bracket_engraver
5872 \consists Vaticana_ligature_engraver
5873 \override NoteHead #'style = #'vaticana_punctum
5874 \override Stem #'transparent = ##t
5884 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5885 \include "gregorian-init.ly"
5887 \notes \transpose c c' {
5890 \noBreak s^\markup {"j"}
5896 \remove "Bar_number_engraver"
5900 \remove "Clef_engraver"
5901 \remove "Key_engraver"
5902 \override StaffSymbol #'transparent = ##t
5903 \remove "Time_signature_engraver"
5904 \remove "Bar_engraver"
5905 minimumVerticalExtent = ##f
5909 \remove Ligature_bracket_engraver
5910 \consists Vaticana_ligature_engraver
5911 \override NoteHead #'style = #'vaticana_punctum
5912 \override Stem #'transparent = ##t
5921 @code{5. Clivis vel Flexa}
5923 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5924 \include "gregorian-init.ly"
5926 \notes \transpose c c' {
5935 \remove "Bar_number_engraver"
5939 \remove "Clef_engraver"
5940 \remove "Key_engraver"
5941 \override StaffSymbol #'transparent = ##t
5942 \remove "Time_signature_engraver"
5943 \remove "Bar_engraver"
5944 minimumVerticalExtent = ##f
5948 \remove Ligature_bracket_engraver
5949 \consists Vaticana_ligature_engraver
5950 \override NoteHead #'style = #'vaticana_punctum
5951 \override Stem #'transparent = ##t
5957 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.0\cm]
5958 \include "gregorian-init.ly"
5960 \notes \transpose c c' {
5961 % Clivis Aucta Descendens
5962 \[ b \flexa \auctum \descendens g \]
5963 \noBreak s^\markup {"l"} \noBreak
5965 % Clivis Aucta Ascendens
5966 \[ b \flexa \auctum \ascendens g \]
5967 \noBreak s^\markup {"m"}
5973 \remove "Bar_number_engraver"
5977 \remove "Clef_engraver"
5978 \remove "Key_engraver"
5979 \override StaffSymbol #'transparent = ##t
5980 \remove "Time_signature_engraver"
5981 \remove "Bar_engraver"
5982 minimumVerticalExtent = ##f
5986 \remove Ligature_bracket_engraver
5987 \consists Vaticana_ligature_engraver
5988 \override NoteHead #'style = #'vaticana_punctum
5989 \override Stem #'transparent = ##t
5995 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5996 \include "gregorian-init.ly"
5998 \notes \transpose c c' {
6000 \[ b \flexa \deminutum g \]
6007 \remove "Bar_number_engraver"
6011 \remove "Clef_engraver"
6012 \remove "Key_engraver"
6013 \override StaffSymbol #'transparent = ##t
6014 \remove "Time_signature_engraver"
6015 \remove "Bar_engraver"
6016 minimumVerticalExtent = ##f
6020 \remove Ligature_bracket_engraver
6021 \consists Vaticana_ligature_engraver
6022 \override NoteHead #'style = #'vaticana_punctum
6023 \override Stem #'transparent = ##t
6030 @code{6. Podatus vel Pes}
6032 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6033 \include "gregorian-init.ly"
6035 \notes \transpose c c' {
6044 \remove "Bar_number_engraver"
6048 \remove "Clef_engraver"
6049 \remove "Key_engraver"
6050 \override StaffSymbol #'transparent = ##t
6051 \remove "Time_signature_engraver"
6052 \remove "Bar_engraver"
6053 minimumVerticalExtent = ##f
6057 \remove Ligature_bracket_engraver
6058 \consists Vaticana_ligature_engraver
6059 \override NoteHead #'style = #'vaticana_punctum
6060 \override Stem #'transparent = ##t
6066 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6067 \include "gregorian-init.ly"
6069 \notes \transpose c c' {
6070 % Pes Auctus Descendens
6071 \[ g \pes \auctum \descendens b \]
6072 \noBreak s^\markup {"p"} \noBreak
6074 % Pes Auctus Ascendens
6075 \[ g \pes \auctum \ascendens b \]
6076 \noBreak s^\markup {"q"}
6082 \remove "Bar_number_engraver"
6086 \remove "Clef_engraver"
6087 \remove "Key_engraver"
6088 \override StaffSymbol #'transparent = ##t
6089 \remove "Time_signature_engraver"
6090 \remove "Bar_engraver"
6091 minimumVerticalExtent = ##f
6095 \remove Ligature_bracket_engraver
6096 \consists Vaticana_ligature_engraver
6097 \override NoteHead #'style = #'vaticana_punctum
6098 \override Stem #'transparent = ##t
6104 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6105 \include "gregorian-init.ly"
6107 \notes \transpose c c' {
6109 \[ g \pes \deminutum b \]
6116 \remove "Bar_number_engraver"
6120 \remove "Clef_engraver"
6121 \remove "Key_engraver"
6122 \override StaffSymbol #'transparent = ##t
6123 \remove "Time_signature_engraver"
6124 \remove "Bar_engraver"
6125 minimumVerticalExtent = ##f
6129 \remove Ligature_bracket_engraver
6130 \consists Vaticana_ligature_engraver
6131 \override NoteHead #'style = #'vaticana_punctum
6132 \override Stem #'transparent = ##t
6139 @code{7. Pes Quassus}
6141 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6142 \include "gregorian-init.ly"
6144 \notes \transpose c c' {
6146 \[ \oriscus g \pes \virga b \]
6153 \remove "Bar_number_engraver"
6157 \remove "Clef_engraver"
6158 \remove "Key_engraver"
6159 \override StaffSymbol #'transparent = ##t
6160 \remove "Time_signature_engraver"
6161 \remove "Bar_engraver"
6162 minimumVerticalExtent = ##f
6166 \remove Ligature_bracket_engraver
6167 \consists Vaticana_ligature_engraver
6168 \override NoteHead #'style = #'vaticana_punctum
6169 \override Stem #'transparent = ##t
6175 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6176 \include "gregorian-init.ly"
6178 \notes \transpose c c' {
6179 % Pes Quassus Auctus Descendens
6180 \[ \oriscus g \pes \auctum \descendens b \]
6187 \remove "Bar_number_engraver"
6191 \remove "Clef_engraver"
6192 \remove "Key_engraver"
6193 \override StaffSymbol #'transparent = ##t
6194 \remove "Time_signature_engraver"
6195 \remove "Bar_engraver"
6196 minimumVerticalExtent = ##f
6200 \remove Ligature_bracket_engraver
6201 \consists Vaticana_ligature_engraver
6202 \override NoteHead #'style = #'vaticana_punctum
6203 \override Stem #'transparent = ##t
6211 @code{8. Quilisma Pes}
6213 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6214 \include "gregorian-init.ly"
6216 \notes \transpose c c' {
6218 \[ \quilisma g \pes b \]
6225 \remove "Bar_number_engraver"
6229 \remove "Clef_engraver"
6230 \remove "Key_engraver"
6231 \override StaffSymbol #'transparent = ##t
6232 \remove "Time_signature_engraver"
6233 \remove "Bar_engraver"
6234 minimumVerticalExtent = ##f
6238 \remove Ligature_bracket_engraver
6239 \consists Vaticana_ligature_engraver
6240 \override NoteHead #'style = #'vaticana_punctum
6241 \override Stem #'transparent = ##t
6247 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6248 \include "gregorian-init.ly"
6250 \notes \transpose c c' {
6251 % Quilisma Pes Auctus Descendens
6252 \[ \quilisma g \pes \auctum \descendens b \]
6259 \remove "Bar_number_engraver"
6263 \remove "Clef_engraver"
6264 \remove "Key_engraver"
6265 \override StaffSymbol #'transparent = ##t
6266 \remove "Time_signature_engraver"
6267 \remove "Bar_engraver"
6268 minimumVerticalExtent = ##f
6272 \remove Ligature_bracket_engraver
6273 \consists Vaticana_ligature_engraver
6274 \override NoteHead #'style = #'vaticana_punctum
6275 \override Stem #'transparent = ##t
6283 @code{9. Podatus Initio Debilis}
6285 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6286 \include "gregorian-init.ly"
6288 \notes \transpose c c' {
6289 % Pes Initio Debilis
6290 \[ \deminutum g \pes b \]
6297 \remove "Bar_number_engraver"
6301 \remove "Clef_engraver"
6302 \remove "Key_engraver"
6303 \override StaffSymbol #'transparent = ##t
6304 \remove "Time_signature_engraver"
6305 \remove "Bar_engraver"
6306 minimumVerticalExtent = ##f
6310 \remove Ligature_bracket_engraver
6311 \consists Vaticana_ligature_engraver
6312 \override NoteHead #'style = #'vaticana_punctum
6313 \override Stem #'transparent = ##t
6319 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6320 \include "gregorian-init.ly"
6322 \notes \transpose c c' {
6323 % Pes Auctus Descendens Initio Debilis
6324 \[ \deminutum g \pes \auctum \descendens b \]
6331 \remove "Bar_number_engraver"
6335 \remove "Clef_engraver"
6336 \remove "Key_engraver"
6337 \override StaffSymbol #'transparent = ##t
6338 \remove "Time_signature_engraver"
6339 \remove "Bar_engraver"
6340 minimumVerticalExtent = ##f
6344 \remove Ligature_bracket_engraver
6345 \consists Vaticana_ligature_engraver
6346 \override NoteHead #'style = #'vaticana_punctum
6347 \override Stem #'transparent = ##t
6357 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6358 \include "gregorian-init.ly"
6360 \notes \transpose c c' {
6362 \[ a \pes b \flexa g \]
6369 \remove "Bar_number_engraver"
6373 \remove "Clef_engraver"
6374 \remove "Key_engraver"
6375 \override StaffSymbol #'transparent = ##t
6376 \remove "Time_signature_engraver"
6377 \remove "Bar_engraver"
6378 minimumVerticalExtent = ##f
6382 \remove Ligature_bracket_engraver
6383 \consists Vaticana_ligature_engraver
6384 \override NoteHead #'style = #'vaticana_punctum
6385 \override Stem #'transparent = ##t
6391 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6392 \include "gregorian-init.ly"
6394 \notes \transpose c c' {
6395 % Torculus Auctus Descendens
6396 \[ a \pes b \flexa \auctum \descendens g \]
6403 \remove "Bar_number_engraver"
6407 \remove "Clef_engraver"
6408 \remove "Key_engraver"
6409 \override StaffSymbol #'transparent = ##t
6410 \remove "Time_signature_engraver"
6411 \remove "Bar_engraver"
6412 minimumVerticalExtent = ##f
6416 \remove Ligature_bracket_engraver
6417 \consists Vaticana_ligature_engraver
6418 \override NoteHead #'style = #'vaticana_punctum
6419 \override Stem #'transparent = ##t
6425 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6426 \include "gregorian-init.ly"
6428 \notes \transpose c c' {
6429 % Torculus Deminutus
6430 \[ a \pes b \flexa \deminutum g \]
6437 \remove "Bar_number_engraver"
6441 \remove "Clef_engraver"
6442 \remove "Key_engraver"
6443 \override StaffSymbol #'transparent = ##t
6444 \remove "Time_signature_engraver"
6445 \remove "Bar_engraver"
6446 minimumVerticalExtent = ##f
6450 \remove Ligature_bracket_engraver
6451 \consists Vaticana_ligature_engraver
6452 \override NoteHead #'style = #'vaticana_punctum
6453 \override Stem #'transparent = ##t
6460 @code{11. Torculus Initio Debilis}
6462 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6463 \include "gregorian-init.ly"
6465 \notes \transpose c c' {
6466 % Torculus Initio Debilis
6467 \[ \deminutum a \pes b \flexa g \]
6474 \remove "Bar_number_engraver"
6478 \remove "Clef_engraver"
6479 \remove "Key_engraver"
6480 \override StaffSymbol #'transparent = ##t
6481 \remove "Time_signature_engraver"
6482 \remove "Bar_engraver"
6483 minimumVerticalExtent = ##f
6487 \remove Ligature_bracket_engraver
6488 \consists Vaticana_ligature_engraver
6489 \override NoteHead #'style = #'vaticana_punctum
6490 \override Stem #'transparent = ##t
6496 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6497 \include "gregorian-init.ly"
6499 \notes \transpose c c' {
6500 % Torculus Auctus Descendens Initio Debilis
6501 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6508 \remove "Bar_number_engraver"
6512 \remove "Clef_engraver"
6513 \remove "Key_engraver"
6514 \override StaffSymbol #'transparent = ##t
6515 \remove "Time_signature_engraver"
6516 \remove "Bar_engraver"
6517 minimumVerticalExtent = ##f
6521 \remove Ligature_bracket_engraver
6522 \consists Vaticana_ligature_engraver
6523 \override NoteHead #'style = #'vaticana_punctum
6524 \override Stem #'transparent = ##t
6530 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6531 \include "gregorian-init.ly"
6533 \notes \transpose c c' {
6534 % Torculus Deminutus Initio Debilis
6535 \[ \deminutum a \pes b \flexa \deminutum g \]
6542 \remove "Bar_number_engraver"
6546 \remove "Clef_engraver"
6547 \remove "Key_engraver"
6548 \override StaffSymbol #'transparent = ##t
6549 \remove "Time_signature_engraver"
6550 \remove "Bar_engraver"
6551 minimumVerticalExtent = ##f
6555 \remove Ligature_bracket_engraver
6556 \consists Vaticana_ligature_engraver
6557 \override NoteHead #'style = #'vaticana_punctum
6558 \override Stem #'transparent = ##t
6565 @code{12. Porrectus}
6567 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6568 \include "gregorian-init.ly"
6570 \notes \transpose c c' {
6572 \[ a \flexa g \pes b \]
6579 \remove "Bar_number_engraver"
6583 \remove "Clef_engraver"
6584 \remove "Key_engraver"
6585 \override StaffSymbol #'transparent = ##t
6586 \remove "Time_signature_engraver"
6587 \remove "Bar_engraver"
6588 minimumVerticalExtent = ##f
6592 \remove Ligature_bracket_engraver
6593 \consists Vaticana_ligature_engraver
6594 \override NoteHead #'style = #'vaticana_punctum
6595 \override Stem #'transparent = ##t
6601 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6602 \include "gregorian-init.ly"
6604 \notes \transpose c c' {
6605 % Porrectus Auctus Descendens
6606 \[ a \flexa g \pes \auctum \descendens b \]
6613 \remove "Bar_number_engraver"
6617 \remove "Clef_engraver"
6618 \remove "Key_engraver"
6619 \override StaffSymbol #'transparent = ##t
6620 \remove "Time_signature_engraver"
6621 \remove "Bar_engraver"
6622 minimumVerticalExtent = ##f
6626 \remove Ligature_bracket_engraver
6627 \consists Vaticana_ligature_engraver
6628 \override NoteHead #'style = #'vaticana_punctum
6629 \override Stem #'transparent = ##t
6635 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6636 \include "gregorian-init.ly"
6638 \notes \transpose c c' {
6639 % Porrectus Deminutus
6640 \[ a \flexa g \pes \deminutum b \]
6647 \remove "Bar_number_engraver"
6651 \remove "Clef_engraver"
6652 \remove "Key_engraver"
6653 \override StaffSymbol #'transparent = ##t
6654 \remove "Time_signature_engraver"
6655 \remove "Bar_engraver"
6656 minimumVerticalExtent = ##f
6660 \remove Ligature_bracket_engraver
6661 \consists Vaticana_ligature_engraver
6662 \override NoteHead #'style = #'vaticana_punctum
6663 \override Stem #'transparent = ##t
6672 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6673 \include "gregorian-init.ly"
6675 \notes \transpose c c' {
6677 \[ \virga b \inclinatum a \inclinatum g \]
6684 \remove "Bar_number_engraver"
6688 \remove "Clef_engraver"
6689 \remove "Key_engraver"
6690 \override StaffSymbol #'transparent = ##t
6691 \remove "Time_signature_engraver"
6692 \remove "Bar_engraver"
6693 minimumVerticalExtent = ##f
6697 \remove Ligature_bracket_engraver
6698 \consists Vaticana_ligature_engraver
6699 \override NoteHead #'style = #'vaticana_punctum
6700 \override Stem #'transparent = ##t
6706 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6707 \include "gregorian-init.ly"
6709 \notes \transpose c c' {
6711 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6718 \remove "Bar_number_engraver"
6722 \remove "Clef_engraver"
6723 \remove "Key_engraver"
6724 \override StaffSymbol #'transparent = ##t
6725 \remove "Time_signature_engraver"
6726 \remove "Bar_engraver"
6727 minimumVerticalExtent = ##f
6731 \remove Ligature_bracket_engraver
6732 \consists Vaticana_ligature_engraver
6733 \override NoteHead #'style = #'vaticana_punctum
6734 \override Stem #'transparent = ##t
6740 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6741 \include "gregorian-init.ly"
6743 \notes \transpose c c' {
6744 % Climacus Deminutus
6745 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6752 \remove "Bar_number_engraver"
6756 \remove "Clef_engraver"
6757 \remove "Key_engraver"
6758 \override StaffSymbol #'transparent = ##t
6759 \remove "Time_signature_engraver"
6760 \remove "Bar_engraver"
6761 minimumVerticalExtent = ##f
6765 \remove Ligature_bracket_engraver
6766 \consists Vaticana_ligature_engraver
6767 \override NoteHead #'style = #'vaticana_punctum
6768 \override Stem #'transparent = ##t
6775 @code{14. Scandicus}
6777 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6778 \include "gregorian-init.ly"
6780 \notes \transpose c c' {
6782 \[ g \pes a \virga b \]
6789 \remove "Bar_number_engraver"
6793 \remove "Clef_engraver"
6794 \remove "Key_engraver"
6795 \override StaffSymbol #'transparent = ##t
6796 \remove "Time_signature_engraver"
6797 \remove "Bar_engraver"
6798 minimumVerticalExtent = ##f
6802 \remove Ligature_bracket_engraver
6803 \consists Vaticana_ligature_engraver
6804 \override NoteHead #'style = #'vaticana_punctum
6805 \override Stem #'transparent = ##t
6811 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6812 \include "gregorian-init.ly"
6814 \notes \transpose c c' {
6815 % Scandicus Auctus Descendens
6816 \[ g \pes a \pes \auctum \descendens b \]
6823 \remove "Bar_number_engraver"
6827 \remove "Clef_engraver"
6828 \remove "Key_engraver"
6829 \override StaffSymbol #'transparent = ##t
6830 \remove "Time_signature_engraver"
6831 \remove "Bar_engraver"
6832 minimumVerticalExtent = ##f
6836 \remove Ligature_bracket_engraver
6837 \consists Vaticana_ligature_engraver
6838 \override NoteHead #'style = #'vaticana_punctum
6839 \override Stem #'transparent = ##t
6845 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6846 \include "gregorian-init.ly"
6848 \notes \transpose c c' {
6849 % Scandicus Deminutus
6850 \[ g \pes a \pes \deminutum b \]
6857 \remove "Bar_number_engraver"
6861 \remove "Clef_engraver"
6862 \remove "Key_engraver"
6863 \override StaffSymbol #'transparent = ##t
6864 \remove "Time_signature_engraver"
6865 \remove "Bar_engraver"
6866 minimumVerticalExtent = ##f
6870 \remove Ligature_bracket_engraver
6871 \consists Vaticana_ligature_engraver
6872 \override NoteHead #'style = #'vaticana_punctum
6873 \override Stem #'transparent = ##t
6882 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6883 \include "gregorian-init.ly"
6885 \notes \transpose c c' {
6887 \[ g \oriscus a \pes \virga b \]
6894 \remove "Bar_number_engraver"
6898 \remove "Clef_engraver"
6899 \remove "Key_engraver"
6900 \override StaffSymbol #'transparent = ##t
6901 \remove "Time_signature_engraver"
6902 \remove "Bar_engraver"
6903 minimumVerticalExtent = ##f
6907 \remove Ligature_bracket_engraver
6908 \consists Vaticana_ligature_engraver
6909 \override NoteHead #'style = #'vaticana_punctum
6910 \override Stem #'transparent = ##t
6916 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6917 \include "gregorian-init.ly"
6919 \notes \transpose c c' {
6920 % Salicus Auctus Descendens
6921 \[ g \oriscus a \pes \auctum \descendens b \]
6928 \remove "Bar_number_engraver"
6932 \remove "Clef_engraver"
6933 \remove "Key_engraver"
6934 \override StaffSymbol #'transparent = ##t
6935 \remove "Time_signature_engraver"
6936 \remove "Bar_engraver"
6937 minimumVerticalExtent = ##f
6941 \remove Ligature_bracket_engraver
6942 \consists Vaticana_ligature_engraver
6943 \override NoteHead #'style = #'vaticana_punctum
6944 \override Stem #'transparent = ##t
6954 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6955 \include "gregorian-init.ly"
6957 \notes \transpose c c' {
6959 \[ \stropha b \stropha b \stropha a \]
6966 \remove "Bar_number_engraver"
6970 \remove "Clef_engraver"
6971 \remove "Key_engraver"
6972 \override StaffSymbol #'transparent = ##t
6973 \remove "Time_signature_engraver"
6974 \remove "Bar_engraver"
6975 minimumVerticalExtent = ##f
6979 \remove Ligature_bracket_engraver
6980 \consists Vaticana_ligature_engraver
6981 \override NoteHead #'style = #'vaticana_punctum
6982 \override Stem #'transparent = ##t
6994 Unlike most other neumes notation systems, the input language for
6995 neumes does not necessarily reflect directly the typographical
6996 appearance, but is designed to solely focuse on musical meaning. For
6997 example, @code{\[ a \pes b \flexa g \]} produces a Torculus consisting
6998 of three Punctum heads, while @code{\[ a \flexa g \pes b \]} produces
6999 a Porrectus with a curved flexa shape and only a single Punctum head.
7000 There is no command to explicitly typeset the curved flexa shape; the
7001 decision of when to typeset a curved flexa shape is purely taken from
7002 the musical input. The idea of this approach is to separate the
7003 musical aspects of the input from the notation style of the output.
7004 This way, the same input can be reused to typeset the same music in a
7005 different style of Gregorian chant notation such as Hufnagel (also
7006 known as German gothic neumes) or Medicaea (kind of a very simple
7007 forerunner of the Editio Vaticana). As soon as Hufnagel ligature
7008 engraver and Medicaea ligature engraver will have been implemented, it
7009 will be as simple as replacing the ligature engraver in the
7010 @internalsref{Voice} context to get the desired notation style from
7013 The following table shows the code fragments that produce the
7014 ligatures in the above neumes table. The letter in the first column
7015 in each line of the below table indicates to which ligature in the
7016 above table it refers. The second column gives the name of the
7017 ligature. The third column shows the code fragment that produces this
7018 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
7020 @multitable @columnfractions .1 .4 .5
7034 Punctum Inclinatum @tab
7035 @code{\[ \inclinatum b \]}
7039 Punctum Auctum Ascendens @tab
7040 @code{\[ \auctum \ascendens b \]}
7044 Punctum Auctum Descendens @tab
7045 @code{\[ \auctum \descendens b \]}
7049 Punctum Inclinatum Auctum @tab
7050 @code{\[ \inclinatum \auctum b \]}
7054 Punctum Inclinatum Parvum @tab
7055 @code{\[ \inclinatum \deminutum b \]}
7060 @code{\[ \virga b \]}
7065 @code{\[ \stropha b \]}
7070 @code{\[ \stropha \auctum b \]}
7075 @code{\[ \oriscus b \]}
7079 Clivis vel Flexa @tab
7080 @code{\[ b \flexa g \]}
7084 Clivis Aucta Descendens @tab
7085 @code{\[ b \flexa \auctum \descendens g \]}
7089 Clivis Aucta Ascendens @tab
7090 @code{\[ b \flexa \auctum \ascendens g \]}
7095 @code{\[ b \flexa \deminutum g \]}
7099 Podatus vel Pes @tab
7100 @code{\[ g \pes b \]}
7104 Pes Auctus Descendens @tab
7105 @code{\[ g \pes \auctum \descendens b \]}
7109 Pes Auctus Ascendens @tab
7110 @code{\[ g \pes \auctum \ascendens b \]}
7115 @code{\[ g \pes \deminutum b \]}
7120 @code{\[ \oriscus g \pes \virga b \]}
7124 Pes Quassus Auctus Descendens @tab
7125 @code{\[ \oriscus g \pes \auctum \descendens b \]}
7130 @code{\[ \quilisma g \pes b \]}
7134 Quilisma Pes Auctus Descendens @tab
7135 @code{\[ \quilisma g \pes \auctum \descendens b \]}
7139 Pes Initio Debilis @tab
7140 @code{\[ \deminutum g \pes b \]}
7144 Pes Auctus Descendens Initio Debilis @tab
7145 @code{\[ \deminutum g \pes \auctum \descendens b \]}
7150 @code{\[ a \pes b \flexa g \]}
7154 Torculus Auctus Descendens @tab
7155 @code{\[ a \pes b \flexa \auctum \descendens g \]}
7159 Torculus Deminutus @tab
7160 @code{\[ a \pes b \flexa \deminutum g \]}
7164 Torculus Initio Debilis @tab
7165 @code{\[ \deminutum a \pes b \flexa g \]}
7169 Torculus Auctus Descendens Initio Debilis @tab
7170 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
7174 Torculus Deminutus Initio Debilis @tab
7175 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
7180 @code{\[ a \flexa g \pes b \]}
7184 Porrectus Auctus Descendens @tab
7185 @code{\[ a \flexa g \pes \auctum \descendens b \]}
7189 Porrectus Deminutus @tab
7190 @code{\[ a \flexa g \pes \deminutum b \]}
7195 @code{\[ \virga b \inclinatum a \inclinatum g \]}
7199 Climacus Auctus @tab
7200 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
7204 Climacus Deminutus @tab
7205 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
7210 @code{\[ g \pes a \virga b \]}
7214 Scandicus Auctus Descendens @tab
7215 @code{\[ g \pes a \pes \auctum \descendens b \]}
7219 Scandicus Deminutus @tab
7220 @code{\[ g \pes a \pes \deminutum b \]}
7225 @code{\[ g \oriscus a \pes \virga b \]}
7229 Salicus Auctus Descendens @tab
7230 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
7235 @code{\[ \stropha b \stropha b \stropha a \]}
7241 The following head prefixes are supported:
7243 @cindex @code{\virga}
7245 @cindex @code{\stropha}
7247 @cindex @code{\inclinatum}
7249 @cindex @code{\auctum}
7251 @cindex @code{\descendens}
7253 @cindex @code{\ascendens}
7255 @cindex @code{\oriscus}
7257 @cindex @code{\quilisma}
7259 @cindex @code{\deminutum}
7262 Head prefixes can be accumulated, though restrictions apply. For
7263 example, either @code{\descendens} or @code{\ascendens} can be applied
7264 to a head, but not both to the same head.
7267 @cindex @code{\flexa}
7268 Two adjacent heads can be tied together with the @code{\pes} and
7269 @code{\flexa} infix commands for a rising and falling line of melody,
7274 Trigonus: apply equal spacing, regardless of pitch.
7277 @subsection Figured bass
7279 @cindex Basso continuo
7281 @c TODO: musicological blurb about FB
7285 LilyPond has limited support for figured bass:
7287 @lilypond[verbatim,fragment]
7289 \context Voice \notes { \clef bass dis4 c d ais}
7290 \context FiguredBass
7292 < 6 >4 < 7 >8 < 6+ [_!] >
7298 The support for figured bass consists of two parts: there is an input
7299 mode, introduced by @code{\figures}, where you can enter bass figures
7300 as numbers, and there is a context called @internalsref{FiguredBass} that
7301 takes care of making @internalsref{BassFigure} objects.
7303 In figures input mode, a group of bass figures is delimited by
7304 @code{<} and @code{>}. The duration is entered after the @code{>>}:
7309 \context FiguredBass
7313 Accidentals are added when you append @code{-}, @code{!} and @code{+}
7320 \context FiguredBass
7321 \figures { <4- 6+ 7!> }
7324 Spaces or dashes may be inserted by using @code{_}. Brackets are
7325 introduced with @code{[} and @code{]}:
7331 \context FiguredBass
7332 \figures { < [4 6] 8 [_! 12]> }
7335 Although the support for figured bass may superficially resemble chord
7336 support, it works much simpler. The @code{\figures} mode simply
7337 stores the numbers , and @internalsref{FiguredBass} context prints
7338 them as entered. There is no conversion to pitches, and no
7339 realizations of the bass are played in the MIDI file.
7341 Internally, the code produces markup texts. You can use any of the
7342 markup text properties to override formatting. For example, the
7343 vertical spacing of the figures may be set with @code{baseline-skip}.
7347 Internals: @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
7348 and @internalsref{FiguredBass} context.
7352 Slash notation for alterations is not supported.
7355 @node Vaticana style contexts
7356 @subsection Vaticana style contexts
7358 @cindex VaticanaVoiceContext
7359 @cindex VaticanaStaffContext
7361 The predefined @code{VaticanaVoiceContext} and
7362 @code{VaticanaStaffContext} can be used to easily engrave a piece of
7363 Gregorian Chant in the style of the Editio Vaticana. These contexts
7364 initialize all relevant context properties and grob properties to
7365 proper values. With these contexts, you can immediately go ahead
7366 entering the chant, as the following short excerpt demonstrates:
7368 @lilypond[raggedright,verbatim,noindent]
7369 \include "gregorian-init.ly"
7372 \context VaticanaVoice = "cantus" {
7373 \override Score.BarNumber #'transparent = ##t
7375 \[ c'\melisma c' \flexa a \] \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
7376 \[ f\melisma \pes a c' c' \pes d'\melismaEnd \] c' \divisioMinima \break
7377 \[ c'\melisma c' \flexa a \] \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
7380 \lyricsto "cantus" \new Lyrics \lyrics {
7381 San- ctus, San- ctus, San- ctus
7387 @node Contemporary notation
7388 @section Contemporary notation
7390 In the 20th century, composers have greatly expanded the musical
7391 vocabulary. With this expansion, many innovations in musical notation
7392 have been tried. The book by Stone (1980) gives a comprehensive
7393 overview (see @ref{Literature list}). In general, the use of new,
7394 innovative notation makes a piece harder to understand and perform and
7395 its use should therefore be avoided if possible. For this reason,
7396 support for contemporary notation in LilyPond is limited.
7405 @subsection Clusters
7409 In musical terminology, a @emph{cluster} denotes a range of
7410 simultaneously sounding pitches that may change over time. The set of
7411 available pitches to apply usually depends on the accoustic source.
7412 Thus, in piano music, a cluster typically consists of a continous range
7413 of the semitones as provided by the piano's fixed set of a chromatic
7414 scale. In choral music, each singer of the choir typically may sing an
7415 arbitrary pitch within the cluster's range that is not bound to any
7416 diatonic, chromatic or other scale. In electronic music, a cluster
7417 (theoretically) may even cover a continuous range of pitches, thus
7418 resulting in coloured noise, such as pink noise.
7420 Clusters can be denoted in the context of ordinary staff notation by
7421 engraving simple geometrical shapes that replace ordinary notation of
7422 notes. Ordinary notes as musical events specify starting time and
7423 duration of pitches; however, the duration of a note is expressed by the
7424 shape of the note head rather than by the horizontal graphical extent of
7425 the note symbol. In contrast, the shape of a cluster geometrically
7426 describes the development of a range of pitches (vertical extent) over
7427 time (horizontal extent). Still, the geometrical shape of a cluster
7428 covers the area in wich any single pitch contained in the cluster would
7429 be notated as an ordinary note. From this point of view, it is
7430 reasonable to specify a cluster as the envelope of a set of notes.
7434 A cluster is engraved as the envelope of a set of
7435 cluster-notes. Cluster notes are created by applying the function
7436 @code{notes-to-clusters} to a sequence of chords, e.g.
7438 @lilypond[relative=1,verbatim]
7439 \apply #notes-to-clusters { <c e > <b f'> }
7442 The following example (from
7443 @inputfileref{input/regression,cluster.ly}) shows what the result
7446 @lilypondfile[]{cluster.ly}
7448 By default, @internalsref{Cluster_spanner_engraver} is in the
7449 @internalsref{Voice} context. This allows putting ordinary notes and
7450 clusters together in the same staff, even simultaneously. In such a
7451 case no attempt is made to automatically avoid collisions between
7452 ordinary notes and clusters.
7456 Internals: @internalsref{ClusterSpanner},
7457 @internalsref{ClusterSpannerBeacon},
7458 @internalsref{Cluster_spanner_engraver}, and
7459 @internalsref{ClusterNoteEvent}.
7461 Examples: @inputfileref{input/regression,cluster.ly}.
7465 Music expressions like @code{<< @{ g8 e8 @} a4 >>} are not printed
7466 accurately. Use @code{<g a>8 <e a>8} instead.
7471 @subsection Fermatas
7477 Contemporary music notation frequently uses special fermata symbols to
7478 indicate fermatas of differing lengths.
7482 The following are supported
7484 @lilypond[raggedright]
7486 << \addlyrics \notes {
7506 \context Lyrics \lyrics {
7507 "shortfermata" "fermata" "longfermata" "verylongfermata"
7512 See @ref{Articulations} for general instructions how to apply scripts
7513 such as fermatas to a @code{\notes@{@}} block.
7516 @node Special notation
7517 @section Special notation
7521 * Easy Notation note heads::
7525 @subsection Balloon help
7527 Elements of notation can be marked and named with the help of a square
7528 balloon. The primary purpose of this feature is to explain notation.
7530 The following example demonstrates its use.
7532 @lilypond[verbatim,fragment,raggedright,relative=1]
7535 #(add-balloon-text 'NoteHead "heads, or tails?"
7541 The function @code{add-balloon-text} takes the name of a grob, the
7542 label to print and where to put the label relative to the object. In
7543 the above example, the text ``heads or tails?'' ends 3 spaces below
7547 @cindex notation, explaining
7551 Internals: @internalsref{text-balloon-interface}.
7553 Examples: @inputfileref{input/regression,balloon.ly}.
7555 @node Easy Notation note heads
7556 @subsection Easy Notation note heads
7558 @cindex easy notation
7561 The `easy play' note head includes a note name inside the head. It is
7562 used in music aimed at beginners:
7564 @lilypond[raggedright,verbatim,staffsize=26]
7566 \notes { c'2 e'4 f' | g'1 }
7567 \paper { \translator { \EasyNotation } }
7571 The @code{EasyNotation} variable overrides a @internalsref{Score} @c
7572 context. To make the letters readable, it has to be printed in a
7573 large font size. To print with a larger font, see @ref{Font Size}.
7578 If you view the result with Xdvi, then staff lines may show through
7579 the letters. Printing the PostScript file obtained does produce the
7585 @section Tuning output
7587 There are situations where default layout decisions are not
7588 sufficient. In this section we discuss ways to override these
7591 Formatting is internally done by manipulating so called objects
7592 (graphic objects). Each object carries with it a set of properties
7593 (object or layout properties) specific to that object. For example, a
7594 stem object has properties that specify its direction, length and
7597 The most direct way of tuning the output is by altering the values of
7598 these properties. There are two ways of doing that: first, you can
7599 temporarily change the definition of one type of object, thus
7600 affecting a whole set of objects. Second, you can select one specific
7601 object, and set a layout property in that object.
7603 Do not confuse layout properties with translation
7604 properties. Translation properties always use a mixed caps style
7605 naming, and are manipulated using @code{\set} and @code{\unset}:
7607 \set Context.propertyName = @var{value}
7610 Layout properties are use Scheme style variable naming, i.e. lower
7611 case words separated with dashes. They are symbols, and should always
7612 be quoted using @code{#'}. For example, this could be an imaginary
7613 layout property name:
7615 #'layout-property-name
7620 The introduction of the @ref{Technical manual} gives a more in-depth
7621 treatment of the difference between translation and layout.
7625 * Constructing a tweak::
7632 @node Tuning objects
7633 @subsection Tuning objects
7635 @cindex object description
7637 The definition of an object is a list of default object
7638 properties. For example, the definition of the Stem object (available
7639 in @file{scm/define-grobs.scm}), includes the following definitions
7640 for @internalsref{Stem}:
7644 (beamed-lengths . (3.5 3.5 3.5 4.5 5.0))
7645 (Y-extent-callback . ,Stem::height)
7650 Adding variables on top of this existing definition overrides the
7651 system default, and alters the resulting appearance of the layout
7657 Changing a variable for only one object is commonly achieved with
7661 \once \override @var{context}.@var{objectname}
7662 @var{symbol} = @var{value}
7664 Here @var{symbol} is a Scheme expression of symbol type, @var{context}
7665 and @var{objectname} is a string and @var{value} is a Scheme expression.
7666 This command applies a setting only during one moment in the score.
7668 In the following example, only one @internalsref{Stem} object is
7669 changed from its original setting:
7671 @lilypond[verbatim,fragment,relative=1]
7673 \once \override Voice.Stem #'thickness = #4
7677 @cindex @code{\once}
7679 For changing more objects, the same command, without @code{\once} can
7682 \override @var{context}.@var{objectname} @var{symbol} = @var{value}
7684 This command adds @code{@var{symbol} = @var{value}} to the definition
7685 of @var{objectname} in the context @var{context}, and this definition
7686 stays in place until it is removed.
7688 An existing definition may be removed by the following command:
7691 \property @var{context}.@var{objectname} \revert @var{symbol}
7696 @lilypond[verbatim,quote]
7697 c'4 \override Stem #'thickness = #4.0
7699 c'4 \revert Stem #'thickness
7703 The following example gives exactly the same result as the previous
7704 one (assuming the system default for stem thickness is 1.3):
7706 @lilypond[verbatim,quote]
7707 c'4 \override Stem #'thickness = #4.0
7709 c'4 \override Stem #'thickness = #1.3
7713 Reverting a setting which was not set in the first place has no
7719 Internals: @internalsref{OverrideProperty}, @internalsref{RevertProperty},
7720 @internalsref{PropertySet}, @internalsref{All-backend-properties}, and
7721 @internalsref{All-layout-objects}.
7726 The backend is not very strict in type-checking object properties.
7727 Cyclic references in Scheme values for properties can cause hangs
7731 * Constructing a tweak::
7737 @node Constructing a tweak
7738 @subsection Constructing a tweak
7741 @cindex internal documentation
7742 @cindex finding graphical objects
7743 @cindex graphical object descriptions
7745 @cindex @code{\override}
7747 @cindex internal documentation
7751 Three pieces of information are required to use @code{\override} and
7752 @code{\set}: the name of the layout object, the context and the name
7753 of the property. We demonstrate how to glean this information from
7754 the notation manual and the generated documentation.
7756 The generated documentation is a set of HTML pages which should be
7757 included if you installed a binary distribution, typically in
7758 @file{/usr/share/doc/lilypond}. They are also available on the web:
7759 go to the @uref{http://lilypond.org,LilyPond website}, click
7760 ``Documentation'', select the correct version, and click then
7761 ``Program reference.'' It is advisable to bookmark the local HTML
7762 files. They will load faster than the ones on the web. If you use the
7763 version from the web, you must check whether the documentation matches
7764 the program version: it is generated from the definitions that the
7765 program uses, and therefore it is strongly tied to the LilyPond
7769 @c [TODO: revise for new site.]
7771 Suppose we want to move the fingering indication in the fragment below:
7773 @lilypond[relative=2,verbatim]
7779 If you visit the documentation of @code{Fingering} (in @ref{Fingering
7780 instructions}), you will notice that there is written:
7785 Internals: @internalsref{FingerEvent} and @internalsref{Fingering}.
7792 In other words, the fingerings once entered, are internally stored as
7793 @code{FingerEvent} music objects. When printed, a @code{Fingering}
7794 layout object is created for every @code{FingerEvent}.
7796 The Fingering object has a number of different functions, and each of
7797 those is captured in an interface. The interfaces are listed under
7798 @internalsref{Fingering} in the program reference.
7802 The @code{Fingering} object has a fixed size
7803 (@internalsref{item-interface}), the symbol is a piece of text
7804 (@internalsref{text-interface}), whose font can be set
7805 (@internalsref{font-interface}). It is centered horizontally
7806 (@internalsref{self-alignment-interface}), it is placed next to other
7807 objects (@internalsref{side-position-interface}) vertically, and its
7808 placement is coordinated with other scripts
7809 (@internalsref{text-script-interface}). It also has the standard
7810 @internalsref{grob-interface} (grob stands for Graphical object)
7812 @cindex graphical object
7813 @cindex layout object
7814 @cindex object, layout
7815 with all the variables that come with
7816 it. Finally, it denotes a fingering instruction, so it has
7817 @internalsref{finger-interface}.
7819 For the vertical placement, we have to look under
7820 @code{side-position-interface}:
7822 @code{side-position-interface}
7824 Position a victim object (this one) next to other objects (the
7825 support). In this case, the property @code{direction} signifies where to put the
7826 victim object relative to the support (left or right, up or down?)
7831 below this description, the variable @code{padding} is described as
7835 (dimension, in staff space)
7837 add this much extra space between objects that are next to each
7838 other. Default value: @code{0.6}
7842 By increasing the value of @code{padding}, we can move away the
7843 fingering. The following command inserts 3 staff spaces of white
7844 between the note and the fingering:
7846 \once \override Fingering #'padding = #3
7849 Inserting this command before the Fingering object is created,
7850 i.e. before @code{c2}, yields the following result:
7852 @lilypond[relative=2,fragment,verbatim]
7853 \once \override Fingering
7860 The context name @code{Voice} in the example above can be determined
7861 as follows. In the documentation for @internalsref{Fingering}, it says
7863 Fingering grobs are created by: @internalsref{Fingering_engraver} @c
7866 Clicking @code{Fingering_engraver} shows the documentation of
7867 the module responsible for interpreting the fingering instructions and
7868 translating them to a @code{Fingering} object. Such a module is called
7869 an @emph{engraver}. The documentation of the @code{Fingering_engraver}
7872 Fingering_engraver is part of contexts: Voice
7874 so tuning the settings for Fingering should be done with
7876 \override Fingering @dots{}
7879 Of course, the tweak may also done in a larger context than
7880 @code{Voice}, for example, @internalsref{Staff} or
7881 @internalsref{Score}.
7885 Internals: the program reference also contains alphabetical lists of
7886 @internalsref{Contexts}, @internalsref{All-layout-objects} and
7887 @internalsref{Music-expressions}, so you can also find which objects
7888 to tweak by browsing the internals document.
7892 @subsection Applyoutput
7894 The most versatile way of tuning an object is @code{\applyoutput}. Its
7897 \applyoutput @var{proc}
7901 where @var{proc} is a Scheme function, taking three arguments.
7903 When interpreted, the function @var{proc} is called for every layout
7904 object found in the context, with the following arguments:
7906 @item the layout object itself,
7907 @item the context where the layout object was created, and
7908 @item the context where @code{\applyoutput} is processed.
7912 In addition, the cause of the layout object, i.e. the music
7913 expression or object that was responsible for creating it, is in the
7914 object property @code{cause}. For example, for a note head, this is a
7915 @internalsref{NoteHead} event, and for a @internalsref{Stem} object,
7916 this is a @internalsref{NoteHead} object.
7918 Here is a simple example of @code{\applyoutput}; it blanks note-heads on the
7921 (define (blanker grob grob-origin context)
7922 (if (and (memq (ly:grob-property grob 'interfaces)
7923 note-head-interface)
7924 (eq? (ly:grob-property grob 'staff-position) 0))
7926 (ly:grob-set-property! grob 'transparent #t)))
7931 @node Font selection
7932 @subsection Font selection
7934 The most common thing to change about the appearance of fonts is their
7935 size. The font size of any context can be easily changed by setting
7936 the @code{fontSize} property for that context. Its value is a number:
7937 negative numbers make the font smaller, positive numbers larger. An
7938 example is given below:
7940 @lilypond[fragment,relative=1,verbatim,quote]
7941 c4 c4 \set fontSize = #-1
7944 This command will set @code{font-size} (see below), and does
7945 not change the size of variable symbols, such as beams or slurs.
7947 One of the uses of @code{fontSize} is to get smaller symbols for cue
7948 notes. An elaborate example of those is in
7949 @inputfileref{input/test,cue-notes.ly}.
7951 @cindex magnification
7954 The font used for printing a object can be selected by setting
7955 @code{font-name}, e.g.
7957 \override Staff.TimeSignature
7958 #'font-name = #"cmr17"
7962 Any font can be used, as long as it is available to @TeX{}. Possible
7963 fonts include foreign fonts or fonts that do not belong to the
7964 Computer Modern font family. The size of fonts selected in this way
7965 can be changed with the @code{font-magnification} property. For
7966 example, @code{2.0} blows up all letters by a factor 2 in both
7970 @cindex font magnification
7972 Font selection for the standard fonts, @TeX{}'s Computer Modern fonts,
7973 can also be adjusted with a more fine-grained mechanism. By setting
7974 the object properties described below, you can select a different font;
7975 all three mechanisms work for every object that supports
7976 @code{font-interface}:
7981 is a symbol indicating the general class of the typeface. Supported are
7982 @code{roman} (Computer Modern), @code{braces} (for piano staff
7983 braces), @code{music} (the standard music font, including ancient
7984 glyphs), @code{dynamic} (for dynamic signs) and @code{typewriter}.
7987 is a symbol indicating the shape of the font, there are typically several
7988 font shapes available for each font family. Choices are @code{italic},
7989 @code{caps} and @code{upright}.
7992 is a symbol indicating the series of the font. There are typically several
7993 font series for each font family and shape. Choices are @code{medium}
7998 For any of these properties, the value @code{*} (i.e. the symbol
7999 @code{*}, entered as @code{#'*}), acts as a wildcard. This can be used
8000 to override default setting, which are always present. For example:
8002 \override Lyrics .LyricText #'font-series = #'bold
8003 \override Lyrics .LyricText #'font-family = #'typewriter
8004 \override Lyrics .LyricText #'font-shape = #'*
8007 @cindex @code{font-style}
8009 The font size is set by modifying the @code{font-size} property. Its
8010 value is a number indicating the size relative to the standard size.
8011 Each step up is an increase of approximately 12% of the font size. Six
8012 steps is exactly a factor two. The Scheme function @code{magstep}
8013 converts a @code{font-size} number to a scaling factor.
8015 LilyPond has fonts in different design sizes: the music fonts for
8016 smaller sizes are chubbier, while the text fonts are relatively wider.
8017 Font size changes are achieved by scaling the design size that is
8018 closest to the desired size.
8020 The @code{font-size} mechanism does not work for fonts selected
8021 through @code{font-name}. These may be scaled with
8022 @code{font-magnification}.
8026 The following commands set @code{fontSize} for the current voice.
8028 @cindex @code{\tiny}
8030 @cindex @code{\small}
8032 @cindex @code{\normalsize}
8037 Init files: @file{ly/declarations-init.ly} contains hints how new
8038 fonts may be added to LilyPond.
8042 There is no style sheet provided for other fonts besides the @TeX{}
8043 Computer Modern family.
8045 @cindex font selection
8046 @cindex font magnification
8047 @cindex @code{font-interface}
8051 @section Text markup
8056 @cindex typeset text
8058 LilyPond has an internal mechanism to typeset texts. You can access it
8059 with the keyword @code{\markup}. Within markup mode, you can enter texts
8060 similar to lyrics: simply enter them, surrounded by spaces:
8063 @lilypond[verbatim,fragment,relative=1]
8064 c1^\markup { hello }
8065 c1_\markup { hi there }
8066 c1^\markup { hi \bold there, is \italic anyone home? }
8069 @cindex font switching
8071 The markup in the example demonstrates font switching commands. The
8072 command @code{\bold} and @code{\italic} only apply to the first
8073 following word; enclose a set of texts with braces to apply a command
8076 \markup @{ \bold @{ hi there @} @}
8080 For clarity, you can also do this for single arguments, e.g.
8083 \markup { is \italic { anyone } home }
8086 @cindex font size, texts
8089 In markup mode you can compose expressions, similar to mathematical
8090 expressions, XML documents and music expressions. The braces group
8091 notes into horizontal lines. Other types of lists also exist: you can
8092 stack expressions grouped with @code{<}, and @code{>} vertically with
8093 the command @code{\column}. Similarly, @code{\center} aligns texts by
8096 @lilypond[verbatim,fragment,relative=1]
8097 c1^\markup { \column < a bbbb c > }
8098 c1^\markup { \center < a bbbb c > }
8099 c1^\markup { \line < a b c > }
8103 Markups can be stored in variables, and these variables
8104 may be attached to notes, like
8106 allegro = \markup { \bold \large { Allegro } }
8107 \notes { a^\allegro b c d }
8111 Some objects have alignment procedures of their own, which cancel out
8112 any effects of alignments applied to their markup arguments as a
8113 whole. For example, the @internalsref{RehearsalMark} is horizontally
8114 centered, so using @code{\mark \markup @{ \left-align .. @}} has no
8115 effect. Similarly, whole texts over notes cannot be moved vertically
8116 with @code{\raise}. For moving and aligning complete objects, grob
8117 properties should be used.
8123 Init files: @file{scm/new-markup.scm}.
8128 Text layout is ultimately done by @TeX{}, which does kerning of
8129 letters. LilyPond does not account for kerning, so texts will be
8130 spaced slightly too wide.
8132 Syntax errors for markup mode are confusing.
8134 Markup texts cannot be used in the titling of the @code{\header}
8135 field. Titles are made by La@TeX{}, so La@TeX{} commands should be used
8141 * Overview of text markup commands::
8142 * Markup construction in scheme::
8143 * Markup command definition::
8146 @node Overview of text markup commands
8147 @subsection Overview of text markup commands
8149 @include markup-commands.tely
8151 @node Markup construction in scheme
8152 @subsection Markup construction in scheme
8154 @cindex defining markup commands
8156 The @code{markup} macro builds markup expressions in Scheme while
8157 providing a LilyPond-like syntax. For example,
8159 (markup #:column (#:line (#:bold #:italic "hello" #:raise 0.4 "world")
8160 #:bigger #:line ("foo" "bar" "baz")))
8166 \markup \column < @{ \bold \italic "hello" \raise #0.4 "world" @}
8167 \bigger @{ foo bar baz @} >
8171 This example exposes the main translation rules between regular
8172 LilyPond markup syntax and scheme markup syntax, which are summed up
8174 @multitable @columnfractions .5 .5
8175 @item @b{LilyPond} @tab @b{Scheme}
8176 @item @code{\command} @tab @code{#:command}
8177 @item @code{\variable} @tab @code{variable}
8178 @item @code{@{ ... @}} @tab @code{#:line ( ... )}
8179 @item @code{\center < ... >} @tab @code{#:center ( ... )}
8180 @item @code{string} @tab @code{"string"}
8181 @item @code{#scheme-arg} @tab @code{scheme-arg}
8184 Besides, the whole scheme language is accessible inside the
8185 @code{markup} macro: thus, one may use function calls inside
8186 @code{markup} in order to manipulate character strings for
8187 instance. This proves useful when defining new markup commands (see
8188 @ref{Markup command definition}).
8192 One can not feed the @code{#:line} (resp @code{#:center},
8193 @code{#:column}) command with a variable or the result of a function
8196 (markup #:line (fun-that-returns-markups))
8198 is illegal. One should use the @code{make-line-markup} (resp
8199 @code{make-center-markup}, @code{make-column-markup}) function
8202 (markup (make-line-markup (fun-that-returns-markups)))
8205 @node Markup command definition
8206 @subsection Markup command definition
8208 New markup commands can be defined thanks to the @code{def-markup-command} scheme macro.
8210 (def-markup-command (@var{command-name} @var{paper} @var{props} @var{arg1} @var{arg2} ...)
8211 (@var{arg1-type?} @var{arg2-type?} ...)
8214 @var{argi}: i@var{th} command argument
8215 @var{argi-type?}: a type predicate for the i@var{th} argument
8216 @var{paper}: the `paper' definition
8217 @var{props}: a list of alists, containing all active properties.
8220 As a simple example, we show how to add a @code{\smallcaps} command,
8221 which selects @TeX{}'s small caps font. Normally, we could select the
8222 small caps font as follows:
8225 \markup { \override #'(font-shape . caps) Text-in-caps }
8228 This selects the caps font by setting the @code{font-shape} property to
8229 @code{#'caps} for interpreting @code{Text-in-caps}.
8231 To make the above available as @code{\smallcaps} command, we have to
8232 define a function using @code{def-markup-command}. The command should
8233 take a single argument, of markup type. Therefore, the start of the
8234 definition should read
8236 (def-markup-command (smallcaps paper props argument) (markup?)
8241 What follows is the content of the command: we should interpret
8242 the @code{argument} as a markup, i.e.
8245 (interpret-markup paper @dots{} argument)
8249 This interpretation should add @code{'(font-shape . caps)} to the active
8250 properties, so we substitute the the following for the @dots{} in the
8254 (cons (list '(font-shape . caps) ) props)
8258 The variable @code{props} is a list of alists, and we prepend to it by
8259 consing a list with the extra setting.
8261 However, suppose that we are using a font that does not have a
8262 small-caps variant. In that case, we have to fake the small caps font,
8263 by setting a string in upcase, with the first letter a little larger:
8266 #(def-markup-command (smallcaps paper props str) (string?)
8267 "Print the string argument in small caps. Syntax: \\smallcaps #\"string\""
8268 (interpret-markup paper props
8271 (if (= (string-length s) 0)
8273 (markup #:large (string-upcase (substring s 0 1))
8274 #:translate (cons -0.6 0)
8275 #:tiny (string-upcase (substring s 1)))))
8276 (string-split str #\Space)))))
8279 The @code{smallcaps} command first splits its string argument into
8280 tokens separated by spaces (@code{(string-split str #\Space)}); for
8281 each token, a markup is built with the first letter made large and
8282 upcased (@code{#:large (string-upcase (substring s 0 1))}), and a
8283 second markup built with the following letters made tiny and upcased
8284 (@code{#:tiny (string-upcase (substring s 1))}). As LilyPond
8285 introduces a space between markups on a line, the second markup is
8286 translated to the left (@code{#:translate (cons -0.6 0) ...}). Then,
8287 the markups built for each token are put in a line
8288 (@code{(make-line-markup ...)}). Finally, the resulting markup is
8289 passed to the @code{interpret-markup} function, with the @code{paper}
8290 and @code{props} arguments.
8292 Finally, suppose that we are typesetting a recitative in an opera, and
8293 we would like to define a command that will show character names in a
8294 custom manner. Names should be printed with small caps and translated a
8295 bit to the left and top. We will define a @code{\character} command
8296 that takes into account the needed translation, and uses the newly
8297 defined @code{\smallcaps} command:
8300 #(def-markup-command (character paper props name) (string?)
8301 "Print the character name in small caps, translated to the left and
8302 top. Syntax: \\character #\"name\""
8303 (interpret-markup paper props
8304 (markup "" #:translate (cons -4 2) #:smallcaps name)))
8307 There is one complication that needs explanation: texts above and below
8308 the staff are moved vertically to be at a certain distance (the
8309 @code{padding} property) from the staff and the notes. To make sure
8310 that this mechanism does not annihilate the vertical effect of our
8311 @code{#:translate}, we add an empty string (@code{""}) before the
8312 translated text. Now the @code{""} will be put above the notes, and the
8313 @code{name} is moved in relation to that empty string. The net effect is
8314 that the text is moved to the upper left.
8316 The final result is as follows:
8320 c''^\markup \character #"Cleopatra"
8321 e'^\markup \character #"Giulio Cesare"
8326 @lilypond[raggedright]
8327 #(def-markup-command (smallcaps paper props str) (string?)
8328 "Print the string argument in small caps. Syntax: \\smallcaps #\"string\""
8329 (interpret-markup paper props
8332 (if (= (string-length s) 0)
8334 (markup #:large (string-upcase (substring s 0 1))
8335 #:translate (cons -0.6 0)
8336 #:tiny (string-upcase (substring s 1)))))
8337 (string-split str #\Space)))))
8339 #(def-markup-command (character paper props name) (string?)
8340 "Print the character name in small caps, translated to the left and
8341 top. Syntax: \\character #\"name\""
8342 (interpret-markup paper props
8343 (markup "" #:translate (cons -4 0) #:smallcaps name)))
8347 c''^\markup \character #"Cleopatra"
8348 e'^\markup \character #"Giulio Cesare"
8356 @section Global layout
8358 The global layout determined by three factors: the page layout, the
8359 line breaks and the spacing. These all influence each other. The
8360 choice of spacing determines how densely each system of music is set,
8361 which influences where line breaks breaks are chosen, and thus
8362 ultimately how many pages a piece of music takes. This section
8363 explains how to tune the algorithm for spacing.
8365 Globally spoken, this procedure happens in three steps: first,
8366 flexible distances (``springs'') are chosen, based on durations. All
8367 possible line breaking combination are tried, and the one with the
8368 best results---a layout that has uniform density and requires as
8369 little stretching or cramping as possible---is chosen. When the score
8370 is processed by @TeX{}, each page is filled with systems, and page breaks
8371 are chosen whenever the page gets full.
8376 * Vertical spacing::
8377 * Horizontal spacing::
8384 @node Vertical spacing
8385 @subsection Vertical spacing
8387 @cindex vertical spacing
8388 @cindex distance between staves
8389 @cindex staff distance
8390 @cindex between staves, distance
8391 @cindex staffs per page
8392 @cindex space between staves
8394 The height of each system is determined automatically by LilyPond, to
8395 keep systems from bumping into each other, some minimum distances are
8396 set. By changing these, you can put staves closer together, and thus
8397 put more systems onto one page.
8399 Normally staves are stacked vertically. To make
8400 staves maintain a distance, their vertical size is padded. This is
8401 done with the property @code{minimumVerticalExtent}. It takes a pair
8402 of numbers, so if you want to make it smaller from its, then you could
8405 \set Staff.minimumVerticalExtent = #'(-4 . 4)
8407 This sets the vertical size of the current staff to 4 staff spaces on
8408 either side of the center staff line. The argument of
8409 @code{minimumVerticalExtent} is interpreted as an interval, where the
8410 center line is the 0, so the first number is generally negative. The
8411 staff can be made larger at the bottom by setting it to @code{(-6
8414 The piano staves are handled a little differently: to make cross-staff
8415 beaming work correctly, it is necessary that the distance between staves
8416 is fixed beforehand. This is also done with a
8417 @internalsref{VerticalAlignment} object, created in
8418 @internalsref{PianoStaff}. In this object the distance between the
8419 staves is fixed by setting @code{forced-distance}. If you want to
8420 override this, use a @code{\translator} block as follows:
8425 \override VerticalAlignment #'forced-distance = #9
8430 This would bring the staves together at a distance of 9 staff spaces,
8431 measured from the center line of each staff.
8435 Internals: Vertical alignment of staves is handled by the
8436 @internalsref{VerticalAlignment} object.
8441 @node Horizontal spacing
8442 @subsection Horizontal Spacing
8444 The spacing engine translates differences in durations into
8445 stretchable distances (``springs'') of differing lengths. Longer
8446 durations get more space, shorter durations get less. The shortest
8447 durations get a fixed amount of space (which is controlled by
8448 @code{shortest-duration-space} in the @internalsref{SpacingSpanner} object).
8449 The longer the duration, the more space it gets: doubling a
8450 duration adds a fixed amount (this amount is controlled by
8451 @code{spacing-increment}) of space to the note.
8453 For example, the following piece contains lots of half, quarter and
8454 8th notes, the eighth note is followed by 1 note head width (NHW).
8455 The quarter note is followed by 2 NHW, the half by 3 NHW, etc.
8456 @lilypond[fragment,verbatim,relative=1] c2 c4. c8 c4. c8 c4. c8 c8
8460 Normally, @code{shortest-duration-space} is set to 1.2, which is the
8461 width of a note head, and @code{shortest-duration-space} is set to
8462 2.0, meaning that the shortest note gets 2 NHW (i.e. 2 times
8463 @code{shortest-duration-space}) of space. For normal notes, this space
8464 is always counted from the left edge of the symbol, so the shortest
8465 notes are generally followed by one NHW of space.
8467 If one would follow the above procedure exactly, then adding a single
8468 32th note to a score that uses 8th and 16th notes, would widen up the
8469 entire score a lot. The shortest note is no longer a 16th, but a 32nd,
8470 thus adding 1 NHW to every note. To prevent this, the
8471 shortest duration for spacing is not the shortest note in the score,
8472 but the most commonly found shortest note. Notes that are even
8473 shorter this are followed by a space that is proportional to their
8474 duration relative to the common shortest note. So if we were to add
8475 only a few 16th notes to the example above, they would be followed by
8478 @lilypond[fragment,verbatim,relative=2]
8479 c2 c4. c8 c4. c16[ c] c4. c8 c8 c8 c4 c4 c4
8482 The most common shortest duration is determined as follows: in every
8483 measure, the shortest duration is determined. The most common short
8484 duration, is taken as the basis for the spacing, with the stipulation
8485 that this shortest duration should always be equal to or shorter than
8486 1/8th note. The shortest duration is printed when you run lilypond
8487 with @code{--verbose}. These durations may also be customized. If you
8488 set the @code{common-shortest-duration} in
8489 @internalsref{SpacingSpanner}, then this sets the base duration for
8490 spacing. The maximum duration for this base (normally 1/8th), is set
8491 through @code{base-shortest-duration}.
8493 @cindex @code{common-shortest-duration}
8494 @cindex @code{base-shortest-duration}
8495 @cindex @code{stem-spacing-correction}
8496 @cindex @code{spacing}
8498 In the introduction it was explained that stem directions influence
8499 spacing. This is controlled with @code{stem-spacing-correction}
8500 property in @internalsref{NoteSpacing}, which are generated for every
8501 @internalsref{Voice} context. The @code{StaffSpacing} object
8502 (generated at @internalsref{Staff} context) contains the same property
8503 for controlling the stem/barline spacing. The following example
8504 shows these corrections, once with default settings, and once with
8505 exaggerated corrections:
8511 \override Staff.NoteSpacing #'stem-spacing-correction
8513 \override Staff.StaffSpacing #'stem-spacing-correction
8518 \paper { raggedright = ##t } }
8521 @cindex SpacingSpanner, overriding properties
8523 Properties of the @internalsref{SpacingSpanner} must be overridden
8524 from the @code{\paper} block, since the @internalsref{SpacingSpanner} is
8525 created before any property commands are interpreted.
8527 \paper @{ \translator @{
8529 SpacingSpanner \override #'spacing-increment = #3.0
8536 Internals: @internalsref{SpacingSpanner}, @internalsref{NoteSpacing},
8537 @internalsref{StaffSpacing}, @internalsref{SeparationItem}, and
8538 @internalsref{SeparatingGroupSpanner}.
8542 Spacing is determined on a score wide basis. If you have a score that
8543 changes its character (measured in durations) halfway during the
8544 score, the part containing the longer durations will be spaced too
8547 There is no convenient mechanism to manually override spacing.
8552 @subsection Font size
8553 @cindex font size, setting
8554 @cindex staff size, setting
8555 @cindex @code{paper} file
8557 The Feta font provides musical symbols at eight seven different
8558 sizes. Each font is tuned for a different staff size: at smaller sizes
8559 the font gets heavier, to match the relatively heavier staff lines.
8560 The recommended font sizes are listed in the following table:
8562 @multitable @columnfractions .25 .25 .25 .25
8565 @tab @b{staff height (pt)}
8566 @tab @b{staff height (mm)}
8608 @c modern rental material ?
8612 These fonts are available in any sizes. The context property
8613 @code{fontSize} and the layout property @code{staff-space} (in
8614 @internalsref{StaffSymbol}) can be used to tune size for individual
8615 staffs. The size of individual staffs are relative to the global size,
8616 which can be set in the following manner:
8619 #(set-global-staff-size 14)
8622 This sets the global default size to 14pt staff height, and scales all
8628 @subsection Line breaking
8631 @cindex breaking lines
8633 Line breaks are normally computed automatically. They are chosen such
8634 that lines look neither cramped nor loose, and that consecutive lines
8635 have similar density.
8637 Occasionally you might want to override the automatic breaks; you can
8638 do this by specifying @code{\break}. This will force a line break at
8639 this point. Line breaks can only occur at places where there are bar
8640 lines. If you want to have a line break where there is no bar line,
8641 you can force an invisible bar line by entering @code{\bar
8642 ""}. Similarly, @code{\noBreak} forbids a line break at a
8646 @cindex regular line breaks
8647 @cindex four bar music.
8649 For linebreaks at regular intervals use @code{\break} separated by
8650 skips and repeated with @code{\repeat}:
8652 << \repeat unfold 7 @{
8653 s1 \noBreak s1 \noBreak
8654 s1 \noBreak s1 \break @}
8655 @emph{the real music}
8660 This makes the following 28 measures (assuming 4/4 time) be broken every
8661 4 measures, and only there.
8665 @code{\break}, @code{\noBreak}
8666 @cindex @code{\break}
8667 @cindex @code{\noBreak}
8671 Internals: @internalsref{BreakEvent}.
8675 @subsection Page layout
8678 @cindex breaking pages
8680 @cindex @code{indent}
8681 @cindex @code{linewidth}
8683 The most basic settings influencing the spacing are @code{indent} and
8684 @code{linewidth}. They are set in the @code{\paper} block. They
8685 control the indentation of the first line of music, and the lengths of
8688 If @code{raggedright} is set to true in the @code{\paper}
8689 block, then the lines are justified at their natural length. This
8690 useful for short fragments, and for checking how tight the natural
8694 @cindex vertical spacing
8696 The page layout process happens outside the LilyPond formatting
8697 engine: variables controlling page layout are passed to the output,
8698 and are further interpreted by @code{lilypond} wrapper program. It
8699 responds to the following variables in the @code{\paper} block. The
8700 variable @code{textheight} sets the total height of the music on each
8701 page. The spacing between systems is controlled with
8702 @code{interscoreline}, its default is 16pt. The distance between the
8703 score lines will stretch in order to fill the full page
8704 @code{interscorelinefill} is set to a positive number. In that case
8705 @code{interscoreline} specifies the minimum spacing.
8707 @cindex @code{textheight}
8708 @cindex @code{interscoreline}
8709 @cindex @code{interscorelinefill}
8711 If the variable @code{lastpagefill} is defined,
8712 @c fixme: this should only be done if lastpagefill= #t
8713 systems are evenly distributed vertically on the last page. This
8714 might produce ugly results in case there are not enough systems on the
8715 last page. The @command{lilypond-book} command ignores
8716 @code{lastpagefill}. See @ref{lilypond-book manual} for more
8719 @cindex @code{lastpagefill}
8721 Page breaks are normally computed by @TeX{}, so they are not under
8722 direct control of LilyPond. However, you can insert a commands into
8723 the @file{.tex} output to instruct @TeX{} where to break pages. This
8724 is done by setting the @code{between-systems-strings} on the
8725 @internalsref{NonMusicalPaperColumn} where the system is broken.
8726 An example is shown in @inputfileref{input/regression,between-systems.ly}.
8727 The predefined command @code{\newpage} also does this.
8731 @cindex @code{papersize}
8733 To change the paper size, use the following Scheme code:
8736 #(set-paper-size "a4")
8743 @cindex @code{\newpage}
8749 In this manual: @ref{Invoking lilypond}.
8751 Examples: @inputfileref{input/regression,between-systems.ly}.
8753 Internals: @internalsref{NonMusicalPaperColumn}.
8757 LilyPond has no concept of page layout, which makes it difficult to
8758 reliably choose page breaks in longer pieces.
8767 Entered music can also be converted to MIDI output. The performance
8768 is good enough for proof-hearing the music for errors.
8770 Ties, dynamics and tempo changes are interpreted. Dynamic marks,
8771 crescendi and decrescendi translate into MIDI volume levels. Dynamic
8772 marks translate to a fixed fraction of the available MIDI volume
8773 range, crescendi and decrescendi make the volume vary linearly between
8774 their two extremities. The fractions can be adjusted by
8775 @code{dynamicAbsoluteVolumeFunction} in @internalsref{Voice} context.
8776 For each type of MIDI instrument, a volume range can be defined. This
8777 gives a basic equalizer control, which can enhance the quality of
8778 the MIDI output remarkably. The equalizer can be controlled by
8779 setting @code{instrumentEqualizer}.
8783 Many musically interesting effects, such as swing, articulation,
8784 slurring, etc., are not translated to MIDI.
8786 Since slurs are not interpreted, @code{\lyricsto} and
8787 @code{\addlyrics} sections will be interpreted wrongly.
8789 The MIDI output allocates a channel for each Staff, and one for global
8790 settings. Hence, the MIDI file should not have more than 15 staves
8791 (or 14 if you do not use drums).
8796 * MIDI instrument names::
8801 @subsection MIDI block
8805 The MIDI block is analogous to the paper block, but it is somewhat
8806 simpler. The @code{\midi} block can contain:
8810 @item a @code{\tempo} definition, and
8811 @item context definitions.
8814 Assignments in the @code{\midi} block are not allowed.
8816 A number followed by a period is interpreted as a real number, so
8817 for setting the tempo for dotted notes, an extra space should be
8818 inserted, for example:
8821 \midi @{ \tempo 4 . = 120 @}
8825 @cindex context definition
8827 Context definitions follow precisely the same syntax as within the
8828 \paper block. Translation modules for sound are called performers.
8829 The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
8832 @node MIDI instrument names
8833 @subsection MIDI instrument names
8835 @cindex instrument names
8836 @cindex @code{Staff.midiInstrument}
8838 The MIDI instrument name is set by the @code{Staff.midiInstrument}
8839 property. The instrument name should be chosen from the list in
8840 @ref{MIDI instruments}.
8844 If the selected string does not exactly match, then the default is
8845 used, which is the Grand Piano.