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{NewTieEvent},
435 Examples: if you want less ties created for a chord, see
436 @inputfileref{input/test,tie-sparse.ly}.
438 For tying only a subset of the note heads of a pair of chords, see
439 @inputfileref{input/regression,tie-chord-partial.ly}.
444 Switching staves when a tie is active will not produce a slanted tie.
446 Formatting of ties is a difficult subject. The results are often not
456 @cindex @code{\times}
458 Tuplets are made out of a music expression by multiplying all durations
461 @cindex @code{\times}
463 \times @var{fraction} @var{musicexpr}
467 The duration of @var{musicexpr} will be multiplied by the fraction.
468 The fraction's denominator will be printed over the notes, optionally
469 with a bracket. The most common tuplet is the triplet in which 3
470 notes have the length of 2, so the notes are 2/3 of their written
473 @lilypond[fragment,verbatim,center]
474 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
477 The property @code{tupletSpannerDuration} specifies how long each
478 bracket should last. With this, you can make lots of tuplets while
479 typing @code{\times} only once, saving lots of typing. In the next
480 example, there are two triplets shown, while @code{\times} was only
483 @lilypond[fragment,relative,raggedright,verbatim]
484 \set tupletSpannerDuration = #(ly:make-moment 1 4)
485 \times 2/3 { c'8 c c c c c }
488 The format of the number is determined by the property
489 @code{tupletNumberFormatFunction}. The default prints only the
490 denominator, but if it is set to the Scheme function
491 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
495 @cindex @code{tupletNumberFormatFunction}
496 @cindex tuplet formatting
501 @cindex @code{\tupletUp}
503 @cindex @code{\tupletDown}
505 @cindex @code{\tupletBoth}
510 Internals: @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
512 Examples: @inputfileref{input/regression,tuplet-nest.ly}.
516 Nested tuplets are not formatted automatically. In this case, outer
517 tuplet brackets should be moved manually, which is demonstrated in
518 @inputfileref{input/regression,tuplet-nest.ly}.
522 @node Easier music entry
523 @section Easier music entry
526 When entering music it is easy to introduce errors. This section deals
527 with tricks and features of the input language that were added solely
528 to help entering music, and find and correct mistakes.
530 It is also possible to use external programs, for example GUI
531 interfaces, or MIDI transcription programs, to enter or edit
532 music. Refer to the website for more information. Finally, there are
533 tools make debugging easier, by linking the input file and the output
534 shown on screen. See @ref{Point and click} for more information.
541 * Skipping corrected music::
542 * Automatic note splitting::
548 @node Relative octaves
549 @subsection Relative octaves
551 @cindex relative octave specification
553 Octaves are specified by adding @code{'} and @code{,} to pitch names.
554 When you copy existing music, it is easy to accidentally put a pitch
555 in the wrong octave and hard to find such an error. The relative
556 octave mode prevents these errors: a single error puts the rest of the
557 piece off by one octave:
559 @cindex @code{\relative}
561 \relative @var{startpitch} @var{musicexpr}
564 The octave of notes that appear in @var{musicexpr} are calculated as
565 follows: If no octave changing marks are used, the basic interval
566 between this and the last note is always taken to be a fourth or less
567 (; this distance is determined without regarding alterations: a
568 @code{fisis} following a @code{ceses} will be put above the
571 The octave changing marks @code{'} and @code{,} can be added to raise
572 or lower the pitch by an extra octave. Upon entering relative mode,
573 an absolute starting pitch must be specified that will act as the
574 predecessor of the first note of @var{musicexpr}.
576 Here is the relative mode shown in action:
577 @lilypond[fragment,raggedright,verbatim,center]
583 Octave changing marks are used for intervals greater than a fourth:
584 @lilypond[fragment,verbatim,center]
589 If the preceding item is a chord, the first note of the chord is used
590 to determine the first note of the next chord:
592 @lilypond[fragment,verbatim,center]
599 @cindex @code{\notes}
601 The pitch after the @code{\relative} contains a note name. To parse
602 the pitch as a note name, you have to be in note mode, so there must
603 be a surrounding @code{\notes} keyword (which is not
606 The relative conversion will not affect @code{\transpose},
607 @code{\chords} or @code{\relative} sections in its argument. If you
608 want to use relative within transposed music, you must place an
609 additional @code{\relative} inside the @code{\transpose}.
612 @subsection Octave check
615 Octave checks make octave errors easier to correct: a note may be
616 followed by @code{=}@var{quotes} which indicates what its absolute
617 octave should be. In the following example,
619 \relative c'' @{ c='' b=' d,='' @}
623 @c take care with @code, adds confusing quotes.
624 the d will generate a warning, because a d'' is expected, but a d' is
625 found. In the output, the octave is corrected this and the following
630 There is also a syntax that is separate from the notes.
635 This checks that @var{pitch} (without octave) yields @var{pitch} (with
636 octave) in \relative mode. If not, a warning is printed, and the
637 octave is corrected, for example, the first check is passed
638 successfully. The second check fails with an error message. The
639 octave is adjusted so the following notes are in the correct octave
650 The octave of a note following an octave check is determined with
651 respect to the note preceding it. In the next fragment, the last note
652 is a @code{a'}, above central C. Hence, the @code{\octave} check may
653 be deleted without changing the meaning of the piece.
655 @lilypond[verbatim,fragment]
664 @subsection Bar check
668 @cindex @code{barCheckSynchronize}
671 Bar checks help detect errors in the durations. A bar check is
672 entered using the bar symbol, `@code{|}'. Whenever it is encountered
673 during interpretation, it should fall on a measure boundary. If it
674 does not, a warning is printed. Depending on the value of
675 @code{barCheckSynchronize}, the beginning of the measure will be
678 In the next example, the second bar check will signal an error:
680 \time 3/4 c2 e4 | g2 |
683 Bar checks can also be used in lyrics, for example
688 Twin -- kle | Twin -- kle
693 @cindex skipTypesetting
695 Failed bar checks are caused by entering incorrect
696 durations. Incorrect durations often completely garble up the score,
697 especially if it is polyphonic, so you should start correcting the
698 score by scanning for failed bar checks and incorrect durations. To
699 speed up this process, you can use @code{skipTypesetting}, described
702 @node Skipping corrected music
703 @subsection Skipping corrected music
705 The property @code{Score.skipTypesetting} can be used to switch on and
706 off typesetting completely during the interpretation phase. When
707 typesetting is switched off, the music is processed much more quickly.
708 This can be used to skip over the parts of a score that have already
709 been checked for errors:
711 @lilypond[fragment,raggedright,verbatim]
713 \set Score.skipTypesetting = ##t
715 \set Score.skipTypesetting = ##f
719 @node Automatic note splitting
720 @subsection Automatic note splitting
722 Long notes can be converted automatically to tied notes. This is done
723 by replacing the @internalsref{Note_heads_engraver} by the
724 @internalsref{Completion_heads_engraver}.
725 In the following examples, notes crossing the barline are split and tied.
728 @lilypond[noindent,verbatim,relative=1]
730 \remove "Note_heads_engraver"
731 \consists "Completion_heads_engraver"
733 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
737 This engraver splits all running notes at the bar line, and inserts
738 ties. One of its uses is to debug complex scores: if the measures are
739 not entirely filled, then the ties exactly show how much each measure
744 Not all durations (especially those containing tuplets) can be
745 represented exactly; the engraver will not insert tuplets.
749 Examples: @inputfileref{input/regression,completion-heads.ly}.
751 Internals: @internalsref{Completion_heads_engraver}.
755 @section Staff notation
757 This section describes music notation that occurs on staff level,
758 such as keys, clefs and time signatures.
760 @cindex Staff notation
774 @subsection Staff symbol
776 @cindex adjusting staff symbol
778 Notes, dynamic signs, etc. are grouped
779 with a set of horizontal lines, into a staff (plural `staves'). In our
780 system, these lines are drawn using a separate layout object called
784 @cindex staff lines, setting number of
785 @cindex staff lines, setting thickness of
786 @cindex thickness of staff lines, setting
787 @cindex number of staff lines, setting
791 Internals: @internalsref{StaffSymbol}.
793 Examples: @inputfileref{input/test,staff-lines.ly},
794 @inputfileref{input/test,staff-size.ly}.
798 If a staff is ended halfway a piece, the staff symbol may not end
799 exactly on the barline.
803 @subsection Key signature
804 @cindex Key signature
808 The key signature indicates the scale in which a piece is played. It
809 is denoted by a set of alterations (flats or sharps) at the start of
814 Setting or changing the key signature is done with the @code{\key}
817 @code{\key} @var{pitch} @var{type}
820 @cindex @code{\minor}
821 @cindex @code{\major}
822 @cindex @code{\minor}
823 @cindex @code{\ionian}
824 @cindex @code{\locrian}
825 @cindex @code{\aeolian}
826 @cindex @code{\mixolydian}
827 @cindex @code{\lydian}
828 @cindex @code{\phrygian}
829 @cindex @code{\dorian}
831 Here, @var{type} should be @code{\major} or @code{\minor} to get
832 @var{pitch}-major or @var{pitch}-minor, respectively.
833 The standard mode names @code{\ionian},
834 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
835 @code{\phrygian}, and @code{\dorian} are also defined.
837 This command sets the context property
838 @internalsref{Staff}.@code{keySignature}. Non-standard key signatures
839 can be specified by setting this property directly.
841 Accidentals and key signatures often confuse new users, because
842 unaltered notes get natural signs depending on the keysignature. The
843 tutorial explains why this is so in @ref{More about pitches}.
847 The ordering of a key cancellation is wrong when it is combined with
848 repeat bar lines. The cancellation is also printed after a line break.
852 Internals: @internalsref{KeyChangeEvent}, and @internalsref{KeySignature}.
854 @cindex @code{keySignature}
861 The clef indicates which lines of the staff correspond to which
866 The clef can be set or changed with the @code{\clef} command:
867 @lilypond[fragment,verbatim]
868 \key f\major c''2 \clef alto g'2
871 Supported clef-names include:
872 @c Moved standard clefs to the top /MB
876 @item treble, violin, G, G2
889 G clef on 1st line, so-called French violin clef
894 @cindex mezzosoprano clef
897 @cindex baritone clef
900 @cindex varbaritone clef
909 By adding @code{_8} or @code{^8} to the clef name, the clef is
910 transposed one octave down or up, respectively, and @code{_15} and
911 @code{^15} transposes by two octaves. The argument @var{clefname}
912 must be enclosed in quotes when it contains underscores or digits. For
916 @cindex choral tenor clef
917 @lilypond[verbatim,fragment,relative]
921 This command is equivalent to setting @code{clefGlyph},
922 @code{clefPosition} (which controls the Y position of the clef),
923 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
924 when any of these properties are changed.
928 Internals: the object for this symbol is @internalsref{Clef}.
932 @node Ottava brackets
933 @subsection Ottava brackets
935 ``Ottava'' brackets introduce an extra transposition of an octave for
936 the staff. They are created by invoking the function
937 @code{set-octavation}:
943 @lilypond[verbatim,fragment]
952 The @code{set-octavation} function also takes -1 (for 8va bassa) and 2
953 (for 15ma) as arguments. Internally the function sets the properties
954 @code{ottavation} (eg. to @code{"8va"}) and
955 @code{centralCPosition}. For overriding the text of the bracket, set
956 @code{ottavation} after invoking @code{set-octavation}, i.e.,
960 \set Staff.ottavation = #"8"
965 Internals: @internalsref{OttavaBracket}.
967 Examples: @inputfileref{input/regression,ottava.ly},
968 @inputfileref{input/regression,ottava-broken.ly}.
972 @code{set-octavation} will get confused when clef changes happen
973 during an octavation bracket.
976 @subsection Time signature
977 @cindex Time signature
981 Time signature indicates the metrum of a piece: a regular pattern of
982 strong and weak beats. It is denoted by a fraction at the start of the
987 The time signature is set or changed by the @code{\time}
989 @lilypond[fragment,verbatim]
990 \time 2/4 c'2 \time 3/4 c'2.
993 The symbol that is printed can be customized with the @code{style}
994 property. Setting it to @code{#'()} uses fraction style for 4/4 and
995 2/2 time. There are many more options for its layout. See
996 @inputfileref{input/test,time.ly} for more examples.
999 This command sets the property @code{timeSignatureFraction},
1000 @code{beatLength} and @code{measureLength} in the @code{Timing}
1001 context, which is normally aliased to @internalsref{Score}. The
1002 property @code{measureLength} determines where bar lines should be
1003 inserted, and how automatic beams should be generated. Changing the
1004 value of @code{timeSignatureFraction} also causes the symbol to be
1007 More options are available through the Scheme function
1008 @code{set-time-signature}. In combination with the
1009 @internalsref{Measure_grouping_engraver}, it will create
1010 @internalsref{MeasureGrouping} signs. Such signs ease reading
1011 rhythmically complex modern music. In the following example, the 9/8
1012 measure is subdivided in 2, 2, 2 and 3. This is passed to
1013 @code{set-time-signature} as the third argument @code{(2 2 2 3)}:
1016 \score { \notes \relative c'' {
1017 #(set-time-signature 9 8 '(2 2 2 3))
1018 g8[ g] d[ d] g[ g] a8[( bes g]) |
1019 #(set-time-signature 5 8 '(3 2))
1024 \translator { \StaffContext
1025 \consists "Measure_grouping_engraver"
1031 Internals: @internalsref{TimeSignature}, and @internalsref{Timing_engraver}.
1036 Automatic beaming does not use measure grouping specified with
1037 @code{set-time-signature}.
1039 @node Partial measures
1040 @subsection Partial measures
1043 @cindex partial measure
1044 @cindex measure, partial
1045 @cindex shorten measures
1046 @cindex @code{\partial}
1048 Partial measures, for example in upsteps, are entered using the
1049 @code{\partial} command:
1050 @lilypond[fragment,verbatim,relative=1]
1051 \partial 16*5 c16 cis d dis e | a2. c,4 | b2
1054 The syntax for this command is
1056 \partial @var{duration}
1058 This is internally translated into
1060 \set Timing.measurePosition = -@var{length of duration}
1063 The property @code{measurePosition} contains a rational number
1064 indicating how much of the measure has passed at this point.
1066 @node Unmetered music
1067 @subsection Unmetered music
1069 Bar lines and bar numbers are calculated automatically. For unmetered
1070 music (e.g. cadenzas), this is not desirable. By setting
1071 @code{Score.timing} to false, this automatic timing can be switched
1077 @cindex @code{\cadenzaOn}
1079 @cindex @code{\cadenzaOff}
1083 @subsection Bar lines
1087 @cindex measure lines
1091 Bar lines delimit measures, but are also used to indicate repeats.
1092 Normally, they are inserted automatically. Line breaks may only
1098 of barlines can be forced with the @code{\bar} command:
1100 @lilypond[relative=1,fragment,verbatim]
1104 The following bar types are available:
1105 @lilypond[fragment,relative,raggedright,verbatim]
1118 For allowing linebreaks, there is a special command,
1122 This will insert an invisible barline, and allow linebreaks at this
1125 In scores with many staves, a @code{\bar} command in one staff is
1126 automatically applied to all staves. The resulting bar lines are
1127 connected between different staves of a @internalsref{StaffGroup}:
1129 @lilypond[fragment,verbatim]
1130 << \context StaffGroup <<
1134 \new Staff { \clef bass c4 g e g } >>
1135 \new Staff { \clef bass c2 c2 } >>
1139 The command @code{\bar @var{bartype}} is a short cut for doing
1140 @code{\set Score.whichBar = @var{bartype}} Whenever
1141 @code{whichBar} is set to a string, a bar line of that type is
1142 created. At the start of a measure it is set to
1143 @code{defaultBarType}. The contents of @code{repeatCommands} are used
1144 to override default measure bars.
1146 Property @code{whichBar} can also be set directly, using @code{\set}
1147 or @code{\bar}. These settings take precedence over the automatic
1148 @code{whichBar} settings.
1151 @cindex repeatCommands
1152 @cindex defaultBarType
1154 You are encouraged to use @code{\repeat} for repetitions. See
1161 In this manual: @ref{Repeats}.
1164 Internals: the bar line objects that are created at
1165 @internalsref{Staff} level are called @internalsref{BarLine}, the bar
1166 lines that span staves are @internalsref{SpanBar}s.
1168 @cindex bar lines at start of system
1169 @cindex start of system
1171 The barlines at the start of each system are
1172 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
1173 @internalsref{SystemStartBracket}. Only one of these types is created
1174 in every context, and that type is determined by the property
1175 @code{systemStartDelimiter}.
1177 Examples: @inputfileref{input/test,bar-lines.ly},
1183 The easiest way to enter fragments with more than one voice on a staff
1184 is to split chords using the separator @code{\\}. You can use it for
1185 small, short-lived voices or for single chords:
1187 @lilypond[verbatim,fragment]
1188 \context Staff \relative c'' {
1189 c4 << { f d e } \\ { b c2 } >>
1190 c4 << g' \\ b, \\ f' \\ d >>
1194 The separator causes @internalsref{Voice} contexts@footnote{Polyphonic
1195 voices are sometimes called "layers" other notation packages}
1197 to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
1198 each of these contexts, vertical direction of slurs, stems, etc. is set
1201 @cindex @code{\voiceOne}
1202 @cindex @code{\voiceFour}
1204 This can also be done by instantiating @internalsref{Voice} contexts
1205 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1206 a stem directions and horizontal shift for each part:
1209 @lilypond[raggedright,verbatim]
1211 \context Staff << \new Voice { \voiceOne cis2 b }
1212 \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
1213 \new Voice { \voiceTwo fis4~ fis4 f ~ f } >>
1217 The command @code{\oneVoice} will revert back to the normal setting.
1218 @cindex @code{\oneVoice}
1221 Normally, note heads with a different number of dots are not merged, but
1222 when the object property @code{merge-differently-dotted} is set in
1223 the @internalsref{NoteCollision} object, they are merged:
1224 @lilypond[verbatim,fragment,raggedright]
1225 \relative c'' \context Voice << {
1227 \override Staff.NoteCollision
1228 #'merge-differently-dotted = ##t
1230 } \\ { g8.[ f16] g8.[ f16] }
1234 Similarly, you can merge half note heads with eighth notes, by setting
1235 @code{merge-differently-headed}:
1236 @lilypond[fragment,relative=2,verbatim]
1239 \override Staff.NoteCollision
1240 #'merge-differently-headed = ##t
1241 c8 c4. } \\ { c2 c2 } >>
1244 LilyPond also vertically shifts rests that are opposite of a stem:
1247 @lilypond[raggedright,fragment,verbatim]
1248 \context Voice << c''4 \\ r4 >>
1256 @cindex @code{\oneVoice}
1258 @cindex @code{\voiceOne}
1260 @cindex @code{\voiceTwo}
1262 @cindex @code{\voiceThree}
1264 @cindex @code{\voiceFour}
1268 The following commands specify in what chords of the current voice
1269 should be shifted: the outer voice has @code{\shiftOff}, and the inner
1270 voices have @code{\shiftOn}, @code{\shiftOnn}, etc.
1273 @cindex @code{\shiftOn}
1275 @cindex @code{\shiftOnn}
1277 @cindex @code{\shiftOnnn}
1279 @cindex @code{\shiftOff}
1286 Internals: the objects responsible for resolving collisions are
1287 @internalsref{NoteCollision} and @internalsref{RestCollision}.
1289 Examples: See also example files
1290 @inputfileref{input/regression,collision-dots.ly},
1291 @inputfileref{input/regression,collision-head-chords.ly},
1292 @inputfileref{input/regression,collision-heads.ly},
1293 @inputfileref{input/regression,collision-mesh.ly}, and
1294 @inputfileref{input/regression,collisions.ly}.
1299 Resolving collisions is a intricate subject, and only a few situations
1300 are handled. When LilyPond cannot cope, the @code{force-hshift}
1301 property of the @internalsref{NoteColumn} object and pitched rests can
1302 be used to override typesetting decisions.
1304 When using @code{merge-differently-headed} with an upstem 8th or a shorter
1305 note, and a downstem half note, the 8th note gets the wrong offset.
1307 There is no support for clusters where the same note occurs with
1308 different accidentals in the same chord. In this case, it is
1309 recommended to use enharmonic transcription, or to use special cluster
1310 notation (see @ref{Clusters}).
1315 Beams are used to group short notes into chunks that are aligned with
1316 the metrum. They are inserted automatically in most cases:
1318 @lilypond[fragment,verbatim,relative=2]
1319 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1322 When these automatic decisions are not good enough, beaming can be
1323 entered explicitly. It is also possible to define beaming patterns
1324 that differ from the defaults.
1328 Internals: @internalsref{Beam}.
1331 @cindex Automatic beams
1334 * Setting automatic beam behavior::
1338 @subsection Manual beams
1339 @cindex beams, manual
1343 In some cases it may be necessary to override the automatic beaming
1344 algorithm. For example, the auto beamer will not put beams over rests
1345 or bar lines. Such beams are specified by manually: the begin and end
1346 point are marked with @code{[} and @code{]}:
1348 @lilypond[fragment,relative,verbatim]
1350 r4 r8[ g' a r8] r8 g[ | a] r8
1354 @cindex @code{stemLeftBeamCount}
1356 Normally, beaming patterns within a beam are determined automatically.
1357 When this mechanism fouls up, the properties
1358 @code{stemLeftBeamCount} and @code{stemRightBeamCount} can
1359 be used to control the beam subdivision on a stem. If either property
1360 is set, its value will be used only once, and then it is erased.
1362 @lilypond[fragment,relative,verbatim]
1365 f8[ r16 \set stemLeftBeamCount = #1 f g a]
1368 @cindex @code{stemRightBeamCount}
1371 The property @code{subdivideBeams} can be set in order to subdivide
1372 all 16th or shorter beams at beat positions, as defined by the
1373 @code{beatLength} property . This accomplishes the same effect as
1374 twiddling with @code{stemLeftBeamCount} and @code{stemRightBeamCount},
1375 but it take less typing:
1378 @lilypond[relative=1,verbatim,noindent]
1380 \set subdivideBeams = ##t
1382 \set Score.beatLength = #(ly:make-moment 1 8)
1385 @cindex subdivideBeams
1387 Kneed beams are inserted automatically, when a large gap is detected
1388 between the note heads. This behavior can be tuned through the object
1389 property @code{auto-knee-gap}.
1391 Normally, line breaks are forbidden when beams cross bar lines. This
1392 behavior can be changed by setting @code{allowBeamBreak}.
1394 @cindex @code{allowBeamBreak}
1395 @cindex beams and line breaks
1397 @cindex beams, kneed
1399 @cindex auto-knee-gap
1405 @cindex Frenched staves
1407 Automatically kneed beams cannot be used together with hidden staves.
1412 @node Setting automatic beam behavior
1413 @subsection Setting automatic beam behavior
1415 @cindex @code{autoBeamSettings}
1416 @cindex @code{(end * * * *)}
1417 @cindex @code{(begin * * * *)}
1418 @cindex automatic beams, tuning
1419 @cindex tuning automatic beaming
1421 @c [TODO: use \applycontext]
1423 In normal time signatures, automatic beams can start on any note but can
1424 only end in a few positions within the measure: beams can end on a beat,
1425 or at durations specified by the properties in
1426 @code{autoBeamSettings}. The defaults for @code{autoBeamSettings}
1427 are defined in @file{scm/auto-beam.scm}.
1429 The value of @code{autoBeamSettings} is changed with two functions:
1431 #(override-auto-beam-setting
1432 '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b}
1434 #(revert-auto-beam-setting '(@var{be} @var{p} @var{q} @var{n} @var{m}))
1436 Here, @var{be} is the symbol @code{begin} or @code{end}. It determines
1437 whether the rule applies to begin or end-points. The quantity
1438 @var{p}/@var{q} refers to the length of the beamed notes (and `@code{*
1439 *}' designates notes of any length), @var{n}/@var{M} refers to a time
1440 signature (wildcards `@code{* *}' may be entered to designate all time
1441 signatures), @var{a}/@var{b} is a duration. By default, this command
1442 changes settings for the current voice. It is also possible to adjust
1443 settings at higher contexts, by adding a @var{context} argument.
1445 For example, if automatic beams should end on every quarter note, use
1448 #(override-auto-beam-setting '(end * * * *) 1 4)
1450 Since the duration of a quarter note is 1/4 of a whole note, it is
1451 entered as @code{(ly:make-moment 1 4)}.
1453 The same syntax can be used to specify beam starting points. In this
1454 example, automatic beams can only end on a dotted quarter note:
1456 #(override-auto-beam-setting '(end * * * *) 3 8)
1458 In 4/4 time signature, this means that automatic beams could end only on
1459 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1460 3/8, has passed within the measure).
1462 Rules can also be restricted to specific time signatures. A rule that
1463 should only be applied in @var{N}/@var{M} time signature is formed by
1464 replacing the second asterisks by @var{N} and @var{M}. For example, a
1465 rule for 6/8 time exclusively looks like
1467 #(override-auto-beam-setting '(begin * * 6 8) @dots{})
1470 If a rule should be to applied only to certain types of beams, use the
1471 first pair of asterisks. Beams are classified according to the
1472 shortest note they contain. For a beam ending rule that only applies
1473 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1476 If a score ends while an automatic beam has not been ended and is still
1477 accepting notes, this last beam will not be typeset at all.
1479 @cindex automatic beam generation
1481 @cindex @code{autoBeaming}
1484 For melodies that have lyrics, you may want to switch off
1485 automatic beaming. This is done by setting @code{autoBeaming} to
1490 @cindex @code{\autoBeamOff}
1491 @code{\autoBeamOff},
1492 @cindex @code{\autoBeamOn}
1498 The rules for ending a beam depend on the shortest note in a beam.
1499 So, while it is possible to have different ending rules for eight
1500 beams and sixteenth beams, a beam that contains both eight and
1501 sixteenth notes will use the rules for the sixteenth beam.
1503 In the example below, the autobeamer makes eight beams and sixteenth
1504 end at 3 eights; the third beam can only be corrected by specifying
1507 @lilypond[raggedright,fragment,relative,noverbatim,quote]
1508 #(override-auto-beam-setting '(end * * * *) 3 8)
1509 % rather show case where it goes wrong
1510 %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
1511 \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
1513 It is not possible to specify beaming parameters that act differently in
1514 different parts of a measure. This means that it is not possible to use
1515 automatic beaming in irregular meters such as @code{5/8}.
1518 @section Accidentals
1521 This section describes how to change the way that accidentals are
1522 inserted automatically before the running notes.
1526 * Using the predefined accidental variables::
1527 * Customized accidental rules::
1530 @node Using the predefined accidental variables
1531 @subsection Using the predefined accidental variables
1533 The constructs for describing the accidental typesetting rules are
1534 quite hairy, so non-experts should stick to the variables
1535 defined in @file{ly/property-init.ly}.
1536 @cindex @file{property-init.ly}
1538 The variables set properties in the ``@code{Current}'' context (see
1539 @ref{Context properties}). This means that the variables should
1540 normally be added right after the creation of the context in which the
1541 accidental typesetting described by the variable is to take
1542 effect. For example, if you want to use piano-accidentals in a piano
1543 staff then issue @code{\pianoAccidentals} first thing after the
1544 creation of the piano staff:
1547 \notes \relative c'' <<
1548 \new Staff @{ cis4 d e2 @}
1549 \context GrandStaff <<
1551 \new Staff @{ cis4 d e2 @}
1552 \new Staff @{ es2 c @}
1554 \new Staff @{ es2 c @}
1558 @lilypond[raggedright]
1560 \notes \relative c'' <<
1561 \new Staff { cis4 d e2 }
1562 \context GrandStaff <<
1564 \new Staff { cis4 d e2 }
1565 \new Staff { es2 c }
1567 \new Staff { es2 c }
1572 minimumVerticalExtent = #'(-4.0 . 4.0)
1580 @item \defaultAccidentals
1581 @cindex @code{\defaultAccidentals}
1582 This is the default typesetting behaviour. It should correspond
1583 to 18th century common practice: Accidentals are
1584 remembered to the end of the measure in which they occur and
1585 only on their own octave.
1587 @item \voiceAccidentals
1588 @cindex @code{\voiceAccidentals}
1590 The normal behaviour is to
1591 remember the accidentals on Staff-level. This variable, however,
1592 typesets accidentals individually for each voice. Apart from that the
1593 rule is similar to @code{\defaultAccidentals}.
1595 This leads to some weird and often unwanted results
1596 because accidentals from one voice do not get cancelled in other
1598 @lilypond[raggedright,relative,fragment,verbatim,quote]
1606 Hence you should only use @code{\voiceAccidentals} if the voices
1607 are to be read solely by individual musicians. If the staff is to be
1608 used by one musician (e.g. a conductor) then you use
1609 @code{\modernVoiceAccidentals} or @code{\modernVoiceCautionaries}
1612 @item \modernAccidentals
1613 @cindex @code{\modernAccidentals}
1614 This rule corresponds to the common practice in the 20th
1616 The rule is more complex than @code{\defaultAccidentals}.
1617 You get all the same accidentals, but temporary
1618 accidentals also get cancelled in other octaves. Furthermore,
1619 in the same octave, they also get cancelled in the following measure:
1620 @lilypond[raggedright,fragment,verbatim]
1622 cis' c'' cis'2 | c'' c'
1625 @item \modernCautionaries
1626 @cindex @code{\modernCautionaries}
1627 This rule is similar to @code{\modernAccidentals}, but the
1628 ``extra'' accidentals (the ones not typeset by
1629 @code{\defaultAccidentals}) are typeset as cautionary accidentals.
1630 They are printed in reduced size or with parentheses:
1631 @lilypond[raggedright,fragment,verbatim]
1633 cis' c'' cis'2 | c'' c'
1636 @cindex @code{\modernVoiceAccidentals}
1637 @item \modernVoiceAccidentals
1638 is used for multivoice accidentals to be read both by musicians
1639 playing one voice and musicians playing all voices. Accidentals are
1640 typeset for each voice, but they @emph{are} cancelled across voices in
1641 the same @internalsref{Staff}.
1643 @cindex @code{\modernVoiceCautionaries}
1644 @item \modernVoiceCautionaries
1645 is the same as @code{\modernVoiceAccidentals}, but with the extra
1646 accidentals (the ones not typeset by @code{\voiceAccidentals}) typeset
1647 as cautionaries. Even though all accidentals typeset by
1648 @code{\defaultAccidentals} @emph{are} typeset by this variable then
1649 some of them are typeset as cautionaries.
1651 @item \pianoAccidentals
1652 @cindex @code{\pianoAccidentals}
1653 20th century practice for piano notation. Very similar to
1654 @code{\modernAccidentals} but accidentals also get cancelled
1655 across the staves in the same @internalsref{GrandStaff} or
1656 @internalsref{PianoStaff}.
1658 @item \pianoCautionaries
1659 @cindex @code{\pianoCautionaries}
1660 As @code{\pianoAccidentals} but with the extra accidentals
1661 typeset as cautionaries.
1664 @cindex @code{\noResetKey}
1665 Same as @code{\defaultAccidentals} but with accidentals lasting
1666 ``forever'' and not only until the next measure:
1667 @lilypond[raggedright,fragment,verbatim,relative]
1672 @item \forgetAccidentals
1673 @cindex @code{\forgetAccidentals}
1674 This is sort of the opposite of @code{\noResetKey}: Accidentals
1675 are not remembered at all---and hence all accidentals are
1676 typeset relative to the key signature, regardless of what was
1677 before in the music:
1678 @lilypond[raggedright,fragment,verbatim,relative]
1680 \key d\major c4 c cis cis d d dis dis
1684 @node Customized accidental rules
1685 @subsection Customized accidental rules
1687 For determining when to print an accidental, several different rules
1688 are tried. The rule that gives the highest number of accidentals is
1689 used. Each rule consists of
1692 In which context is the rule applied. For example, if
1693 @var{context} is @internalsref{Score} then all staves share
1694 accidentals, and if @var{context} is @internalsref{Staff} then all
1695 voices in the same staff share accidentals, but staves do not.
1698 Whether the accidental changes all octaves or only the current
1699 octave. Valid choices are
1703 This is the default algorithm. Accidentals are typeset if the note changes
1704 the accidental of that note in that octave. Accidentals lasts to the end of the measure
1705 and then as many measures as specified in the value. I.e. 1 means to the end
1706 of next measure, -1 means to the end of previous measure (that is: no duration at all), etc. #t means forever.
1708 Accidentals are typeset if the note is different from
1709 the previous note on the same pitch in any octave. The value has same meaning as in
1715 Over how many barlines the accidental lasts.
1716 If @var{lazyness} is @code{-1} then the accidental is forget
1717 immediately, and if @var{lazyness} is @code{#t} then the accidental
1724 @cindex @code{\defaultAccidentals}
1725 @code{\defaultAccidentals},
1726 @cindex @code{\voiceAccidentals}
1727 @code{\voiceAccidentals},
1728 @cindex @code{\modernAccidentals}
1729 @code{\modernAccidentals},
1730 @cindex @code{\modernCautionaries}
1731 @code{\modernCautionaries},
1732 @cindex @code{\modernVoiceAccidentals}
1733 @code{\modernVoiceAccidentals},
1734 @cindex @code{\modernVoiceCautionaries}
1735 @code{\modernVoiceCautionaries},
1736 @cindex @code{\pianoAccidentals}
1737 @code{\pianoAccidentals},
1738 @cindex @code{\pianoCautionaries}
1739 @code{\pianoCautionaries},
1740 @cindex @code{\noResetKey}
1742 @cindex @code{\forgetAccidentals}
1743 @code{\forgetAccidentals}.
1747 Internals: @internalsref{Accidental_engraver},
1748 @internalsref{Accidental}, and @internalsref{AccidentalPlacement}.
1753 Currently the simultaneous notes are considered to be entered in
1754 sequential mode. This means that in a chord the accidentals are
1755 typeset as if the notes in the chord happened once at a time - in the
1756 order in which they appear in the input file.
1758 This is only a problem when there are simultaneous notes whose
1759 accidentals depend on each other. The problem only occurs when using
1760 non-default accidentals. In the default scheme, accidentals only
1761 depend on other accidentals with the same pitch on the same staff, so
1762 no conflicts possible.
1764 This example shows two examples of the same music giving different
1765 accidentals depending on the order in which the notes occur in the
1768 @lilypond[raggedright,fragment,verbatim]
1769 \set Staff.autoAccidentals = #'( Staff (any-octave . 0) )
1770 cis'4 <c'' c'> r2 | cis'4 <c' c''> r2
1771 | <cis' c''> r | <c'' cis'> r |
1774 This problem can be solved by manually inserting @code{!} and @code{?}
1775 for the problematic notes.
1777 @node Expressive marks
1778 @section Expressive marks
1781 @c todo: should change ordering
1782 @c where to put text spanners, metronome marks,
1791 * Analysis brackets::
1793 * Fingering instructions::
1804 A slur indicates that notes are to be played bound or @emph{legato}.
1808 They are entered using parentheses:
1809 @lilypond[relative=1,fragment,verbatim,center]
1810 f( g)( a) a8 b( a4 g2 f4)
1815 @c TODO: should explain that ^( and _( set directions
1816 @c should set attachments with ^ and _ ?
1818 Slurs avoid crossing stems, and are generally attached to note heads.
1819 However, in some situations with beams, slurs may be attached to stem
1820 ends. If you want to override this layout you can do this through the
1821 object property @code{attachment} of @internalsref{Slur} in
1822 @internalsref{Voice} context. Its value is a pair of symbols, specifying
1823 the attachment type of the left and right end points:
1825 @lilypond[fragment,relative,verbatim]
1827 \override Stem #'length = #5.5
1829 \override Slur #'attachment = #'(stem . stem)
1833 If a slur would strike through a stem or beam, the slur will be moved
1834 away upward or downward. If this happens, attaching the slur to the
1835 stems might look better:
1837 @lilypond[fragment,relative,verbatim]
1840 \override Slur #'attachment = #'(stem . stem)
1847 @cindex @code{\slurUp}
1849 @cindex @code{\slurDown}
1851 @cindex @code{\slurBoth}
1853 @cindex @code{\slurDotted}
1855 @cindex @code{\slurSolid}
1860 Internals: @seeinternals{Slur}, and @internalsref{SlurEvent}.
1865 Producing nice slurs is a difficult problem, and LilyPond currently
1866 uses a simple, empiric method to produce slurs. In some cases, its
1870 @cindex Adjusting slurs
1872 @node Phrasing slurs
1873 @subsection Phrasing slurs
1875 @cindex phrasing slurs
1876 @cindex phrasing marks
1878 A phrasing slur (or phrasing mark) connects chords and is used to
1879 indicate a musical sentence. It is started using @code{\(} and @code{\)}
1882 @lilypond[fragment,verbatim,center,relative]
1883 \time 6/4 c'\( d( e) f( e) d\)
1886 Typographically, the phrasing slur behaves almost exactly like a
1887 normal slur. However, they are treated as different objects. A
1888 @code{\slurUp} will have no effect on a phrasing slur; instead, you
1889 should use @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
1890 @code{\phrasingSlurBoth}.
1892 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth}
1893 will only affect normal slurs and not phrasing slurs.
1897 @cindex @code{\phrasingSlurUp}
1898 @code{\phrasingSlurUp},
1899 @cindex @code{\phrasingSlurDown}
1900 @code{\phrasingSlurDown},
1901 @cindex @code{\phrasingSlurBoth}
1902 @code{\phrasingSlurBoth},
1906 Internals: see also @internalsref{PhrasingSlur}, and
1907 @internalsref{PhrasingSlurEvent}.
1911 Phrasing slurs have the same limitations in their formatting as normal
1912 slurs. Putting phrasing slurs over rests leads to spurious warnings.
1915 @subsection Breath marks
1917 Breath marks are entered using @code{\breathe}:
1920 @lilypond[fragment,relative,verbatim]
1924 The glyph of the breath mark can be tweaked by overriding the
1925 @code{text} property of the @code{BreathingSign} layout object with
1926 any markup text. For example,
1927 @lilypond[fragment,verbatim,relative]
1929 \override BreathingSign #'text
1930 = #(make-musicglyph-markup "scripts-rvarcomma")
1937 Internals: @internalsref{BreathingSign},
1938 @internalsref{BreathingSignEvent}.
1940 Examples: @inputfileref{input/regression,breathing-sign.ly}.
1943 @node Metronome marks
1944 @subsection Metronome marks
1947 @cindex beats per minute
1948 @cindex metronome marking
1950 Metronome settings can be entered as follows:
1952 \tempo @var{duration} = @var{perminute}
1955 In the MIDI output, they are interpreted as a tempo change, and in the
1956 paper output, a metronome marking is printed:
1957 @cindex @code{\tempo}
1958 @lilypond[fragment,verbatim]
1964 Internals: @internalsref{MetronomeChangeEvent}.
1969 @subsection Text spanners
1970 @cindex Text spanners
1972 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
1973 are written as texts, and extended over many measures with dotted
1974 lines. You can create such texts using text spanners: attach
1975 @code{\startTextSpan} and @code{\stopTextSpan} to the
1976 start and ending note of the spanner.
1978 The string to be printed, as well as the style, is set through object
1981 @lilypond[fragment,relative,verbatim]
1983 \override TextSpanner #'direction = #-1
1984 \override TextSpanner #'edge-text = #'("rall " . "")
1985 c2\startTextSpan b c\stopTextSpan a }
1991 Internals @internalsref{TextSpanEvent},
1992 @internalsref{TextSpanner}.
1994 Examples: @inputfileref{input/regression,text-spanner.ly}.
1997 @node Analysis brackets
1998 @subsection Analysis brackets
2000 @cindex phrasing brackets
2001 @cindex musicological analysis
2002 @cindex note grouping bracket
2004 Brackets are used in musical analysis to indicate structure in musical
2005 pieces. LilyPond supports a simple form of nested horizontal brackets.
2006 To use this, add the @internalsref{Horizontal_bracket_engraver} to
2007 @internalsref{Staff} context. A bracket is started with
2008 @code{\startGroup} and closed with @code{\stopGroup}:
2010 @lilypond[raggedright,verbatim]
2011 \score { \notes \relative c'' {
2012 c4\startGroup\startGroup
2015 c4\stopGroup\stopGroup
2017 \paper { \translator {
2018 \StaffContext \consists "Horizontal_bracket_engraver"
2024 Internals: @internalsref{HorizontalBracket},
2025 @internalsref{NoteGroupingEvent}.
2027 Examples: @inputfileref{input/regression,note-group-bracket.ly}.
2031 @subsection Articulations
2032 @cindex Articulations
2034 @cindex articulations
2038 A variety of symbols can appear above and below notes to indicate
2039 different characteristics of the performance. They are added to a note
2040 by adding a dash and the character signifying the
2041 articulation. They are demonstrated here:
2043 @lilypondfile[]{script-abbreviations.ly}
2045 The meanings of these shorthands can be changed: see
2046 @file{ly/script-init.ly} for examples.
2049 The script is automatically placed, but if you need to force
2050 directions, you can use @code{_} to force them down, or @code{^} to
2052 @lilypond[fragment,verbatim]
2056 Other symbols can be added using the syntax
2057 @var{note}@code{\}@var{name}, e.g. @code{c4\fermata}. Again, they
2058 can be forced up or down using @code{^} and @code{_},
2061 @lilypond[verbatim,fragment,relative=2]
2062 c\fermata c^\fermata c_\fermata
2069 @cindex staccatissimo
2078 @cindex organ pedal marks
2087 @cindex prallmordent
2091 @cindex thumb marking
2096 @lilypondfile[]{script-chart.ly}
2101 @cindex @code{\scriptUp}
2103 @cindex @code{\scriptDown}
2105 @cindex @code{\scriptBoth}
2110 Internals: @internalsref{ScriptEvent}, and @internalsref{Script}.
2114 These note ornaments appear in the printed output but have no
2115 effect on the MIDI rendering of the music.
2118 @node Fingering instructions
2119 @subsection Fingering instructions
2123 Fingering instructions can be entered using
2125 @var{note}-@var{digit}
2127 For finger changes, use markup texts:
2129 @lilypond[verbatim,raggedright,fragment]
2130 c'4-1 c'4-2 c'4-3 c'4-4
2131 c'^\markup { \fontsize #-3 \number "2-3" }
2134 @cindex finger change
2139 You can use the thumb-script to indicate that a note should be
2140 played with the thumb (e.g. in cello music):
2142 @lilypond[verbatim,raggedright,fragment]
2143 <a' a''-3>8(_\thumb <b' b''-3>)_\thumb
2144 <c'' c'''-3>(_\thumb <d'' d'''-3>)_\thumb
2147 Fingerings for chords can also be added to individual notes
2148 of the chord by adding them after the pitches:
2149 @lilypond[verbatim,raggedright,fragment,relative=1]
2150 < c-1 e-2 g-3 b-5 > 4
2154 In this case, setting @code{fingeringOrientations} will put fingerings next
2157 @lilypond[verbatim,raggedright,fragment,relative=1]
2158 \set fingeringOrientations = #'(left down)
2159 <c-1 es-2 g-4 bes-5 > 4
2160 \set fingeringOrientations = #'(up right down)
2161 <c-1 es-2 g-4 bes-5 > 4
2164 By using single note chords, fingering instructions can be put close
2165 to note heads in monophonic music.
2169 Internals: @internalsref{FingerEvent}, and @internalsref{Fingering}.
2171 Examples: @inputfileref{input/regression,finger-chords.ly}.
2174 @subsection Text scripts
2175 @cindex Text scripts
2177 @cindex text items, non-empty
2178 @cindex non-empty texts
2180 It is possible to place arbitrary strings of text or markup text (see
2181 @ref{Text markup}) above or below notes by using a string:
2182 @code{c^"text"}. By default, these indications do not influence the
2183 note spacing, but by using the command @code{\fatText}, the widths
2184 will be taken into account:
2186 @lilypond[fragment,raggedright,verbatim] \relative c' {
2187 c4^"longtext" \fatText c4_"longlongtext" c4 }
2190 It is possible to use @TeX{} commands in the strings, but this should
2191 be avoided because the exact dimensions of the string can then no
2196 @refcommand{fatText}, @refcommand{emptyText}.
2201 In this manual: @ref{Text markup}.
2203 Internals: @internalsref{TextScriptEvent}, @internalsref{TextScript}.
2209 @subsection Grace notes
2212 @c should have blurb about accaciatura / appogiatura
2214 @cindex @code{\grace}
2218 Grace notes are ornaments that are written out. The most common ones
2219 are acciaccatura, which should be played as very short. It is denoted
2220 by a slurred small note with a slashed stem. The appoggiatura is a
2221 grace note that takes a fixed fraction of the main note, is and
2222 denoted as a slurred note in small print without a slash.
2223 They are entered with the commands @code{\acciaccatura} and
2224 @code{\appoggiatura}, as demonstrated in the following example:
2227 @cindex appoggiatura
2228 @cindex acciaccatura
2230 @lilypond[relative=2,verbatim,fragment]
2231 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
2232 \acciaccatura { g16[ f] } e4
2235 Both are special forms of the @code{\grace} command. By prefixing this
2236 keyword to a music expression, a new one is formed, which will be
2237 printed in a smaller font and takes up no logical time in a measure.
2238 @lilypond[relative=2,verbatim,fragment]
2240 \grace { c16[ d16] } c2 c4
2244 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
2245 @code{\grace} command does not start a slur.
2247 Internally, timing for grace notes is done using a second, `grace'
2248 time. Every point in time consists of two rational numbers: one
2249 denotes the logical time, one denotes the grace timing. The above
2250 example is shown here with timing tuples:
2252 @lilypond[raggedright]
2255 c4 \grace c16 c4 \grace {
2258 \new Lyrics \lyrics {
2261 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
2262 \markup { (\fraction 1 4 , 0 ) } 4
2264 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2265 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2267 \markup { ( \fraction 2 4 , 0 ) }
2272 The placement of grace notes is synchronized between different staves.
2273 In the following example, there are two sixteenth graces notes for
2274 every eighth grace note:
2276 @lilypond[relative=2,verbatim,fragment]
2277 << \new Staff { e4 \grace { c16[ d e f] } e4 }
2278 \new Staff { c'4 \grace { g8[ b] } c4 } >>
2283 If you want to end a note with a grace, then the standard trick
2284 is to put the grace notes after a ``space note'', e.g.
2285 @lilypond[fragment,verbatim,relative=2]
2288 { s2 \grace { c16[ d] } } >>
2294 By adjusting the duration of the skip note (here it is a half-note),
2295 the space between the main-note and the grace is adjusted.
2298 A @code{\grace} section will introduce special typesetting settings,
2299 for example, to produce smaller type, and set directions. Hence, when
2300 introducing layout tweaks, they should be inside the grace section,
2302 @lilypond[fragment,verbatim,relative=1]
2305 \override Stem #'direction = #-1
2307 \revert Stem #'direction
2314 The overrides should also be reverted inside the grace section.
2316 If the layout of grace sections must be changed throughout the music,
2317 then this can be accomplished through the function
2318 @code{add-grace-property}. The following example
2319 undefines the Stem direction grace section, so stems do not always
2324 #(add-grace-property "Voice" Stem direction '())
2330 Another option is to change the variables @code{startGraceMusic},
2331 @code{stopGraceMusic}, @code{startAccacciaturaMusic},
2332 @code{stopAccacciaturaMusic}, @code{startAppoggiaturaMusic},
2333 @code{stopAppoggiaturaMusic}. More information is in the file
2334 @file{ly/grace-init.ly}
2339 Internals: @internalsref{GraceMusic}.
2343 A score that starts with an @code{\grace} section needs an explicit
2344 @code{\context Voice} declaration, otherwise the main note and grace
2345 note end up on different staves.
2347 Grace note synchronization can also lead to surprises. Staff notation,
2348 such as key signatures, barlines, etc. are also synchronized. Take
2349 care when you mix staves with grace notes and staves without, for example,
2351 @lilypond[relative=2,verbatim,fragment]
2352 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2353 \new Staff { c4 \bar "|:" d4 } >>
2356 Grace sections should only be used within sequential music
2357 expressions. Nesting or juxtaposing grace sections is not supported,
2358 and might produce crashes or other errors.
2362 @subsection Glissando
2365 @cindex @code{\glissando}
2367 A glissando is a smooth change in pitch. It is denoted by a line or a
2368 wavy line between two notes.
2372 A glissando line can be requested by attaching a @code{\glissando} to
2375 @lilypond[fragment,relative,verbatim]
2381 Internals: @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2386 Adding additional texts (such as @emph{gliss.}) is not supported.
2390 @subsection Dynamics
2403 @cindex @code{\ffff}
2413 Absolute dynamic marks are specified using an variable after a
2414 note: @code{c4\ff}. The available dynamic marks are @code{\ppp},
2415 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2416 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2417 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}:
2419 @lilypond[verbatim,raggedright,fragment,relative]
2420 c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2426 @cindex @code{\decr}
2427 @cindex @code{\rced}
2434 A crescendo mark is started with @code{\<} and terminated with
2435 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2436 with @code{\!}. Because these marks are bound to notes, if you must
2437 use spacer notes if multiple marks during one note are needed:
2439 @lilypond[fragment,verbatim,center,quote]
2440 c''\< c''\! d''\decr e''\rced
2441 << f''1 { s4 s4\< s4\! \> s4\! } >>
2443 This may give rise to very short hairpins. Use @code{minimum-length}
2444 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2448 \override Staff.Hairpin #'minimum-length = #5
2451 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2452 is an example how to do it:
2454 @lilypond[fragment,relative=2,verbatim]
2455 c4 \cresc c4 c c c \endcresc c4
2461 You can also supply your own texts:
2462 @lilypond[fragment,relative,verbatim]
2464 \set crescendoText = \markup { \italic "cresc. poco" }
2465 \set crescendoSpanner = #'dashed-line
2475 @cindex @code{\dynamicUp}
2477 @cindex @code{\dynamicDown}
2478 @code{\dynamicDown},
2479 @cindex @code{\dynamicBoth}
2480 @code{\dynamicBoth}.
2482 @cindex direction, of dynamics
2486 Internals: @internalsref{CrescendoEvent}, @internalsref{DecrescendoEvent}, and
2487 @internalsref{AbsoluteDynamicEvent}.
2489 Dynamics are objects of @internalsref{DynamicText} and
2490 @internalsref{Hairpin}. Vertical positioning of these symbols is
2491 handled by the @internalsref{DynamicLineSpanner} object.
2493 If you want to adjust padding or vertical direction of the dynamics, you
2494 must set properties for the @internalsref{DynamicLineSpanner} object.
2502 @cindex @code{\repeat}
2505 Repetition is a central concept in music, and multiple notations exist
2506 for repetitions. In LilyPond, most of these notations can be captured
2507 in a uniform syntax. One of the advantages is that they can be
2508 rendered in MIDI accurately.
2510 The following types of repetition are supported:
2514 Repeated music is fully written (played) out. Useful for MIDI
2515 output, and entering repetitive music.
2518 This is the normal notation: Repeats are not written out, but
2519 alternative endings (voltas) are printed, left to right.
2523 Alternative endings are written stacked. This has limited use but may be
2524 used to typeset two lines of lyrics in songs with repeats, see
2525 @inputfileref{input,star-spangled-banner.ly}.
2533 Make beat or measure repeats. These look like percent signs.
2539 * Repeats and MIDI::
2540 * Manual repeat commands::
2542 * Tremolo subdivisions::
2547 @subsection Repeat syntax
2551 LilyPond has one syntactic construct for specifying different types of
2552 repeats. The syntax is
2555 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2558 If you have alternative endings, you may add
2559 @cindex @code{\alternative}
2561 \alternative @code{@{} @var{alternative1}
2563 @var{alternative3} @dots{} @code{@}}
2565 where each @var{alternative} is a music expression. If you do not
2566 give enough alternatives for all of the repeats, then the first
2567 alternative is assumed to be played more than once.
2569 Normal notation repeats are used like this:
2570 @lilypond[fragment,verbatim,relative=1]
2572 \repeat volta 2 { c4 d e f }
2573 \repeat volta 2 { f e d c }
2576 With alternative endings:
2577 @lilypond[fragment,verbatim,relative=1]
2579 \repeat volta 2 {c4 d e f}
2580 \alternative { {d2 d} {f f,} }
2584 @lilypond[fragment,verbatim,relative=1]
2587 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2588 \alternative { { g4 g g } { a | a a a a | b2. } }
2594 If you do a nested repeat like
2603 then it is ambiguous to which @code{\repeat} the @code{\alternative}
2604 belongs. This ambiguity is resolved by always having the
2605 @code{\alternative} belong to the inner @code{\repeat}. For clarity,
2606 it is advisable to use braces in such situations.
2609 @node Repeats and MIDI
2610 @subsection Repeats and MIDI
2612 @cindex expanding repeats
2614 For instructions on how to unfold repeats for MIDI output, see the
2615 example file @inputfileref{input/test,unfold-all-repeats.ly}.
2620 Timing information is not remembered at the start of an alternative,
2621 so after a repeat timing information must be reset by hand, for
2622 example by setting @code{Score.measurePosition} or entering
2623 @code{\partial}. Similarly, slurs or ties are also not repeated.
2626 @node Manual repeat commands
2627 @subsection Manual repeat commands
2629 @cindex @code{repeatCommands}
2631 The property @code{repeatCommands} can be used to control the layout of
2632 repeats. Its value is a Scheme list of repeat commands, where each repeat
2636 @item the symbol @code{start-repeat},
2637 which prints a @code{|:} bar line,
2638 @item the symbol @code{end-repeat},
2639 which prints a @code{:|} bar line,
2640 @item the list @code{(volta @var{text})},
2641 which prints a volta bracket saying @var{text}: The text can be specified as
2642 a text string or as a markup text, see @ref{Text markup}. Do not
2643 forget to change the font, as the default number font does not contain
2644 alphabetic characters. Or,
2645 @item the list @code{(volta #f)}, which
2646 stops a running volta bracket:
2649 @lilypond[verbatim,fragment,relative=2]
2651 \set Score.repeatCommands = #'((volta "93") end-repeat)
2653 \set Score.repeatCommands = #'((volta #f))
2660 Internals: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2661 @internalsref{VoltaRepeatedMusic},
2662 @internalsref{UnfoldedRepeatedMusic}, and
2663 @internalsref{FoldedRepeatedMusic}.
2665 @node Tremolo repeats
2666 @subsection Tremolo repeats
2667 @cindex tremolo beams
2669 To place tremolo marks between notes, use @code{\repeat} with tremolo
2671 @lilypond[verbatim,raggedright]
2673 \context Voice \notes\relative c' {
2674 \repeat "tremolo" 8 { c16 d16 }
2675 \repeat "tremolo" 4 { c16 d16 }
2676 \repeat "tremolo" 2 { c16 d16 }
2681 Tremolo marks can also be put on a single note. In this case, the
2682 note should not be surrounded by braces.
2683 @lilypond[verbatim,raggedright]
2684 \repeat "tremolo" 4 c16
2687 A similar mechanism is the tremolo subdivision, described in
2688 @ref{Tremolo subdivisions}.
2692 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
2694 Internals: tremolo beams are @internalsref{Beam} objects. Single stem
2695 tremolos are @internalsref{StemTremolo}s. The music expression is
2696 @internalsref{TremoloEvent}.
2698 Example files: @inputfileref{input/regression,chord-tremolo.ly},
2699 @inputfileref{input/regression,stem-tremolo.ly}.
2701 @node Tremolo subdivisions
2702 @subsection Tremolo subdivisions
2703 @cindex tremolo marks
2704 @cindex @code{tremoloFlags}
2706 Tremolo marks can be printed on a single note by adding
2707 `@code{:}[@var{length}]' after the note. The length must be at least 8.
2708 A @var{length} value of 8 gives one line across the note stem. If the
2709 length is omitted, then then the last value (stored in
2710 @code{tremoloFlags}) is used:
2712 @lilypond[verbatim,fragment,center]
2713 c'2:8 c':32 | c': c': |
2716 @c [TODO : stok is te kort bij 32en]
2720 Tremolos in this style do not carry over into the MIDI output.
2724 In this manual: @ref{Tremolo repeats}.
2726 Elsewhere: @internalsref{StemTremolo}, @internalsref{TremoloEvent}.
2728 @node Measure repeats
2729 @subsection Measure repeats
2731 @cindex percent repeats
2732 @cindex measure repeats
2734 In the @code{percent} style, a note pattern can be repeated. It is
2735 printed once, and then the pattern is replaced with a special sign.
2736 Patterns of a one and two measures are replaced by percent-like signs,
2737 patterns that divide the measure length are replaced by slashes:
2739 @lilypond[verbatim,raggedright]
2740 \context Voice { \repeat "percent" 4 { c'4 }
2741 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
2747 Internals: @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
2748 @internalsref{PercentRepeatedMusic}, and
2749 @internalsref{DoublePercentRepeat}.
2753 @node Rhythmic music
2754 @section Rhythmic music
2758 * Showing melody rhythms::
2759 * Entering percussion::
2760 * Percussion staves::
2764 @node Showing melody rhythms
2765 @subsection Showing melody rhythms
2767 Sometimes you might want to show only the rhythm of a melody. This
2768 can be done with the rhythmic staff. All pitches of notes on such a
2769 staff are squashed, and the staff itself has a single line:
2771 @lilypond[fragment,relative,verbatim]
2772 \context RhythmicStaff {
2774 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
2780 Internals: @internalsref{RhythmicStaff}.
2782 Examples: @inputfileref{input/regression,rhythmic-staff.ly}.
2785 @node Entering percussion
2786 @subsection Entering percussion
2793 Percussion notes may be entered in @code{\drums} mode, which is
2794 similar to @code{notes}. Each piece of percussion has a full name and
2795 an abbreviated name, and both be used in input files:
2797 @lilypond[raggedright]
2798 \drums { hihat4 hh4 }
2801 The complete list of drum names is in the init file
2802 @file{ly/drumpitch-init.ly}.
2803 @c TODO: properly document this.
2807 Internals: @internalsref{DrumNoteEvent}.
2809 @node Percussion staves
2810 @subsection Percussion staves
2814 A percussion part for more than one instrument typically uses a
2815 multiline staff where each position in the staff refers to one piece
2819 To typeset the music, the notes must be interpreted in a
2820 @internalsref{DrumStaff} and @internalsref{DrumVoice} contexts:
2823 @lilypond[raggedright,verbatim,quote]
2824 up = \drums { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2825 down = \drums { bassdrum4 snare8 bd r bd sn4 }
2828 << \new DrumVoice { \voiceOne \up }
2829 \new DrumVoice { \voiceTwo \down }
2833 There are also other layout possibilities. To use these, set the
2834 property @code{drumStyleTable} in context @internalsref{DrumVoice}.
2835 The following variables have been predefined:
2839 is the default. It typesets a typical drum kit on a five-line staff
2842 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
2843 bd sn ss tomh tommh tomml toml tomfh tomfl }
2844 mus = \drums { cymc cyms cymr hh | hhc hho hhho hhp | \break cb hc
2845 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
2847 << \new DrumStaff\with {
2848 \remove Bar_engraver
2849 \remove Time_signature_engraver
2850 \override Stem #'transparent = ##t
2851 \override Stem #'Y-extent-callback = ##f
2852 minimumVerticalExtent = #'(-4.0 . 5.0)
2854 \context Lyrics \nam
2857 %% need to do this, because of indented @itemize
2859 \translator { \ScoreContext
2860 \override BarNumber #'transparent =##T
2864 The drum scheme supports six different toms. When there fewer toms, simply
2865 select the toms that produce the desired result, i.e. to get toms on
2866 the three middle lines you use @code{tommh}, @code{tomml} and
2869 @item timbales-style
2870 to typeset timbales on a two line staff:
2872 @lilypond[raggedright]
2873 nam = \lyrics { timh ssh timl ssl cb }
2874 mus = \drums { timh ssh timl ssl cb s16 }
2877 \context DrumStaff \with {
2878 \remove Bar_engraver
2879 \remove Time_signature_engraver
2880 \override Stem #'transparent = ##t
2881 \override Stem #'Y-extent-callback = ##f
2882 \override StaffSymbol #'line-count = #2
2883 \override StaffSymbol #'staff-space = #2
2884 minimumVerticalExtent = #'(-3.0 . 4.0)
2885 drumStyleTable = #timbales-style
2887 \context Lyrics \nam
2892 to typeset congas on a two line staff:
2894 @lilypond[raggedright]
2895 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
2896 mus = \drums { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
2899 \context DrumStaff\with {
2900 \remove Bar_engraver
2901 \remove Time_signature_engraver
2902 drumStyleTable = #congas-style
2903 \override StaffSymbol #'line-count = #2
2905 %% this sucks; it will lengthen stems.
2906 \override StaffSymbol #'staff-space = #2
2907 \override Stem #'transparent = ##t
2908 \override Stem #'Y-extent-callback = ##f
2910 \context Lyrics \nam
2915 to typeset bongos on a two line staff:
2917 @lilypond[raggedright]
2918 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
2919 mus = \drums { boh boho bohm ssh bol bolo bolm ssl s16 }
2922 \context DrumStaff\with {
2923 \remove Bar_engraver
2924 \remove Time_signature_engraver
2925 \override StaffSymbol #'line-count = #2
2926 drumStyleTable = #bongos-style
2928 %% this sucks; it will lengthen stems.
2929 \override StaffSymbol #'staff-space = #2
2930 \override Stem #'transparent = ##t
2931 \override Stem #'Y-extent-callback = ##f
2933 \context Lyrics \nam
2938 @item percussion-style
2939 to typeset all kinds of simple percussion on one line staves:
2940 @lilypond[raggedright]
2941 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
2942 mus = \drums { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
2945 \context DrumStaff\with{
2946 \remove Bar_engraver
2947 drumStyleTable = #percussion-style
2948 \override StaffSymbol #'line-count = #1
2949 \remove Time_signature_engraver
2950 \override Stem #'transparent = ##t
2951 \override Stem #'Y-extent-callback = ##f
2953 \context Lyrics \nam
2959 If you do not like any of the predefined lists you can define your own
2960 list at the top of your file:
2962 @lilypond[raggedright,verbatim]
2964 (bassdrum default #f -1)
2965 (snare default #f 0)
2967 (pedalhihat xcircle "stopped" 2)
2968 (lowtom diamond #f 3)
2970 up = \drums { hh8 hh hh hh hhp4 hhp }
2971 down = \drums { bd4 sn bd toml8 toml }
2974 \set DrumStaff.drumStyleTable
2975 = #(alist->hash-table mydrums)
2976 \new DrumVoice { \voiceOne \up }
2977 \new DrumVoice { \voiceTwo \down }
2985 Init files: @file{ly/drumpitch-init.ly}.
2987 Internals: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
2991 Short polyphonic notation, @code{<< @dots{} \\ @dots{} >>}, does not
2992 work for @internalsref{DrumVoices}.
2994 Because general MIDI does not contain rimshots the sidestick is used
2995 for this purpose instead.
2998 @section Piano music
3000 Piano staves are two normal staves coupled with a brace. The staves
3001 are largely independent, but sometimes voices can cross between the
3002 two staves. The same notation is also used for harps and other key
3003 instruments. The @internalsref{PianoStaff} is especially built to
3004 handle this cross-staffing behavior. In this section we discuss the
3005 @internalsref{PianoStaff} and some other pianistic peculiarities.
3009 * Automatic staff changes::
3010 * Manual staff switches::
3013 * Staff switch lines::
3018 There is no support for putting chords across staves. You can get
3019 this result by increasing the length of the stem in the lower stave so
3020 it reaches the stem in the upper stave, or vice versa. An example is
3021 included with the distribution as
3022 @inputfileref{input/test,stem-cross-staff.ly}.
3024 Dynamics are not centered, but kludges do exist. See
3025 @inputfileref{input/template,piano-dynamics.ly}.
3027 @cindex cross staff stem
3028 @cindex stem, cross staff
3031 @c fixme: should have hyperlinks as well.
3037 @node Automatic staff changes
3038 @subsection Automatic staff changes
3039 @cindex Automatic staff changes
3041 Voices can switch automatically between the top and the bottom
3042 staff. The syntax for this is
3044 \autochange \context Voice @{ @dots{}@var{music}@dots{} @}
3046 The two staffs of the piano staff must be named @code{up} and
3049 The autochanger switches on basis of pitch (central C is the turning
3050 point), and it looks ahead skipping over rests to switch in
3051 advance. Here is a practical example:
3053 @lilypond[verbatim,raggedright,quote]
3054 \score { \notes \context PianoStaff <<
3055 \context Staff = "up" {
3056 \autochange \new Voice \relative c' {
3057 g4 a b c d r4 a g } }
3058 \context Staff = "down" {
3065 In this example, spacer rests are used to prevent the bottom staff from
3066 terminating too soon.
3071 In this manual: @ref{Manual staff switches}.
3073 Internals: @internalsref{AutoChangeMusic}.
3079 The staff switches often do not end up in optimal places. For high
3080 quality output, staff switches should be specified manually.
3084 @node Manual staff switches
3085 @subsection Manual staff switches
3087 @cindex manual staff switches
3088 @cindex staff switch, manual
3090 Voices can be switched between staves manually, using the following command:
3092 \change Staff = @var{staffname} @var{music}
3096 The string @var{staffname} is the name of the staff. It switches the
3097 current voice from its current staff to the Staff called
3098 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3107 Pianos have pedals that alter the way sound are produced. Generally, a
3108 piano has three pedals, sustain, una corda, and sostenuto.
3112 Piano pedal instruction can be expressed by attaching
3113 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3114 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3117 @lilypond[fragment,verbatim]
3118 c'4\sustainDown c'4\sustainUp
3121 What is printed can be modified by setting @code{pedal@var{X}Strings},
3122 where @var{X} is one of the pedal types: @code{Sustain},
3123 @code{Sostenuto} or @code{UnaCorda}. Refer to the generated
3124 documentation of @internalsref{SustainPedal} for more information.
3126 Pedals can also be indicated by a sequence of brackets, by setting the
3127 @code{pedalSustainStyle} property to @code{bracket} objects:
3129 @lilypond[fragment,verbatim]
3130 \set Staff.pedalSustainStyle = #'bracket
3131 c''4\sustainDown d''4 e''4
3132 a'4\sustainUp\sustainDown
3133 f'4 g'4 a'4\sustainUp
3136 A third style of pedal notation is a mixture of text and brackets,
3137 obtained by setting the @code{pedalSustainStyle} style property to
3140 @lilypond[fragment,verbatim]
3141 \set Staff.pedalSustainStyle = #'mixed
3142 c''4\sustainDown d''4 e''4
3143 c'4\sustainUp\sustainDown
3144 f'4 g'4 a'4\sustainUp
3147 The default `*Ped' style for sustain and damper pedals corresponds to
3148 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
3151 @lilypond[fragment,verbatim]
3152 c''4\sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4\sostenutoUp
3155 For fine-tuning of the appearance of a pedal bracket, the properties
3156 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3157 @code{PianoPedalBracket} objects (see
3158 @internalsref{PianoPedalBracket} in the Program reference) can be modified. For example, the
3159 bracket may be extended to the end of the note head:
3161 @lilypond[fragment,verbatim]
3162 \override Staff.PianoPedalBracket
3163 #'shorten-pair = #'(0 . -1.0)
3164 c''4\sostenutoDown d''4 e''4 c'4
3165 f'4 g'4 a'4\sostenutoUp
3169 @subsection Arpeggio
3172 @cindex broken arpeggio
3173 @cindex @code{\arpeggio}
3175 You can specify an arpeggio sign on a chord by attaching an
3176 @code{\arpeggio} to a chord:
3179 @lilypond[fragment,relative,verbatim]
3183 When an arpeggio crosses staves, you attach an arpeggio to the chords
3184 in both staves, and set
3185 @internalsref{PianoStaff}.@code{connectArpeggios}:
3187 @lilypond[fragment,relative,verbatim]
3188 \context PianoStaff <<
3189 \set PianoStaff.connectArpeggios = ##t
3190 \new Staff { <c' e g c>\arpeggio }
3191 \new Staff { \clef bass <c,, e g>\arpeggio }
3195 The direction of the arpeggio is sometimes denoted by adding an
3196 arrowhead to the wiggly line. This can be typeset by setting
3197 @code{arpeggio-direction}:
3199 @lilypond[fragment,relative,verbatim]
3201 \override Arpeggio #'arpeggio-direction = #1
3203 \override Arpeggio #'arpeggio-direction = #-1
3208 A square bracket on the left indicates that the player should not
3209 arpeggiate the chord. To draw these brackets, set the
3210 @code{print-function} property of @code{Arpeggio} or
3211 @code{PianoStaff.Arpeggio} objects to @code{\arpeggioBracket}, and use
3212 @code{\arpeggio} statements within the chords as before:
3214 @lilypond[fragment,relative,verbatim]
3215 \override PianoStaff.Arpeggio
3216 #'print-function = \arpeggioBracket
3222 @cindex @code{\arpeggioBracket}
3223 @code{\arpeggioBracket},
3224 @cindex @code{\arpeggio}
3229 Internals: @internalsref{ArpeggioEvent} music expressions lead to
3230 @internalsref{Arpeggio} objects. Cross staff arpeggios are
3231 @internalsref{PianoStaff}.@internalsref{Arpeggio}.
3235 It is not possible to mix connected arpeggios and unconnected
3236 arpeggios in one @internalsref{PianoStaff} at the same time.
3238 @node Staff switch lines
3239 @subsection Staff switch lines
3242 @cindex follow voice
3243 @cindex staff switching
3246 @cindex @code{followVoice}
3248 Whenever a voice switches to another staff a line connecting the notes
3249 can be printed automatically. This is enabled if the property
3250 @code{PianoStaff.followVoice} is set to true:
3252 @lilypond[fragment,relative,verbatim]
3253 \context PianoStaff <<
3254 \set PianoStaff.followVoice = ##t
3255 \context Staff \context Voice {
3260 \context Staff=two { \clef bass \skip 1*2 }
3264 The associated object is @internalsref{VoiceFollower}.
3268 @cindex @code{\showStaffSwitch}
3269 @code{\showStaffSwitch},
3270 @cindex @code{\hideStaffSwitch}
3271 @code{\hideStaffSwitch}.
3275 @section Vocal music
3277 This section discusses how to enter and print lyrics.
3281 * The Lyrics context::
3286 @node Entering lyrics
3287 @subsection Entering lyrics
3291 @cindex @code{\lyrics}
3294 Lyrics are entered in a special input mode. This mode is is introduced
3295 by the keyword @code{\lyrics}. In this mode you can enter lyrics, with
3296 punctuation and accents without any hassle. Syllables are entered like
3297 notes, but with pitches replaced by text. For example,
3299 \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
3302 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3303 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3304 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3305 any 8-bit character with ASCII code over 127, or a two-character
3306 combination of a backslash followed by one of @code{`}, @code{'},
3307 @code{"}, or @code{^}.
3309 Subsequent characters of a word can be any character that is not a digit
3310 and not white space. One important consequence of this is that a word
3311 can end with @code{@}}. The following example is usually a bug. The
3312 syllable includes a @code{@}}, and hence the opening brace is not balanced:
3314 \lyrics @{ twinkle@}
3317 @cindex @code{\property}, in @code{\lyrics}
3318 Similarly, a period following a alphabetic sequence, is included in
3319 the resulting string. As a consequence, spaces must be inserted around
3322 \override Score . LyricText #'font-shape = #'italic
3326 @cindex spaces, in lyrics
3327 @cindex quotes, in lyrics
3329 Any @code{_} character which appears in an unquoted word is converted
3330 to a space. This provides a mechanism for introducing spaces into words
3331 without using quotes. Quoted words can also be used in Lyrics mode to
3332 specify words that cannot be written with the above rules:
3335 \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3339 Hyphens can be entered as ordinary hyphens at the end of a syllable, i.e.
3344 These will be attached to the end of the first syllable.
3346 Centered hyphens are entered using the special `@code{-}@code{-}' lyric
3347 as a separate word between syllables. The hyphen will have variable
3348 length depending on the space between the syllables and it will be
3349 centered between the syllables.
3354 When a lyric is sung over many notes (this is called a melisma), this is
3355 indicated with a horizontal line centered between a syllable and the
3356 next one. Such a line is called an extender line, and it is entered as
3361 Internals: @internalsref{LyricEvent}, @internalsref{HyphenEvent}, and
3362 @internalsref{ExtenderEvent}.
3364 Examples: @inputfileref{input/test,lyric-hyphen-retain.ly}.
3368 The definition of lyrics mode is too complex.
3372 @node The Lyrics context
3373 @subsection The Lyrics context
3375 Lyrics are printed by interpreting them in a @internalsref{Lyrics} context:
3377 \context Lyrics \lyrics @dots{}
3380 @cindex automatic syllable durations
3381 @cindex @code{\lyricsto}
3382 @cindex lyrics and melodies
3384 This will place the lyrics according to the durations that were
3385 entered. The lyrics can also be aligned under a given melody
3386 automatically. In this case, it is no longer necessary to enter the
3387 correct duration for each syllable. This is achieved by combining the
3388 melody and the lyrics with the @code{\lyricsto} expression:
3390 \lyricsto @var{name} \new Lyrics @dots{}
3393 This aligns the lyrics to the
3395 notes of the @internalsref{Voice} context called @var{name}, which has
3396 to exist. Therefore, normally the @code{Voice} is specified first, and
3397 then the lyrics are specified with @code{\lyricsto}.
3399 For different or more complex orderings, the best way is to setup the
3400 hierarchy of staves and lyrics first, e.g.
3402 \context ChoirStaff \notes <<
3403 \context Lyrics = sopranoLyrics @{ s1 @}
3404 \context Voice = soprano @{ @emph{music} @}
3405 \context Lyrics = tenor @{ s1 @}
3406 \context Voice = tenorLyrics @{ @emph{music} @}
3409 and then combine the appropriate melodies and lyric lines:
3411 \lyricsto "soprano" \new Lyrics @emph{the lyrics}
3415 The final input would resemble
3418 << \context ChoirStaff \notes << @emph{setup the music} >>
3419 \lyricsto "soprano" @emph{etc}
3420 \lyricsto "alto" @emph{etc}
3426 The @code{\lyricsto} command detects melismata: it only puts one
3427 syllable under a tied or slurred group of notes. If you want to force
3428 an unslurred group of notes to be a melisma, then insert
3429 @code{\melisma} after the first note of the group, and
3430 @code{\melismaEnd} after the last one, e.g.
3432 @lilypond[relative=1,raggedright,fragment,verbatim]
3433 << \context Voice = "lala" { \time 3/4
3439 \lyricsto "lala" \new Lyrics \lyrics {
3444 In addition, notes are considered a melisma if they are manually
3445 beamed, and automatic beaming (see @ref{Setting automatic beam
3446 behavior}) is switched off. The criteria for deciding melismata
3447 can be tuned with the property @code{melismaBusyProperties}. See
3448 @internalsref{Melisma_engraver} for more information.
3450 When multiple stanzas are put on the same melody, it can happen that
3451 two stanzas have melismata in different locations. This can be
3452 remedied by switching off melismata for one
3453 @internalsref{Lyrics}. This is achieved by setting
3454 the @code{ignoreMelismata} property to @code{#t}. An example is shown
3455 in @inputfileref{input/regression,lyric-combine-new.ly}.
3458 @cindex choral score
3460 A complete example of a SATB score setup is in the file
3461 @inputfileref{input/template,satb.ly}.
3466 @code{\melisma}, @code{\melismaEnd}
3467 @cindex @code{\melismaEnd}
3468 @cindex @code{\melisma}
3472 Internals: Music expressions: @internalsref{LyricCombineMusic},
3473 Contexts: @internalsref{Lyrics}, @internalsref{Melisma_engraver}.
3475 Examples: @inputfileref{input/template,satb.ly},
3476 @inputfileref{input/regression,lyric-combine-new.ly}.
3480 Melismata are not detected automatically, and extender lines must be
3484 For proper processing of extender lines, the
3485 @internalsref{Lyrics} and @internalsref{Voice} should be
3486 linked. This can be achieved either by using @code{\lyricsto} or by
3487 setting corresponding names for both contexts. The latter is explained
3488 in @ref{More stanzas}.
3491 @subsection More stanzas
3493 @cindex phrasing, in lyrics
3496 The lyrics should be aligned with the note heads of the melody. To
3497 achieve this, each line of lyrics should be marked to correspond with
3498 the melodic line. This is done automatically when @code{\lyricsto},
3499 but it can also be done manually.
3501 To this end, give the @internalsref{Voice} context an identity:
3503 \context Voice = duet @{
3508 Then set the @internalsref{Lyrics} contexts to names starting with
3509 that identity followed by a dash. In the preceding example, the
3510 @internalsref{Voice} identity is @code{duet}, so the identities of the
3511 @internalsref{Lyrics}s are marked @code{duet-1} and @code{duet-2}:
3513 \context Lyrics = "duet-1" @{
3514 Hi, my name is bert. @}
3515 \context Lyrics = "duet-2" @{
3516 Ooooo, ch\'e -- ri, je t'aime. @}
3519 The complete example is shown here:
3520 @lilypond[raggedright,verbatim]
3522 << \notes \relative c'' \context Voice = duet { \time 3/4
3524 \lyrics << \lyricsto "duet" \new Lyrics {
3526 Hi, my name is bert. }
3527 \lyricsto "duet" \new Lyrics {
3529 Ooooo, ch\'e -- ri, je t'aime. }
3534 @cindex stanza number
3535 @cindex singer's names
3536 @cindex name of singer
3538 Stanza numbers can be added by setting @code{stanza}, e.g.
3541 \set stanza = "Bert"
3543 \set stanza = "Ernie"
3546 Notice how dots are surrounded with spaces in @code{\lyrics} mode, to
3547 prevent @code{stanza} being interpreted as a single
3550 Names of the singers should be added using @code{Lyrics
3551 . vocalName} and @code{Lyrics . vocNam}, analogous to instrument
3552 annotations for staves.
3554 To make empty spaces in lyrics, use @code{\skip}.
3559 Internals: Layout objects @internalsref{LyricText}
3560 @internalsref{VocalName}. Music expressions:
3561 @internalsref{LyricEvent}.
3567 Input for lyrics introduces a syntactical ambiguity:
3574 is interpreted as assigning a string identifier @code{\foo} such that
3575 it contains @code{"bar"}. However, it could also be interpreted as
3576 making or a music identifier @code{\foo} containing the syllable
3577 `bar'. The force the latter interpretation, use
3587 The term @emph{ambitus} (plural: ambituses) denotes a range of pitches
3588 for a given voice in a part of music. It also may denote the pitch
3589 range that a musical instrument is capable of playing. Most musical
3590 instruments have their ambitus standardized (or at least there is
3591 agreement upon the minimal ambitus of a particular type of
3592 instrument), such that a composer or arranger of a piece of music can
3593 easily meet the ambitus constraints of the targeted instrument.
3594 However, the ambitus of the human voice depends on individual
3595 physiological state, including education and training of the voice.
3596 Therefore, a singer potentially has to check for each piece of music
3597 if the ambitus of that piece meets his individual capabilities. This
3598 is why the ambitus of a piece may be of particular value to vocal
3601 The ambitus is typically notated on a per-voice basis at the very
3602 beginning of a piece, e.g. nearby the initial clef or time signature of
3603 each staff. The range is graphically specified by two noteheads, that
3604 represent the minimum and maximum pitch. Some publishers use a textual
3605 notation: they put the range in words in front of the corresponding
3606 staff. LilyPond only supports the graphical ambitus notation.
3608 To apply, add the @internalsref{Ambitus_engraver} to the
3609 @internalsref{Voice} context, i.e.
3615 \consists Ambitus_engraver
3620 This results in the following output:
3622 @lilypond[raggedright]
3623 upper = \notes \relative c {
3626 as'' c e2 bes f cis d4 e f2 g
3628 lower = \notes \relative c {
3631 e'4 b g a c es fis a cis b a g f e d2
3634 \context ChoirStaff {
3636 \new Staff { \upper }
3637 \new Staff { \lower }
3643 \consists Ambitus_engraver
3649 If you have multiple voices in a single staff, and you want a single
3650 ambitus per staff rather than per each voice, then add the
3651 @internalsref{Ambitus_engraver} to the @internalsref{Staff} context
3652 rather than to the @internalsref{Voice} context.
3654 It is possible to tune individual ambituses for multiple voices on a
3655 single staff, for example by erasing or shifting them horizontally. An
3656 example is in @inputfileref{input/test,ambitus-mixed.ly}
3660 Internals: @internalsref{Ambitus}.
3662 Examples: @inputfileref{input/regression,ambitus.ly},
3663 @inputfileref{input/test,ambitus-mixed.ly}.
3667 There is no collision handling in the case of multiple per-voice
3673 Tablature notation is used for notating music for plucked string
3674 instruments. It notates pitches not by using note heads, but by
3675 indicating on which string and fret a note must be played. LilyPond
3676 offers limited support for tablature.
3679 * Tablatures basic::
3680 * Non-guitar tablatures::
3683 @node Tablatures basic
3684 @subsection Tablatures basic
3685 @cindex Tablatures basic
3687 The string number associated to a note is given as a backslash
3688 followed by a number, e.g. @code{c4\3} for a C quarter on the third
3689 string. By default, string 1 is the highest one, and the tuning
3690 defaults to the standard guitar tuning (with 6 strings). The notes
3691 are printed as tablature, by using @internalsref{TabStaff} and
3692 @internalsref{TabVoice} contexts:
3694 @lilypond[fragment,verbatim]
3695 \notes \context TabStaff {
3703 When no string is specified, the first string that does not give a
3704 fret number less than @code{minimumFret} is selected. The default
3705 value for @code{minimumFret} is 0:
3709 e8 fis gis a b cis' dis' e'
3710 \set TabStaff.minimumFret = #8
3711 e8 fis gis a b cis' dis' e'
3716 e8 fis gis a b cis' dis' e'
3717 \set TabStaff.minimumFret = #8
3718 e8 fis gis a b cis' dis' e'
3721 \context StaffGroup <<
3722 \context Staff { \clef "G_8" \frag }
3723 \context TabStaff { \frag }
3730 Internals: @internalsref{TabStaff}, @internalsref{TabVoice}, and
3731 @internalsref{StringNumberEvent}.
3735 Chords are not handled in a special way, and hence the automatic
3736 string selector may easily select the same string to two notes in a
3740 @node Non-guitar tablatures
3741 @subsection Non-guitar tablatures
3742 @cindex Non-guitar tablatures
3744 You can change the number of strings, by setting the number of lines
3745 in the @internalsref{TabStaff}.
3747 You can change the tuning of the strings. A string tuning is given as
3748 a Scheme list with one integer number for each string, the number
3749 being the pitch (measured in semitones relative to central C) of an
3750 open string. The numbers specified for @code{stringTuning} are the
3751 numbers of semitones to subtract or add, starting the specified pitch
3752 by default middle C, in string order. Thus, the notes are e, a, d, and
3755 @lilypond[fragment,verbatim]
3756 \context TabStaff <<
3757 \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
3760 a,4 c' a e' e c' a e'
3765 It is possible to change the Scheme function to format the tablature
3766 note text. The default is @code{fret-number-tablature-format}, which
3767 uses the fret number. For instruments that do not use this notation,
3768 you can create a special tablature formatting function. This function
3769 takes three argument: string number, string tuning and note pitch.
3773 No guitar special effects have been implemented.
3778 @section Chord names
3781 LilyPond has support for both printing chord names. Chords may be
3782 entered in musical chord notation, i.e. @code{< .. >}, but they can
3783 also be entered by name. Internally, the chords are represented as a
3784 set of pitches, so they can be transposed:
3787 @lilypond[verbatim,raggedright]
3788 twoWays = \notes \transpose c c' {
3798 << \context ChordNames \twoWays
3799 \context Voice \twoWays >> }
3802 This example also shows that the chord printing routines do not try to
3803 be intelligent. The last chord (@code{f bes d}) is not interpreted as
3809 * Printing chord names::
3814 @subsection Chords mode
3817 Chord mode is a mode where you can input sets of pitches using common
3818 names. It is introduced by the keyword @code{\chords}.
3819 In chords mode, a chord is entered by the root, which is entered
3820 like a common pitch:
3821 @lilypond[fragment,verbatim,quote,relative=1]
3822 \chords { es4. d8 c2 }
3827 Other chords may be entered by suffixing a colon, and introducing a
3828 modifier, and optionally, a number:
3830 @lilypond[fragment,verbatim,quote]
3831 \chords { e1:m e1:7 e1:m7 }
3833 The first number following the root is taken to be the `type' of the
3834 chord, thirds are added to the root until it reaches the specified
3836 @lilypond[fragment,verbatim]
3837 \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
3840 @cindex root of chord
3841 @cindex additions, in chords
3842 @cindex removals, in chords
3844 More complex chords may also be constructed adding separate steps
3845 to a chord. Additions are added after the number following
3846 the colon, and are separated by dots:
3848 @lilypond[verbatim,fragment,quote]
3849 \chords { c:5.6 c:3.7.8 c:3.6.13 }
3851 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
3853 @lilypond[verbatim,fragment,quote]
3854 \chords { c:7+ c:5+.3- c:3-.5-.7- }
3856 Removals are specified similarly, and are introduced by a caret. They
3857 must come after the additions:
3858 @lilypond[verbatim,fragment]
3859 \chords { c^3 c:7^5 c:9^3.5 }
3862 Modifiers can be used to change pitches. The following modifiers are
3866 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
3868 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
3871 is the augmented chord. This modifier raises the 5th step.
3873 is the major 7th chord. This modifier raises the 7th step if present.
3875 is the suspended 4th or 2nd. This modifier removes the 3rd
3876 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
3879 Modifiers can be mixed with additions:
3880 @lilypond[verbatim,fragment]
3881 \chords { c:sus4 c:7sus4 c:dim7 c:m6 }
3884 @cindex modifiers, in chords.
3891 Since an unaltered 11 does not sound good when combined with an
3892 unaltered 13, the 11 is removed in this case (unless it is added
3895 @lilypond[fragment,verbatim]
3896 \chords { c:13 c:13.11 c:m13 }
3901 An inversion (putting one pitch of the chord on the bottom), as well
3902 as bass notes, can be specified by appending
3903 @code{/}@var{pitch} to the chord:
3904 @lilypond[fragment,verbatim,center]
3905 \chords { c1 c/g c/f }
3909 A bass note can be added instead of transposed out of the chord,
3910 by using @code{/+}@var{pitch}.
3912 @lilypond[fragment,verbatim,center]
3913 \chords { c1 c/+g c/+f }
3916 Chords is a mode similar to @code{\lyrics}, @code{\notes} etc. Most
3917 of the commands continue to work, for example, @code{r} and
3918 @code{\skip} can be used to insert rests and spaces, and property
3919 commands may be used to change various settings.
3925 Each step can only be present in a chord once. The following
3926 simply produces the augmented chord, since @code{5+} is interpreted
3929 @lilypond[verbatim,fragment]
3930 \chords { c:5.5-.5+ }
3934 @node Printing chord names
3935 @subsection Printing chord names
3937 @cindex printing chord names
3941 For displaying printed chord names, use the @internalsref{ChordNames} context.
3942 The chords may be entered either using the notation
3943 described above, or directly using @code{<} and @code{>}:
3945 @lilypond[verbatim,raggedright]
3947 \chords {a1 b c} <d' f' a'> <e' g' b'>
3951 \context ChordNames \scheme
3952 \context Staff \scheme
3957 You can make the chord changes stand out by setting
3958 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
3959 display chord names when there is a change in the chords scheme and at
3960 the start of a new line:
3962 @lilypond[verbatim,linewidth=9\cm]
3964 c1:m c:m \break c:m c:m d
3968 \context ChordNames {
3969 \set chordChanges = ##t
3971 \context Staff \transpose c c' \scheme
3976 The default chord name layout is a system for Jazz music, proposed by
3977 Klaus Ignatzek (see @ref{Literature list}). It can be tuned through the
3978 following properties:
3981 @cindex chordNameExceptions
3982 @item chordNameExceptions
3983 This is a list that contains the chords that have special formatting.
3985 @inputfileref{input/regression,chord-name-exceptions.ly}.
3986 @cindex exceptions, chord names.
3989 @cindex majorSevenSymbol
3990 @item majorSevenSymbol
3991 This property contains the markup object used for the 7th step, when
3992 it is major. Predefined options are @code{whiteTriangleMarkup} and
3993 @code{blackTriangleMarkup}. See
3994 @inputfileref{input/regression,chord-name-major7.ly} for an example.
3996 @cindex chordNameSeparator
3997 @item chordNameSeparator
3998 Different parts of a chord name are normally separated by a
3999 slash. By setting @code{chordNameSeparator}, you can specify other
4001 @lilypond[fragment,verbatim]
4002 \context ChordNames \chords {
4004 \set chordNameSeparator
4005 = \markup { \typewriter "|" }
4009 @cindex chordRootNamer
4010 @item chordRootNamer
4011 The root of a chord is usually printed as a letter with an optional
4012 alteration. The transformation from pitch to letter is done by this
4013 function. Special note names (for example, the German ``H'' for a
4014 B-chord) can be produced by storing a new function in this property.
4016 The pre-defined variables @code{\germanChords},
4017 @code{\semiGermanChords} set these variables.
4020 @cindex chordNoteNamer
4021 @item chordNoteNamer
4022 The default is to print single pitch, e.g. the bass note, using the
4023 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
4024 to a specialized function to change this behavior. For example, the
4025 base can be printed in lower case.
4030 There are also two other chord name schemes implemented: an alternate
4031 Jazz chord notation, and a systematic scheme called Banter chords. The
4032 alternate jazz notation is also shown on the chart in @ref{Chord name
4033 chart}. Turning on these styles is described in the input file
4034 @inputfileref{input/test,chord-names-jazz.ly}.
4038 @cindex chords, jazz
4043 @cindex @code{\germanChords}
4044 @code{\germanChords},
4045 @cindex @code{\semiGermanChords}
4046 @code{\semiGermanChords}.
4053 Examples: @inputfileref{input/regression,chord-name-major7.ly},
4054 @inputfileref{input/regression,chord-name-exceptions.ly},
4055 @inputfileref{input/test,chord-names-jazz.ly},
4056 @inputfileref{input/test,chord-names-german.ly}.
4058 Init files: @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
4063 Chord names are determined solely from the list of pitches. Chord
4064 inversions are not identified, and neither are added bass notes. This
4065 may result in strange chord names when chords are entered with the
4066 @code{< .. >} syntax.
4071 @node Orchestral music
4072 @section Orchestral music
4074 @cindex Writing parts
4076 Orchestral music involves some special notation, both in the full
4077 score and the individual parts. This section explains how to tackle
4078 some common problems in orchestral music.
4083 * Multiple staff contexts::
4086 * Instrument names::
4088 * Multi measure rests::
4089 * Automatic part combining::
4091 * Different editions from one source::
4092 * Sound output for transposing instruments::
4095 @node Multiple staff contexts
4096 @subsection Multiple staff contexts
4098 Polyphonic scores consist of many staves. These staves can be
4099 constructed in three different ways:
4101 @item The group is started with a brace at the left. This is done with the
4102 @internalsref{GrandStaff} context.
4103 @item The group is started with a bracket. This is done with the
4104 @internalsref{StaffGroup} context
4105 @item The group is started with a vertical line. This is the default
4109 @cindex Staff, multiple
4110 @cindex bracket, vertical
4111 @cindex brace, vertical
4118 @node Rehearsal marks
4119 @subsection Rehearsal marks
4120 @cindex Rehearsal marks
4122 @cindex @code{\mark}
4124 To print a rehearsal mark, use the @code{\mark} command:
4125 @lilypond[fragment,verbatim]
4136 (The letter I is skipped in accordance with engraving traditions.)
4138 The mark is incremented automatically if you use @code{\mark
4139 \default}, but you can also use an integer argument to set the mark
4140 manually. The value to use is stored in the property
4141 @code{rehearsalMark}.
4143 The style is defined by the property @code{markFormatter}. It is a
4144 function taking the current mark (an integer) and the current context
4145 as argument. It should return a markup object. In the following
4146 example, @code{markFormatter} is set to a canned procedure. After a
4147 few measures, it is set to function that produces a boxed number.
4149 @lilypond[verbatim,fragment,relative=1]
4150 \set Score.markFormatter = #format-mark-numbers
4153 \set Score.markFormatter
4154 = #(lambda (mark context)
4155 (make-bold-markup (make-box-markup (number->string mark))))
4160 The file @file{scm/translation-functions.scm} contains the definitions
4161 of @code{format-mark-numbers} (the default format) and
4162 @code{format-mark-letters}. They can be used as inspiration for other
4163 formatting functions.
4166 @cindex coda on bar line
4167 @cindex segno on bar line
4168 @cindex fermata on bar line
4169 @cindex bar lines, symbols on
4171 The @code{\mark} command can also be used to put signs like coda,
4172 segno and fermatas on a barline. Use @code{\markup} to
4173 to access the appropriate symbol:
4175 @lilypond[fragment,verbatim,relative=1]
4176 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4180 In this case, during line breaks, marks must also be printed at the
4181 end of the line, and not at the beginning. Use the following to force
4184 \override Score.RehearsalMark
4185 #'break-visibility = #begin-of-line-invisible
4191 @cindex barlines, putting symbols on
4195 Internals: @internalsref{MarkEvent}, @internalsref{RehearsalMark}
4197 Init files: @file{scm/translation-functions.scm} contains the
4198 definition of @code{format-mark-numbers} and
4199 @code{format-mark-letters}. They can be used as inspiration for other
4200 formatting functions.
4202 Examples: @inputfileref{input/regression,rehearsal-mark-letter.ly},
4203 @inputfileref{input/regression,rehearsal-mark-number.ly}.
4207 @subsection Bar numbers
4211 @cindex measure numbers
4212 @cindex currentBarNumber
4214 Bar numbers are printed by default at the start of the line. The
4215 number itself is stored in the
4216 @code{currentBarNumber} property,
4217 which is normally updated automatically for every measure.
4219 Bar numbers can be typeset at regular intervals instead of at the
4220 beginning of each line. This is illustrated in the following example,
4221 whose source is available as
4222 @inputfileref{input/test,bar-number-regular-interval.ly}:
4224 @lilypondfile[]{bar-number-regular-interval.ly}
4229 Internals: @internalsref{BarNumber}.
4231 Examples: @inputfileref{input/test,bar-number-every-five-reset.ly},
4232 and @inputfileref{input/test,bar-number-regular-interval.ly}.
4236 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4237 there is one at the top. To solve this, the
4238 @code{padding} property of @internalsref{BarNumber} can be
4239 used to position the number correctly.
4241 @node Instrument names
4242 @subsection Instrument names
4244 In an orchestral score, instrument names are printed left side of the
4247 This can be achieved by setting @internalsref{Staff}.@code{instrument}
4248 and @internalsref{Staff}.@code{instr}. This will print a string before
4249 the start of the staff. For the first start, @code{instrument} is
4250 used, for the next ones @code{instr} is used:
4253 @lilypond[verbatim,raggedright]
4254 \set Staff.instrument = "ploink " { c''4 }
4258 You can also use markup texts to construct more complicated instrument
4262 @lilypond[fragment,verbatim,raggedright]
4264 \set Staff.instrument = \markup {
4265 \column < "Clarinetti"
4267 \smaller \musicglyph #"accidentals--1"
4278 Internals: @internalsref{InstrumentName}.
4282 When you put a name on a grand staff or piano staff the width of the
4283 brace is not taken into account. You must add extra spaces to the end of
4284 the name to avoid a collision.
4287 @subsection Transpose
4289 @cindex transposition of pitches
4290 @cindex @code{\transpose}
4292 A music expression can be transposed with @code{\transpose}. The syntax
4295 \transpose @var{from} @var{to} @var{musicexpr}
4298 This means that @var{musicexpr} is transposed by the interval between
4299 the pitches @var{from} and @var{to}: any note with pitch @code{from}
4300 is changed to @code{to}.
4303 For example, consider a piece written in the key of D major. If
4304 this piece is a little too low for its performer, it can be
4305 transposed up to E major with
4307 \tranpose d e @dots{}
4310 Consider a part written for violin (a C instrument). If
4311 this part is to be played on the A clarinet, the following
4312 transposition will produce the appropriate part
4315 \transpose a c @dots{}
4318 Since @var{from} and @var{to} are pitches, @code{\transpose} must be
4319 inside a @code{\notes} section. @code{\transpose} distinguishes
4320 between enharmonic pitches: both @code{\transpose c cis} or
4321 @code{\transpose c des} will transpose up half a tone. The first
4322 version will print sharps and the second version will print flats:
4324 @lilypond[raggedright,verbatim]
4325 mus =\notes { \key d \major cis d fis g }
4326 \score { \notes \context Staff {
4329 \transpose c g' \mus
4330 \transpose c f' \mus
4337 Internals: @internalsref{TransposedMusic}, and
4338 @internalsref{UntransposableMusic}.
4342 If you want to use both @code{\transpose} and @code{\relative}, then
4343 you must put @code{\transpose} outside of @code{\relative}, since
4344 @code{\relative} will have no effect music that appears inside a
4350 @node Multi measure rests
4351 @subsection Multi measure rests
4352 @cindex multi measure rests
4353 @cindex Rests, multi measure
4357 Multi measure rests are entered using `@code{R}'. It is specifically
4358 meant for full bar rests and for entering parts: the rest can expand
4359 to fill a score with rests, or it can be printed as a single
4360 multimeasure rest. This expansion is controlled by the property
4361 @code{Score.skipBars}. If this is set to true, empty measures will not
4362 be expanded, and the appropriate number is added automatically:
4364 @lilypond[fragment,verbatim]
4365 \time 4/4 r1 | R1 | R1*2
4366 \set Score.skipBars = ##t R1*17 R1*4
4369 The @code{1} in @code{R1} is similar to the duration notation used for
4370 notes. Hence, for time signatures other than 4/4, you must enter other
4371 durations. This can be done with augmentation dots or fractions:
4373 @lilypond[fragment,verbatim]
4374 \set Score.skipBars = ##t
4382 An @code{R} spanning a single measure is printed as either a whole rest
4383 or a breve, centered in the measure regardless of the time signature.
4385 @cindex text on multi-measure rest
4386 @cindex script on multi-measure rest
4387 @cindex fermata on multi-measure rest
4389 Texts can be added to multi-measure rests by using the
4390 @var{note}-@code{markup} syntax (see @ref{Text markup}). In this case, the number is
4391 replaced. If you need both texts and the number, you must add the
4392 number by hand. A variable (@code{\fermataMarkup}) is provided for
4396 @lilypond[verbatim,fragment]
4398 R2._\markup { "Ad lib" }
4402 If you want to have a text on the left end of a multi-measure rest,
4403 attach the text to a zero-length skip note, i.e.
4411 @cindex whole rests for a full measure
4415 Internals: @internalsref{MultiMeasureRestEvent},
4416 @internalsref{MultiMeasureTextEvent},
4417 @internalsref{MultiMeasureRestMusicGroup}, and
4418 @internalsref{MultiMeasureRest}.
4420 The layout object @internalsref{MultiMeasureRestNumber} is for the
4421 default number, and @internalsref{MultiMeasureRestText} for user
4426 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
4427 over multi-measure rests.
4429 @cindex condensing rests
4431 There is no way to automatically condense multiple rests into a single
4432 multimeasure rest. Multi measure rests do not take part in rest
4435 Be careful when entering multimeasure rests followed by whole
4436 notes. The following will enter two notes lasting four measures each:
4440 When @code{skipBars} is set, then the result will look OK, but the
4441 bar numbering will be off.
4443 @node Automatic part combining
4444 @subsection Automatic part combining
4445 @cindex automatic part combining
4446 @cindex part combiner
4449 Automatic part combining is used to merge two parts of music onto a
4450 staff. It is aimed at typesetting orchestral scores. When the two
4451 parts are identical for a period of time, only one is shown. In
4452 places where the two parts differ, they are typeset as separate
4453 voices, and stem directions are set automatically. Also, solo and
4454 @emph{a due} parts are identified and can be marked.
4458 The syntax for part combining is
4461 \partcombine @var{musicexpr1} @var{musicexpr2}
4464 The music expressions will be interpreted as @internalsref{Voice}
4467 The following example demonstrates the basic functionality of the part
4468 combiner: putting parts on one staff, and setting stem directions and
4471 @lilypond[verbatim,raggedright,fragment,relative=1]
4472 \new Staff \partcombine
4481 The first @code{g} appears only once, although it was
4482 specified twice (once in each part). Stem, slur and tie directions are
4483 set automatically, depending whether there is a solo or unisono. The
4484 first part (with context called @code{one}) always gets up stems, and
4485 `solo', while the second (called @code{two}) always gets down stems and
4488 If you just want the merging parts, and not the textual markings, you
4489 may set the property @var{soloADue} to false:
4491 @lilypond[verbatim,raggedright,fragment]
4493 \set Staff.soloADue = ##f
4505 Internals: @internalsref{PartCombineMusic},
4506 @internalsref{SoloOneEvent}, and
4507 @internalsref{SoloTwoEvent}, and
4508 @internalsref{UnisonoEvent}.
4512 In @code{soloADue} mode, when the two voices play the same notes on and
4513 off, the part combiner may typeset @code{a2} more than once in a
4516 @code{\partcombine} can not be inside @code{\times}.
4521 @subsection Hiding staves
4523 @cindex Frenched scores
4524 @cindex Hiding staves
4526 In orchestral scores, staff lines that only have rests are usually
4527 removed. This saves some space. This style is called `French Score'.
4528 For @internalsref{Lyrics}, @internalsref{Lyrics},
4529 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
4530 switched on by default. When these line of these contexts turn out
4531 empty after the line-breaking process, they are removed.
4533 For normal staves, a specialized @internalsref{Staff} context is
4534 available, which does the same: staves containing nothing (or only
4535 multi measure rests) are removed. The context definition is stored in
4536 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
4537 in this example disappears in the second line:
4542 \notes \relative c' <<
4543 \new Staff { e4 f g a \break c1 }
4544 \new Staff { c4 d e f \break R1 }
4548 \translator { \RemoveEmptyStaffContext }
4553 The first page shows all staffs in full. If they should be removed
4554 from the first page too, set @code{remove-first} to false
4555 in @internalsref{RemoveEmptyVerticalGroup}.
4557 @node Different editions from one source
4558 @subsection Different editions from one source
4560 The @code{\tag} command marks music expressions with a name. These
4561 tagged expressions can be filtered out later. With this mechanism it
4562 is possible to make different versions of the same music source.
4564 In the following example, we see two versions of a piece of music, one
4565 for the full score, and one with cue notes for the instrumental part:
4581 The same can be applied to articulations, texts, etc.: they are
4584 -\tag #@var{your-tag}
4586 to an articulation, for example,
4591 This defines a note with a conditional fingering indication.
4593 By applying the @code{remove-tag} function, tagged expressions can be
4594 filtered. For example,
4598 \apply #(remove-tag 'score) @var{the music}
4599 \apply #(remove-tag 'part) @var{the music}
4604 @lilypondfile[]{tag-filter.ly}
4606 The argument of the @code{\tag} command should be a symbol, or a list
4607 of symbols, for example,
4609 \tag #'(original-part transposed-part) @dots{}
4614 Examples: @inputfileref{input/regression,tag-filter.ly}.
4617 @node Sound output for transposing instruments
4618 @subsection Sound output for transposing instruments
4620 When you want to make a MIDI file from a score containing transposed
4621 and untransposed instruments, you have to instruct LilyPond the pitch
4622 offset (in semitones) for the transposed instruments. This is done
4623 using the @code{transposing} property. It does not affect printed
4626 @cindex @code{transposing}
4629 \set Staff.instrument = #"Cl. in B-flat"
4630 \set Staff.transposing = #-2
4634 @node Ancient notation
4635 @section Ancient notation
4637 @cindex Vaticana, Editio
4638 @cindex Medicaea, Editio
4643 @c [TODO: write more comprehensive introduction on ancient notation]
4645 Support for ancient notation is still under heavy development.
4646 Regardless of all of the current limitations (see the bugs section
4647 below for details), it includes features for mensural
4648 notation and Gregorian Chant notation. There is also limited support
4649 for figured bass notation.
4651 Many graphical objects provide a @code{style} property, see
4652 @ref{Ancient note heads}, @ref{Ancient accidentals}, @ref{Ancient
4653 rests}, @ref{Ancient clefs}, @ref{Ancient flags} and @ref{Ancient time
4654 signatures}. By manipulating such a grob property, the typographical
4655 appearance of the affected graphical objects can be accomodated for a
4656 specific notation flavour without need for introducing any new
4660 Other aspects of ancient notation can not that easily be expressed as
4661 in terms of just changing a style property of a graphical object.
4662 Therefore, some notational concepts are introduced specifically for
4663 ancient notation, see @ref{Custodes}, @ref{Divisiones},
4664 @ref{Ligatures}, and @ref{Figured bass}.
4668 * Ancient note heads::
4669 * Ancient accidentals::
4673 * Ancient time signatures::
4678 * Vaticana style contexts::
4681 If this all is way too much of documentation for you, and you just
4682 want to dive into typesetting without worrying too much about the
4683 details on how to customize a context, then you may have a look at the
4684 predefined contexts (see @ref{Vaticana style contexts}). Use them to
4685 set up predefined style-specific voice and staff contexts, and
4686 directly go ahead with the note entry.
4690 Ligatures need special spacing that has not yet been implemented. As
4691 a result, there is too much space between ligatures most of the time,
4692 and line breaking often is unsatisfactory. Also, lyrics do not
4693 correctly align with ligatures.
4695 Accidentals must not be printed within a ligature, but instead need to
4696 be collected and printed in front of it.
4698 Augmentum dots within ligatures are not handled correctly.
4701 @node Ancient note heads
4702 @subsection Ancient note heads
4708 For ancient notation, a note head style other than the @code{default}
4709 style may be chosen. This is accomplished by setting the @code{style}
4710 property of the NoteHead object to the desired value (@code{baroque},
4711 @code{neo_mensural} or @code{mensural}). The @code{baroque} style
4712 differs from the @code{default} style only in using a square shape for
4713 @code{\breve} note heads. The @code{neo_mensural} style differs from
4714 the @code{baroque} style in that it uses rhomboidal heads for whole
4715 notes and all smaller durations. Stems are centered on the note
4716 heads. This style is in particular useful when transcribing mensural
4717 music, e.g. for the incipit. The @code{mensural} style finally
4718 produces note heads that mimick the look of note heads in historic
4719 printings of the 16th century.
4721 The following example demonstrates the @code{neo_mensural} style:
4723 @lilypond[fragment,raggedright,verbatim]
4724 \override NoteHead #'style = #'neo_mensural
4725 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
4728 When typesetting a piece in Gregorian Chant notation, a Gregorian
4729 ligature engraver will automatically select the proper note heads,
4730 such there is no need to explicitly set the note head style. Still,
4731 the note head style can be set e.g. to @code{vaticana_punctum} to
4732 produce punctum neumes. Similarly, a mensural ligature engraver is
4733 used to automatically assemble mensural ligatures. See
4734 @ref{Ligatures} for how ligature engravers work.
4739 @ref{Percussion staves} use note head styles of their own that are
4740 frequently used in contemporary music notation.
4742 Examples: @inputfileref{input/regression,note-head-style.ly} gives an
4743 overview over all available note head styles.
4746 @node Ancient accidentals
4747 @subsection Ancient accidentals
4753 Use the @code{style} property of grob @internalsref{Accidental} to
4754 select ancient accidentals. Supported styles are
4755 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
4757 @lilypond[raggedright,staffsize=26]
4765 { " " \musicglyph #"accidentals-vaticana-1"
4766 " " \musicglyph #"accidentals-vaticana0" }
4770 { " " \musicglyph #"accidentals-medicaea-1" }
4774 { " " \musicglyph #"accidentals-hufnagel-1" }
4778 { " " \musicglyph #"accidentals-mensural-1"
4779 " " \musicglyph #"accidentals-mensural1" }
4788 \remove "Bar_number_engraver"
4792 \remove "Clef_engraver"
4793 \remove "Key_engraver"
4794 \remove "Time_signature_engraver"
4795 \remove "Staff_symbol_engraver"
4796 minimumVerticalExtent = ##f
4802 As shown, not all accidentals are supported by each style. When
4803 trying to access an unsupported accidental, LilyPond will switch to a
4804 different style, as demonstrated in
4805 @inputfileref{input/test,ancient-accidentals.ly}.
4807 Similarly to local accidentals, the style of the key signature can be
4808 controlled by the @code{style} property of the
4809 @internalsref{KeySignature} grob.
4813 In this manual: @ref{Pitches}, @ref{Chromatic alterations} and
4814 @ref{Accidentals} give a general introduction into the use of
4815 accidentals. @ref{Key signature} gives a general introduction into
4816 the use of key signatures.
4818 Internals: @internalsref{KeySignature}.
4820 Examples: @inputfileref{input/test,ancient-accidentals.ly}.
4823 @subsection Ancient rests
4829 Use the @code{style} property of grob @internalsref{Rest} to select
4830 ancient accidentals. Supported styles are @code{classical},
4831 @code{neo_mensural} and @code{mensural}. @code{classical} differs
4832 from the @code{default} style only in that the quarter rest looks like
4833 a horizontally mirrored 8th rest. The @code{neo_mensural} style suits
4834 well for e.g. the incipit of a transcribed mensural piece of music.
4835 The @code{mensural} style finally mimicks the appearance of rests as
4836 in historic prints of the 16th century.
4838 The following example demonstrates the @code{neo_mensural} style:
4840 @lilypond[fragment,raggedright,verbatim]
4841 \override Rest #'style = #'neo_mensural
4842 r\longa r\breve r1 r2 r4 r8 r16
4845 There are no 32th and 64th rests specifically for the mensural or
4846 neo-mensural style. Instead, the rests from the default style will be
4847 taken. See @inputfileref{input/test,rests.ly} for a chart of all
4850 There are no rests in Gregorian Chant notation; instead, it uses
4855 In this manual: @ref{Rests} gives a general introduction into the use of rests.
4859 @subsection Ancient clefs
4865 LilyPond supports a variety of clefs, many of them ancient.
4867 The following table shows all ancient clefs that are supported via the
4868 @code{\clef} command. Some of the clefs use the same glyph, but
4869 differ only with respect to the line they are printed on. In such
4870 cases, a trailing number in the name is used to enumerate these clefs.
4871 Still, you can manually force a clef glyph to be typeset on an
4872 arbitrary line, as described in @ref{Clef}. The note printed to the
4873 right side of each clef in the example column denotes the @code{c'}
4874 with respect to that clef.
4876 @multitable @columnfractions .3 .3 .3 .1
4880 @b{Description} @tab
4881 @b{Supported Clefs} @tab
4885 @code{clefs-neo_mensural_c} @tab
4886 modern style mensural C clef @tab
4887 @code{neo_mensural_c1}, @code{neo_mensural_c2},
4888 @code{neo_mensural_c3}, @code{neo_mensural_c4} @tab
4889 @lilypond[relative,notime]
4890 \override Staff.TimeSignature #'transparent = ##t
4891 \clef "neo_mensural_c2" c
4895 @code{clefs-petrucci_c1}
4896 @code{clefs-petrucci_c2}
4897 @code{clefs-petrucci_c3}
4898 @code{clefs-petrucci_c4}
4899 @code{clefs-petrucci_c5}
4902 petrucci style mensural C clefs, for use on different stafflines
4903 (the examples shows the 2nd staffline C clef).
4913 @lilypond[relative,notime]
4914 \override Staff.TimeSignature #'transparent = ##t
4915 \clef "petrucci_c2" c
4919 @code{clefs-petrucci_f} @tab
4920 petrucci style mensural F clef @tab
4921 @code{petrucci_f} @tab
4922 @lilypond[relative,notime]
4923 \override Staff.TimeSignature #'transparent = ##t
4924 \clef "petrucci_f" c
4928 @code{clefs-petrucci_g} @tab
4929 petrucci style mensural G clef @tab
4930 @code{petrucci_g} @tab
4931 @lilypond[relative,notime]
4932 \override Staff.TimeSignature #'transparent = ##t
4933 \clef "petrucci_g" c
4937 @code{clefs-mensural_c} @tab
4938 historic style mensural C clef @tab
4939 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
4940 @code{mensural_c4} @tab
4941 @lilypond[relative,notime]
4942 \override Staff.TimeSignature #'transparent = ##t
4943 \clef "mensural_c2" c
4947 @code{clefs-mensural_f} @tab
4948 historic style mensural F clef @tab
4949 @code{mensural_f} @tab
4950 @lilypond[relative,notime]
4951 \override Staff.TimeSignature #'transparent = ##t
4952 \clef "mensural_f" c
4956 @code{clefs-mensural_g} @tab
4957 historic style mensural G clef @tab
4958 @code{mensural_g} @tab
4959 @lilypond[relative,notime]
4960 \override Staff.TimeSignature #'transparent = ##t
4961 \clef "mensural_g" c
4965 @code{clefs-vaticana_do} @tab
4966 Editio Vaticana style do clef @tab
4967 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
4968 @lilypond[relative,notime]
4969 \override Staff.StaffSymbol #'line-count = #4
4970 \override Staff.TimeSignature #'transparent = ##t
4971 \clef "vaticana_do2" c
4975 @code{clefs-vaticana_fa} @tab
4976 Editio Vaticana style fa clef @tab
4977 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
4978 @lilypond[relative,notime]
4979 \override Staff.StaffSymbol #'line-count = #4
4980 \override Staff.TimeSignature #'transparent = ##t
4981 \clef "vaticana_fa2" c
4985 @code{clefs-medicaea_do} @tab
4986 Editio Medicaea style do clef @tab
4987 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
4988 @lilypond[relative,notime]
4989 \override Staff.StaffSymbol #'line-count = #4
4990 \override Staff.TimeSignature #'transparent = ##t
4991 \clef "medicaea_do2" c
4995 @code{clefs-medicaea_fa} @tab
4996 Editio Medicaea style fa clef @tab
4997 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
4998 @lilypond[relative,notime]
4999 \override Staff.StaffSymbol #'line-count = #4
5000 \override Staff.TimeSignature #'transparent = ##t
5001 \clef "medicaea_fa2" c
5005 @code{clefs-hufnagel_do} @tab
5006 historic style hufnagel do clef @tab
5007 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
5008 @lilypond[relative,notime]
5009 \override Staff.StaffSymbol #'line-count = #4
5010 \override Staff.TimeSignature #'transparent = ##t
5011 \clef "hufnagel_do2" c
5015 @code{clefs-hufnagel_fa} @tab
5016 historic style hufnagel fa clef @tab
5017 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
5018 @lilypond[relative,notime]
5019 \override Staff.StaffSymbol #'line-count = #4
5020 \override Staff.TimeSignature #'transparent = ##t
5021 \clef "hufnagel_fa2" c
5025 @code{clefs-hufnagel_do_fa} @tab
5026 historic style hufnagel combined do/fa clef @tab
5027 @code{hufnagel_do_fa} @tab
5028 @lilypond[relative,notime]
5029 \override Staff.TimeSignature #'transparent = ##t
5030 \clef "hufnagel_do_fa" c
5035 @c --- This should go somewhere else: ---
5036 @c @item modern style percussion clef (glyph: @code{clefs-percussion})
5039 @c @code{percussion}
5041 @c @lilypond{\override Staff.TimeSignature #'transparent = ##t \clef "percussion" c'}
5043 @c @item modern style tab clef (glyph: @code{clefs-tab})
5048 @c @lilypond{\context Staff \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #6 \override Staff.TimeSignature #'transparent = ##t \clef "tab" c'}
5050 @emph{Modern style} means ``as is typeset in contemporary editions of
5051 transcribed mensural music''.
5053 @emph{Petrucci style} means ``inspired by printings published by the
5054 famous engraver Petrucci (1466-1539)''.
5056 @emph{Historic style} means ``as was typeset or written in historic
5057 editions (other than those of Petrucci)''.
5059 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
5061 Petrucci used C clefs with differently balanced left-side vertical
5062 beams, depending on which staffline it is printed.
5066 In this manual: for the percussion clef, see @ref{Percussion staves}.
5067 For the @code{TAB} clef, see @ref{Tablatures}.
5069 Internals: for modern clefs, see @ref{Clef}.
5073 The mensural g clef is temporarily mapped to the Petrucci g clef,
5074 until a new mensural g clef will have been implemented.
5079 @subsection Ancient flags
5085 Use the @code{flag-style} property of grob @internalsref{Stem} to
5086 select ancient flags. Besides the @code{default} flag style,
5087 only @code{mensural} style is supported:
5089 @lilypond[fragment,raggedright,verbatim]
5090 \override Stem #'flag-style = #'mensural
5091 \override Stem #'thickness = #1.0
5092 \override NoteHead #'style = #'mensural
5094 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
5095 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5098 Note that the innermost flare of each mensural flag always is
5099 vertically aligned with a staff line. If you do not like this
5100 behaviour, you can set the @code{adjust-if-on-staffline} property of
5101 grob @internalsref{Stem} to @code{##f}. Then, the vertical position
5102 of the end of each flare is different between notes on staff lines and
5103 notes between staff lines:
5105 @lilypond[fragment,raggedright]
5106 \override Stem #'flag-style = #'mensural
5107 \override Stem #'thickness = #1.0
5108 \override Stem #'adjust-if-on-staffline = ##f
5109 \override NoteHead #'style = #'mensural
5111 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
5112 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5115 There is no particular flag style for neo-mensural notation. Hence,
5116 when typesetting e.g. the incipit of a transcibed piece of mensural
5117 music, the default flag style should be used. There are no flags in
5118 Gregorian Chant notation.
5121 @node Ancient time signatures
5122 @subsection Ancient time signatures
5124 @cindex time signatures
5128 There is limited support for mensural time signatures. The
5129 glyphs are hard-wired to particular time fractions. In other words,
5130 to get a particular mensural signature glyph with the @code{\time n/m}
5131 command, @code{n} and @code{m} have to be chosen according to the
5137 \set Score.timing = ##f
5138 \set Score.barAlways = ##t
5139 s_\markup { "$\\backslash$time 4/4" }
5140 ^\markup { " " \musicglyph #"timesig-neo_mensural4/4" }
5142 s_\markup { "$\\backslash$time 2/2" }
5143 ^\markup { " " \musicglyph #"timesig-neo_mensural2/2" }
5145 s_\markup { "$\\backslash$time 6/4" }
5146 ^\markup { " " \musicglyph #"timesig-neo_mensural6/4" }
5148 s_\markup { "$\\backslash$time 6/8" }
5149 ^\markup { " " \musicglyph #"timesig-neo_mensural6/8" }
5151 s_\markup { "$\\backslash$time 3/2" }
5152 ^\markup { " " \musicglyph #"timesig-neo_mensural3/2" }
5154 s_\markup { "$\\backslash$time 3/4" }
5155 ^\markup { " " \musicglyph #"timesig-neo_mensural3/4" }
5157 s_\markup { "$\\backslash$time 9/4" }
5158 ^\markup { " " \musicglyph #"timesig-neo_mensural9/4" }
5160 s_\markup { "$\\backslash$time 9/8" }
5161 ^\markup { " " \musicglyph #"timesig-neo_mensural9/8" }
5163 s_\markup { "$\\backslash$time 4/8" }
5164 ^\markup { " " \musicglyph #"timesig-neo_mensural4/8" }
5166 s_\markup { "$\\backslash$time 2/4" }
5167 ^\markup { " " \musicglyph #"timesig-neo_mensural2/4" }
5175 \remove Staff_symbol_engraver
5176 \remove Clef_engraver
5177 \remove Time_signature_engraver
5183 Use the @code{style} property of grob @internalsref{TimeSignature} to
5184 select ancient time signatures. Supported styles are
5185 @code{neo_mensural} and @code{mensural}. The above table uses the
5186 @code{neo_mensural} style. This style is appropriate e.g. for the
5187 incipit of transcriptions of mensural pieces. The @code{mensural}
5188 style mimicks the look of historical printings of the 16th century.
5190 @inputfileref{input/test,time.ly} gives an overview over all available
5191 ancient and modern styles.
5195 Internals: @ref{Time signature} gives a general introduction into the use of time
5200 Mensural signature glyphs are mapped to time fractions in a
5201 hard-wired way. This mapping is sensible, but still arbitrary: given
5202 a mensural time signature, the time fraction represents a modern meter
5203 that usually will be a good choice when transcribing a mensural piece
5204 of music. For a particular piece of mensural music, however, the
5205 mapping may be unsatisfactory. In particular, the mapping assumes a
5206 fixed transcription of durations (e.g. brevis = half note in 2/2,
5207 i.e. 4:1). Some glyphs (such as the alternate glyph for 6/8 meter)
5208 are not at all accessible through the @code{\time} command.
5210 Mensural time signatures are supported typographically, but not yet
5211 musically. The internal representation of durations is
5212 based on a purely binary system; a ternary division such as 1 brevis =
5213 3 semibrevis (tempus perfectum) or 1 semibrevis = 3 minima (cum
5214 prolatione maiori) is not correctly handled: event times in ternary
5215 modes will be badly computed, resulting e.g. in horizontally
5216 misaligned note heads, and bar checks are likely to erroneously fail.
5218 The syntax and semantics of the @code{\time} command for mensural
5219 music is subject to change.
5222 @subsection Custodes
5227 A @emph{custos} (plural: @emph{custodes}; latin word for `guard') is a
5228 symbol that appears at the end of a staff. It anticipates the pitch
5229 of the first note(s) of the following line and thus helps the player
5230 or singer to manage line breaks during performance, thus enhancing
5231 readability of a score.
5233 Custodes were frequently used in music notation until the 17th
5234 century. Nowadays, they have survived only in a few particular forms
5235 of musical notation such as contemporary editions of Gregorian chant
5236 like the @emph{editio vaticana}. There are different custos glyphs
5237 used in different flavours of notational style.
5241 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
5242 @internalsref{Staff} context when declaring the @code{\paper} block,
5243 as shown in the following example:
5249 \consists Custos_engraver
5250 Custos \override #'style = #'mensural
5255 The result looks like this:
5261 \override Staff.Custos #'style = #'mensural
5268 \consists Custos_engraver
5275 The custos glyph is selected by the @code{style} property. The styles
5276 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
5277 @code{mensural}. They are demonstrated in the following fragment:
5287 { " " \musicglyph #"custodes-vaticana-u0" }
5291 { " " \musicglyph #"custodes-medicaea-u0" }
5295 { " " \musicglyph #"custodes-hufnagel-u0" }
5299 { " " \musicglyph #"custodes-mensural-u0" }
5308 \remove "Bar_number_engraver"
5312 \remove "Clef_engraver"
5313 \remove "Key_engraver"
5314 \remove "Time_signature_engraver"
5315 \remove "Staff_symbol_engraver"
5316 minimumVerticalExtent = ##f
5322 If the boolean property @code{adjust-if-on-staffline} is set to
5323 @code{#t} (which it is by default), lily typesets slightly different
5324 variants of the custos glyph, depending on whether the custos, is
5325 typeset on or between stafflines. The glyph will
5326 optically fit well into the staff, with the appendage on the right of
5327 the custos always ending at the same vertical position between two
5328 stafflines regardless of the pitch. If you set
5329 @code{adjust-if-on-staffline} to @code{#f}, then
5330 a compromise between both forms is used.
5332 Just like stems can be attached to noteheads in two directions
5333 @emph{up} and @emph{down}, each custos glyph is available with its
5334 appendage pointing either up or down. If the pitch of a custos is
5335 above a selectable position, the appendage will point downwards; if
5336 the pitch is below this position, the appendage will point upwards.
5337 Use property @code{neutral-position} to select this position. By
5338 default, it is set to @code{0}, such that the neutral position is the
5339 center of the staff. Use property @code{neutral-direction} to control
5340 what happens if a custos is typeset on the neutral position itself.
5341 By default, this property is set to @code{-1}, such that the appendage
5342 will point downwards. If set to @code{1}, the appendage will point
5343 upwards. Other values such as @code{0} are reserved for future
5344 extensions and should not be used.
5348 Internals: @internalsref{Custos}.
5350 Examples: @inputfileref{input/regression,custos.ly}.
5354 @subsection Divisiones
5360 A @emph{divisio} (plural: @emph{divisiones}; latin word for
5361 `division') is a staff context symbol that is used to structure
5362 Gregorian music into phrases and sections. The musical meaning of
5363 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
5364 can be characterized as short, medium and long pause, somewhat like
5365 @ref{Breath marks}. The @emph{finalis} sign not only marks the end of
5366 a chant, but is also frequently used within a single
5367 antiphonal/responsorial chant to mark the end of each section.
5371 To use divisiones, include the file @code{gregorian-init.ly}. It
5372 contains definitions that you can apply by just inserting
5373 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
5374 and @code{\finalis} at proper places in the input. Some editions use
5375 @emph{virgula} or @emph{caesura} instead of divisio minima.
5376 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
5379 @lilypondfile[]{divisiones.ly}
5383 @cindex @code{\virgula}
5385 @cindex @code{\caesura}
5387 @cindex @code{\divisioMinima}
5388 @code{\divisioMinima},
5389 @cindex @code{\divisioMaior}
5390 @code{\divisioMaior},
5391 @cindex @code{\divisioMaxima}
5392 @code{\divisioMaxima},
5393 @cindex @code{\finalis}
5398 In this manual: @ref{Breath marks}.
5400 Internals: @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}.
5402 Examples: @inputfileref{input/test,divisiones.ly}.
5405 @subsection Ligatures
5409 @c TODO: Should double check if I recalled things correctly when I wrote
5410 @c down the following paragraph by heart.
5412 In musical terminology, a ligature is a coherent graphical symbol that
5413 represents at least two distinct notes. Ligatures originally appeared
5414 in the manuscripts of Gregorian chant notation roughly since the 9th
5415 century as an allusion to the accent symbols of greek lyric poetry to
5416 denote ascending or descending sequences of notes. Both, the shape
5417 and the exact meaning of ligatures changed tremendously during the
5418 following centuries: In early notation, ligatures were used for
5419 monophonic tunes (Gregorian chant) and very soon denoted also the way
5420 of performance in the sense of articulation. With upcoming
5421 multiphony, the need for a metric system arised, since multiple voices
5422 of a piece have to be synchronized some way. New notation systems
5423 were invented that used the manifold shapes of ligatures to now denote
5424 rhythmical patterns (e.g. black mensural notation, mannered notation,
5425 ars nova). With the invention of the metric system of the white
5426 mensural notation, the need for ligatures to denote such patterns
5427 disappeared. Nevertheless, ligatures were still in use in the
5428 mensural system for a couple of decades until they finally disappeared
5429 during the late 16th / early 17th century. Still, ligatures have
5430 survived in contemporary editions of Gregorian chant such as the
5431 Editio Vaticana from 1905/08.
5435 Syntactically, ligatures are simply enclosed by @code{\[} and
5436 @code{\]}. Some ligature styles (such as Editio Vaticana) may need
5437 additional input syntax specific for this particular type of ligature.
5438 By default, the @internalsref{LigatureBracket} engraver just puts a
5439 square bracket above the ligature:
5441 @lilypond[raggedright,verbatim]
5443 \notes \transpose c c' {
5451 To select a specific style of ligatures, a proper ligature engraver
5452 has to be added to the @internalsref{Voice} context, as explained in
5453 the following subsections. Only white mensural ligatures
5454 are supported with certain limitations. Support for Editio Vaticana
5455 will be added in the future.
5458 * White mensural ligatures::
5459 * Gregorian square neumes ligatures::
5462 @node White mensural ligatures
5463 @subsubsection White mensural ligatures
5465 @cindex Mensural ligatures
5466 @cindex White mensural ligatures
5468 There is limited support for white mensural ligatures. The
5469 implementation is still experimental; it may output strange
5470 warnings or even crash in some cases or produce weird results on more
5475 To engrave white mensural ligatures, in the paper block the
5476 @internalsref{Mensural_ligature_engraver} has to be put into the
5477 @internalsref{Voice} context, and remove the
5478 @internalsref{Ligature_bracket_engraver}:
5484 \remove Ligature_bracket_engraver
5485 \consists Mensural_ligature_engraver
5490 There is no additional input language to describe the shape of a
5491 white mensural ligature. The shape is rather determined solely from
5492 the pitch and duration of the enclosed notes. While this approach may
5493 take a new user a while to get accustomed, it has the great advantage
5494 that the full musical information of the ligature is known internally.
5495 This is not only required for correct MIDI output, but also allows for
5496 automatic transcription of the ligatures.
5501 \set Score.timing = ##f
5502 \set Score.defaultBarType = "empty"
5503 \override NoteHead #'style = #'neo_mensural
5504 \override Staff.TimeSignature #'style = #'neo_mensural
5506 \[ g\longa c\breve a\breve f\breve d'\longa \]
5508 \[ e1 f1 a\breve g\longa \]
5510 @lilypond[raggedright]
5512 \notes \transpose c c' {
5513 \set Score.timing = ##f
5514 \set Score.defaultBarType = "empty"
5515 \override NoteHead #'style = #'neo_mensural
5516 \override Staff.TimeSignature #'style = #'neo_mensural
5518 \[ g\longa c\breve a\breve f\breve d'\longa \]
5520 \[ e1 f1 a\breve g\longa \]
5525 \remove Ligature_bracket_engraver
5526 \consists Mensural_ligature_engraver
5532 Without replacing @internalsref{Ligature_bracket_engraver} with
5533 @internalsref{Mensural_ligature_engraver}, the same music transcribes
5536 @lilypond[raggedright]
5538 \notes \transpose c c' {
5539 \set Score.timing = ##f
5540 \set Score.defaultBarType = "empty"
5541 \override NoteHead #'style = #'neo_mensural
5542 \override Staff.TimeSignature #'style = #'neo_mensural
5544 \[ g\longa c\breve a\breve f\breve d'\longa \]
5546 \[ e1 f1 a\breve g\longa \]
5552 @node Gregorian square neumes ligatures
5553 @subsubsection Gregorian square neumes ligatures
5555 @cindex Square neumes ligatures
5556 @cindex Gregorian square neumes ligatures
5558 Gregorian square neumes notation (following the style of the Editio
5559 Vaticana) is under heavy development, but not yet really usable for
5560 production purposes. Core ligatures can already be typeset, but
5561 essential issues for serious typesetting are still under development,
5562 such as (among others) horizontal alignment of multiple ligatures,
5563 lyrics alignment and proper accidentals handling. Still, this section
5564 gives a sneak preview of what Gregorian chant may look like once it
5567 The following table contains the extended neumes table of the 2nd
5568 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
5569 1983 by the monks of Solesmes.
5571 @multitable @columnfractions .4 .2 .2 .2
5574 @b{Neuma aut@*Neumarum Elementa} @tab
5575 @b{Figurae@*Rectae} @tab
5576 @b{Figurae@*Liquescentes Auctae} @tab
5577 @b{Figurae@*Liquescentes Deminutae}
5579 @c TODO: \paper block is identical in all of the below examples.
5580 @c Therefore, it should somehow be included rather than duplicated all
5583 @c why not make identifiers in ly/engraver-init.ly? --hwn
5585 @c Because it's just used to typeset plain notes without
5586 @c a staff for demonstration purposes rather than something
5587 @c special of Gregorian chant notation. --jr
5592 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.5\cm]
5593 \include "gregorian-init.ly"
5595 \notes \transpose c c' {
5598 \noBreak s^\markup {"a"} \noBreak
5600 % Punctum Inclinatum
5602 \noBreak s^\markup {"b"}
5608 \remove "Bar_number_engraver"
5612 \remove "Clef_engraver"
5613 \remove "Key_engraver"
5614 \override StaffSymbol #'transparent = ##t
5615 \remove "Time_signature_engraver"
5616 \remove "Bar_engraver"
5617 minimumVerticalExtent = ##f
5621 \remove Ligature_bracket_engraver
5622 \consists Vaticana_ligature_engraver
5623 \override NoteHead #'style = #'vaticana_punctum
5624 \override Stem #'transparent = ##t
5630 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.5\cm]
5631 \include "gregorian-init.ly"
5633 \notes \transpose c c' {
5634 % Punctum Auctum Ascendens
5635 \[ \auctum \ascendens b \]
5636 \noBreak s^\markup {"c"} \noBreak
5638 % Punctum Auctum Descendens
5639 \[ \auctum \descendens b \]
5640 \noBreak s^\markup {"d"} \noBreak
5642 % Punctum Inclinatum Auctum
5643 \[ \inclinatum \auctum b \]
5644 \noBreak s^\markup {"e"}
5650 \remove "Bar_number_engraver"
5654 \remove "Clef_engraver"
5655 \remove "Key_engraver"
5656 \override StaffSymbol #'transparent = ##t
5657 \remove "Time_signature_engraver"
5658 \remove "Bar_engraver"
5659 minimumVerticalExtent = ##f
5663 \remove Ligature_bracket_engraver
5664 \consists Vaticana_ligature_engraver
5665 \override NoteHead #'style = #'vaticana_punctum
5666 \override Stem #'transparent = ##t
5672 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5673 \include "gregorian-init.ly"
5675 \notes \transpose c c' {
5676 % Punctum Inclinatum Parvum
5677 \[ \inclinatum \deminutum b \]
5678 \noBreak s^\markup {"f"}
5684 \remove "Bar_number_engraver"
5688 \remove "Clef_engraver"
5689 \remove "Key_engraver"
5690 \override StaffSymbol #'transparent = ##t
5691 \remove "Time_signature_engraver"
5692 \remove "Bar_engraver"
5693 minimumVerticalExtent = ##f
5697 \remove Ligature_bracket_engraver
5698 \consists Vaticana_ligature_engraver
5699 \override NoteHead #'style = #'vaticana_punctum
5700 \override Stem #'transparent = ##t
5709 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5710 \include "gregorian-init.ly"
5712 \notes \transpose c c' {
5715 \noBreak s^\markup {"g"}
5721 \remove "Bar_number_engraver"
5725 \remove "Clef_engraver"
5726 \remove "Key_engraver"
5727 \override StaffSymbol #'transparent = ##t
5728 \remove "Time_signature_engraver"
5729 \remove "Bar_engraver"
5730 minimumVerticalExtent = ##f
5734 \remove Ligature_bracket_engraver
5735 \consists Vaticana_ligature_engraver
5736 \override NoteHead #'style = #'vaticana_punctum
5737 \override Stem #'transparent = ##t
5746 @code{3. Apostropha vel Stropha}
5748 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5749 \include "gregorian-init.ly"
5751 \notes \transpose c c' {
5754 \noBreak s^\markup {"h"}
5760 \remove "Bar_number_engraver"
5764 \remove "Clef_engraver"
5765 \remove "Key_engraver"
5766 \override StaffSymbol #'transparent = ##t
5767 \remove "Time_signature_engraver"
5768 \remove "Bar_engraver"
5769 minimumVerticalExtent = ##f
5773 \remove Ligature_bracket_engraver
5774 \consists Vaticana_ligature_engraver
5775 \override NoteHead #'style = #'vaticana_punctum
5776 \override Stem #'transparent = ##t
5782 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5783 \include "gregorian-init.ly"
5785 \notes \transpose c c' {
5787 \[ \stropha \auctum b \]
5788 \noBreak s^\markup {"i"}
5794 \remove "Bar_number_engraver"
5798 \remove "Clef_engraver"
5799 \remove "Key_engraver"
5800 \override StaffSymbol #'transparent = ##t
5801 \remove "Time_signature_engraver"
5802 \remove "Bar_engraver"
5803 minimumVerticalExtent = ##f
5807 \remove Ligature_bracket_engraver
5808 \consists Vaticana_ligature_engraver
5809 \override NoteHead #'style = #'vaticana_punctum
5810 \override Stem #'transparent = ##t
5820 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5821 \include "gregorian-init.ly"
5823 \notes \transpose c c' {
5826 \noBreak s^\markup {"j"}
5832 \remove "Bar_number_engraver"
5836 \remove "Clef_engraver"
5837 \remove "Key_engraver"
5838 \override StaffSymbol #'transparent = ##t
5839 \remove "Time_signature_engraver"
5840 \remove "Bar_engraver"
5841 minimumVerticalExtent = ##f
5845 \remove Ligature_bracket_engraver
5846 \consists Vaticana_ligature_engraver
5847 \override NoteHead #'style = #'vaticana_punctum
5848 \override Stem #'transparent = ##t
5857 @code{5. Clivis vel Flexa}
5859 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5860 \include "gregorian-init.ly"
5862 \notes \transpose c c' {
5871 \remove "Bar_number_engraver"
5875 \remove "Clef_engraver"
5876 \remove "Key_engraver"
5877 \override StaffSymbol #'transparent = ##t
5878 \remove "Time_signature_engraver"
5879 \remove "Bar_engraver"
5880 minimumVerticalExtent = ##f
5884 \remove Ligature_bracket_engraver
5885 \consists Vaticana_ligature_engraver
5886 \override NoteHead #'style = #'vaticana_punctum
5887 \override Stem #'transparent = ##t
5893 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.0\cm]
5894 \include "gregorian-init.ly"
5896 \notes \transpose c c' {
5897 % Clivis Aucta Descendens
5898 \[ b \flexa \auctum \descendens g \]
5899 \noBreak s^\markup {"l"} \noBreak
5901 % Clivis Aucta Ascendens
5902 \[ b \flexa \auctum \ascendens g \]
5903 \noBreak s^\markup {"m"}
5909 \remove "Bar_number_engraver"
5913 \remove "Clef_engraver"
5914 \remove "Key_engraver"
5915 \override StaffSymbol #'transparent = ##t
5916 \remove "Time_signature_engraver"
5917 \remove "Bar_engraver"
5918 minimumVerticalExtent = ##f
5922 \remove Ligature_bracket_engraver
5923 \consists Vaticana_ligature_engraver
5924 \override NoteHead #'style = #'vaticana_punctum
5925 \override Stem #'transparent = ##t
5931 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5932 \include "gregorian-init.ly"
5934 \notes \transpose c c' {
5936 \[ b \flexa \deminutum g \]
5943 \remove "Bar_number_engraver"
5947 \remove "Clef_engraver"
5948 \remove "Key_engraver"
5949 \override StaffSymbol #'transparent = ##t
5950 \remove "Time_signature_engraver"
5951 \remove "Bar_engraver"
5952 minimumVerticalExtent = ##f
5956 \remove Ligature_bracket_engraver
5957 \consists Vaticana_ligature_engraver
5958 \override NoteHead #'style = #'vaticana_punctum
5959 \override Stem #'transparent = ##t
5966 @code{6. Podatus vel Pes}
5968 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5969 \include "gregorian-init.ly"
5971 \notes \transpose c c' {
5980 \remove "Bar_number_engraver"
5984 \remove "Clef_engraver"
5985 \remove "Key_engraver"
5986 \override StaffSymbol #'transparent = ##t
5987 \remove "Time_signature_engraver"
5988 \remove "Bar_engraver"
5989 minimumVerticalExtent = ##f
5993 \remove Ligature_bracket_engraver
5994 \consists Vaticana_ligature_engraver
5995 \override NoteHead #'style = #'vaticana_punctum
5996 \override Stem #'transparent = ##t
6002 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6003 \include "gregorian-init.ly"
6005 \notes \transpose c c' {
6006 % Pes Auctus Descendens
6007 \[ g \pes \auctum \descendens b \]
6008 \noBreak s^\markup {"p"} \noBreak
6010 % Pes Auctus Ascendens
6011 \[ g \pes \auctum \ascendens b \]
6012 \noBreak s^\markup {"q"}
6018 \remove "Bar_number_engraver"
6022 \remove "Clef_engraver"
6023 \remove "Key_engraver"
6024 \override StaffSymbol #'transparent = ##t
6025 \remove "Time_signature_engraver"
6026 \remove "Bar_engraver"
6027 minimumVerticalExtent = ##f
6031 \remove Ligature_bracket_engraver
6032 \consists Vaticana_ligature_engraver
6033 \override NoteHead #'style = #'vaticana_punctum
6034 \override Stem #'transparent = ##t
6040 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6041 \include "gregorian-init.ly"
6043 \notes \transpose c c' {
6045 \[ g \pes \deminutum b \]
6052 \remove "Bar_number_engraver"
6056 \remove "Clef_engraver"
6057 \remove "Key_engraver"
6058 \override StaffSymbol #'transparent = ##t
6059 \remove "Time_signature_engraver"
6060 \remove "Bar_engraver"
6061 minimumVerticalExtent = ##f
6065 \remove Ligature_bracket_engraver
6066 \consists Vaticana_ligature_engraver
6067 \override NoteHead #'style = #'vaticana_punctum
6068 \override Stem #'transparent = ##t
6075 @code{7. Pes Quassus}
6077 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6078 \include "gregorian-init.ly"
6080 \notes \transpose c c' {
6082 \[ \oriscus g \pes \virga b \]
6089 \remove "Bar_number_engraver"
6093 \remove "Clef_engraver"
6094 \remove "Key_engraver"
6095 \override StaffSymbol #'transparent = ##t
6096 \remove "Time_signature_engraver"
6097 \remove "Bar_engraver"
6098 minimumVerticalExtent = ##f
6102 \remove Ligature_bracket_engraver
6103 \consists Vaticana_ligature_engraver
6104 \override NoteHead #'style = #'vaticana_punctum
6105 \override Stem #'transparent = ##t
6111 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6112 \include "gregorian-init.ly"
6114 \notes \transpose c c' {
6115 % Pes Quassus Auctus Descendens
6116 \[ \oriscus g \pes \auctum \descendens b \]
6123 \remove "Bar_number_engraver"
6127 \remove "Clef_engraver"
6128 \remove "Key_engraver"
6129 \override StaffSymbol #'transparent = ##t
6130 \remove "Time_signature_engraver"
6131 \remove "Bar_engraver"
6132 minimumVerticalExtent = ##f
6136 \remove Ligature_bracket_engraver
6137 \consists Vaticana_ligature_engraver
6138 \override NoteHead #'style = #'vaticana_punctum
6139 \override Stem #'transparent = ##t
6147 @code{8. Quilisma Pes}
6149 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6150 \include "gregorian-init.ly"
6152 \notes \transpose c c' {
6154 \[ \quilisma g \pes b \]
6161 \remove "Bar_number_engraver"
6165 \remove "Clef_engraver"
6166 \remove "Key_engraver"
6167 \override StaffSymbol #'transparent = ##t
6168 \remove "Time_signature_engraver"
6169 \remove "Bar_engraver"
6170 minimumVerticalExtent = ##f
6174 \remove Ligature_bracket_engraver
6175 \consists Vaticana_ligature_engraver
6176 \override NoteHead #'style = #'vaticana_punctum
6177 \override Stem #'transparent = ##t
6183 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6184 \include "gregorian-init.ly"
6186 \notes \transpose c c' {
6187 % Quilisma Pes Auctus Descendens
6188 \[ \quilisma g \pes \auctum \descendens b \]
6195 \remove "Bar_number_engraver"
6199 \remove "Clef_engraver"
6200 \remove "Key_engraver"
6201 \override StaffSymbol #'transparent = ##t
6202 \remove "Time_signature_engraver"
6203 \remove "Bar_engraver"
6204 minimumVerticalExtent = ##f
6208 \remove Ligature_bracket_engraver
6209 \consists Vaticana_ligature_engraver
6210 \override NoteHead #'style = #'vaticana_punctum
6211 \override Stem #'transparent = ##t
6219 @code{9. Podatus Initio Debilis}
6221 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6222 \include "gregorian-init.ly"
6224 \notes \transpose c c' {
6225 % Pes Initio Debilis
6226 \[ \deminutum g \pes b \]
6233 \remove "Bar_number_engraver"
6237 \remove "Clef_engraver"
6238 \remove "Key_engraver"
6239 \override StaffSymbol #'transparent = ##t
6240 \remove "Time_signature_engraver"
6241 \remove "Bar_engraver"
6242 minimumVerticalExtent = ##f
6246 \remove Ligature_bracket_engraver
6247 \consists Vaticana_ligature_engraver
6248 \override NoteHead #'style = #'vaticana_punctum
6249 \override Stem #'transparent = ##t
6255 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6256 \include "gregorian-init.ly"
6258 \notes \transpose c c' {
6259 % Pes Auctus Descendens Initio Debilis
6260 \[ \deminutum g \pes \auctum \descendens b \]
6267 \remove "Bar_number_engraver"
6271 \remove "Clef_engraver"
6272 \remove "Key_engraver"
6273 \override StaffSymbol #'transparent = ##t
6274 \remove "Time_signature_engraver"
6275 \remove "Bar_engraver"
6276 minimumVerticalExtent = ##f
6280 \remove Ligature_bracket_engraver
6281 \consists Vaticana_ligature_engraver
6282 \override NoteHead #'style = #'vaticana_punctum
6283 \override Stem #'transparent = ##t
6293 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6294 \include "gregorian-init.ly"
6296 \notes \transpose c c' {
6298 \[ a \pes b \flexa g \]
6305 \remove "Bar_number_engraver"
6309 \remove "Clef_engraver"
6310 \remove "Key_engraver"
6311 \override StaffSymbol #'transparent = ##t
6312 \remove "Time_signature_engraver"
6313 \remove "Bar_engraver"
6314 minimumVerticalExtent = ##f
6318 \remove Ligature_bracket_engraver
6319 \consists Vaticana_ligature_engraver
6320 \override NoteHead #'style = #'vaticana_punctum
6321 \override Stem #'transparent = ##t
6327 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6328 \include "gregorian-init.ly"
6330 \notes \transpose c c' {
6331 % Torculus Auctus Descendens
6332 \[ a \pes b \flexa \auctum \descendens g \]
6339 \remove "Bar_number_engraver"
6343 \remove "Clef_engraver"
6344 \remove "Key_engraver"
6345 \override StaffSymbol #'transparent = ##t
6346 \remove "Time_signature_engraver"
6347 \remove "Bar_engraver"
6348 minimumVerticalExtent = ##f
6352 \remove Ligature_bracket_engraver
6353 \consists Vaticana_ligature_engraver
6354 \override NoteHead #'style = #'vaticana_punctum
6355 \override Stem #'transparent = ##t
6361 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6362 \include "gregorian-init.ly"
6364 \notes \transpose c c' {
6365 % Torculus Deminutus
6366 \[ a \pes b \flexa \deminutum g \]
6373 \remove "Bar_number_engraver"
6377 \remove "Clef_engraver"
6378 \remove "Key_engraver"
6379 \override StaffSymbol #'transparent = ##t
6380 \remove "Time_signature_engraver"
6381 \remove "Bar_engraver"
6382 minimumVerticalExtent = ##f
6386 \remove Ligature_bracket_engraver
6387 \consists Vaticana_ligature_engraver
6388 \override NoteHead #'style = #'vaticana_punctum
6389 \override Stem #'transparent = ##t
6396 @code{11. Torculus Initio Debilis}
6398 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6399 \include "gregorian-init.ly"
6401 \notes \transpose c c' {
6402 % Torculus Initio Debilis
6403 \[ \deminutum a \pes b \flexa g \]
6410 \remove "Bar_number_engraver"
6414 \remove "Clef_engraver"
6415 \remove "Key_engraver"
6416 \override StaffSymbol #'transparent = ##t
6417 \remove "Time_signature_engraver"
6418 \remove "Bar_engraver"
6419 minimumVerticalExtent = ##f
6423 \remove Ligature_bracket_engraver
6424 \consists Vaticana_ligature_engraver
6425 \override NoteHead #'style = #'vaticana_punctum
6426 \override Stem #'transparent = ##t
6432 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6433 \include "gregorian-init.ly"
6435 \notes \transpose c c' {
6436 % Torculus Auctus Descendens Initio Debilis
6437 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6444 \remove "Bar_number_engraver"
6448 \remove "Clef_engraver"
6449 \remove "Key_engraver"
6450 \override StaffSymbol #'transparent = ##t
6451 \remove "Time_signature_engraver"
6452 \remove "Bar_engraver"
6453 minimumVerticalExtent = ##f
6457 \remove Ligature_bracket_engraver
6458 \consists Vaticana_ligature_engraver
6459 \override NoteHead #'style = #'vaticana_punctum
6460 \override Stem #'transparent = ##t
6466 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6467 \include "gregorian-init.ly"
6469 \notes \transpose c c' {
6470 % Torculus Deminutus Initio Debilis
6471 \[ \deminutum a \pes b \flexa \deminutum g \]
6478 \remove "Bar_number_engraver"
6482 \remove "Clef_engraver"
6483 \remove "Key_engraver"
6484 \override StaffSymbol #'transparent = ##t
6485 \remove "Time_signature_engraver"
6486 \remove "Bar_engraver"
6487 minimumVerticalExtent = ##f
6491 \remove Ligature_bracket_engraver
6492 \consists Vaticana_ligature_engraver
6493 \override NoteHead #'style = #'vaticana_punctum
6494 \override Stem #'transparent = ##t
6501 @code{12. Porrectus}
6503 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6504 \include "gregorian-init.ly"
6506 \notes \transpose c c' {
6508 \[ a \flexa g \pes b \]
6515 \remove "Bar_number_engraver"
6519 \remove "Clef_engraver"
6520 \remove "Key_engraver"
6521 \override StaffSymbol #'transparent = ##t
6522 \remove "Time_signature_engraver"
6523 \remove "Bar_engraver"
6524 minimumVerticalExtent = ##f
6528 \remove Ligature_bracket_engraver
6529 \consists Vaticana_ligature_engraver
6530 \override NoteHead #'style = #'vaticana_punctum
6531 \override Stem #'transparent = ##t
6537 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6538 \include "gregorian-init.ly"
6540 \notes \transpose c c' {
6541 % Porrectus Auctus Descendens
6542 \[ a \flexa g \pes \auctum \descendens b \]
6549 \remove "Bar_number_engraver"
6553 \remove "Clef_engraver"
6554 \remove "Key_engraver"
6555 \override StaffSymbol #'transparent = ##t
6556 \remove "Time_signature_engraver"
6557 \remove "Bar_engraver"
6558 minimumVerticalExtent = ##f
6562 \remove Ligature_bracket_engraver
6563 \consists Vaticana_ligature_engraver
6564 \override NoteHead #'style = #'vaticana_punctum
6565 \override Stem #'transparent = ##t
6571 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6572 \include "gregorian-init.ly"
6574 \notes \transpose c c' {
6575 % Porrectus Deminutus
6576 \[ a \flexa g \pes \deminutum b \]
6583 \remove "Bar_number_engraver"
6587 \remove "Clef_engraver"
6588 \remove "Key_engraver"
6589 \override StaffSymbol #'transparent = ##t
6590 \remove "Time_signature_engraver"
6591 \remove "Bar_engraver"
6592 minimumVerticalExtent = ##f
6596 \remove Ligature_bracket_engraver
6597 \consists Vaticana_ligature_engraver
6598 \override NoteHead #'style = #'vaticana_punctum
6599 \override Stem #'transparent = ##t
6608 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6609 \include "gregorian-init.ly"
6611 \notes \transpose c c' {
6613 \[ \virga b \inclinatum a \inclinatum g \]
6620 \remove "Bar_number_engraver"
6624 \remove "Clef_engraver"
6625 \remove "Key_engraver"
6626 \override StaffSymbol #'transparent = ##t
6627 \remove "Time_signature_engraver"
6628 \remove "Bar_engraver"
6629 minimumVerticalExtent = ##f
6633 \remove Ligature_bracket_engraver
6634 \consists Vaticana_ligature_engraver
6635 \override NoteHead #'style = #'vaticana_punctum
6636 \override Stem #'transparent = ##t
6642 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6643 \include "gregorian-init.ly"
6645 \notes \transpose c c' {
6647 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6654 \remove "Bar_number_engraver"
6658 \remove "Clef_engraver"
6659 \remove "Key_engraver"
6660 \override StaffSymbol #'transparent = ##t
6661 \remove "Time_signature_engraver"
6662 \remove "Bar_engraver"
6663 minimumVerticalExtent = ##f
6667 \remove Ligature_bracket_engraver
6668 \consists Vaticana_ligature_engraver
6669 \override NoteHead #'style = #'vaticana_punctum
6670 \override Stem #'transparent = ##t
6676 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6677 \include "gregorian-init.ly"
6679 \notes \transpose c c' {
6680 % Climacus Deminutus
6681 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6688 \remove "Bar_number_engraver"
6692 \remove "Clef_engraver"
6693 \remove "Key_engraver"
6694 \override StaffSymbol #'transparent = ##t
6695 \remove "Time_signature_engraver"
6696 \remove "Bar_engraver"
6697 minimumVerticalExtent = ##f
6701 \remove Ligature_bracket_engraver
6702 \consists Vaticana_ligature_engraver
6703 \override NoteHead #'style = #'vaticana_punctum
6704 \override Stem #'transparent = ##t
6711 @code{14. Scandicus}
6713 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6714 \include "gregorian-init.ly"
6716 \notes \transpose c c' {
6718 \[ g \pes a \virga b \]
6725 \remove "Bar_number_engraver"
6729 \remove "Clef_engraver"
6730 \remove "Key_engraver"
6731 \override StaffSymbol #'transparent = ##t
6732 \remove "Time_signature_engraver"
6733 \remove "Bar_engraver"
6734 minimumVerticalExtent = ##f
6738 \remove Ligature_bracket_engraver
6739 \consists Vaticana_ligature_engraver
6740 \override NoteHead #'style = #'vaticana_punctum
6741 \override Stem #'transparent = ##t
6747 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6748 \include "gregorian-init.ly"
6750 \notes \transpose c c' {
6751 % Scandicus Auctus Descendens
6752 \[ g \pes a \pes \auctum \descendens b \]
6759 \remove "Bar_number_engraver"
6763 \remove "Clef_engraver"
6764 \remove "Key_engraver"
6765 \override StaffSymbol #'transparent = ##t
6766 \remove "Time_signature_engraver"
6767 \remove "Bar_engraver"
6768 minimumVerticalExtent = ##f
6772 \remove Ligature_bracket_engraver
6773 \consists Vaticana_ligature_engraver
6774 \override NoteHead #'style = #'vaticana_punctum
6775 \override Stem #'transparent = ##t
6781 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6782 \include "gregorian-init.ly"
6784 \notes \transpose c c' {
6785 % Scandicus Deminutus
6786 \[ g \pes a \pes \deminutum b \]
6793 \remove "Bar_number_engraver"
6797 \remove "Clef_engraver"
6798 \remove "Key_engraver"
6799 \override StaffSymbol #'transparent = ##t
6800 \remove "Time_signature_engraver"
6801 \remove "Bar_engraver"
6802 minimumVerticalExtent = ##f
6806 \remove Ligature_bracket_engraver
6807 \consists Vaticana_ligature_engraver
6808 \override NoteHead #'style = #'vaticana_punctum
6809 \override Stem #'transparent = ##t
6818 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6819 \include "gregorian-init.ly"
6821 \notes \transpose c c' {
6823 \[ g \oriscus a \pes \virga b \]
6830 \remove "Bar_number_engraver"
6834 \remove "Clef_engraver"
6835 \remove "Key_engraver"
6836 \override StaffSymbol #'transparent = ##t
6837 \remove "Time_signature_engraver"
6838 \remove "Bar_engraver"
6839 minimumVerticalExtent = ##f
6843 \remove Ligature_bracket_engraver
6844 \consists Vaticana_ligature_engraver
6845 \override NoteHead #'style = #'vaticana_punctum
6846 \override Stem #'transparent = ##t
6852 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6853 \include "gregorian-init.ly"
6855 \notes \transpose c c' {
6856 % Salicus Auctus Descendens
6857 \[ g \oriscus a \pes \auctum \descendens b \]
6864 \remove "Bar_number_engraver"
6868 \remove "Clef_engraver"
6869 \remove "Key_engraver"
6870 \override StaffSymbol #'transparent = ##t
6871 \remove "Time_signature_engraver"
6872 \remove "Bar_engraver"
6873 minimumVerticalExtent = ##f
6877 \remove Ligature_bracket_engraver
6878 \consists Vaticana_ligature_engraver
6879 \override NoteHead #'style = #'vaticana_punctum
6880 \override Stem #'transparent = ##t
6890 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6891 \include "gregorian-init.ly"
6893 \notes \transpose c c' {
6895 \[ \stropha b \stropha b \stropha a \]
6902 \remove "Bar_number_engraver"
6906 \remove "Clef_engraver"
6907 \remove "Key_engraver"
6908 \override StaffSymbol #'transparent = ##t
6909 \remove "Time_signature_engraver"
6910 \remove "Bar_engraver"
6911 minimumVerticalExtent = ##f
6915 \remove Ligature_bracket_engraver
6916 \consists Vaticana_ligature_engraver
6917 \override NoteHead #'style = #'vaticana_punctum
6918 \override Stem #'transparent = ##t
6930 Unlike most other neumes notation systems, the input language for
6931 neumes does not necessarily reflect directly the typographical
6932 appearance, but is designed to solely focuse on musical meaning. For
6933 example, @code{\[ a \pes b \flexa g \]} produces a Torculus consisting
6934 of three Punctum heads, while @code{\[ a \flexa g \pes b \]} produces
6935 a Porrectus with a curved flexa shape and only a single Punctum head.
6936 There is no command to explicitly typeset the curved flexa shape; the
6937 decision of when to typeset a curved flexa shape is purely taken from
6938 the musical input. The idea of this approach is to separate the
6939 musical aspects of the input from the notation style of the output.
6940 This way, the same input can be reused to typeset the same music in a
6941 different style of Gregorian chant notation such as Hufnagel (also
6942 known as German gothic neumes) or Medicaea (kind of a very simple
6943 forerunner of the Editio Vaticana). As soon as Hufnagel ligature
6944 engraver and Medicaea ligature engraver will have been implemented, it
6945 will be as simple as replacing the ligature engraver in the
6946 @internalsref{Voice} context to get the desired notation style from
6949 The following table shows the code fragments that produce the
6950 ligatures in the above neumes table. The letter in the first column
6951 in each line of the below table indicates to which ligature in the
6952 above table it refers. The second column gives the name of the
6953 ligature. The third column shows the code fragment that produces this
6954 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
6956 @multitable @columnfractions .1 .4 .5
6970 Punctum Inclinatum @tab
6971 @code{\[ \inclinatum b \]}
6975 Punctum Auctum Ascendens @tab
6976 @code{\[ \auctum \ascendens b \]}
6980 Punctum Auctum Descendens @tab
6981 @code{\[ \auctum \descendens b \]}
6985 Punctum Inclinatum Auctum @tab
6986 @code{\[ \inclinatum \auctum b \]}
6990 Punctum Inclinatum Parvum @tab
6991 @code{\[ \inclinatum \deminutum b \]}
6996 @code{\[ \virga b \]}
7001 @code{\[ \stropha b \]}
7006 @code{\[ \stropha \auctum b \]}
7011 @code{\[ \oriscus b \]}
7015 Clivis vel Flexa @tab
7016 @code{\[ b \flexa g \]}
7020 Clivis Aucta Descendens @tab
7021 @code{\[ b \flexa \auctum \descendens g \]}
7025 Clivis Aucta Ascendens @tab
7026 @code{\[ b \flexa \auctum \ascendens g \]}
7031 @code{\[ b \flexa \deminutum g \]}
7035 Podatus vel Pes @tab
7036 @code{\[ g \pes b \]}
7040 Pes Auctus Descendens @tab
7041 @code{\[ g \pes \auctum \descendens b \]}
7045 Pes Auctus Ascendens @tab
7046 @code{\[ g \pes \auctum \ascendens b \]}
7051 @code{\[ g \pes \deminutum b \]}
7056 @code{\[ \oriscus g \pes \virga b \]}
7060 Pes Quassus Auctus Descendens @tab
7061 @code{\[ \oriscus g \pes \auctum \descendens b \]}
7066 @code{\[ \quilisma g \pes b \]}
7070 Quilisma Pes Auctus Descendens @tab
7071 @code{\[ \quilisma g \pes \auctum \descendens b \]}
7075 Pes Initio Debilis @tab
7076 @code{\[ \deminutum g \pes b \]}
7080 Pes Auctus Descendens Initio Debilis @tab
7081 @code{\[ \deminutum g \pes \auctum \descendens b \]}
7086 @code{\[ a \pes b \flexa g \]}
7090 Torculus Auctus Descendens @tab
7091 @code{\[ a \pes b \flexa \auctum \descendens g \]}
7095 Torculus Deminutus @tab
7096 @code{\[ a \pes b \flexa \deminutum g \]}
7100 Torculus Initio Debilis @tab
7101 @code{\[ \deminutum a \pes b \flexa g \]}
7105 Torculus Auctus Descendens Initio Debilis @tab
7106 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
7110 Torculus Deminutus Initio Debilis @tab
7111 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
7116 @code{\[ a \flexa g \pes b \]}
7120 Porrectus Auctus Descendens @tab
7121 @code{\[ a \flexa g \pes \auctum \descendens b \]}
7125 Porrectus Deminutus @tab
7126 @code{\[ a \flexa g \pes \deminutum b \]}
7131 @code{\[ \virga b \inclinatum a \inclinatum g \]}
7135 Climacus Auctus @tab
7136 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
7140 Climacus Deminutus @tab
7141 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
7146 @code{\[ g \pes a \virga b \]}
7150 Scandicus Auctus Descendens @tab
7151 @code{\[ g \pes a \pes \auctum \descendens b \]}
7155 Scandicus Deminutus @tab
7156 @code{\[ g \pes a \pes \deminutum b \]}
7161 @code{\[ g \oriscus a \pes \virga b \]}
7165 Salicus Auctus Descendens @tab
7166 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
7171 @code{\[ \stropha b \stropha b \stropha a \]}
7177 The following head prefixes are supported:
7179 @cindex @code{\virga}
7181 @cindex @code{\stropha}
7183 @cindex @code{\inclinatum}
7185 @cindex @code{\auctum}
7187 @cindex @code{\descendens}
7189 @cindex @code{\ascendens}
7191 @cindex @code{\oriscus}
7193 @cindex @code{\quilisma}
7195 @cindex @code{\deminutum}
7198 Head prefixes can be accumulated, though restrictions apply. For
7199 example, either @code{\descendens} or @code{\ascendens} can be applied
7200 to a head, but not both to the same head.
7203 @cindex @code{\flexa}
7204 Two adjacent heads can be tied together with the @code{\pes} and
7205 @code{\flexa} infix commands for a rising and falling line of melody,
7210 Trigonus: apply equal spacing, regardless of pitch.
7213 @subsection Figured bass
7215 @cindex Basso continuo
7217 @c TODO: musicological blurb about FB
7221 LilyPond has limited support for figured bass:
7223 @lilypond[verbatim,fragment]
7225 \context Voice \notes { \clef bass dis4 c d ais}
7226 \context FiguredBass
7228 < 6 >4 < 7 >8 < 6+ [_!] >
7234 The support for figured bass consists of two parts: there is an input
7235 mode, introduced by @code{\figures}, where you can enter bass figures
7236 as numbers, and there is a context called @internalsref{FiguredBass} that
7237 takes care of making @internalsref{BassFigure} objects.
7239 In figures input mode, a group of bass figures is delimited by
7240 @code{<} and @code{>}. The duration is entered after the @code{>>}:
7245 \context FiguredBass
7249 Accidentals are added when you append @code{-}, @code{!} and @code{+}
7256 \context FiguredBass
7257 \figures { <4- 6+ 7!> }
7260 Spaces or dashes may be inserted by using @code{_}. Brackets are
7261 introduced with @code{[} and @code{]}:
7267 \context FiguredBass
7268 \figures { < [4 6] 8 [_! 12]> }
7271 Although the support for figured bass may superficially resemble chord
7272 support, it works much simpler. The @code{\figures} mode simply
7273 stores the numbers , and @internalsref{FiguredBass} context prints
7274 them as entered. There is no conversion to pitches, and no
7275 realizations of the bass are played in the MIDI file.
7277 Internally, the code produces markup texts. You can use any of the
7278 markup text properties to override formatting. For example, the
7279 vertical spacing of the figures may be set with @code{baseline-skip}.
7283 Internals: @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
7284 and @internalsref{FiguredBass} context.
7288 Slash notation for alterations is not supported.
7291 @node Vaticana style contexts
7292 @subsection Vaticana style contexts
7294 @cindex VaticanaVoiceContext
7295 @cindex VaticanaStaffContext
7297 The predefined @code{VaticanaVoiceContext} and
7298 @code{VaticanaStaffContext} can be used to easily engrave a piece of
7299 Gregorian Chant in the style of the Editio Vaticana. These contexts
7300 initialize all relevant context properties and grob properties to
7301 proper values. With these contexts, you can immediately go ahead
7302 entering the chant, as the following short excerpt demonstrates:
7304 @lilypond[raggedright,verbatim,noindent]
7305 \include "gregorian-init.ly"
7308 \context VaticanaVoice = "cantus" {
7309 \override Score.BarNumber #'transparent = ##t
7311 \[ c'\melisma c' \flexa a \] \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
7312 \[ f\melisma \pes a c' c' \pes d'\melismaEnd \] c' \divisioMinima \break
7313 \[ c'\melisma c' \flexa a \] \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
7316 \lyricsto "cantus" \new Lyrics \lyrics {
7317 San- ctus, San- ctus, San- ctus
7323 @node Contemporary notation
7324 @section Contemporary notation
7326 In the 20th century, composers have greatly expanded the musical
7327 vocabulary. With this expansion, many innovations in musical notation
7328 have been tried. The book by Stone (1980) gives a comprehensive
7329 overview (see @ref{Literature list}). In general, the use of new,
7330 innovative notation makes a piece harder to understand and perform and
7331 its use should therefore be avoided if possible. For this reason,
7332 support for contemporary notation in LilyPond is limited.
7341 @subsection Clusters
7345 In musical terminology, a @emph{cluster} denotes a range of
7346 simultaneously sounding pitches that may change over time. The set of
7347 available pitches to apply usually depends on the accoustic source.
7348 Thus, in piano music, a cluster typically consists of a continous range
7349 of the semitones as provided by the piano's fixed set of a chromatic
7350 scale. In choral music, each singer of the choir typically may sing an
7351 arbitrary pitch within the cluster's range that is not bound to any
7352 diatonic, chromatic or other scale. In electronic music, a cluster
7353 (theoretically) may even cover a continuous range of pitches, thus
7354 resulting in coloured noise, such as pink noise.
7356 Clusters can be denoted in the context of ordinary staff notation by
7357 engraving simple geometrical shapes that replace ordinary notation of
7358 notes. Ordinary notes as musical events specify starting time and
7359 duration of pitches; however, the duration of a note is expressed by the
7360 shape of the note head rather than by the horizontal graphical extent of
7361 the note symbol. In contrast, the shape of a cluster geometrically
7362 describes the development of a range of pitches (vertical extent) over
7363 time (horizontal extent). Still, the geometrical shape of a cluster
7364 covers the area in wich any single pitch contained in the cluster would
7365 be notated as an ordinary note. From this point of view, it is
7366 reasonable to specify a cluster as the envelope of a set of notes.
7370 A cluster is engraved as the envelope of a set of
7371 cluster-notes. Cluster notes are created by applying the function
7372 @code{notes-to-clusters} to a sequence of chords, e.g.
7374 @lilypond[relative=1,verbatim]
7375 \apply #notes-to-clusters { <c e > <b f'> }
7378 The following example (from
7379 @inputfileref{input/regression,cluster.ly}) shows what the result
7382 @lilypondfile[]{cluster.ly}
7384 By default, @internalsref{Cluster_spanner_engraver} is in the
7385 @internalsref{Voice} context. This allows putting ordinary notes and
7386 clusters together in the same staff, even simultaneously. In such a
7387 case no attempt is made to automatically avoid collisions between
7388 ordinary notes and clusters.
7392 Internals: @internalsref{ClusterSpanner},
7393 @internalsref{ClusterSpannerBeacon},
7394 @internalsref{Cluster_spanner_engraver}, and
7395 @internalsref{ClusterNoteEvent}.
7397 Examples: @inputfileref{input/regression,cluster.ly}.
7401 Music expressions like @code{<< @{ g8 e8 @} a4 >>} are not printed
7402 accurately. Use @code{<g a>8 <e a>8} instead.
7407 @subsection Fermatas
7413 Contemporary music notation frequently uses special fermata symbols to
7414 indicate fermatas of differing lengths.
7418 The following are supported
7420 @lilypond[raggedright]
7422 << \addlyrics \notes {
7442 \context Lyrics \lyrics {
7443 "shortfermata" "fermata" "longfermata" "verylongfermata"
7448 See @ref{Articulations} for general instructions how to apply scripts
7449 such as fermatas to a @code{\notes@{@}} block.
7452 @node Special notation
7453 @section Special notation
7457 * Easy Notation note heads::
7461 @subsection Balloon help
7463 Elements of notation can be marked and named with the help of a square
7464 balloon. The primary purpose of this feature is to explain notation.
7466 The following example demonstrates its use.
7468 @lilypond[verbatim,fragment,raggedright,relative=1]
7471 #(add-balloon-text 'NoteHead "heads, or tails?"
7477 The function @code{add-balloon-text} takes the name of a grob, the
7478 label to print and where to put the label relative to the object. In
7479 the above example, the text ``heads or tails?'' ends 3 spaces below
7483 @cindex notation, explaining
7487 Internals: @internalsref{text-balloon-interface}.
7489 Examples: @inputfileref{input/regression,balloon.ly}.
7491 @node Easy Notation note heads
7492 @subsection Easy Notation note heads
7494 @cindex easy notation
7497 The `easy play' note head includes a note name inside the head. It is
7498 used in music aimed at beginners:
7500 @lilypond[raggedright,verbatim,staffsize=26]
7502 \notes { c'2 e'4 f' | g'1 }
7503 \paper { \translator { \EasyNotation } }
7507 The @code{EasyNotation} variable overrides a @internalsref{Score}
7508 context. To make the letters readable, it has to be printed in a
7509 large font size. To print with a larger font, see @ref{Font Size}.
7514 If you view the result with Xdvi, then staff lines may show through
7515 the letters. Printing the PostScript file obtained does produce the
7521 @section Tuning output
7523 There are situations where default layout decisions are not
7524 sufficient. In this section we discuss ways to override these
7527 Formatting is internally done by manipulating so called objects
7528 (graphic objects). Each object carries with it a set of properties
7529 (object or layout properties) specific to that object. For example, a
7530 stem object has properties that specify its direction, length and
7533 The most direct way of tuning the output is by altering the values of
7534 these properties. There are two ways of doing that: first, you can
7535 temporarily change the definition of one type of object, thus
7536 affecting a whole set of objects. Second, you can select one specific
7537 object, and set a layout property in that object.
7539 Do not confuse layout properties with translation
7540 properties. Translation properties always use a mixed caps style
7541 naming, and are manipulated using @code{\set} and @code{\unset}:
7543 \set Context.propertyName = @var{value}
7546 Layout properties are use Scheme style variable naming, i.e. lower
7547 case words separated with dashes. They are symbols, and should always
7548 be quoted using @code{#'}. For example, this could be an imaginary
7549 layout property name:
7551 #'layout-property-name
7556 The introduction of the @ref{Technical manual} gives a more in-depth
7557 treatment of the difference between translation and layout.
7561 * Constructing a tweak::
7568 @node Tuning objects
7569 @subsection Tuning objects
7571 @cindex object description
7573 The definition of an object is a list of default object
7574 properties. For example, the definition of the Stem object (available
7575 in @file{scm/define-grobs.scm}), includes the following definitions
7576 for @internalsref{Stem}:
7580 (beamed-lengths . (3.5 3.5 3.5 4.5 5.0))
7581 (Y-extent-callback . ,Stem::height)
7586 Adding variables on top of this existing definition overrides the
7587 system default, and alters the resulting appearance of the layout
7593 Changing a variable for only one object is commonly achieved with
7597 \once \override @var{context}.@var{objectname}
7598 @var{symbol} = @var{value}
7600 Here @var{symbol} is a Scheme expression of symbol type, @var{context}
7601 and @var{objectname} is a string and @var{value} is a Scheme expression.
7602 This command applies a setting only during one moment in the score.
7604 In the following example, only one @internalsref{Stem} object is
7605 changed from its original setting:
7607 @lilypond[verbatim,fragment,relative=1]
7609 \once \override Voice.Stem #'thickness = #4
7613 @cindex @code{\once}
7615 For changing more objects, the same command, without @code{\once} can
7618 \override @var{context}.@var{objectname} @var{symbol} = @var{value}
7620 This command adds @code{@var{symbol} = @var{value}} to the definition
7621 of @var{objectname} in the context @var{context}, and this definition
7622 stays in place until it is removed.
7624 An existing definition may be removed by the following command:
7627 \property @var{context}.@var{objectname} \revert @var{symbol}
7632 @lilypond[verbatim,quote]
7633 c'4 \override Stem #'thickness = #4.0
7635 c'4 \revert Stem #'thickness
7639 The following example gives exactly the same result as the previous
7640 one (assuming the system default for stem thickness is 1.3):
7642 @lilypond[verbatim,quote]
7643 c'4 \override Stem #'thickness = #4.0
7645 c'4 \override Stem #'thickness = #1.3
7649 Reverting a setting which was not set in the first place has no
7655 Internals: @internalsref{OverrideProperty}, @internalsref{RevertProperty},
7656 @internalsref{PropertySet}, @internalsref{All-backend-properties}, and
7657 @internalsref{All-layout-objects}.
7662 The backend is not very strict in type-checking object properties.
7663 Cyclic references in Scheme values for properties can cause hangs
7667 * Constructing a tweak::
7673 @node Constructing a tweak
7674 @subsection Constructing a tweak
7677 @cindex internal documentation
7678 @cindex finding graphical objects
7679 @cindex graphical object descriptions
7681 @cindex @code{\override}
7683 @cindex internal documentation
7687 Three pieces of information are required to use @code{\override} and
7688 @code{\set}: the name of the layout object, the context and the name
7689 of the property. We demonstrate how to glean this information from
7690 the notation manual and the generated documentation.
7692 The generated documentation is a set of HTML pages which should be
7693 included if you installed a binary distribution, typically in
7694 @file{/usr/share/doc/lilypond}. They are also available on the web:
7695 go to the @uref{http://lilypond.org,LilyPond website}, click
7696 ``Documentation'', select the correct version, and click then
7697 ``Program reference.'' It is advisable to bookmark the local HTML
7698 files. They will load faster than the ones on the web. If you use the
7699 version from the web, you must check whether the documentation matches
7700 the program version: it is generated from the definitions that the
7701 program uses, and therefore it is strongly tied to the LilyPond
7705 @c [TODO: revise for new site.]
7707 Suppose we want to move the fingering indication in the fragment below:
7709 @lilypond[relative=2,verbatim]
7715 If you visit the documentation of @code{Fingering} (in @ref{Fingering
7716 instructions}), you will notice that there is written:
7721 Internals: @internalsref{FingerEvent} and @internalsref{Fingering}.
7728 In other words, the fingerings once entered, are internally stored as
7729 @code{FingerEvent} music objects. When printed, a @code{Fingering}
7730 layout object is created for every @code{FingerEvent}.
7732 The Fingering object has a number of different functions, and each of
7733 those is captured in an interface. The interfaces are listed under
7734 @internalsref{Fingering} in the program reference.
7738 The @code{Fingering} object has a fixed size
7739 (@internalsref{item-interface}), the symbol is a piece of text
7740 (@internalsref{text-interface}), whose font can be set
7741 (@internalsref{font-interface}). It is centered horizontally
7742 (@internalsref{self-alignment-interface}), it is placed next to other
7743 objects (@internalsref{side-position-interface}) vertically, and its
7744 placement is coordinated with other scripts
7745 (@internalsref{text-script-interface}). It also has the standard
7746 @internalsref{grob-interface} (grob stands for Graphical object)
7748 @cindex graphical object
7749 @cindex layout object
7750 @cindex object, layout
7751 with all the variables that come with
7752 it. Finally, it denotes a fingering instruction, so it has
7753 @internalsref{finger-interface}.
7755 For the vertical placement, we have to look under
7756 @code{side-position-interface}:
7758 @code{side-position-interface}
7760 Position a victim object (this one) next to other objects (the
7761 support). In this case, the property @code{direction} signifies where to put the
7762 victim object relative to the support (left or right, up or down?)
7767 below this description, the variable @code{padding} is described as
7771 (dimension, in staff space)
7773 add this much extra space between objects that are next to each
7774 other. Default value: @code{0.6}
7778 By increasing the value of @code{padding}, we can move away the
7779 fingering. The following command inserts 3 staff spaces of white
7780 between the note and the fingering:
7782 \once \override Fingering #'padding = #3
7785 Inserting this command before the Fingering object is created,
7786 i.e. before @code{c2}, yields the following result:
7788 @lilypond[relative=2,fragment,verbatim]
7789 \once \override Fingering
7796 The context name @code{Voice} in the example above can be determined
7797 as follows. In the documentation for @internalsref{Fingering}, it says
7799 Fingering grobs are created by: @internalsref{Fingering_engraver}
7802 Clicking @code{Fingering_engraver} shows the documentation of
7803 the module responsible for interpreting the fingering instructions and
7804 translating them to a @code{Fingering} object. Such a module is called
7805 an @emph{engraver}. The documentation of the @code{Fingering_engraver}
7808 Fingering_engraver is part of contexts: Voice
7810 so tuning the settings for Fingering should be done with
7812 \override Fingering @dots{}
7815 Of course, the tweak may also done in a larger context than
7816 @code{Voice}, for example, @internalsref{Staff} or
7817 @internalsref{Score}.
7821 Internals: the program reference also contains alphabetical lists of
7822 @internalsref{Contexts}, @internalsref{All-layout-objects} and
7823 @internalsref{Music-expressions}, so you can also find which objects
7824 to tweak by browsing the internals document.
7828 @subsection Applyoutput
7830 The most versatile way of tuning an object is @code{\applyoutput}. Its
7833 \applyoutput @var{proc}
7837 where @var{proc} is a Scheme function, taking three arguments.
7839 When interpreted, the function @var{proc} is called for every layout
7840 object found in the context, with the following arguments:
7842 @item the layout object itself,
7843 @item the context where the layout object was created, and
7844 @item the context where @code{\applyoutput} is processed.
7848 In addition, the cause of the layout object, i.e. the music
7849 expression or object that was responsible for creating it, is in the
7850 object property @code{cause}. For example, for a note head, this is a
7851 @internalsref{NoteHead} event, and for a @internalsref{Stem} object,
7852 this is a @internalsref{NoteHead} object.
7854 Here is a simple example of @code{\applyoutput}; it blanks note-heads on the
7857 (define (blanker grob grob-origin context)
7858 (if (and (memq (ly:get-grob-property grob 'interfaces)
7859 note-head-interface)
7860 (eq? (ly:get-grob-property grob 'staff-position) 0))
7862 (ly:set-grob-property! grob 'transparent #t)))
7867 @node Font selection
7868 @subsection Font selection
7870 The most common thing to change about the appearance of fonts is their
7871 size. The font size of any context can be easily changed by setting
7872 the @code{fontSize} property for that context. Its value is a number:
7873 negative numbers make the font smaller, positive numbers larger. An
7874 example is given below:
7876 @lilypond[fragment,relative=1,verbatim,quote]
7877 c4 c4 \set fontSize = #-1
7880 This command will set @code{font-size} (see below), and does
7881 not change the size of variable symbols, such as beams or slurs.
7883 One of the uses of @code{fontSize} is to get smaller symbols for cue
7884 notes. An elaborate example of those is in
7885 @inputfileref{input/test,cue-notes.ly}.
7887 @cindex magnification
7890 The font used for printing a object can be selected by setting
7891 @code{font-name}, e.g.
7893 \override Staff.TimeSignature
7894 #'font-name = #"cmr17"
7898 Any font can be used, as long as it is available to @TeX{}. Possible
7899 fonts include foreign fonts or fonts that do not belong to the
7900 Computer Modern font family. The size of fonts selected in this way
7901 can be changed with the @code{font-magnification} property. For
7902 example, @code{2.0} blows up all letters by a factor 2 in both
7906 @cindex font magnification
7908 Font selection for the standard fonts, @TeX{}'s Computer Modern fonts,
7909 can also be adjusted with a more fine-grained mechanism. By setting
7910 the object properties described below, you can select a different font;
7911 all three mechanisms work for every object that supports
7912 @code{font-interface}:
7917 is a symbol indicating the general class of the typeface. Supported are
7918 @code{roman} (Computer Modern), @code{braces} (for piano staff
7919 braces), @code{music} (the standard music font, including ancient
7920 glyphs), @code{dynamic} (for dynamic signs) and @code{typewriter}.
7923 is a symbol indicating the shape of the font, there are typically several
7924 font shapes available for each font family. Choices are @code{italic},
7925 @code{caps} and @code{upright}.
7928 is a symbol indicating the series of the font. There are typically several
7929 font series for each font family and shape. Choices are @code{medium}
7934 For any of these properties, the value @code{*} (i.e. the symbol
7935 @code{*}, entered as @code{#'*}), acts as a wildcard. This can be used
7936 to override default setting, which are always present. For example:
7938 \override Lyrics .LyricText #'font-series = #'bold
7939 \override Lyrics .LyricText #'font-family = #'typewriter
7940 \override Lyrics .LyricText #'font-shape = #'*
7943 @cindex @code{font-style}
7945 The font size is set by modifying the @code{font-size} property. Its
7946 value is a number indicating the size relative to the standard size.
7947 Each step up is an increase of approximately 12% of the font size. Six
7948 steps is exactly a factor two. The Scheme function @code{magstep}
7949 converts a @code{font-size} number to a scaling factor.
7951 LilyPond has fonts in different design sizes: the music fonts for
7952 smaller sizes are chubbier, while the text fonts are relatively wider.
7953 Font size changes are achieved by scaling the design size that is
7954 closest to the desired size.
7956 The @code{font-size} mechanism does not work for fonts selected
7957 through @code{font-name}. These may be scaled with
7958 @code{font-magnification}.
7962 The following commands set @code{fontSize} for the current voice.
7964 @cindex @code{\tiny}
7966 @cindex @code{\small}
7968 @cindex @code{\normalsize}
7973 Init files: @file{ly/declarations-init.ly} contains hints how new
7974 fonts may be added to LilyPond.
7978 There is no style sheet provided for other fonts besides the @TeX{}
7979 Computer Modern family.
7981 @cindex font selection
7982 @cindex font magnification
7983 @cindex @code{font-interface}
7987 @section Text markup
7992 @cindex typeset text
7994 LilyPond has an internal mechanism to typeset texts. You can access it
7995 with the keyword @code{\markup}. Within markup mode, you can enter texts
7996 similar to lyrics: simply enter them, surrounded by spaces:
7999 @lilypond[verbatim,fragment,relative=1]
8000 c1^\markup { hello }
8001 c1_\markup { hi there }
8002 c1^\markup { hi \bold there, is \italic anyone home? }
8005 @cindex font switching
8007 The markup in the example demonstrates font switching commands. The
8008 command @code{\bold} and @code{\italic} only apply to the first
8009 following word; enclose a set of texts with braces to apply a command
8012 \markup @{ \bold @{ hi there @} @}
8016 For clarity, you can also do this for single arguments, e.g.
8019 \markup { is \italic { anyone } home }
8022 @cindex font size, texts
8025 In markup mode you can compose expressions, similar to mathematical
8026 expressions, XML documents and music expressions. The braces group
8027 notes into horizontal lines. Other types of lists also exist: you can
8028 stack expressions grouped with @code{<}, and @code{>} vertically with
8029 the command @code{\column}. Similarly, @code{\center} aligns texts by
8032 @lilypond[verbatim,fragment,relative=1]
8033 c1^\markup { \column < a bbbb c > }
8034 c1^\markup { \center < a bbbb c > }
8035 c1^\markup { \line < a b c > }
8039 Markups can be stored in variables, and these variables
8040 may be attached to notes, like
8042 allegro = \markup { \bold \large { Allegro } }
8043 \notes { a^\allegro b c d }
8047 Some objects have alignment procedures of their own, which cancel out
8048 any effects of alignments applied to their markup arguments as a
8049 whole. For example, the @internalsref{RehearsalMark} is horizontally
8050 centered, so using @code{\mark \markup @{ \left-align .. @}} has no
8051 effect. Similarly, whole texts over notes cannot be moved vertically
8052 with @code{\raise}. For moving and aligning complete objects, grob
8053 properties should be used.
8059 Init files: @file{scm/new-markup.scm}.
8064 Text layout is ultimately done by @TeX{}, which does kerning of
8065 letters. LilyPond does not account for kerning, so texts will be
8066 spaced slightly too wide.
8068 Syntax errors for markup mode are confusing.
8070 Markup texts cannot be used in the titling of the @code{\header}
8071 field. Titles are made by La@TeX{}, so La@TeX{} commands should be used
8077 * Overview of text markup commands::
8078 * Markup construction in scheme::
8079 * Markup command definition::
8082 @node Overview of text markup commands
8083 @subsection Overview of text markup commands
8085 @include markup-commands.tely
8087 @node Markup construction in scheme
8088 @subsection Markup construction in scheme
8090 @cindex defining markup commands
8092 The @code{markup} macro builds markup expressions in Scheme while
8093 providing a LilyPond-like syntax. For example,
8095 (markup #:column (#:line (#:bold #:italic "hello" #:raise 0.4 "world")
8096 #:bigger #:line ("foo" "bar" "baz")))
8102 \markup \column < @{ \bold \italic "hello" \raise #0.4 "world" @}
8103 \bigger @{ foo bar baz @} >
8107 This example exposes the main translation rules between regular
8108 LilyPond markup syntax and scheme markup syntax, which are summed up
8110 @multitable @columnfractions .5 .5
8111 @item @b{LilyPond} @tab @b{Scheme}
8112 @item @code{\command} @tab @code{#:command}
8113 @item @code{\variable} @tab @code{variable}
8114 @item @code{@{ ... @}} @tab @code{#:line ( ... )}
8115 @item @code{\center < ... >} @tab @code{#:center ( ... )}
8116 @item @code{string} @tab @code{"string"}
8117 @item @code{#scheme-arg} @tab @code{scheme-arg}
8120 Besides, the whole scheme language is accessible inside the
8121 @code{markup} macro: thus, one may use function calls inside
8122 @code{markup} in order to manipulate character strings for
8123 instance. This proves useful when defining new markup commands (see
8124 @ref{Markup command definition}).
8128 One can not feed the @code{#:line} (resp @code{#:center},
8129 @code{#:column}) command with a variable or the result of a function
8132 (markup #:line (fun-that-returns-markups))
8134 is illegal. One should use the @code{make-line-markup} (resp
8135 @code{make-center-markup}, @code{make-column-markup}) function
8138 (markup (make-line-markup (fun-that-returns-markups)))
8141 @node Markup command definition
8142 @subsection Markup command definition
8144 New markup commands can be defined thanks to the @code{def-markup-command} scheme macro.
8146 (def-markup-command (@var{command-name} @var{paper} @var{props} @var{arg1} @var{arg2} ...)
8147 (@var{arg1-type?} @var{arg2-type?} ...)
8150 @var{argi}: i@var{th} command argument
8151 @var{argi-type?}: a type predicate for the i@var{th} argument
8152 @var{paper}: the `paper' definition
8153 @var{props}: a list of alists, containing all active properties.
8156 As a simple example, we show how to add a @code{\smallcaps} command,
8157 which selects @TeX{}'s small caps font. Normally, we could select the
8158 small caps font as follows:
8161 \markup { \override #'(font-shape . caps) Text-in-caps }
8164 This selects the caps font by setting the @code{font-shape} property to
8165 @code{#'caps} for interpreting @code{Text-in-caps}.
8167 To make the above available as @code{\smallcaps} command, we have to
8168 define a function using @code{def-markup-command}. The command should
8169 take a single argument, of markup type. Therefore, the start of the
8170 definition should read
8172 (def-markup-command (smallcaps paper props argument) (markup?)
8177 What follows is the content of the command: we should interpret
8178 the @code{argument} as a markup, i.e.
8181 (interpret-markup paper @dots{} argument)
8185 This interpretation should add @code{'(font-shape . caps)} to the active
8186 properties, so we substitute the the following for the @dots{} in the
8190 (cons (list '(font-shape . caps) ) props)
8194 The variable @code{props} is a list of alists, and we prepend to it by
8195 consing a list with the extra setting.
8197 However, suppose that we are using a font that does not have a
8198 small-caps variant. In that case, we have to fake the small caps font,
8199 by setting a string in upcase, with the first letter a little larger:
8202 #(def-markup-command (smallcaps paper props str) (string?)
8203 "Print the string argument in small caps. Syntax: \\smallcaps #\"string\""
8204 (interpret-markup paper props
8207 (if (= (string-length s) 0)
8209 (markup #:large (string-upcase (substring s 0 1))
8210 #:translate (cons -0.6 0)
8211 #:tiny (string-upcase (substring s 1)))))
8212 (string-split str #\Space)))))
8215 The @code{smallcaps} command first splits its string argument into
8216 tokens separated by spaces (@code{(string-split str #\Space)}); for
8217 each token, a markup is built with the first letter made large and
8218 upcased (@code{#:large (string-upcase (substring s 0 1))}), and a
8219 second markup built with the following letters made tiny and upcased
8220 (@code{#:tiny (string-upcase (substring s 1))}). As LilyPond
8221 introduces a space between markups on a line, the second markup is
8222 translated to the left (@code{#:translate (cons -0.6 0) ...}). Then,
8223 the markups built for each token are put in a line
8224 (@code{(make-line-markup ...)}). Finally, the resulting markup is
8225 passed to the @code{interpret-markup} function, with the @code{paper}
8226 and @code{props} arguments.
8228 Finally, suppose that we are typesetting a recitative in an opera, and
8229 we would like to define a command that will show character names in a
8230 custom manner. Names should be printed with small caps and translated a
8231 bit to the left and top. We will define a @code{\character} command
8232 that takes into account the needed translation, and uses the newly
8233 defined @code{\smallcaps} command:
8236 #(def-markup-command (character paper props name) (string?)
8237 "Print the character name in small caps, translated to the left and
8238 top. Syntax: \\character #\"name\""
8239 (interpret-markup paper props
8240 (markup "" #:translate (cons -4 2) #:smallcaps name)))
8243 There is one complication that needs explanation: texts above and below
8244 the staff are moved vertically to be at a certain distance (the
8245 @code{padding} property) from the staff and the notes. To make sure
8246 that this mechanism does not annihilate the vertical effect of our
8247 @code{#:translate}, we add an empty string (@code{""}) before the
8248 translated text. Now the @code{""} will be put above the notes, and the
8249 @code{name} is moved in relation to that empty string. The net effect is
8250 that the text is moved to the upper left.
8252 The final result is as follows:
8256 c''^\markup \character #"Cleopatra"
8257 e'^\markup \character #"Giulio Cesare"
8262 @lilypond[raggedright]
8263 #(def-markup-command (smallcaps paper props str) (string?)
8264 "Print the string argument in small caps. Syntax: \\smallcaps #\"string\""
8265 (interpret-markup paper props
8268 (if (= (string-length s) 0)
8270 (markup #:large (string-upcase (substring s 0 1))
8271 #:translate (cons -0.6 0)
8272 #:tiny (string-upcase (substring s 1)))))
8273 (string-split str #\Space)))))
8275 #(def-markup-command (character paper props name) (string?)
8276 "Print the character name in small caps, translated to the left and
8277 top. Syntax: \\character #\"name\""
8278 (interpret-markup paper props
8279 (markup "" #:translate (cons -4 0) #:smallcaps name)))
8283 c''^\markup \character #"Cleopatra"
8284 e'^\markup \character #"Giulio Cesare"
8292 @section Global layout
8294 The global layout determined by three factors: the page layout, the
8295 line breaks and the spacing. These all influence each other. The
8296 choice of spacing determines how densely each system of music is set,
8297 which influences where line breaks breaks are chosen, and thus
8298 ultimately how many pages a piece of music takes. This section
8299 explains how to tune the algorithm for spacing.
8301 Globally spoken, this procedure happens in three steps: first,
8302 flexible distances (``springs'') are chosen, based on durations. All
8303 possible line breaking combination are tried, and the one with the
8304 best results---a layout that has uniform density and requires as
8305 little stretching or cramping as possible---is chosen. When the score
8306 is processed by @TeX{}, each page is filled with systems, and page breaks
8307 are chosen whenever the page gets full.
8312 * Vertical spacing::
8313 * Horizontal spacing::
8320 @node Vertical spacing
8321 @subsection Vertical spacing
8323 @cindex vertical spacing
8324 @cindex distance between staves
8325 @cindex staff distance
8326 @cindex between staves, distance
8327 @cindex staffs per page
8328 @cindex space between staves
8330 The height of each system is determined automatically by LilyPond, to
8331 keep systems from bumping into each other, some minimum distances are
8332 set. By changing these, you can put staves closer together, and thus
8333 put more systems onto one page.
8335 Normally staves are stacked vertically. To make
8336 staves maintain a distance, their vertical size is padded. This is
8337 done with the property @code{minimumVerticalExtent}. It takes a pair
8338 of numbers, so if you want to make it smaller from its, then you could
8341 \set Staff.minimumVerticalExtent = #'(-4 . 4)
8343 This sets the vertical size of the current staff to 4 staff spaces on
8344 either side of the center staff line. The argument of
8345 @code{minimumVerticalExtent} is interpreted as an interval, where the
8346 center line is the 0, so the first number is generally negative. The
8347 staff can be made larger at the bottom by setting it to @code{(-6
8350 The piano staves are handled a little differently: to make cross-staff
8351 beaming work correctly, it is necessary that the distance between staves
8352 is fixed beforehand. This is also done with a
8353 @internalsref{VerticalAlignment} object, created in
8354 @internalsref{PianoStaff}. In this object the distance between the
8355 staves is fixed by setting @code{forced-distance}. If you want to
8356 override this, use a @code{\translator} block as follows:
8360 VerticalAlignment \override #'forced-distance = #9
8363 This would bring the staves together at a distance of 9 staff spaces,
8364 measured from the center line of each staff.
8368 Internals: Vertical alignment of staves is handled by the
8369 @internalsref{VerticalAlignment} object.
8373 @node Horizontal spacing
8374 @subsection Horizontal Spacing
8376 The spacing engine translates differences in durations into
8377 stretchable distances (``springs'') of differing lengths. Longer
8378 durations get more space, shorter durations get less. The shortest
8379 durations get a fixed amount of space (which is controlled by
8380 @code{shortest-duration-space} in the @internalsref{SpacingSpanner} object).
8381 The longer the duration, the more space it gets: doubling a
8382 duration adds a fixed amount (this amount is controlled by
8383 @code{spacing-increment}) of space to the note.
8385 For example, the following piece contains lots of half, quarter and
8386 8th notes, the eighth note is followed by 1 note head width (NHW).
8387 The quarter note is followed by 2 NHW, the half by 3 NHW, etc.
8388 @lilypond[fragment,verbatim,relative=1] c2 c4. c8 c4. c8 c4. c8 c8
8392 Normally, @code{shortest-duration-space} is set to 1.2, which is the
8393 width of a note head, and @code{shortest-duration-space} is set to
8394 2.0, meaning that the shortest note gets 2 NHW (i.e. 2 times
8395 @code{shortest-duration-space}) of space. For normal notes, this space
8396 is always counted from the left edge of the symbol, so the shortest
8397 notes are generally followed by one NHW of space.
8399 If one would follow the above procedure exactly, then adding a single
8400 32th note to a score that uses 8th and 16th notes, would widen up the
8401 entire score a lot. The shortest note is no longer a 16th, but a 32nd,
8402 thus adding 1 NHW to every note. To prevent this, the
8403 shortest duration for spacing is not the shortest note in the score,
8404 but the most commonly found shortest note. Notes that are even
8405 shorter this are followed by a space that is proportional to their
8406 duration relative to the common shortest note. So if we were to add
8407 only a few 16th notes to the example above, they would be followed by
8410 @lilypond[fragment,verbatim,relative=2]
8411 c2 c4. c8 c4. c16[ c] c4. c8 c8 c8 c4 c4 c4
8414 The most common shortest duration is determined as follows: in every
8415 measure, the shortest duration is determined. The most common short
8416 duration, is taken as the basis for the spacing, with the stipulation
8417 that this shortest duration should always be equal to or shorter than
8418 1/8th note. The shortest duration is printed when you run lilypond
8419 with @code{--verbose}. These durations may also be customized. If you
8420 set the @code{common-shortest-duration} in
8421 @internalsref{SpacingSpanner}, then this sets the base duration for
8422 spacing. The maximum duration for this base (normally 1/8th), is set
8423 through @code{base-shortest-duration}.
8425 @cindex @code{common-shortest-duration}
8426 @cindex @code{base-shortest-duration}
8427 @cindex @code{stem-spacing-correction}
8428 @cindex @code{spacing}
8430 In the introduction it was explained that stem directions influence
8431 spacing. This is controlled with @code{stem-spacing-correction}
8432 property in @internalsref{NoteSpacing}, which are generated for every
8433 @internalsref{Voice} context. The @code{StaffSpacing} object
8434 (generated at @internalsref{Staff} context) contains the same property
8435 for controlling the stem/barline spacing. The following example
8436 shows these corrections, once with default settings, and once with
8437 exaggerated corrections:
8443 \override Staff.NoteSpacing #'stem-spacing-correction
8445 \override Staff.StaffSpacing #'stem-spacing-correction
8450 \paper { raggedright = ##t } }
8453 @cindex SpacingSpanner, overriding properties
8455 Properties of the @internalsref{SpacingSpanner} must be overridden
8456 from the @code{\paper} block, since the @internalsref{SpacingSpanner} is
8457 created before any property commands are interpreted.
8459 \paper @{ \translator @{
8461 SpacingSpanner \override #'spacing-increment = #3.0
8468 Internals: @internalsref{SpacingSpanner}, @internalsref{NoteSpacing},
8469 @internalsref{StaffSpacing}, @internalsref{SeparationItem}, and
8470 @internalsref{SeparatingGroupSpanner}.
8474 Spacing is determined on a score wide basis. If you have a score that
8475 changes its character (measured in durations) halfway during the
8476 score, the part containing the longer durations will be spaced too
8479 There is no convenient mechanism to manually override spacing.
8484 @subsection Font size
8485 @cindex font size, setting
8486 @cindex staff size, setting
8487 @cindex @code{paper} file
8489 The Feta font provides musical symbols at eight seven different
8490 sizes. Each font is tuned for a different staff size: at smaller sizes
8491 the font gets heavier, to match the relatively heavier staff lines.
8492 The recommended font sizes are listed in the following table:
8494 @multitable @columnfractions .25 .25 .25 .25
8497 @tab @b{staff height (pt)}
8498 @tab @b{staff height (mm)}
8540 @c modern rental material ?
8544 These fonts are available in any sizes. The context property
8545 @code{fontSize} and the layout property @code{staff-space} (in
8546 @internalsref{StaffSymbol}) can be used to tune size for individual
8547 staffs. The size of individual staffs are relative to the global size,
8548 which can be set in the following manner:
8551 #(set-global-staff-size 14)
8554 This sets the global default size to 14pt staff height, and scales all
8560 @subsection Line breaking
8563 @cindex breaking lines
8565 Line breaks are normally computed automatically. They are chosen such
8566 that lines look neither cramped nor loose, and that consecutive lines
8567 have similar density.
8569 Occasionally you might want to override the automatic breaks; you can
8570 do this by specifying @code{\break}. This will force a line break at
8571 this point. Line breaks can only occur at places where there are bar
8572 lines. If you want to have a line break where there is no bar line,
8573 you can force an invisible bar line by entering @code{\bar
8574 ""}. Similarly, @code{\noBreak} forbids a line break at a
8578 @cindex regular line breaks
8579 @cindex four bar music.
8581 For linebreaks at regular intervals use @code{\break} separated by
8582 skips and repeated with @code{\repeat}:
8584 << \repeat unfold 7 @{
8585 s1 \noBreak s1 \noBreak
8586 s1 \noBreak s1 \break @}
8587 @emph{the real music}
8592 This makes the following 28 measures (assuming 4/4 time) be broken every
8593 4 measures, and only there.
8597 @code{\break}, @code{\noBreak}
8598 @cindex @code{\break}
8599 @cindex @code{\noBreak}
8603 Internals: @internalsref{BreakEvent}.
8607 @subsection Page layout
8610 @cindex breaking pages
8612 @cindex @code{indent}
8613 @cindex @code{linewidth}
8615 The most basic settings influencing the spacing are @code{indent} and
8616 @code{linewidth}. They are set in the @code{\paper} block. They
8617 control the indentation of the first line of music, and the lengths of
8620 If @code{raggedright} is set to true in the @code{\paper}
8621 block, then the lines are justified at their natural length. This
8622 useful for short fragments, and for checking how tight the natural
8626 @cindex vertical spacing
8628 The page layout process happens outside the LilyPond formatting
8629 engine: variables controlling page layout are passed to the output,
8630 and are further interpreted by @code{lilypond} wrapper program. It
8631 responds to the following variables in the @code{\paper} block. The
8632 variable @code{textheight} sets the total height of the music on each
8633 page. The spacing between systems is controlled with
8634 @code{interscoreline}, its default is 16pt. The distance between the
8635 score lines will stretch in order to fill the full page
8636 @code{interscorelinefill} is set to a positive number. In that case
8637 @code{interscoreline} specifies the minimum spacing.
8639 @cindex @code{textheight}
8640 @cindex @code{interscoreline}
8641 @cindex @code{interscorelinefill}
8643 If the variable @code{lastpagefill} is defined,
8644 @c fixme: this should only be done if lastpagefill= #t
8645 systems are evenly distributed vertically on the last page. This
8646 might produce ugly results in case there are not enough systems on the
8647 last page. The @command{lilypond-book} command ignores
8648 @code{lastpagefill}. See @ref{lilypond-book manual} for more
8651 @cindex @code{lastpagefill}
8653 Page breaks are normally computed by @TeX{}, so they are not under
8654 direct control of LilyPond. However, you can insert a commands into
8655 the @file{.tex} output to instruct @TeX{} where to break pages. This
8656 is done by setting the @code{between-systems-strings} on the
8657 @internalsref{NonMusicalPaperColumn} where the system is broken.
8658 An example is shown in @inputfileref{input/regression,between-systems.ly}.
8659 The predefined command @code{\newpage} also does this.
8663 @cindex @code{papersize}
8665 To change the paper size, use the following Scheme code:
8668 #(set-paper-size "a4")
8675 @cindex @code{\newpage}
8681 In this manual: @ref{Invoking lilypond}.
8683 Examples: @inputfileref{input/regression,between-systems.ly}.
8685 Internals: @internalsref{NonMusicalPaperColumn}.
8689 LilyPond has no concept of page layout, which makes it difficult to
8690 reliably choose page breaks in longer pieces.
8699 Entered music can also be converted to MIDI output. The performance
8700 is good enough for proof-hearing the music for errors.
8702 Ties, dynamics and tempo changes are interpreted. Dynamic marks,
8703 crescendi and decrescendi translate into MIDI volume levels. Dynamic
8704 marks translate to a fixed fraction of the available MIDI volume
8705 range, crescendi and decrescendi make the volume vary linearly between
8706 their two extremities. The fractions can be adjusted by
8707 @code{dynamicAbsoluteVolumeFunction} in @internalsref{Voice} context.
8708 For each type of MIDI instrument, a volume range can be defined. This
8709 gives a basic equalizer control, which can enhance the quality of
8710 the MIDI output remarkably. The equalizer can be controlled by
8711 setting @code{instrumentEqualizer}.
8715 Many musically interesting effects, such as swing, articulation,
8716 slurring, etc., are not translated to MIDI.
8718 Since slurs are not interpreted, @code{\lyricsto} and
8719 @code{\addlyrics} sections will be interpreted wrongly.
8721 The MIDI output allocates a channel for each Staff, and one for global
8722 settings. Hence, the MIDI file should not have more than 15 staves
8723 (or 14 if you do not use drums).
8728 * MIDI instrument names::
8733 @subsection MIDI block
8737 The MIDI block is analogous to the paper block, but it is somewhat
8738 simpler. The @code{\midi} block can contain:
8742 @item a @code{\tempo} definition, and
8743 @item context definitions.
8746 Assignments in the @code{\midi} block are not allowed.
8748 A number followed by a period is interpreted as a real number, so
8749 for setting the tempo for dotted notes, an extra space should be
8750 inserted, for example:
8753 \midi @{ \tempo 4 . = 120 @}
8757 @cindex context definition
8759 Context definitions follow precisely the same syntax as within the
8760 \paper block. Translation modules for sound are called performers.
8761 The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
8764 @node MIDI instrument names
8765 @subsection MIDI instrument names
8767 @cindex instrument names
8768 @cindex @code{Staff.midiInstrument}
8770 The MIDI instrument name is set by the @code{Staff.midiInstrument}
8771 property. The instrument name should be chosen from the list in
8772 @ref{MIDI instruments}.
8776 If the selected string does not exactly match, then the default is
8777 used, which is the Grand Piano.