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:
299 @c FIXME: what is an identifier? I do not think it's been introduced yet.
300 @c and if it has, I obviously skipped that part. - Graham
304 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
306 r1 r2 r4 r8 r16 r32 r64 r64
311 \notes \relative c'' {
313 a1 a2 a4 a8 a16 a32 a64 a64
315 r1 r2 r4 r8 r16 r32 r64 r64
320 \remove "Clef_engraver"
321 \remove "Staff_symbol_engraver"
322 \remove "Time_signature_engraver"
323 \consists "Pitch_squash_engraver"
330 If the duration is omitted then it is set to the previously entered
331 duration. The default for the first note is a quarter note. The duration
332 can be followed by dots (`@code{.}') in order to obtain dotted note
336 @lilypond[fragment,verbatim,center]
337 a' b' c''8 b' a'4 a'4. b'4.. c'8.
342 You can alter the length of duration by a fraction @var{N/M}
343 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
344 will not affect the appearance of the notes or rests produced.
345 In the following example, the first three notes take up exactly two
347 @lilypond[fragment,relative=2,verbatim]
349 a4*2/3 gis4*2/3 a4*2/3
356 Dots are normally moved up to avoid staff lines, except in polyphonic
357 situations. The following commands may be used to force a particular
360 @cindex @code{\dotsUp}
362 @cindex @code{\dotsDown}
364 @cindex @code{\dotsBoth}
369 Internals: @internalsref{Dots}, and @internalsref{DotColumn}.
374 Whenever a note is found, a @internalsref{Stem} object is created
375 automatically. For whole notes and rests, they are also created but
380 @cindex @code{\stemUp}
382 @cindex @code{\stemDown}
384 @cindex @code{\stemBoth}
395 A tie connects two adjacent note heads of the same pitch. The tie in
396 effect extends the length of a note. Ties should not be confused with
397 slurs, which indicate articulation, or phrasing slurs, which indicate
398 musical phrasing. A tie is entered using the tilde symbol `@code{~}':
400 @lilypond[fragment,verbatim,center]
401 e' ~ e' <c' e' g'> ~ <c' e' g'>
404 When a tie is applied to a chord, all note heads whose pitches match
405 are connected. When no note heads match, no ties will be created.
407 In its meaning a tie is just a way of extending a note duration, similar
408 to the augmentation dot; in the following example there are two ways of
409 notating exactly the same concept:
411 @lilypond[fragment,raggedright,quote]
412 \time 3/4 c'2. c'2 ~ c'4
414 If you need to tie a lot of notes over bars, it may be easier to use automatic
415 note splitting (see @ref{Automatic note splitting}).
420 @cindex @code{\tieUp}
422 @cindex @code{\tieDown}
424 @cindex @code{\tieBoth}
426 @cindex @code{\tieDotted}
428 @cindex @code{\tieSolid}
433 In this manual: @ref{Automatic note splitting}.
435 Internals: @internalsref{TieEvent}, @internalsref{NewTieEvent},
438 Examples: if you want less ties created for a chord, see
439 @inputfileref{input/test,tie-sparse.ly}.
441 For tying only a subset of the note heads of a pair of chords, see
442 @inputfileref{input/regression,tie-chord-partial.ly}.
447 Switching staves when a tie is active will not produce a slanted tie.
449 Formatting of ties is a difficult subject. The results are often not
459 @cindex @code{\times}
461 Tuplets are made out of a music expression by multiplying all durations
464 @cindex @code{\times}
466 \times @var{fraction} @var{musicexpr}
470 The duration of @var{musicexpr} will be multiplied by the fraction.
471 The fraction's denominator will be printed over the notes, optionally
472 with a bracket. The most common tuplet is the triplet in which 3
473 notes have the length of 2, so the notes are 2/3 of their written
476 @lilypond[fragment,verbatim,center]
477 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
480 The property @code{tupletSpannerDuration} specifies how long each
481 bracket should last. With this, you can make lots of tuplets while
482 typing @code{\times} only once, saving lots of typing. In the next
483 example, there are two triplets shown, while @code{\times} was only
486 @lilypond[fragment,relative,raggedright,verbatim]
487 \property Voice.tupletSpannerDuration = #(ly:make-moment 1 4)
488 \times 2/3 { c'8 c c c c c }
491 The format of the number is determined by the property
492 @code{tupletNumberFormatFunction}. The default prints only the
493 denominator, but if it is set to the Scheme function
494 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
498 @cindex @code{tupletNumberFormatFunction}
499 @cindex tuplet formatting
504 @cindex @code{\tupletUp}
506 @cindex @code{\tupletDown}
508 @cindex @code{\tupletBoth}
513 Internals: @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
515 Examples: @inputfileref{input/regression,tuplet-nest.ly}.
519 Nested tuplets are not formatted automatically. In this case, outer
520 tuplet brackets should be moved manually, which is demonstrated in
521 @inputfileref{input/regression,tuplet-nest.ly}.
525 @node Easier music entry
526 @section Easier music entry
529 When entering music it is easy to introduce errors. This section deals
530 with tricks and features of the input language that were added solely
531 to help entering music, and find and correct mistakes.
533 It is also possible to use external programs, for example GUI
534 interfaces, or MIDI transcription programs, to enter or edit
535 music. Refer to the website for more information. Finally, there are
536 tools make debugging easier, by linking the input file and the output
537 shown on screen. See @ref{Point and click} for more information.
544 * Skipping corrected music::
545 * Automatic note splitting::
551 @node Relative octaves
552 @subsection Relative octaves
554 @cindex relative octave specification
556 Octaves are specified by adding @code{'} and @code{,} to pitch names.
557 When you copy existing music, it is easy to accidentally put a pitch
558 in the wrong octave and hard to find such an error. The relative
559 octave mode prevents these errors: a single error puts the rest of the
560 piece off by one octave:
562 @cindex @code{\relative}
564 \relative @var{startpitch} @var{musicexpr}
567 The octave of notes that appear in @var{musicexpr} are calculated as
568 follows: If no octave changing marks are used, the basic interval
569 between this and the last note is always taken to be a fourth or less
570 (; this distance is determined without regarding alterations: a
571 @code{fisis} following a @code{ceses} will be put above the
574 The octave changing marks @code{'} and @code{,} can be added to raise
575 or lower the pitch by an extra octave. Upon entering relative mode,
576 an absolute starting pitch must be specified that will act as the
577 predecessor of the first note of @var{musicexpr}.
579 Here is the relative mode shown in action:
580 @lilypond[fragment,raggedright,verbatim,center]
586 Octave changing marks are used for intervals greater than a fourth:
587 @lilypond[fragment,verbatim,center]
592 If the preceding item is a chord, the first note of the chord is used
593 to determine the first note of the next chord:
595 @lilypond[fragment,verbatim,center]
602 @cindex @code{\notes}
604 The pitch after the @code{\relative} contains a note name. To parse
605 the pitch as a note name, you have to be in note mode, so there must
606 be a surrounding @code{\notes} keyword (which is not
609 The relative conversion will not affect @code{\transpose},
610 @code{\chords} or @code{\relative} sections in its argument. If you
611 want to use relative within transposed music, you must place an
612 additional @code{\relative} inside the @code{\transpose}.
615 @subsection Octave check
618 Octave checks make octave errors easier to correct: a note may be
619 followed by @code{=}@var{quotes} which indicates what its absolute
620 octave should be. In the following example,
622 \relative c'' @{ c='' b=' d,='' @}
626 @c take care with @code, adds confusing quotes.
627 the d will generate a warning, because a d'' is expected, but a d' is
628 found. In the output, the octave is corrected this and the following
633 There is also a syntax that is separate from the notes.
638 This checks that @var{pitch} (without octave) yields @var{pitch} (with
639 octave) in \relative mode. If not, a warning is printed, and the
640 octave is corrected, for example, the first check is passed
641 successfully. The second check fails with an error message. The
642 octave is adjusted so the following notes are in the correct octave
653 The octave of a note following an octave check is determined with
654 respect to the note preceding it. In the next fragment, the last note
655 is a @code{a'}, above central C. Hence, the @code{\octave} check may
656 be deleted without changing the meaning of the piece.
658 @lilypond[verbatim,fragment]
667 @subsection Bar check
671 @cindex @code{barCheckSynchronize}
674 Bar checks help detect errors in the durations. A bar check is
675 entered using the bar symbol, `@code{|}'. Whenever it is encountered
676 during interpretation, it should fall on a measure boundary. If it
677 does not, a warning is printed. Depending on the value of
678 @code{barCheckSynchronize}, the beginning of the measure will be
681 In the next example, the second bar check will signal an error:
683 \time 3/4 c2 e4 | g2 |
686 Bar checks can also be used in lyrics, for example
691 Twin -- kle | Twin -- kle
696 @cindex skipTypesetting
698 Failed bar checks are caused by entering incorrect
699 durations. Incorrect durations often completely garble up the score,
700 especially if it is polyphonic, so you should start correcting the
701 score by scanning for failed bar checks and incorrect durations. To
702 speed up this process, you can use @code{skipTypesetting}, described
705 @node Skipping corrected music
706 @subsection Skipping corrected music
708 The property @code{Score.skipTypesetting} can be used to switch on and
709 off typesetting completely during the interpretation phase. When
710 typesetting is switched off, the music is processed much more quickly.
711 This can be used to skip over the parts of a score that have already
712 been checked for errors:
714 @lilypond[fragment,raggedright,verbatim]
716 \property Score.skipTypesetting = ##t
718 \property Score.skipTypesetting = ##f
722 @node Automatic note splitting
723 @subsection Automatic note splitting
725 Long notes can be converted automatically to tied notes. This is done
726 by replacing the @internalsref{Note_heads_engraver} by the
727 @internalsref{Completion_heads_engraver}.
728 In the following examples, notes crossing the barline are split and tied.
731 @lilypond[noindent,verbatim]
733 \remove "Note_heads_engraver"
734 \consists "Completion_heads_engraver"
736 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
740 This engraver splits all running notes at the bar line, and inserts
741 ties. One of its uses is to debug complex scores: if the measures are
742 not entirely filled, then the ties exactly show how much each measure
747 Not all durations (especially those containing tuplets) can be
748 represented exactly; the engraver will not insert tuplets.
752 Examples: @inputfileref{input/regression,completion-heads.ly}
754 Internals: @internalsref{Completion_heads_engraver}
758 @section Staff notation
760 This section describes music notation that occurs on staff level,
761 such as keys, clefs and time signatures.
763 @cindex Staff notation
777 @subsection Staff symbol
779 @cindex adjusting staff symbol
780 @cindex StaffSymbol, using \property
782 Notes, dynamic signs, etc. are grouped
783 with a set of horizontal lines, into a staff (plural `staves'). In our
784 system, these lines are drawn using a separate layout object called
788 @cindex staff lines, setting number of
789 @cindex staff lines, setting thickness of
790 @cindex thickness of staff lines, setting
791 @cindex number of staff lines, setting
795 Internals: @internalsref{StaffSymbol},
797 Examples: @inputfileref{input/test,staff-lines.ly},
798 @inputfileref{input/test,staff-size.ly}
802 If a staff is ended halfway a piece, the staff symbol may not end
803 exactly on the barline.
807 @subsection Key signature
808 @cindex Key signature
812 The key signature indicates the scale in which a piece is played. It
813 is denoted by a set of alterations (flats or sharps) at the start of
818 Setting or changing the key signature is done with the @code{\key}
821 @code{\key} @var{pitch} @var{type}
824 @cindex @code{\minor}
825 @cindex @code{\major}
826 @cindex @code{\minor}
827 @cindex @code{\ionian}
828 @cindex @code{\locrian}
829 @cindex @code{\aeolian}
830 @cindex @code{\mixolydian}
831 @cindex @code{\lydian}
832 @cindex @code{\phrygian}
833 @cindex @code{\dorian}
835 Here, @var{type} should be @code{\major} or @code{\minor} to get
836 @var{pitch}-major or @var{pitch}-minor, respectively.
837 The standard mode names @code{\ionian},
838 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
839 @code{\phrygian}, and @code{\dorian} are also defined.
841 This command sets the context property
842 @internalsref{Staff}.@code{keySignature}. Non-standard key signatures
843 can be specified by setting this property directly.
845 Accidentals and key signatures often confuse new users, because
846 unaltered notes get natural signs depending on the keysignature. The
847 tutorial explains why this is so in @ref{More about pitches}.
851 The ordering of a key cancellation is wrong when it is combined with
852 repeat bar lines. The cancellation is also printed after a line break.
856 Internals: @internalsref{KeyChangeEvent}, and @internalsref{KeySignature}.
858 @cindex @code{keySignature}
865 The clef indicates which lines of the staff correspond to which
870 The clef can be set or changed with the @code{\clef} command:
871 @lilypond[fragment,verbatim]
872 \key f\major c''2 \clef alto g'2
875 Supported clef-names include:
876 @c Moved standard clefs to the top /MB
880 @item treble, violin, G, G2
893 G clef on 1st line, so-called French violin clef
898 @cindex mezzosoprano clef
901 @cindex baritone clef
904 @cindex varbaritone clef
913 By adding @code{_8} or @code{^8} to the clef name, the clef is
914 transposed one octave down or up, respectively, and @code{_15} and
915 @code{^15} transposes by two octaves. The argument @var{clefname}
916 must be enclosed in quotes when it contains underscores or digits. For
920 @cindex choral tenor clef
921 @lilypond[verbatim,fragment,relative]
925 This command is equivalent to setting @code{clefGlyph},
926 @code{clefPosition} (which controls the Y position of the clef),
927 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
928 when any of these properties are changed.
932 Internals: the object for this symbol is @internalsref{Clef}.
936 @node Ottava brackets
937 @subsection Ottava brackets
939 ``Ottava'' brackets introduce an extra transposition of an octave for
940 the staff. They are created by invoking the function
941 @code{set-octavation}:
947 @lilypond[verbatim,fragment]
956 The @code{set-octavation} function also takes -1 (for 8va bassa) and 2
957 (for 15ma) as arguments. Internally the function sets the properties
958 @code{ottavation} (eg. to @code{"8va"}) and
959 @code{centralCPosition}. For overriding the text of the bracket, set
960 @code{ottavation} after invoking @code{set-octavation}, i.e.,
964 \property Staff.ottavation = #"8"
969 Internals: @internalsref{OttavaBracket}.
971 Examples: @inputfileref{input/regression,ottava.ly},
972 @inputfileref{input/regression,ottava-broken.ly}.
976 @code{set-octavation} will get confused when clef changes happen
977 during an octavation bracket.
980 @subsection Time signature
981 @cindex Time signature
985 Time signature indicates the metrum of a piece: a regular pattern of
986 strong and weak beats. It is denoted by a fraction at the start of the
991 The time signature is set or changed by the @code{\time}
993 @lilypond[fragment,verbatim]
994 \time 2/4 c'2 \time 3/4 c'2.
997 The symbol that is printed can be customized with the @code{style}
998 property. Setting it to @code{#'()} uses fraction style for 4/4 and
999 2/2 time. There are many more options for its layout. See
1000 @inputfileref{input/test,time.ly} for more examples.
1003 This command sets the property @code{timeSignatureFraction},
1004 @code{beatLength} and @code{measureLength} in the @code{Timing}
1005 context, which is normally aliased to @internalsref{Score}. The
1006 property @code{measureLength} determines where bar lines should be
1007 inserted, and how automatic beams should be generated. Changing the
1008 value of @code{timeSignatureFraction} also causes the symbol to be
1011 More options are available through the Scheme function
1012 @code{set-time-signature}. In combination with the
1013 @internalsref{Measure_grouping_engraver}, it will create
1014 @internalsref{MeasureGrouping} signs. Such signs ease reading
1015 rhythmically complex modern music. In the following example, the 9/8
1016 measure is subdivided in 2, 2, 2 and 3. This is passed to
1017 @code{set-time-signature} as the third argument @code{(2 2 2 3)}:
1020 \score { \notes \relative c'' {
1021 #(set-time-signature 9 8 '(2 2 2 3))
1022 g8[ g] d[ d] g[ g] a8[( bes g]) |
1023 #(set-time-signature 5 8 '(3 2))
1028 \translator { \StaffContext
1029 \consists "Measure_grouping_engraver"
1035 Internals: @internalsref{TimeSignature}, and @internalsref{Timing_engraver}.
1040 Automatic beaming does not use measure grouping specified with
1041 @code{set-time-signature}.
1043 @node Partial measures
1044 @subsection Partial measures
1047 @cindex partial measure
1048 @cindex measure, partial
1049 @cindex shorten measures
1050 @cindex @code{\partial}
1052 Partial measures, for example in upsteps, are entered using the
1053 @code{\partial} command:
1054 @lilypond[fragment,verbatim,relative=1]
1055 \partial 16*5 c16 cis d dis e | a2. c,4 | b2
1058 The syntax for this command is
1060 \partial @var{duration}
1062 This is internally translated into
1064 \property Timing.measurePosition = -@var{length of duration}
1067 The property @code{measurePosition} contains a rational number
1068 indicating how much of the measure has passed at this point.
1070 @node Unmetered music
1071 @subsection Unmetered music
1073 Bar lines and bar numbers are calculated automatically. For unmetered
1074 music (e.g. cadenzas), this is not desirable. By setting
1075 @code{Score.timing} to false, this automatic timing can be switched
1081 @cindex @code{\cadenzaOn}
1083 @cindex @code{\cadenzaOff}
1087 @subsection Bar lines
1091 @cindex measure lines
1095 Bar lines delimit measures, but are also used to indicate repeats.
1096 Normally, they are inserted automatically. Line breaks may only
1102 of barlines can be forced with the @code{\bar} command:
1104 @lilypond[relative=1,fragment,verbatim]
1108 The following bar types are available:
1109 @lilypond[fragment,relative,raggedright,verbatim]
1122 For allowing linebreaks, there is a special command,
1126 This will insert an invisible barline, and allow linebreaks at this
1129 In scores with many staves, a @code{\bar} command in one staff is
1130 automatically applied to all staves. The resulting bar lines are
1131 connected between different staves of a @internalsref{StaffGroup}:
1133 @lilypond[fragment,verbatim]
1134 << \context StaffGroup <<
1138 \new Staff { \clef bass c4 g e g } >>
1139 \new Staff { \clef bass c2 c2 } >>
1143 The command @code{\bar @var{bartype}} is a short cut for doing
1144 @code{\property Score.whichBar = @var{bartype}} Whenever
1145 @code{whichBar} is set to a string, a bar line of that type is
1146 created. At the start of a measure it is set to
1147 @code{defaultBarType}. The contents of @code{repeatCommands} are used
1148 to override default measure bars.
1150 Property @code{whichBar} can also be set directly, using @code{\property}
1151 or @code{\bar}. These settings take precedence over the automatic
1152 @code{whichBar} settings.
1155 @cindex repeatCommands
1156 @cindex defaultBarType
1158 You are encouraged to use @code{\repeat} for repetitions. See
1165 In this manual: @ref{Repeats}.
1168 Internals: the bar line objects that are created at
1169 @internalsref{Staff} level are called @internalsref{BarLine}, the bar
1170 lines that span staves are @internalsref{SpanBar}s.
1172 @cindex bar lines at start of system
1173 @cindex start of system
1175 The barlines at the start of each system are
1176 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
1177 @internalsref{SystemStartBracket}. Only one of these types is created
1178 in every context, and that type is determined by the property
1179 @code{systemStartDelimiter}.
1181 Examples: @inputfileref{input/test,bar-lines.ly},
1187 The easiest way to enter fragments with more than one voice on a staff
1188 is to split chords using the separator @code{\\}. You can use it for
1189 small, short-lived voices or for single chords:
1191 @lilypond[verbatim,fragment]
1192 \context Staff \relative c'' {
1193 c4 << { f d e } \\ { b c2 } >>
1194 c4 << g' \\ b, \\ f' \\ d >>
1198 The separator causes @internalsref{Voice} contexts@footnote{Polyphonic
1199 voices are sometimes called "layers" other notation packages}
1201 to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
1202 each of these contexts, vertical direction of slurs, stems, etc. is set
1205 @cindex @code{\voiceOne}
1206 @cindex @code{\voiceFour}
1208 This can also be done by instantiating @internalsref{Voice} contexts
1209 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1210 a stem directions and horizontal shift for each part:
1213 @lilypond[raggedright,verbatim]
1215 \context Staff << \new Voice { \voiceOne cis2 b }
1216 \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
1217 \new Voice { \voiceTwo fis4~ fis4 f ~ f } >>
1221 The command @code{\oneVoice} will revert back to the normal setting.
1222 @cindex @code{\oneVoice}
1225 Normally, note heads with a different number of dots are not merged, but
1226 when the object property @code{merge-differently-dotted} is set in
1227 the @internalsref{NoteCollision} object, they are merged:
1228 @lilypond[verbatim,fragment,raggedright]
1229 \relative c'' \context Voice << {
1231 \property Staff.NoteCollision \override
1232 #'merge-differently-dotted = ##t
1234 } \\ { g8.[ f16] g8.[ f16] }
1238 Similarly, you can merge half note heads with eighth notes, by setting
1239 @code{merge-differently-headed}:
1240 @lilypond[fragment,relative=2,verbatim]
1243 \property Staff.NoteCollision
1244 \override #'merge-differently-headed = ##t
1245 c8 c4. } \\ { c2 c2 } >>
1248 LilyPond also vertically shifts rests that are opposite of a stem:
1251 @lilypond[raggedright,fragment,verbatim]
1252 \context Voice << c''4 \\ r4 >>
1260 @cindex @code{\oneVoice}
1262 @cindex @code{\voiceOne}
1264 @cindex @code{\voiceTwo}
1266 @cindex @code{\voiceThree}
1268 @cindex @code{\voiceFour}
1272 The following commands specify in what chords of the current voice
1273 should be shifted: the outer voice has @code{\shiftOff}, and the inner
1274 voices have @code{\shiftOn}, @code{\shiftOnn}, etc.
1277 @cindex @code{\shiftOn}
1279 @cindex @code{\shiftOnn}
1281 @cindex @code{\shiftOnnn}
1283 @cindex @code{\shiftOff}
1290 Internals: the objects responsible for resolving collisions are
1291 @internalsref{NoteCollision} and @internalsref{RestCollision}.
1293 Examples: See also example files
1294 @inputfileref{input/regression,collision-dots.ly},
1295 @inputfileref{input/regression,collision-head-chords.ly},
1296 @inputfileref{input/regression,collision-heads.ly},
1297 @inputfileref{input/regression,collision-mesh.ly}, and
1298 @inputfileref{input/regression,collisions.ly}.
1303 Resolving collisions is a intricate subject, and only a few situations
1304 are handled. When LilyPond cannot cope, the @code{force-hshift}
1305 property of the @internalsref{NoteColumn} object and pitched rests can
1306 be used to override typesetting decisions.
1308 When using @code{merge-differently-headed} with an upstem 8th or a shorter
1309 note, and a downstem half note, the 8th note gets the wrong offset.
1311 There is no support for clusters where the same note occurs with
1312 different accidentals in the same chord. In this case, it is
1313 recommended to use enharmonic transcription, or to use special cluster
1314 notation (see @ref{Clusters}).
1319 Beams are used to group short notes into chunks that are aligned with
1320 the metrum. They are inserted automatically in most cases:
1322 @lilypond[fragment,verbatim,relative=2]
1323 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1326 When these automatic decisions are not good enough, beaming can be
1327 entered explicitly. It is also possible to define beaming patterns
1328 that differ from the defaults.
1332 Internals: @internalsref{Beam}.
1335 @cindex Automatic beams
1338 * Setting automatic beam behavior::
1342 @subsection Manual beams
1343 @cindex beams, manual
1347 In some cases it may be necessary to override the automatic beaming
1348 algorithm. For example, the auto beamer will not put beams over rests
1349 or bar lines. Such beams are specified by manually: the begin and end
1350 point are marked with @code{[} and @code{]}:
1352 @lilypond[fragment,relative,verbatim]
1354 r4 r8[ g' a r8] r8 g[ | a] r8
1358 @cindex @code{stemLeftBeamCount}
1360 Normally, beaming patterns within a beam are determined automatically.
1361 When this mechanism fouls up, the properties
1362 @code{Voice.stemLeftBeamCount} and @code{Voice.stemRightBeamCount} can
1363 be used to control the beam subdivision on a stem. If either property
1364 is set, its value will be used only once, and then it is erased.
1366 @lilypond[fragment,relative,verbatim]
1369 f8[ r16 \property Voice.stemLeftBeamCount = #1 f g a]
1372 @cindex @code{stemRightBeamCount}
1375 The property @code{subdivideBeams} can be set in order to subdivide
1376 all 16th or shorter beams at beat positions, as defined by the
1377 @code{beatLength} property . This accomplishes the same effect as
1378 twiddling with @code{stemLeftBeamCount} and @code{stemRightBeamCount},
1379 but it take less typing:
1382 @lilypond[relative=1,verbatim,noindent]
1384 \property Voice.subdivideBeams = ##t
1386 \property Score.beatLength = #(ly:make-moment 1 8)
1389 @cindex subdivideBeams
1391 Kneed beams are inserted automatically, when a large gap is detected
1392 between the note heads. This behavior can be tuned through the object
1393 property @code{auto-knee-gap}.
1395 Normally, line breaks are forbidden when beams cross bar lines. This
1396 behavior can be changed by setting @code{allowBeamBreak}.
1398 @cindex @code{allowBeamBreak}
1399 @cindex beams and line breaks
1401 @cindex beams, kneed
1403 @cindex auto-knee-gap
1409 @cindex Frenched staves
1411 Automatically kneed beams cannot be used together with hidden staves.
1416 @node Setting automatic beam behavior
1417 @subsection Setting automatic beam behavior
1419 @cindex @code{autoBeamSettings}
1420 @cindex @code{(end * * * *)}
1421 @cindex @code{(begin * * * *)}
1422 @cindex automatic beams, tuning
1423 @cindex tuning automatic beaming
1425 @c [TODO: use \applycontext]
1427 In normal time signatures, automatic beams can start on any note but can
1428 only end in a few positions within the measure: beams can end on a beat,
1429 or at durations specified by the properties in
1430 @code{Voice.autoBeamSettings}. The defaults for @code{autoBeamSettings}
1431 are defined in @file{scm/auto-beam.scm}.
1433 The value of @code{autoBeamSettings} is changed using
1434 @code{\override} and restored with @code{\revert}:
1436 \property Voice.autoBeamSettings \override #'(@var{BE} @var{P} @var{Q} @var{N} @var{M}) = @var{dur}
1437 \property Voice.autoBeamSettings \revert #'(@var{BE} @var{P} @var{Q} @var{N} @var{M})
1439 Here, @var{BE} is the symbol @code{begin} or @code{end}. It determines
1440 whether the rule applies to begin or end-points. The quantity
1441 @var{P}/@var{Q} refers to the length of the beamed notes (and `@code{*
1442 *}' designates notes of any length), @var{N}/@var{M} refers to a time
1443 signature (wildcards `@code{* *}' may be entered to designate all time
1446 For example, if automatic beams should end on every quarter note, use
1449 \property Voice.autoBeamSettings \override
1450 #'(end * * * *) = #(ly:make-moment 1 4)
1452 Since the duration of a quarter note is 1/4 of a whole note, it is
1453 entered as @code{(ly:make-moment 1 4)}.
1455 The same syntax can be used to specify beam starting points. In this
1456 example, automatic beams can only end on a dotted quarter note:
1458 \property Voice.autoBeamSettings \override
1459 #'(end * * * *) = #(ly:make-moment 3 8)
1461 In 4/4 time signature, this means that automatic beams could end only on
1462 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1463 3/8, has passed within the measure).
1465 Rules can also be restricted to specific time signatures. A rule that
1466 should only be applied in @var{N}/@var{M} time signature is formed by
1467 replacing the second asterisks by @var{N} and @var{M}. For example, a
1468 rule for 6/8 time exclusively looks like
1470 \property Voice.autoBeamSettings \override
1471 #'(begin * * 6 8) = ...
1474 If a rule should be to applied only to certain types of beams, use the
1475 first pair of asterisks. Beams are classified according to the
1476 shortest note they contain. For a beam ending rule that only applies
1477 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1480 If a score ends while an automatic beam has not been ended and is still
1481 accepting notes, this last beam will not be typeset at all.
1483 @cindex automatic beam generation
1485 @cindex @code{Voice.autoBeaming}
1488 For melodies that have lyrics, you may want to switch off
1489 automatic beaming. This is done by setting @code{Voice.autoBeaming} to
1494 @cindex @code{\autoBeamOff}
1495 @code{\autoBeamOff},
1496 @cindex @code{\autoBeamOn}
1502 The rules for ending a beam depend on the shortest note in a beam.
1503 So, while it is possible to have different ending rules for eight
1504 beams and sixteenth beams, a beam that contains both eight and
1505 sixteenth notes will use the rules for the sixteenth beam.
1507 In the example below, the autobeamer makes eight beams and sixteenth
1508 end at 3 eights; the third beam can only be corrected by specifying
1511 @lilypond[raggedright,fragment,relative,noverbatim,quote]
1512 \property Voice.autoBeamSettings
1513 \override #'(end * * * *) = #(ly:make-moment 3 8)
1514 % rather show case where it goes wrong
1515 %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
1516 \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
1518 It is not possible to specify beaming parameters that act differently in
1519 different parts of a measure. This means that it is not possible to use
1520 automatic beaming in irregular meters such as @code{5/8}.
1523 @section Accidentals
1526 This section describes how to change the way that accidentals are
1527 inserted automatically before the running notes.
1531 * Using the predefined accidental variables::
1532 * Customized accidental rules::
1535 @node Using the predefined accidental variables
1536 @subsection Using the predefined accidental variables
1538 The constructs for describing the accidental typesetting rules are
1539 quite hairy, so non-experts should stick to the variables
1540 defined in @file{ly/property-init.ly}.
1541 @cindex @file{property-init.ly}
1543 The variables set properties in the ``@code{Current}'' context (see
1544 @ref{Context properties}). This means that the variables should
1545 normally be added right after the creation of the context in which the
1546 accidental typesetting described by the variable is to take
1547 effect. For example, if you want to use piano-accidentals in a piano
1548 staff then issue @code{\pianoAccidentals} first thing after the
1549 creation of the piano staff:
1552 \notes \relative c'' <<
1553 \new Staff @{ cis4 d e2 @}
1554 \context GrandStaff <<
1556 \new Staff @{ cis4 d e2 @}
1557 \new Staff @{ es2 c @}
1559 \new Staff @{ es2 c @}
1563 @lilypond[raggedright]
1565 \notes \relative c'' <<
1566 \new Staff { cis4 d e2 }
1567 \context GrandStaff <<
1569 \new Staff { cis4 d e2 }
1570 \new Staff { es2 c }
1572 \new Staff { es2 c }
1577 minimumVerticalExtent = #'(-4.0 . 4.0)
1585 @item \defaultAccidentals
1586 @cindex @code{\defaultAccidentals}
1587 This is the default typesetting behaviour. It should correspond
1588 to 18th century common practice: Accidentals are
1589 remembered to the end of the measure in which they occur and
1590 only on their own octave.
1592 @item \voiceAccidentals
1593 @cindex @code{\voiceAccidentals}
1595 The normal behaviour is to
1596 remember the accidentals on Staff-level. This variable, however,
1597 typesets accidentals individually for each voice. Apart from that the
1598 rule is similar to @code{\defaultAccidentals}.
1600 This leads to some weird and often unwanted results
1601 because accidentals from one voice do not get cancelled in other
1603 @lilypond[raggedright,relative,fragment,verbatim,quote]
1611 Hence you should only use @code{\voiceAccidentals} if the voices
1612 are to be read solely by individual musicians. If the staff is to be
1613 used by one musician (e.g. a conductor) then you use
1614 @code{\modernVoiceAccidentals} or @code{\modernVoiceCautionaries}
1617 @item \modernAccidentals
1618 @cindex @code{\modernAccidentals}
1619 This rule corresponds to the common practice in the 20th
1621 The rule is more complex than @code{\defaultAccidentals}.
1622 You get all the same accidentals, but temporary
1623 accidentals also get cancelled in other octaves. Furthermore,
1624 in the same octave, they also get cancelled in the following measure:
1625 @lilypond[raggedright,fragment,verbatim]
1627 cis' c'' cis'2 | c'' c'
1630 @item \modernCautionaries
1631 @cindex @code{\modernCautionaries}
1632 This rule is similar to @code{\modernAccidentals}, but the
1633 ``extra'' accidentals (the ones not typeset by
1634 @code{\defaultAccidentals}) are typeset as cautionary accidentals.
1635 They are printed in reduced size or with parentheses:
1636 @lilypond[raggedright,fragment,verbatim]
1638 cis' c'' cis'2 | c'' c'
1641 @cindex @code{\modernVoiceAccidentals}
1642 @item \modernVoiceAccidentals
1643 is used for multivoice accidentals to be read both by musicians
1644 playing one voice and musicians playing all voices. Accidentals are
1645 typeset for each voice, but they @emph{are} cancelled across voices in
1646 the same @internalsref{Staff}.
1648 @cindex @code{\modernVoiceCautionaries}
1649 @item \modernVoiceCautionaries
1650 is the same as @code{\modernVoiceAccidentals}, but with the extra
1651 accidentals (the ones not typeset by @code{\voiceAccidentals}) typeset
1652 as cautionaries. Even though all accidentals typeset by
1653 @code{\defaultAccidentals} @emph{are} typeset by this variable then
1654 some of them are typeset as cautionaries.
1656 @item \pianoAccidentals
1657 @cindex @code{\pianoAccidentals}
1658 20th century practice for piano notation. Very similar to
1659 @code{\modernAccidentals} but accidentals also get cancelled
1660 across the staves in the same @internalsref{GrandStaff} or
1661 @internalsref{PianoStaff}.
1663 @item \pianoCautionaries
1664 @cindex @code{\pianoCautionaries}
1665 As @code{\pianoAccidentals} but with the extra accidentals
1666 typeset as cautionaries.
1669 @cindex @code{\noResetKey}
1670 Same as @code{\defaultAccidentals} but with accidentals lasting
1671 ``forever'' and not only until the next measure:
1672 @lilypond[raggedright,fragment,verbatim,relative]
1677 @item \forgetAccidentals
1678 @cindex @code{\forgetAccidentals}
1679 This is sort of the opposite of @code{\noResetKey}: Accidentals
1680 are not remembered at all---and hence all accidentals are
1681 typeset relative to the key signature, regardless of what was
1682 before in the music:
1683 @lilypond[raggedright,fragment,verbatim,relative]
1685 \key d\major c4 c cis cis d d dis dis
1689 @node Customized accidental rules
1690 @subsection Customized accidental rules
1692 For determining when to print an accidental, several different rules
1693 are tried. The rule that gives the highest number of accidentals is
1694 used. Each rule consists of
1697 In which context is the rule applied. For example, if
1698 @var{context} is @internalsref{Score} then all staves share
1699 accidentals, and if @var{context} is @internalsref{Staff} then all
1700 voices in the same staff share accidentals, but staves do not.
1703 Whether the accidental changes all octaves or only the current
1704 octave. Valid choices are
1708 This is the default algorithm. Accidentals are typeset if the note changes
1709 the accidental of that note in that octave. Accidentals lasts to the end of the measure
1710 and then as many measures as specified in the value. I.e. 1 means to the end
1711 of next measure, -1 means to the end of previous measure (that is: no duration at all), etc. #t means forever.
1713 Accidentals are typeset if the note is different from
1714 the previous note on the same pitch in any octave. The value has same meaning as in
1720 Over how many barlines the accidental lasts.
1721 If @var{lazyness} is @code{-1} then the accidental is forget
1722 immediately, and if @var{lazyness} is @code{#t} then the accidental
1729 @cindex @code{\defaultAccidentals}
1730 @code{\defaultAccidentals},
1731 @cindex @code{\voiceAccidentals}
1732 @code{\voiceAccidentals},
1733 @cindex @code{\modernAccidentals}
1734 @code{\modernAccidentals},
1735 @cindex @code{\modernCautionaries}
1736 @code{\modernCautionaries},
1737 @cindex @code{\modernVoiceAccidentals}
1738 @code{\modernVoiceAccidentals},
1739 @cindex @code{\modernVoiceCautionaries}
1740 @code{\modernVoiceCautionaries},
1741 @cindex @code{\pianoAccidentals}
1742 @code{\pianoAccidentals},
1743 @cindex @code{\pianoCautionaries}
1744 @code{\pianoCautionaries},
1745 @cindex @code{\noResetKey}
1747 @cindex @code{\forgetAccidentals}
1748 @code{\forgetAccidentals}.
1752 Internals: @internalsref{Accidental_engraver},
1753 @internalsref{Accidental}, and @internalsref{AccidentalPlacement}.
1758 Currently the simultaneous notes are considered to be entered in
1759 sequential mode. This means that in a chord the accidentals are
1760 typeset as if the notes in the chord happened once at a time - in the
1761 order in which they appear in the input file.
1763 This is only a problem when there are simultaneous notes whose
1764 accidentals depend on each other. The problem only occurs when using
1765 non-default accidentals. In the default scheme, accidentals only
1766 depend on other accidentals with the same pitch on the same staff, so
1767 no conflicts possible.
1769 This example shows two examples of the same music giving different
1770 accidentals depending on the order in which the notes occur in the
1773 @lilypond[raggedright,fragment,verbatim]
1774 \property Staff.autoAccidentals = #'( Staff (any-octave . 0) )
1775 cis'4 <c'' c'> r2 | cis'4 <c' c''> r2
1776 | <cis' c''> r | <c'' cis'> r |
1779 This problem can be solved by manually inserting @code{!} and @code{?}
1780 for the problematic notes.
1782 @node Expressive marks
1783 @section Expressive marks
1786 @c todo: should change ordering
1787 @c where to put text spanners, metronome marks,
1796 * Analysis brackets::
1798 * Fingering instructions::
1809 A slur indicates that notes are to be played bound or @emph{legato}.
1813 They are entered using parentheses:
1814 @lilypond[relative=1,fragment,verbatim,center]
1815 f( g)( a) a8 b( a4 g2 f4)
1820 @c TODO: should explain that ^( and _( set directions
1821 @c should set attachments with ^ and _ ?
1823 Slurs avoid crossing stems, and are generally attached to note heads.
1824 However, in some situations with beams, slurs may be attached to stem
1825 ends. If you want to override this layout you can do this through the
1826 object property @code{attachment} of @internalsref{Slur} in
1827 @internalsref{Voice} context. Its value is a pair of symbols, specifying
1828 the attachment type of the left and right end points:
1830 @lilypond[fragment,relative,verbatim]
1832 \property Voice.Stem \set #'length = #5.5
1834 \property Voice.Slur \set #'attachment = #'(stem . stem)
1838 If a slur would strike through a stem or beam, the slur will be moved
1839 away upward or downward. If this happens, attaching the slur to the
1840 stems might look better:
1842 @lilypond[fragment,relative,verbatim]
1845 \property Voice.Slur \set #'attachment = #'(stem . stem)
1852 @cindex @code{\slurUp}
1854 @cindex @code{\slurDown}
1856 @cindex @code{\slurBoth}
1858 @cindex @code{\slurDotted}
1860 @cindex @code{\slurSolid}
1865 Internals: @seeinternals{Slur}, and @internalsref{SlurEvent}.
1870 Producing nice slurs is a difficult problem, and LilyPond currently
1871 uses a simple, empiric method to produce slurs. In some cases, its
1875 @cindex Adjusting slurs
1877 @node Phrasing slurs
1878 @subsection Phrasing slurs
1880 @cindex phrasing slurs
1881 @cindex phrasing marks
1883 A phrasing slur (or phrasing mark) connects chords and is used to
1884 indicate a musical sentence. It is started using @code{\(} and @code{\)}
1887 @lilypond[fragment,verbatim,center,relative]
1888 \time 6/4 c'\( d( e) f( e) d\)
1891 Typographically, the phrasing slur behaves almost exactly like a
1892 normal slur. However, they are treated as different objects. A
1893 @code{\slurUp} will have no effect on a phrasing slur; instead, you
1894 should use @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
1895 @code{\phrasingSlurBoth}.
1897 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth}
1898 will only affect normal slurs and not phrasing slurs.
1902 @cindex @code{\phrasingSlurUp}
1903 @code{\phrasingSlurUp},
1904 @cindex @code{\phrasingSlurDown}
1905 @code{\phrasingSlurDown},
1906 @cindex @code{\phrasingSlurBoth}
1907 @code{\phrasingSlurBoth},
1911 Internals: see also @internalsref{PhrasingSlur}, and
1912 @internalsref{PhrasingSlurEvent}.
1916 Phrasing slurs have the same limitations in their formatting as normal
1917 slurs. Putting phrasing slurs over rests leads to spurious warnings.
1920 @subsection Breath marks
1922 Breath marks are entered using @code{\breathe}:
1925 @lilypond[fragment,relative,verbatim]
1929 The glyph of the breath mark can be tweaked by overriding the
1930 @code{text} property of the @code{BreathingSign} layout object with
1931 any markup text. For example,
1932 @lilypond[fragment,verbatim,relative]
1934 \property Voice.BreathingSign \override #'text
1935 = #(make-musicglyph-markup "scripts-rvarcomma")
1942 Internals: @internalsref{BreathingSign},
1943 @internalsref{BreathingSignEvent}
1945 Examples: @inputfileref{input/regression,breathing-sign.ly}.
1948 @node Metronome marks
1949 @subsection Metronome marks
1952 @cindex beats per minute
1953 @cindex metronome marking
1955 Metronome settings can be entered as follows:
1957 \tempo @var{duration} = @var{perminute}
1960 In the MIDI output, they are interpreted as a tempo change, and in the
1961 paper output, a metronome marking is printed:
1962 @cindex @code{\tempo}
1963 @lilypond[fragment,verbatim]
1969 Internals: @internalsref{MetronomeChangeEvent}.
1974 @subsection Text spanners
1975 @cindex Text spanners
1977 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
1978 are written as texts, and extended over many measures with dotted
1979 lines. You can create such texts using text spanners: attach
1980 @code{\startTextSpan} and @code{\stopTextSpan} to the
1981 start and ending note of the spanner.
1983 The string to be printed, as well as the style, is set through object
1986 @lilypond[fragment,relative,verbatim]
1988 \property Voice.TextSpanner \set #'direction = #-1
1989 \property Voice.TextSpanner \set #'edge-text = #'("rall " . "")
1990 c2\startTextSpan b c\stopTextSpan a }
1996 Internals @internalsref{TextSpanEvent},
1997 @internalsref{TextSpanner}.
1999 Examples: @inputfileref{input/regression,text-spanner.ly}.
2002 @node Analysis brackets
2003 @subsection Analysis brackets
2005 @cindex phrasing brackets
2006 @cindex musicological analysis
2007 @cindex note grouping bracket
2009 Brackets are used in musical analysis to indicate structure in musical
2010 pieces. LilyPond supports a simple form of nested horizontal brackets.
2011 To use this, add the @internalsref{Horizontal_bracket_engraver} to
2012 @internalsref{Staff} context. A bracket is started with
2013 @code{\startGroup} and closed with @code{\stopGroup}:
2015 @lilypond[raggedright,verbatim]
2016 \score { \notes \relative c'' {
2017 c4\startGroup\startGroup
2020 c4\stopGroup\stopGroup
2022 \paper { \translator {
2023 \StaffContext \consists "Horizontal_bracket_engraver"
2029 Internals: @internalsref{HorizontalBracket},
2030 @internalsref{NoteGroupingEvent}
2032 Examples: @inputfileref{input/regression,note-group-bracket.ly}.
2036 @subsection Articulations
2037 @cindex Articulations
2039 @cindex articulations
2043 A variety of symbols can appear above and below notes to indicate
2044 different characteristics of the performance. They are added to a note
2045 by adding a dash and the character signifying the
2046 articulation. They are demonstrated here:
2048 @lilypondfile[]{script-abbreviations.ly}
2050 The meanings of these shorthands can be changed: see
2051 @file{ly/script-init.ly} for examples.
2054 The script is automatically placed, but if you need to force
2055 directions, you can use @code{_} to force them down, or @code{^} to
2057 @lilypond[fragment,verbatim]
2061 Other symbols can be added using the syntax
2062 @var{note}@code{\}@var{name}, e.g. @code{c4\fermata}. Again, they
2063 can be forced up or down using @code{^} and @code{_},
2066 @lilypond[verbatim,fragment,relative=2]
2067 c\fermata c^\fermata c_\fermata
2074 @cindex staccatissimo
2083 @cindex organ pedal marks
2092 @cindex prallmordent
2096 @cindex thumb marking
2101 @lilypondfile[]{script-chart.ly}
2106 @cindex @code{\scriptUp}
2108 @cindex @code{\scriptDown}
2110 @cindex @code{\scriptBoth}
2115 Internals: @internalsref{ScriptEvent}, and @internalsref{Script}.
2119 These note ornaments appear in the printed output but have no
2120 effect on the MIDI rendering of the music.
2123 @node Fingering instructions
2124 @subsection Fingering instructions
2128 Fingering instructions can be entered using
2130 @var{note}-@var{digit}
2132 For finger changes, use markup texts:
2134 @lilypond[verbatim,raggedright,fragment]
2135 c'4-1 c'4-2 c'4-3 c'4-4
2136 c'^\markup { \fontsize #-3 \number "2-3" }
2139 @cindex finger change
2144 You can use the thumb-script to indicate that a note should be
2145 played with the thumb (e.g. in cello music):
2147 @lilypond[verbatim,raggedright,fragment]
2148 <a' a''-3>8(_\thumb <b' b''-3>)_\thumb
2149 <c'' c'''-3>(_\thumb <d'' d'''-3>)_\thumb
2152 Fingerings for chords can also be added to individual notes
2153 of the chord by adding them after the pitches:
2154 @lilypond[verbatim,raggedright,fragment,relative=1]
2155 < c-1 e-2 g-3 b-5 > 4
2159 In this case, setting @code{fingeringOrientations} will put fingerings next
2162 @lilypond[verbatim,raggedright,fragment,relative=1]
2163 \property Voice.fingeringOrientations = #'(left down)
2164 <c-1 es-2 g-4 bes-5 > 4
2165 \property Voice.fingeringOrientations = #'(up right down)
2166 <c-1 es-2 g-4 bes-5 > 4
2169 By using single note chords, fingering instructions can be put close
2170 to note heads in monophonic music.
2174 Internals: @internalsref{FingerEvent}, and @internalsref{Fingering}.
2176 Examples: @inputfileref{input/regression,finger-chords.ly}
2179 @subsection Text scripts
2180 @cindex Text scripts
2182 @cindex text items, non-empty
2183 @cindex non-empty texts
2185 It is possible to place arbitrary strings of text or markup text (see
2186 @ref{Text markup}) above or below notes by using a string:
2187 @code{c^"text"}. By default, these indications do not influence the
2188 note spacing, but by using the command @code{\fatText}, the widths
2189 will be taken into account:
2191 @lilypond[fragment,raggedright,verbatim] \relative c' {
2192 c4^"longtext" \fatText c4_"longlongtext" c4 }
2195 It is possible to use @TeX{} commands in the strings, but this should
2196 be avoided because the exact dimensions of the string can then no
2201 @refcommand{fatText}, @refcommand{emptyText}.
2206 In this manual: @ref{Text markup}.
2208 Internals: @internalsref{TextScriptEvent}, @internalsref{TextScript}
2214 @subsection Grace notes
2217 @c should have blurb about accaciatura / appogiatura
2219 @cindex @code{\grace}
2223 Grace notes are ornaments that are written out. The most common ones
2224 are acciaccatura, which should be played as very short. It is denoted
2225 by a slurred small note with a slashed stem. The appoggiatura is a
2226 grace note that takes a fixed fraction of the main note, is and
2227 denoted as a slurred note in small print without a slash.
2228 They are entered with the commands @code{\acciaccatura} and
2229 @code{\appoggiatura}, as demonstrated in the following example:
2232 @cindex appoggiatura
2233 @cindex acciaccatura
2235 @lilypond[relative=2,verbatim,fragment]
2236 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
2237 \acciaccatura { g16[ f] } e4
2240 Both are special forms of the @code{\grace} command. By prefixing this
2241 keyword to a music expression, a new one is formed, which will be
2242 printed in a smaller font and takes up no logical time in a measure.
2243 @lilypond[relative=2,verbatim,fragment]
2245 \grace { c16[ d16] } c2 c4
2249 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
2250 @code{\grace} command does not start a slur.
2252 Internally, timing for grace notes is done using a second, `grace'
2253 time. Every point in time consists of two rational numbers: one
2254 denotes the logical time, one denotes the grace timing. The above
2255 example is shown here with timing tuples:
2257 @lilypond[raggedright]
2260 c4 \grace c16 c4 \grace {
2263 \new Lyrics \lyrics {
2266 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
2267 \markup { (\fraction 1 4 , 0 ) } 4
2269 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2270 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2272 \markup { ( \fraction 2 4 , 0 ) }
2277 The placement of grace notes is synchronized between different staves.
2278 In the following example, there are two sixteenth graces notes for
2279 every eighth grace note:
2281 @lilypond[relative=2,verbatim,fragment]
2282 << \new Staff { e4 \grace { c16[ d e f] } e4 }
2283 \new Staff { c'4 \grace { g8[ b] } c4 } >>
2288 If you want to end a note with a grace, then the standard trick
2289 is to put the grace notes after a ``space note'', e.g.
2290 @lilypond[fragment,verbatim,relative=2]
2293 { s2 \grace { c16[ d] } } >>
2299 By adjusting the duration of the skip note (here it is a half-note),
2300 the space between the main-note and the grace is adjusted.
2303 A @code{\grace} section will introduce special typesetting settings,
2304 for example, to produce smaller type, and set directions. Hence, when
2305 introducing layout tweaks, they should be inside the grace section,
2307 @lilypond[fragment,verbatim,relative=1]
2310 \property Voice.Stem \override #'direction = #-1
2312 \property Voice.Stem \revert #'direction
2319 The overrides should also be reverted inside the grace section.
2321 If the layout of grace sections must be changed throughout the music,
2322 then this can be accomplished through the function
2323 @code{add-grace-property}. The following example
2324 undefines the Stem direction grace section, so stems do not always
2329 #(add-grace-property "Voice" Stem direction '())
2335 Another option is to change the variables @code{startGraceMusic},
2336 @code{stopGraceMusic}, @code{startAccacciaturaMusic},
2337 @code{stopAccacciaturaMusic}, @code{startAppoggiaturaMusic},
2338 @code{stopAppoggiaturaMusic}. More information is in the file
2339 @file{ly/grace-init.ly}
2344 Internals: @internalsref{GraceMusic}.
2348 A score that starts with an @code{\grace} section needs an explicit
2349 @code{\context Voice} declaration, otherwise the main note and grace
2350 note end up on different staves.
2352 Grace note synchronization can also lead to surprises. Staff notation,
2353 such as key signatures, barlines, etc. are also synchronized. Take
2354 care when you mix staves with grace notes and staves without, for example,
2356 @lilypond[relative=2,verbatim,fragment]
2357 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2358 \new Staff { c4 \bar "|:" d4 } >>
2361 Grace sections should only be used within sequential music
2362 expressions. Nesting or juxtaposing grace sections is not supported,
2363 and might produce crashes or other errors.
2367 @subsection Glissando
2370 @cindex @code{\glissando}
2372 A glissando is a smooth change in pitch. It is denoted by a line or a
2373 wavy line between two notes.
2377 A glissando line can be requested by attaching a @code{\glissando} to
2380 @lilypond[fragment,relative,verbatim]
2386 Internals: @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2391 Adding additional texts (such as @emph{gliss.}) is not supported.
2395 @subsection Dynamics
2408 @cindex @code{\ffff}
2418 Absolute dynamic marks are specified using an variable after a
2419 note: @code{c4\ff}. The available dynamic marks are @code{\ppp},
2420 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2421 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2422 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}:
2424 @lilypond[verbatim,raggedright,fragment,relative]
2425 c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2431 @cindex @code{\decr}
2432 @cindex @code{\rced}
2439 A crescendo mark is started with @code{\<} and terminated with
2440 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2441 with @code{\!}. Because these marks are bound to notes, if you must
2442 use spacer notes if multiple marks during one note are needed:
2444 @lilypond[fragment,verbatim,center,quote]
2445 c''\< c''\! d''\decr e''\rced
2446 << f''1 { s4 s4\< s4\! \> s4\! } >>
2448 This may give rise to very short hairpins. Use @code{minimum-length}
2449 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2453 \property Staff.Hairpin \override #'minimum-length = #5
2456 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2457 is an example how to do it:
2459 @lilypond[fragment,relative=2,verbatim]
2460 c4 \cresc c4 c c c \endcresc c4
2466 You can also supply your own texts:
2467 @lilypond[fragment,relative,verbatim]
2469 \property Voice.crescendoText = \markup { \italic "cresc. poco" }
2470 \property Voice.crescendoSpanner = #'dashed-line
2480 @cindex @code{\dynamicUp}
2482 @cindex @code{\dynamicDown}
2483 @code{\dynamicDown},
2484 @cindex @code{\dynamicBoth}
2485 @code{\dynamicBoth}.
2487 @cindex direction, of dynamics
2491 Internals: @internalsref{CrescendoEvent}, @internalsref{DecrescendoEvent}, and
2492 @internalsref{AbsoluteDynamicEvent}.
2494 Dynamics are objects of @internalsref{DynamicText} and
2495 @internalsref{Hairpin}. Vertical positioning of these symbols is
2496 handled by the @internalsref{DynamicLineSpanner} object.
2498 If you want to adjust padding or vertical direction of the dynamics, you
2499 must set properties for the @internalsref{DynamicLineSpanner} object.
2507 @cindex @code{\repeat}
2510 Repetition is a central concept in music, and multiple notations exist
2511 for repetitions. In LilyPond, most of these notations can be captured
2512 in a uniform syntax. One of the advantages is that they can be
2513 rendered in MIDI accurately.
2515 The following types of repetition are supported:
2519 Repeated music is fully written (played) out. Useful for MIDI
2520 output, and entering repetitive music.
2523 This is the normal notation: Repeats are not written out, but
2524 alternative endings (voltas) are printed, left to right.
2528 Alternative endings are written stacked. This has limited use but may be
2529 used to typeset two lines of lyrics in songs with repeats, see
2530 @inputfileref{input,star-spangled-banner.ly}.
2538 Make beat or measure repeats. These look like percent signs.
2544 * Repeats and MIDI::
2545 * Manual repeat commands::
2547 * Tremolo subdivisions::
2552 @subsection Repeat syntax
2556 LilyPond has one syntactic construct for specifying different types of
2557 repeats. The syntax is
2560 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2563 If you have alternative endings, you may add
2564 @cindex @code{\alternative}
2566 \alternative @code{@{} @var{alternative1}
2568 @var{alternative3} @dots{} @code{@}}
2570 where each @var{alternative} is a music expression. If you do not
2571 give enough alternatives for all of the repeats, then the first
2572 alternative is assumed to be played more than once.
2574 Normal notation repeats are used like this:
2575 @lilypond[fragment,verbatim,relative=1]
2577 \repeat volta 2 { c4 d e f }
2578 \repeat volta 2 { f e d c }
2581 With alternative endings:
2582 @lilypond[fragment,verbatim,relative=1]
2584 \repeat volta 2 {c4 d e f}
2585 \alternative { {d2 d} {f f,} }
2589 @lilypond[fragment,verbatim,relative=1]
2592 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2593 \alternative { { g4 g g } { a | a a a a | b2. } }
2599 If you do a nested repeat like
2608 then it is ambiguous to which @code{\repeat} the @code{\alternative}
2609 belongs. This ambiguity is resolved by always having the
2610 @code{\alternative} belong to the inner @code{\repeat}. For clarity,
2611 it is advisable to use braces in such situations.
2614 @node Repeats and MIDI
2615 @subsection Repeats and MIDI
2617 @cindex expanding repeats
2619 For instructions on how to unfold repeats for MIDI output, see the
2620 example file @inputfileref{input/test,unfold-all-repeats.ly}.
2625 Timing information is not remembered at the start of an alternative,
2626 so after a repeat timing information must be reset by hand, for
2627 example by setting @code{Score.measurePosition} or entering
2628 @code{\partial}. Similarly, slurs or ties are also not repeated.
2631 @node Manual repeat commands
2632 @subsection Manual repeat commands
2634 @cindex @code{repeatCommands}
2636 The property @code{repeatCommands} can be used to control the layout of
2637 repeats. Its value is a Scheme list of repeat commands, where each repeat
2641 @item the symbol @code{start-repeat},
2642 which prints a @code{|:} bar line,
2643 @item the symbol @code{end-repeat},
2644 which prints a @code{:|} bar line,
2645 @item the list @code{(volta @var{text})},
2646 which prints a volta bracket saying @var{text}: The text can be specified as
2647 a text string or as a markup text, see @ref{Text markup}. Do not
2648 forget to change the font, as the default number font does not contain
2649 alphabetic characters. Or,
2650 @item the list @code{(volta #f)}, which
2651 stops a running volta bracket:
2654 @lilypond[verbatim,fragment,relative=2]
2656 \property Score.repeatCommands = #'((volta "93") end-repeat)
2658 \property Score.repeatCommands = #'((volta #f))
2665 Internals: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2666 @internalsref{VoltaRepeatedMusic},
2667 @internalsref{UnfoldedRepeatedMusic}, and
2668 @internalsref{FoldedRepeatedMusic}.
2670 @node Tremolo repeats
2671 @subsection Tremolo repeats
2672 @cindex tremolo beams
2674 To place tremolo marks between notes, use @code{\repeat} with tremolo
2676 @lilypond[verbatim,raggedright]
2678 \context Voice \notes\relative c' {
2679 \repeat "tremolo" 8 { c16 d16 }
2680 \repeat "tremolo" 4 { c16 d16 }
2681 \repeat "tremolo" 2 { c16 d16 }
2686 Tremolo marks can also be put on a single note. In this case, the
2687 note should not be surrounded by braces.
2688 @lilypond[verbatim,raggedright]
2689 \repeat "tremolo" 4 c16
2692 A similar mechanism is the tremolo subdivision, described in
2693 @ref{Tremolo subdivisions}.
2697 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
2699 Internals: tremolo beams are @internalsref{Beam} objects. Single stem
2700 tremolos are @internalsref{StemTremolo}s. The music expression is
2701 @internalsref{TremoloEvent},
2703 Example files: @inputfileref{input/regression,chord-tremolo.ly},
2704 @inputfileref{input/regression,stem-tremolo.ly}.
2706 @node Tremolo subdivisions
2707 @subsection Tremolo subdivisions
2708 @cindex tremolo marks
2709 @cindex @code{tremoloFlags}
2711 Tremolo marks can be printed on a single note by adding
2712 `@code{:}[@var{length}]' after the note. The length must be at least 8.
2713 A @var{length} value of 8 gives one line across the note stem. If the
2714 length is omitted, then then the last value (stored in
2715 @code{Voice.tremoloFlags}) is used:
2717 @lilypond[verbatim,fragment,center]
2718 c'2:8 c':32 | c': c': |
2721 @c [TODO : stok is te kort bij 32en]
2725 Tremolos in this style do not carry over into the MIDI output.
2729 In this manual: @ref{Tremolo repeats}.
2731 Elsewhere: @internalsref{StemTremolo}, @internalsref{TremoloEvent}.
2733 @node Measure repeats
2734 @subsection Measure repeats
2736 @cindex percent repeats
2737 @cindex measure repeats
2739 In the @code{percent} style, a note pattern can be repeated. It is
2740 printed once, and then the pattern is replaced with a special sign.
2741 Patterns of a one and two measures are replaced by percent-like signs,
2742 patterns that divide the measure length are replaced by slashes:
2744 @lilypond[verbatim,raggedright]
2745 \context Voice { \repeat "percent" 4 { c'4 }
2746 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
2752 Internals: @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
2753 @internalsref{PercentRepeatedMusic}, and
2754 @internalsref{DoublePercentRepeat}.
2758 @node Rhythmic music
2759 @section Rhythmic music
2763 * Showing melody rhythms::
2764 * Entering percussion::
2765 * Percussion staves::
2769 @node Showing melody rhythms
2770 @subsection Showing melody rhythms
2772 Sometimes you might want to show only the rhythm of a melody. This
2773 can be done with the rhythmic staff. All pitches of notes on such a
2774 staff are squashed, and the staff itself has a single line:
2776 @lilypond[fragment,relative,verbatim]
2777 \context RhythmicStaff {
2779 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
2785 Internals: @internalsref{RhythmicStaff}.
2787 Examples: @inputfileref{input/regression,rhythmic-staff.ly}.
2790 @node Entering percussion
2791 @subsection Entering percussion
2798 Percussion notes may be entered in @code{\drums} mode, which is
2799 similar to @code{notes}. Each piece of percussion has a full name and
2800 an abbreviated name, and both be used in input files:
2802 @lilypond[raggedright]
2803 \drums { hihat4 hh4 }
2806 The complete list of drum names is in the init file
2807 @file{ly/drumpitch-init.ly}.
2808 @c TODO: properly document this.
2812 Internals: @internalsref{DrumNoteEvent}
2814 @node Percussion staves
2815 @subsection Percussion staves
2819 A percussion part for more than one instrument typically uses a
2820 multiline staff where each position in the staff refers to one piece
2824 To typeset the music, the notes must be interpreted in a
2825 @internalsref{DrumStaff} and @internalsref{DrumVoice} contexts:
2828 @lilypond[raggedright,verbatim,quote]
2829 up = \drums { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2830 down = \drums { bassdrum4 snare8 bd r bd sn4 }
2833 << \new DrumVoice { \voiceOne \up }
2834 \new DrumVoice { \voiceTwo \down }
2838 There are also other layout possibilities. To use these, set the
2839 property @code{drumStyleTable} in context @internalsref{DrumVoice}.
2840 The following variables have been predefined:
2844 is the default. It typesets a typical drum kit on a five-line staff
2847 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
2848 bd sn ss tomh tommh tomml toml tomfh tomfl }
2849 mus = \drums { cymc cyms cymr hh | hhc hho hhho hhp | \break cb hc
2850 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
2852 << \new DrumStaff\with {
2853 \remove Bar_engraver
2854 \remove Time_signature_engraver
2855 Stem \set #'transparent = ##t
2856 Stem \set #'Y-extent-callback = ##f
2857 minimumVerticalExtent = #'(-4.0 . 5.0)
2859 \context Lyrics \nam
2862 %% need to do this, because of indented @itemize
2864 \translator { \ScoreContext
2865 BarNumber \set #'transparent =##T
2869 The drum scheme supports six different toms. When there fewer toms, simply
2870 select the toms that produce the desired result, i.e. to get toms on
2871 the three middle lines you use @code{tommh}, @code{tomml} and
2874 @item timbales-style
2875 to typeset timbales on a two line staff:
2877 @lilypond[raggedright]
2878 nam = \lyrics { timh ssh timl ssl cb }
2879 mus = \drums { timh ssh timl ssl cb s16 }
2882 \context DrumStaff \with {
2883 \remove Bar_engraver
2884 \remove Time_signature_engraver
2885 Stem \set #'transparent = ##t
2886 Stem \set #'Y-extent-callback = ##f
2887 StaffSymbol \override #'line-count = #2
2888 StaffSymbol \override #'staff-space = #2
2889 minimumVerticalExtent = #'(-3.0 . 4.0)
2890 drumStyleTable = #timbales-style
2892 \context Lyrics \nam
2897 to typeset congas on a two line staff:
2899 @lilypond[raggedright]
2900 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
2901 mus = \drums { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
2904 \context DrumStaff\with {
2905 \remove Bar_engraver
2906 \remove Time_signature_engraver
2907 drumStyleTable = #congas-style
2908 StaffSymbol \override #'line-count = #2
2910 %% this sucks; it will lengthen stems.
2911 StaffSymbol \override #'staff-space = #2
2912 Stem \set #'transparent = ##t
2913 Stem \set #'Y-extent-callback = ##f
2915 \context Lyrics \nam
2920 to typeset bongos on a two line staff:
2922 @lilypond[raggedright]
2923 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
2924 mus = \drums { boh boho bohm ssh bol bolo bolm ssl s16 }
2927 \context DrumStaff\with {
2928 \remove Bar_engraver
2929 \remove Time_signature_engraver
2930 StaffSymbol \override #'line-count = #2
2931 drumStyleTable = #bongos-style
2933 %% this sucks; it will lengthen stems.
2934 StaffSymbol \override #'staff-space = #2
2935 Stem \set #'transparent = ##t
2936 Stem \set #'Y-extent-callback = ##f
2938 \context Lyrics \nam
2943 @item percussion-style
2944 to typeset all kinds of simple percussion on one line staves:
2945 @lilypond[raggedright]
2946 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
2947 mus = \drums { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
2950 \context DrumStaff\with{
2951 \remove Bar_engraver
2952 drumStyleTable = #percussion-style
2953 StaffSymbol \override #'line-count = #1
2954 \remove Time_signature_engraver
2955 Stem \set #'transparent = ##t
2956 Stem \set #'Y-extent-callback = ##f
2958 \context Lyrics \nam
2964 If you do not like any of the predefined lists you can define your own
2965 list at the top of your file:
2967 @lilypond[raggedright,verbatim]
2969 (bassdrum default #f -1)
2970 (snare default #f 0)
2972 (pedalhihat xcircle "stopped" 2)
2973 (lowtom diamond #f 3)
2975 up = \drums { hh8 hh hh hh hhp4 hhp }
2976 down = \drums { bd4 sn bd toml8 toml }
2979 \property DrumStaff.drumStyleTable
2980 = #(alist->hash-table mydrums)
2981 \new DrumVoice { \voiceOne \up }
2982 \new DrumVoice { \voiceTwo \down }
2990 Init files: @file{ly/drumpitch-init.ly}
2992 Internals: @internalsref{DrumStaff}, @internalsref{DrumVoice}
2996 Short polyphonic notation, @code{<< @dots{} \\ @dots{} >>}, does not
2997 work for @internalsref{DrumVoices}.
2999 Because general MIDI does not contain rimshots the sidestick is used
3000 for this purpose instead.
3003 @section Piano music
3005 Piano staves are two normal staves coupled with a brace. The staves
3006 are largely independent, but sometimes voices can cross between the
3007 two staves. The same notation is also used for harps and other key
3008 instruments. The @internalsref{PianoStaff} is especially built to
3009 handle this cross-staffing behavior. In this section we discuss the
3010 @internalsref{PianoStaff} and some other pianistic peculiarities.
3014 * Automatic staff changes::
3015 * Manual staff switches::
3018 * Staff switch lines::
3023 There is no support for putting chords across staves. You can get
3024 this result by increasing the length of the stem in the lower stave so
3025 it reaches the stem in the upper stave, or vice versa. An example is
3026 included with the distribution as
3027 @inputfileref{input/test,stem-cross-staff.ly}.
3029 Dynamics are not centered, but kludges do exist. See
3030 @inputfileref{input/template,piano-dynamics.ly}.
3032 @cindex cross staff stem
3033 @cindex stem, cross staff
3036 @c fixme: should have hyperlinks as well.
3042 @node Automatic staff changes
3043 @subsection Automatic staff changes
3044 @cindex Automatic staff changes
3046 Voices can switch automatically between the top and the bottom
3047 staff. The syntax for this is
3049 \autochange \context Voice @{ @dots{}@var{music}@dots{} @}
3051 The two staffs of the piano staff must be named @code{up} and
3054 The autochanger switches on basis of pitch (central C is the turning
3055 point), and it looks ahead skipping over rests to switch in
3056 advance. Here is a practical example:
3058 @lilypond[verbatim,raggedright,quote]
3059 \score { \notes \context PianoStaff <<
3060 \context Staff = "up" {
3061 \autochange \new Voice \relative c' {
3062 g4 a b c d r4 a g } }
3063 \context Staff = "down" {
3070 In this example, spacer rests are used to prevent the bottom staff from
3071 terminating too soon.
3076 In this manual: @ref{Manual staff switches}
3078 Internals: @internalsref{AutoChangeMusic}.
3084 The staff switches often do not end up in optimal places. For high
3085 quality output, staff switches should be specified manually.
3089 @node Manual staff switches
3090 @subsection Manual staff switches
3092 @cindex manual staff switches
3093 @cindex staff switch, manual
3095 Voices can be switched between staves manually, using the following command:
3097 \change Staff = @var{staffname} @var{music}
3101 The string @var{staffname} is the name of the staff. It switches the
3102 current voice from its current staff to the Staff called
3103 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3112 Pianos have pedals that alter the way sound are produced. Generally, a
3113 piano has three pedals, sustain, una corda, and sostenuto.
3117 Piano pedal instruction can be expressed by attaching
3118 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3119 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3122 @lilypond[fragment,verbatim]
3123 c'4\sustainDown c'4\sustainUp
3126 What is printed can be modified by setting @code{pedal@var{X}Strings},
3127 where @var{X} is one of the pedal types: @code{Sustain},
3128 @code{Sostenuto} or @code{UnaCorda}. Refer to the generated
3129 documentation of @internalsref{SustainPedal} for more information.
3131 Pedals can also be indicated by a sequence of brackets, by setting the
3132 @code{pedalSustainStyle} property to @code{bracket} objects:
3134 @lilypond[fragment,verbatim]
3135 \property Staff.pedalSustainStyle = #'bracket
3136 c''4\sustainDown d''4 e''4
3137 a'4\sustainUp\sustainDown
3138 f'4 g'4 a'4\sustainUp
3141 A third style of pedal notation is a mixture of text and brackets,
3142 obtained by setting the @code{pedalSustainStyle} style property to
3145 @lilypond[fragment,verbatim]
3146 \property Staff.pedalSustainStyle = #'mixed
3147 c''4\sustainDown d''4 e''4
3148 c'4\sustainUp\sustainDown
3149 f'4 g'4 a'4\sustainUp
3152 The default `*Ped' style for sustain and damper pedals corresponds to
3153 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
3156 @lilypond[fragment,verbatim]
3157 c''4\sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4\sostenutoUp
3160 For fine-tuning of the appearance of a pedal bracket, the properties
3161 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3162 @code{PianoPedalBracket} objects (see
3163 @internalsref{PianoPedalBracket} in the Program reference) can be modified. For example, the
3164 bracket may be extended to the end of the note head:
3166 @lilypond[fragment,verbatim]
3167 \property Staff.PianoPedalBracket \override
3168 #'shorten-pair = #'(0 . -1.0)
3169 c''4\sostenutoDown d''4 e''4 c'4
3170 f'4 g'4 a'4\sostenutoUp
3174 @subsection Arpeggio
3177 @cindex broken arpeggio
3178 @cindex @code{\arpeggio}
3180 You can specify an arpeggio sign on a chord by attaching an
3181 @code{\arpeggio} to a chord:
3184 @lilypond[fragment,relative,verbatim]
3188 When an arpeggio crosses staves, you attach an arpeggio to the chords
3189 in both staves, and set
3190 @internalsref{PianoStaff}.@code{connectArpeggios}:
3192 @lilypond[fragment,relative,verbatim]
3193 \context PianoStaff <<
3194 \property PianoStaff.connectArpeggios = ##t
3195 \new Staff { <c' e g c>\arpeggio }
3196 \new Staff { \clef bass <c,, e g>\arpeggio }
3200 The direction of the arpeggio is sometimes denoted by adding an
3201 arrowhead to the wiggly line. This can be typeset by setting
3202 @code{arpeggio-direction}:
3204 @lilypond[fragment,relative,verbatim]
3206 \property Voice.Arpeggio \set #'arpeggio-direction = #1
3208 \property Voice.Arpeggio \set #'arpeggio-direction = #-1
3213 A square bracket on the left indicates that the player should not
3214 arpeggiate the chord. To draw these brackets, set the
3215 @code{print-function} property of @code{Arpeggio} or
3216 @code{PianoStaff.Arpeggio} objects to @code{\arpeggioBracket}, and use
3217 @code{\arpeggio} statements within the chords as before:
3219 @lilypond[fragment,relative,verbatim]
3220 \property PianoStaff.Arpeggio \override
3221 #'print-function = \arpeggioBracket
3227 @cindex @code{\arpeggioBracket}
3228 @code{\arpeggioBracket},
3229 @cindex @code{\arpeggio}
3234 Internals: @internalsref{ArpeggioEvent} music expressions lead to
3235 @internalsref{Arpeggio} objects. Cross staff arpeggios are
3236 @internalsref{PianoStaff}.@internalsref{Arpeggio}.
3240 It is not possible to mix connected arpeggios and unconnected
3241 arpeggios in one @internalsref{PianoStaff} at the same time.
3243 @node Staff switch lines
3244 @subsection Staff switch lines
3247 @cindex follow voice
3248 @cindex staff switching
3251 @cindex @code{followVoice}
3253 Whenever a voice switches to another staff a line connecting the notes
3254 can be printed automatically. This is enabled if the property
3255 @code{PianoStaff.followVoice} is set to true:
3257 @lilypond[fragment,relative,verbatim]
3258 \context PianoStaff <<
3259 \property PianoStaff.followVoice = ##t
3260 \context Staff \context Voice {
3265 \context Staff=two { \clef bass \skip 1*2 }
3269 The associated object is @internalsref{VoiceFollower}.
3273 @cindex @code{\showStaffSwitch}
3274 @code{\showStaffSwitch},
3275 @cindex @code{\hideStaffSwitch}
3276 @code{\hideStaffSwitch}.
3280 @section Vocal music
3282 This section discusses how to enter and print lyrics.
3286 * The Lyrics context::
3291 @node Entering lyrics
3292 @subsection Entering lyrics
3296 @cindex @code{\lyrics}
3299 Lyrics are entered in a special input mode. This mode is is introduced
3300 by the keyword @code{\lyrics}. In this mode you can enter lyrics, with
3301 punctuation and accents without any hassle. Syllables are entered like
3302 notes, but with pitches replaced by text. For example,
3304 \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
3307 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3308 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3309 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3310 any 8-bit character with ASCII code over 127, or a two-character
3311 combination of a backslash followed by one of @code{`}, @code{'},
3312 @code{"}, or @code{^}.
3314 Subsequent characters of a word can be any character that is not a digit
3315 and not white space. One important consequence of this is that a word
3316 can end with @code{@}}. The following example is usually a bug. The
3317 syllable includes a @code{@}}, and hence the opening brace is not balanced:
3319 \lyrics @{ twinkle@}
3322 @cindex @code{\property}, in @code{\lyrics}
3323 Similarly, a period following a alphabetic sequence, is included in the
3324 resulting string. As a consequence, spaces must be inserted around
3325 @code{\property} commands:
3327 \property Lyrics . LyricText \set #'font-shape = #'italic
3331 @cindex spaces, in lyrics
3332 @cindex quotes, in lyrics
3334 Any @code{_} character which appears in an unquoted word is converted
3335 to a space. This provides a mechanism for introducing spaces into words
3336 without using quotes. Quoted words can also be used in Lyrics mode to
3337 specify words that cannot be written with the above rules:
3340 \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3344 Hyphens can be entered as ordinary hyphens at the end of a syllable, i.e.
3349 These will be attached to the end of the first syllable.
3351 Centered hyphens are entered using the special `@code{-}@code{-}' lyric
3352 as a separate word between syllables. The hyphen will have variable
3353 length depending on the space between the syllables and it will be
3354 centered between the syllables.
3359 When a lyric is sung over many notes (this is called a melisma), this is
3360 indicated with a horizontal line centered between a syllable and the
3361 next one. Such a line is called an extender line, and it is entered as
3366 Internals: @internalsref{LyricEvent}, @internalsref{HyphenEvent}, and
3367 @internalsref{ExtenderEvent}.
3369 Examples: @inputfileref{input/test,lyric-hyphen-retain.ly}
3373 The definition of lyrics mode is too complex.
3377 @node The Lyrics context
3378 @subsection The Lyrics context
3380 Lyrics are printed by interpreting them in a @internalsref{Lyrics} context:
3382 \context Lyrics \lyrics @dots{}
3385 @cindex automatic syllable durations
3386 @cindex @code{\lyricsto}
3387 @cindex lyrics and melodies
3389 This will place the lyrics according to the durations that were
3390 entered. The lyrics can also be aligned under a given melody
3391 automatically. In this case, it is no longer necessary to enter the
3392 correct duration for each syllable. This is achieved by combining the
3393 melody and the lyrics with the @code{\lyricsto} expression:
3395 \lyricsto @var{name} \new Lyrics @dots{}
3398 This aligns the lyrics to the
3400 notes of the @internalsref{Voice} context called @var{name}, which has
3401 to exist. Therefore, normally the @code{Voice} is specified first, and
3402 then the lyrics are specified with @code{\lyricsto}.
3404 For different or more complex orderings, the best way is to setup the
3405 hierarchy of staves and lyrics first, e.g.
3407 \context ChoirStaff \notes <<
3408 \context Lyrics = sopranoLyrics @{ s1 @}
3409 \context Voice = soprano @{ @emph{music} @}
3410 \context Lyrics = tenor @{ s1 @}
3411 \context Voice = tenorLyrics @{ @emph{music} @}
3414 and then combine the appropriate melodies and lyric lines:
3416 \lyricsto "soprano" \new Lyrics @emph{the lyrics}
3420 The final input would resemble
3423 << \context ChoirStaff \notes << @emph{setup the music} >>
3424 \lyricsto "soprano" @emph{etc}
3425 \lyricsto "alto" @emph{etc}
3431 The @code{\lyricsto} command detects melismata: it only puts one
3432 syllable under a tied or slurred group of notes. If you want to force
3433 an unslurred group of notes to be a melisma, then insert
3434 @code{\melisma} after the first note of the group, and
3435 @code{\melismaEnd} after the last one, e.g.
3437 @lilypond[relative=1,raggedright,fragment,verbatim]
3438 << \context Voice = "lala" { \time 3/4
3444 \lyricsto "lala" \new Lyrics \lyrics {
3449 In addition, notes are considered a melisma if they are manually
3450 beamed, and automatic beaming (see @ref{Setting automatic beam
3451 behavior}) is switched off. The criteria for deciding melismata
3452 can be tuned with the property @code{melismaBusyProperties}. See
3453 @internalsref{Melisma_engraver} for more information.
3455 When multiple stanzas are put on the same melody, it can happen that
3456 two stanzas have melismata in different locations. This can be
3457 remedied by switching off melismata for one
3458 @internalsref{Lyrics}. This is achieved by setting
3459 the @code{ignoreMelismata} property to @code{#t}. An example is shown
3460 in @inputfileref{input/regression,lyric-combine-new.ly}.
3463 @cindex choral score
3465 A complete example of a SATB score setup is in the file
3466 @inputfileref{input/template,satb.ly}.
3471 @code{\melisma}, @code{\melismaEnd}
3472 @cindex @code{\melismaEnd}
3473 @cindex @code{\melisma}
3477 Internals: Music expressions: @internalsref{LyricCombineMusic},
3478 Contexts: @internalsref{Lyrics}, @internalsref{Melisma_engraver}.
3480 Examples: @inputfileref{input/template,satb.ly},
3481 @inputfileref{input/regression,lyric-combine-new.ly}.
3485 Melismata are not detected automatically, and extender lines must be
3489 For proper processing of extender lines, the
3490 @internalsref{Lyrics} and @internalsref{Voice} should be
3491 linked. This can be achieved either by using @code{\lyricsto} or by
3492 setting corresponding names for both contexts. The latter is explained
3493 in @ref{More stanzas}.
3496 @subsection More stanzas
3498 @cindex phrasing, in lyrics
3501 The lyrics should be aligned with the note heads of the melody. To
3502 achieve this, each line of lyrics should be marked to correspond with
3503 the melodic line. This is done automatically when @code{\lyricsto},
3504 but it can also be done manually.
3506 To this end, give the @internalsref{Voice} context an identity:
3508 \context Voice = duet @{
3513 Then set the @internalsref{Lyrics} contexts to names starting with
3514 that identity followed by a dash. In the preceding example, the
3515 @internalsref{Voice} identity is @code{duet}, so the identities of the
3516 @internalsref{Lyrics}s are marked @code{duet-1} and @code{duet-2}:
3518 \context Lyrics = "duet-1" @{
3519 Hi, my name is bert. @}
3520 \context Lyrics = "duet-2" @{
3521 Ooooo, ch\'e -- ri, je t'aime. @}
3524 The complete example is shown here:
3525 @lilypond[raggedright,verbatim]
3527 << \notes \relative c'' \context Voice = duet { \time 3/4
3529 \lyrics << \lyricsto "duet" \new Lyrics {
3530 \property Lyrics . stanza = "1"
3531 Hi, my name is bert. }
3532 \lyricsto "duet" \new Lyrics {
3533 \property Lyrics . stanza = "2"
3534 Ooooo, ch\'e -- ri, je t'aime. }
3539 @cindex stanza number
3540 @cindex singer's names
3541 @cindex name of singer
3543 Stanza numbers can be added by setting @code{Lyrics.stanza}, e.g.
3546 \property Lyrics . stanza = "Bert"
3548 \property Lyrics . stanza = "Ernie"
3551 Notice how dots are surrounded with spaces in @code{\lyrics} mode, to
3552 prevent @code{Lyrics.stanza} being interpreted as a single
3555 Names of the singers should be added using @code{Lyrics
3556 . vocalName} and @code{Lyrics . vocNam}, analogous to instrument
3557 annotations for staves.
3559 To make empty spaces in lyrics, use @code{\skip}.
3564 Internals: Layout objects @internalsref{LyricText}
3565 @internalsref{VocalName}. Music expressions:
3566 @internalsref{LyricEvent}.
3572 Input for lyrics introduces a syntactical ambiguity:
3579 is interpreted as assigning a string identifier @code{\foo} such that
3580 it contains @code{"bar"}. However, it could also be interpreted as
3581 making or a music identifier @code{\foo} containing the syllable
3582 `bar'. The force the latter interpretation, use
3592 The term @emph{ambitus} (plural: ambituses) denotes a range of pitches
3593 for a given voice in a part of music. It also may denote the pitch
3594 range that a musical instrument is capable of playing. Most musical
3595 instruments have their ambitus standardized (or at least there is
3596 agreement upon the minimal ambitus of a particular type of
3597 instrument), such that a composer or arranger of a piece of music can
3598 easily meet the ambitus constraints of the targeted instrument.
3599 However, the ambitus of the human voice depends on individual
3600 physiological state, including education and training of the voice.
3601 Therefore, a singer potentially has to check for each piece of music
3602 if the ambitus of that piece meets his individual capabilities. This
3603 is why the ambitus of a piece may be of particular value to vocal
3606 The ambitus is typically notated on a per-voice basis at the very
3607 beginning of a piece, e.g. nearby the initial clef or time signature of
3608 each staff. The range is graphically specified by two noteheads, that
3609 represent the minimum and maximum pitch. Some publishers use a textual
3610 notation: they put the range in words in front of the corresponding
3611 staff. LilyPond only supports the graphical ambitus notation.
3613 To apply, add the @internalsref{Ambitus_engraver} to the
3614 @internalsref{Voice} context, i.e.
3620 \consists Ambitus_engraver
3625 This results in the following output:
3626 @lilypond[raggedright]
3627 upper = \notes \relative c {
3630 as'' c e2 bes f cis d4 e f2 g
3632 lower = \notes \relative c {
3635 e'4 b g a c es fis a cis b a g f e d2
3638 \context ChoirStaff {
3640 \new Staff { \upper }
3641 \new Staff { \lower }
3647 \consists Ambitus_engraver
3653 If you have multiple voices in a single staff, and you want a single
3654 ambitus per staff rather than per each voice, then add the
3655 @internalsref{Ambitus_engraver} to the @internalsref{Staff} context
3656 rather than to the @internalsref{Voice} context.
3658 It is possible to tune individual ambituses for multiple voices on a
3659 single staff, for example by erasing or shifting them horizontally. An
3660 example is in @inputfileref{input/test,ambitus-mixed.ly}
3664 Internals: @internalsref{Ambitus}
3666 Examples: @inputfileref{input/regression,ambitus.ly},
3667 @inputfileref{input/test,ambitus-mixed.ly}.
3671 There is no collision handling in the case of multiple per-voice
3677 Tablature notation is used for notating music for plucked string
3678 instruments. It notates pitches not by using note heads, but by
3679 indicating on which string and fret a note must be played. LilyPond
3680 offers limited support for tablature.
3683 * Tablatures basic::
3684 * Non-guitar tablatures::
3687 @node Tablatures basic
3688 @subsection Tablatures basic
3689 @cindex Tablatures basic
3691 The string number associated to a note is given as a backslash
3692 followed by a number, e.g. @code{c4\3} for a C quarter on the third
3693 string. By default, string 1 is the highest one, and the tuning
3694 defaults to the standard guitar tuning (with 6 strings). The notes
3695 are printed as tablature, by using @internalsref{TabStaff} and
3696 @internalsref{TabVoice} contexts:
3698 @lilypond[fragment,verbatim]
3699 \notes \context TabStaff {
3707 When no string is specified, the first string that does not give a
3708 fret number less than @code{minimumFret} is selected. The default
3709 value for @code{minimumFret} is 0:
3713 e8 fis gis a b cis' dis' e'
3714 \property TabStaff.minimumFret = #8
3715 e8 fis gis a b cis' dis' e'
3720 e8 fis gis a b cis' dis' e'
3721 \property TabStaff.minimumFret = #8
3722 e8 fis gis a b cis' dis' e'
3725 \context StaffGroup <<
3726 \context Staff { \clef "G_8" \frag }
3727 \context TabStaff { \frag }
3734 Internals: @internalsref{TabStaff}, @internalsref{TabVoice}, and
3735 @internalsref{StringNumberEvent}.
3739 Chords are not handled in a special way, and hence the automatic
3740 string selector may easily select the same string to two notes in a
3744 @node Non-guitar tablatures
3745 @subsection Non-guitar tablatures
3746 @cindex Non-guitar tablatures
3748 You can change the number of strings, by setting the number of lines
3749 in the @internalsref{TabStaff}.
3751 You can change the tuning of the strings. A string tuning is given as
3752 a Scheme list with one integer number for each string, the number
3753 being the pitch (measured in semitones relative to central C) of an
3754 open string. The numbers specified for @code{stringTuning} are the
3755 numbers of semitones to subtract or add, starting the specified pitch
3756 by default middle C, in string order. Thus, the notes are e, a, d, and
3759 @lilypond[fragment,verbatim]
3760 \context TabStaff <<
3761 \property TabStaff.stringTunings = #'(-5 -10 -15 -20)
3764 a,4 c' a e' e c' a e'
3769 It is possible to change the Scheme function to format the tablature
3770 note text. The default is @code{fret-number-tablature-format}, which
3771 uses the fret number. For instruments that do not use this notation,
3772 you can create a special tablature formatting function. This function
3773 takes three argument: string number, string tuning and note pitch.
3777 No guitar special effects have been implemented.
3782 @section Chord names
3785 LilyPond has support for both printing chord names. Chords may be
3786 entered in musical chord notation, i.e. @code{< .. >}, but they can
3787 also be entered by name. Internally, the chords are represented as a
3788 set of pitches, so they can be transposed:
3791 @lilypond[verbatim,raggedright]
3792 twoWays = \notes \transpose c c' {
3802 << \context ChordNames \twoWays
3803 \context Voice \twoWays >> }
3806 This example also shows that the chord printing routines do not try to
3807 be intelligent. The last chord (@code{f bes d}) is not interpreted as
3813 * Printing chord names::
3818 @subsection Chords mode
3821 Chord mode is a mode where you can input sets of pitches using common
3822 names. It is introduced by the keyword @code{\chords}.
3823 In chords mode, a chord is entered by the root, which is entered
3824 like a common pitch:
3825 @lilypond[fragment,verbatim,quote,relative=1]
3826 \chords { es4. d8 c2 }
3831 Other chords may be entered by suffixing a colon, and introducing a
3832 modifier, and optionally, a number:
3834 @lilypond[fragment,verbatim,quote]
3835 \chords { e1:m e1:7 e1:m7 }
3837 The first number following the root is taken to be the `type' of the
3838 chord, thirds are added to the root until it reaches the specified
3840 @lilypond[fragment,verbatim]
3841 \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
3844 @cindex root of chord
3845 @cindex additions, in chords
3846 @cindex removals, in chords
3848 More complex chords may also be constructed adding separate steps
3849 to a chord. Additions are added after the number following
3850 the colon, and are separated by dots:
3852 @lilypond[verbatim,fragment,quote]
3853 \chords { c:5.6 c:3.7.8 c:3.6.13 }
3855 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
3857 @lilypond[verbatim,fragment,quote]
3858 \chords { c:7+ c:5+.3- c:3-.5-.7- }
3860 Removals are specified similarly, and are introduced by a caret. They
3861 must come after the additions:
3862 @lilypond[verbatim,fragment]
3863 \chords { c^3 c:7^5 c:9^3.5 }
3866 Modifiers can be used to change pitches. The following modifiers are
3870 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
3872 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
3875 is the augmented chord. This modifier raises the 5th step.
3877 is the major 7th chord. This modifier raises the 7th step if present.
3879 is the suspended 4th or 2nd. This modifier removes the 3rd
3880 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
3883 Modifiers can be mixed with additions:
3884 @lilypond[verbatim,fragment]
3885 \chords { c:sus4 c:7sus4 c:dim7 c:m6 }
3888 @cindex modifiers, in chords.
3895 Since an unaltered 11 does not sound good when combined with an
3896 unaltered 13, the 11 is removed in this case (unless it is added
3899 @lilypond[fragment,verbatim]
3900 \chords { c:13 c:13.11 c:m13 }
3905 An inversion (putting one pitch of the chord on the bottom), as well
3906 as bass notes, can be specified by appending
3907 @code{/}@var{pitch} to the chord:
3908 @lilypond[fragment,verbatim,center]
3909 \chords { c1 c/g c/f }
3913 A bass note can be added instead of transposed out of the chord,
3914 by using @code{/+}@var{pitch}.
3916 @lilypond[fragment,verbatim,center]
3917 \chords { c1 c/+g c/+f }
3920 Chords is a mode similar to @code{\lyrics}, @code{\notes} etc. Most
3921 of the commands continue to work, for example, @code{r} and
3922 @code{\skip} can be used to insert rests and spaces, and
3923 @code{\property} may be used to change various settings.
3929 Each step can only be present in a chord once. The following
3930 simply produces the augmented chord, since @code{5+} is interpreted
3933 @lilypond[verbatim,fragment]
3934 \chords { c:5.5-.5+ }
3938 @node Printing chord names
3939 @subsection Printing chord names
3941 @cindex printing chord names
3945 For displaying printed chord names, use the @internalsref{ChordNames} context.
3946 The chords may be entered either using the notation
3947 described above, or directly using @code{<} and @code{>}:
3949 @lilypond[verbatim,raggedright]
3951 \chords {a1 b c} <d' f' a'> <e' g' b'>
3955 \context ChordNames \scheme
3956 \context Staff \scheme
3961 You can make the chord changes stand out by setting
3962 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
3963 display chord names when there is a change in the chords scheme and at
3964 the start of a new line:
3966 @lilypond[verbatim,linewidth=9\cm]
3968 c1:m c:m \break c:m c:m d
3972 \context ChordNames {
3973 \property ChordNames.chordChanges = ##t
3975 \context Staff \transpose c c' \scheme
3980 The default chord name layout is a system for Jazz music, proposed by
3981 Klaus Ignatzek (see @ref{Literature list}). It can be tuned through the
3982 following properties:
3985 @cindex chordNameExceptions
3986 @item chordNameExceptions
3987 This is a list that contains the chords that have special formatting.
3989 @inputfileref{input/regression,chord-name-exceptions.ly}.
3990 @cindex exceptions, chord names.
3993 @cindex majorSevenSymbol
3994 @item majorSevenSymbol
3995 This property contains the markup object used for the 7th step, when
3996 it is major. Predefined options are @code{whiteTriangleMarkup} and
3997 @code{blackTriangleMarkup}. See
3998 @inputfileref{input/regression,chord-name-major7.ly} for an example.
4000 @cindex chordNameSeparator
4001 @item chordNameSeparator
4002 Different parts of a chord name are normally separated by a
4003 slash. By setting @code{chordNameSeparator}, you can specify other
4005 @lilypond[fragment,verbatim]
4006 \context ChordNames \chords {
4008 \property ChordNames.chordNameSeparator
4009 = \markup { \typewriter "|" }
4013 @cindex chordRootNamer
4014 @item chordRootNamer
4015 The root of a chord is usually printed as a letter with an optional
4016 alteration. The transformation from pitch to letter is done by this
4017 function. Special note names (for example, the German ``H'' for a
4018 B-chord) can be produced by storing a new function in this property.
4020 The pre-defined variables @code{\germanChords},
4021 @code{\semiGermanChords} set these variables.
4024 @cindex chordNoteNamer
4025 @item chordNoteNamer
4026 The default is to print single pitch, e.g. the bass note, using the
4027 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
4028 to a specialized function to change this behavior. For example, the
4029 base can be printed in lower case.
4034 There are also two other chord name schemes implemented: an alternate
4035 Jazz chord notation, and a systematic scheme called Banter chords. The
4036 alternate jazz notation is also shown on the chart in @ref{Chord name
4037 chart}. Turning on these styles is described in the input file
4038 @inputfileref{input/test,chord-names-jazz.ly}.
4042 @cindex chords, jazz
4047 @cindex @code{\germanChords}
4048 @code{\germanChords},
4049 @cindex @code{\semiGermanChords}
4050 @code{\semiGermanChords}.
4057 Examples: @inputfileref{input/regression,chord-name-major7.ly},
4058 @inputfileref{input/regression,chord-name-exceptions.ly},
4059 @inputfileref{input/test,chord-names-jazz.ly},
4060 @inputfileref{input/test,chord-names-german.ly}.
4062 Init files: @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
4067 Chord names are determined solely from the list of pitches. Chord
4068 inversions are not identified, and neither are added bass notes. This
4069 may result in strange chord names when chords are entered with the
4070 @code{< .. >} syntax.
4075 @node Orchestral music
4076 @section Orchestral music
4078 @cindex Writing parts
4080 Orchestral music involves some special notation, both in the full
4081 score and the individual parts. This section explains how to tackle
4082 some common problems in orchestral music.
4087 * Multiple staff contexts::
4090 * Instrument names::
4092 * Multi measure rests::
4093 * Automatic part combining::
4095 * Different editions from one source::
4096 * Sound output for transposing instruments::
4099 @node Multiple staff contexts
4100 @subsection Multiple staff contexts
4102 Polyphonic scores consist of many staves. These staves can be
4103 constructed in three different ways:
4105 @item The group is started with a brace at the left. This is done with the
4106 @internalsref{GrandStaff} context.
4107 @item The group is started with a bracket. This is done with the
4108 @internalsref{StaffGroup} context
4109 @item The group is started with a vertical line. This is the default
4113 @cindex Staff, multiple
4114 @cindex bracket, vertical
4115 @cindex brace, vertical
4122 @node Rehearsal marks
4123 @subsection Rehearsal marks
4124 @cindex Rehearsal marks
4126 @cindex @code{\mark}
4128 To print a rehearsal mark, use the @code{\mark} command:
4129 @lilypond[fragment,verbatim]
4140 (The letter I is skipped in accordance with engraving traditions.)
4142 The mark is incremented automatically if you use @code{\mark
4143 \default}, but you can also use an integer argument to set the mark
4144 manually. The value to use is stored in the property
4145 @code{rehearsalMark}.
4147 The style is defined by the property @code{markFormatter}. It is a
4148 function taking the current mark (an integer) and the current context
4149 as argument. It should return a markup object. In the following
4150 example, @code{markFormatter} is set to a canned procedure. After a
4151 few measures, it is set to function that produces a boxed number.
4153 @lilypond[verbatim,fragment,relative=1]
4154 \property Score.markFormatter = #format-mark-numbers
4157 \property Score.markFormatter
4158 = #(lambda (mark context)
4159 (make-bold-markup (make-box-markup (number->string mark))))
4164 The file @file{scm/translation-functions.scm} contains the definitions
4165 of @code{format-mark-numbers} (the default format) and
4166 @code{format-mark-letters}. They can be used as inspiration for other
4167 formatting functions.
4170 @cindex coda on bar line
4171 @cindex segno on bar line
4172 @cindex fermata on bar line
4173 @cindex bar lines, symbols on
4175 The @code{\mark} command can also be used to put signs like coda,
4176 segno and fermatas on a barline. Use @code{\markup} to
4177 to access the appropriate symbol:
4179 @lilypond[fragment,verbatim,relative=1]
4180 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4184 In this case, during line breaks, marks must also be printed at the
4185 end of the line, and not at the beginning. Use the following to force
4188 \property Score.RehearsalMark \override
4189 #'break-visibility = #begin-of-line-invisible
4195 @cindex barlines, putting symbols on
4199 Internals: @internalsref{MarkEvent}, @internalsref{RehearsalMark}
4201 Init files: @file{scm/translation-functions.scm} contains the
4202 definition of @code{format-mark-numbers} and
4203 @code{format-mark-letters}. They can be used as inspiration for other
4204 formatting functions.
4206 Examples: @inputfileref{input/regression,rehearsal-mark-letter.ly},
4207 @inputfileref{input/regression,rehearsal-mark-number.ly}.
4211 @subsection Bar numbers
4215 @cindex measure numbers
4216 @cindex currentBarNumber
4218 Bar numbers are printed by default at the start of the line. The
4219 number itself is stored in the
4220 @code{currentBarNumber} property,
4221 which is normally updated automatically for every measure.
4223 Bar numbers can be typeset at regular intervals instead of at the
4224 beginning of each line. This is illustrated in the following example,
4225 whose source is available as
4226 @inputfileref{input/test,bar-number-regular-interval.ly}:
4228 @lilypondfile[]{bar-number-regular-interval.ly}
4233 Internals: @internalsref{BarNumber}.
4235 Examples: @inputfileref{input/test,bar-number-every-five-reset.ly},
4236 and @inputfileref{input/test,bar-number-regular-interval.ly}.
4240 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4241 there is one at the top. To solve this, the
4242 @code{padding} property of @internalsref{BarNumber} can be
4243 used to position the number correctly.
4245 @node Instrument names
4246 @subsection Instrument names
4248 In an orchestral score, instrument names are printed left side of the
4251 This can be achieved by setting @internalsref{Staff}.@code{instrument}
4252 and @internalsref{Staff}.@code{instr}. This will print a string before
4253 the start of the staff. For the first start, @code{instrument} is
4254 used, for the next ones @code{instr} is used:
4257 @lilypond[verbatim,raggedright]
4258 \property Staff.instrument = "ploink " { c''4 }
4262 You can also use markup texts to construct more complicated instrument
4266 @lilypond[fragment,verbatim,raggedright]
4268 \property Staff.instrument = \markup {
4269 \column < "Clarinetti"
4271 \smaller \musicglyph #"accidentals--1"
4282 Internals: @internalsref{InstrumentName}.
4286 When you put a name on a grand staff or piano staff the width of the
4287 brace is not taken into account. You must add extra spaces to the end of
4288 the name to avoid a collision.
4291 @subsection Transpose
4293 @cindex transposition of pitches
4294 @cindex @code{\transpose}
4296 A music expression can be transposed with @code{\transpose}. The syntax
4299 \transpose @var{from} @var{to} @var{musicexpr}
4302 This means that @var{musicexpr} is transposed by the interval between
4303 the pitches @var{from} and @var{to}: any note with pitch @code{from}
4304 is changed to @code{to}.
4307 For example, consider a piece written in the key of D major. If
4308 this piece is a little too low for its performer, it can be
4309 transposed up to E major with
4311 \tranpose d e @dots{}
4314 Consider a part written for violin (a C instrument). If
4315 this part is to be played on the A clarinet, the following
4316 transposition will produce the appropriate part
4319 \transpose a c @dots{}
4322 Since @var{from} and @var{to} are pitches, @code{\transpose} must be
4323 inside a @code{\notes} section. @code{\transpose} distinguishes
4324 between enharmonic pitches: both @code{\transpose c cis} or
4325 @code{\transpose c des} will transpose up half a tone. The first
4326 version will print sharps and the second version will print flats:
4328 @lilypond[raggedright,verbatim]
4329 mus =\notes { \key d \major cis d fis g }
4330 \score { \notes \context Staff {
4333 \transpose c g' \mus
4334 \transpose c f' \mus
4341 Internals: @internalsref{TransposedMusic}, and
4342 @internalsref{UntransposableMusic}.
4346 If you want to use both @code{\transpose} and @code{\relative}, then
4347 you must put @code{\transpose} outside of @code{\relative}, since
4348 @code{\relative} will have no effect music that appears inside a
4354 @node Multi measure rests
4355 @subsection Multi measure rests
4356 @cindex multi measure rests
4357 @cindex Rests, multi measure
4361 Multi measure rests are entered using `@code{R}'. It is specifically
4362 meant for full bar rests and for entering parts: the rest can expand
4363 to fill a score with rests, or it can be printed as a single
4364 multimeasure rest. This expansion is controlled by the property
4365 @code{Score.skipBars}. If this is set to true, empty measures will not
4366 be expanded, and the appropriate number is added automatically:
4368 @lilypond[fragment,verbatim]
4369 \time 4/4 r1 | R1 | R1*2
4370 \property Score.skipBars = ##t R1*17 R1*4
4373 The @code{1} in @code{R1} is similar to the duration notation used for
4374 notes. Hence, for time signatures other than 4/4, you must enter other
4375 durations. This can be done with augmentation dots or fractions:
4377 @lilypond[fragment,verbatim]
4378 \property Score.skipBars = ##t
4386 An @code{R} spanning a single measure is printed as either a whole rest
4387 or a breve, centered in the measure regardless of the time signature.
4389 @cindex text on multi-measure rest
4390 @cindex script on multi-measure rest
4391 @cindex fermata on multi-measure rest
4393 Texts can be added to multi-measure rests by using the
4394 @var{note}-@code{markup} syntax (see @ref{Text markup}). In this case, the number is
4395 replaced. If you need both texts and the number, you must add the
4396 number by hand. A variable (@code{\fermataMarkup}) is provided for
4400 @lilypond[verbatim,fragment]
4402 R2._\markup { "Ad lib" }
4406 If you want to have a text on the left end of a multi-measure rest,
4407 attach the text to a zero-length skip note, i.e.
4415 @cindex whole rests for a full measure
4419 Internals: @internalsref{MultiMeasureRestEvent},
4420 @internalsref{MultiMeasureTextEvent},
4421 @internalsref{MultiMeasureRestMusicGroup}, and
4422 @internalsref{MultiMeasureRest}.
4424 The layout object @internalsref{MultiMeasureRestNumber} is for the
4425 default number, and @internalsref{MultiMeasureRestText} for user
4430 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
4431 over multi-measure rests.
4433 @cindex condensing rests
4435 There is no way to automatically condense multiple rests into a single
4436 multimeasure rest. Multi measure rests do not take part in rest
4439 Be careful when entering multimeasure rests followed by whole
4440 notes. The following will enter two notes lasting four measures each:
4444 When @code{skipBars} is set, then the result will look OK, but the
4445 bar numbering will be off.
4447 @node Automatic part combining
4448 @subsection Automatic part combining
4449 @cindex automatic part combining
4450 @cindex part combiner
4453 Automatic part combining is used to merge two parts of music onto a
4454 staff. It is aimed at typesetting orchestral scores. When the two
4455 parts are identical for a period of time, only one is shown. In
4456 places where the two parts differ, they are typeset as separate
4457 voices, and stem directions are set automatically. Also, solo and
4458 @emph{a due} parts are identified and can be marked.
4462 The syntax for part combining is
4465 \partcombine @var{musicexpr1} @var{musicexpr2}
4468 The music expressions will be interpreted as @internalsref{Voice}
4471 The following example demonstrates the basic functionality of the part
4472 combiner: putting parts on one staff, and setting stem directions and
4475 @lilypond[verbatim,raggedright,fragment,relative=1]
4476 \new Staff \partcombine
4485 The first @code{g} appears only once, although it was
4486 specified twice (once in each part). Stem, slur and tie directions are
4487 set automatically, depending whether there is a solo or unisono. The
4488 first part (with context called @code{one}) always gets up stems, and
4489 `solo', while the second (called @code{two}) always gets down stems and
4492 If you just want the merging parts, and not the textual markings, you
4493 may set the property @var{soloADue} to false:
4495 @lilypond[verbatim,raggedright,fragment]
4497 \property Staff.soloADue = ##f
4509 Internals: @internalsref{PartCombineMusic},
4510 @internalsref{SoloOneEvent}, and
4511 @internalsref{SoloTwoEvent}, and
4512 @internalsref{UnisonoEvent}.
4516 In @code{soloADue} mode, when the two voices play the same notes on and
4517 off, the part combiner may typeset @code{a2} more than once in a
4520 @code{\partcombine} can not be inside @code{\times}.
4525 @subsection Hiding staves
4527 @cindex Frenched scores
4528 @cindex Hiding staves
4530 In orchestral scores, staff lines that only have rests are usually
4531 removed. This saves some space. This style is called `French Score'.
4532 For @internalsref{Lyrics}, @internalsref{Lyrics},
4533 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
4534 switched on by default. When these line of these contexts turn out
4535 empty after the line-breaking process, they are removed.
4537 For normal staves, a specialized @internalsref{Staff} context is
4538 available, which does the same: staves containing nothing (or only
4539 multi measure rests) are removed. The context definition is stored in
4540 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
4541 in this example disappears in the second line:
4546 \notes \relative c' <<
4547 \new Staff { e4 f g a \break c1 }
4548 \new Staff { c4 d e f \break R1 }
4552 \translator { \RemoveEmptyStaffContext }
4557 The first page shows all staffs in full. If they should be removed
4558 from the first page too, set @code{remove-first} to false
4559 in @internalsref{RemoveEmptyVerticalGroup}.
4561 @node Different editions from one source
4562 @subsection Different editions from one source
4564 The @code{\tag} command marks music expressions with a name. These
4565 tagged expressions can be filtered out later. With this mechanism it
4566 is possible to make different versions of the same music source.
4568 In the following example, we see two versions of a piece of music, one
4569 for the full score, and one with cue notes for the instrumental part:
4577 \property Voice.fontSize = #-1
4585 The same can be applied to articulations, texts, etc.: they are
4588 -\tag #@var{your-tag}
4590 to an articulation, for example,
4595 This defines a note with a conditional fingering indication.
4597 By applying the @code{remove-tag} function, tagged expressions can be
4598 filtered. For example,
4602 \apply #(remove-tag 'score) @var{the music}
4603 \apply #(remove-tag 'part) @var{the music}
4608 @lilypondfile[]{tag-filter.ly}
4610 The argument of the @code{\tag} command should be a symbol, or a list
4611 of symbols, for example,
4613 \tag #'(original-part transposed-part) @dots{}
4618 Examples: @inputfileref{input/regression,tag-filter.ly}
4621 @node Sound output for transposing instruments
4622 @subsection Sound output for transposing instruments
4624 When you want to make a MIDI file from a score containing transposed
4625 and untransposed instruments, you have to instruct LilyPond the pitch
4626 offset (in semitones) for the transposed instruments. This is done
4627 using the @code{transposing} property. It does not affect printed
4630 @cindex @code{transposing}
4633 \property Staff.instrument = #"Cl. in B-flat"
4634 \property Staff.transposing = #-2
4638 @node Ancient notation
4639 @section Ancient notation
4641 @cindex Vaticana, Editio
4642 @cindex Medicaea, Editio
4647 @c [TODO: write more comprehensive introduction on ancient notation]
4649 Support for ancient notation is still under heavy development.
4650 Regardless of all of the current limitations (see the bugs section
4651 below for details), it includes features for mensural
4652 notation and Gregorian Chant notation. There is also limited support
4653 for figured bass notation.
4655 Many graphical objects provide a @code{style} property, see
4656 @ref{Ancient note heads}, @ref{Ancient accidentals}, @ref{Ancient
4657 rests}, @ref{Ancient clefs}, @ref{Ancient flags} and @ref{Ancient time
4658 signatures}. By manipulating such a grob property, the typographical
4659 appearance of the affected graphical objects can be accomodated for a
4660 specific notation flavour without need for introducing any new
4664 Other aspects of ancient notation can not that easily be expressed as
4665 in terms of just changing a style property of a graphical object.
4666 Therefore, some notational concepts are introduced specifically for
4667 ancient notation, see @ref{Custodes}, @ref{Divisiones},
4668 @ref{Ligatures}, and @ref{Figured bass}.
4672 * Ancient note heads::
4673 * Ancient accidentals::
4677 * Ancient time signatures::
4682 * Vaticana style contexts::
4685 If this all is way too much of documentation for you, and you just
4686 want to dive into typesetting without worrying too much about the
4687 details on how to customize a context, then you may have a look at the
4688 predefined contexts (see @ref{Vaticana style contexts}). Use them to
4689 set up predefined style-specific voice and staff contexts, and
4690 directly go ahead with the note entry.
4694 Ligatures need special spacing that has not yet been implemented. As
4695 a result, there is too much space between ligatures most of the time,
4696 and line breaking often is unsatisfactory. Also, lyrics do not
4697 correctly align with ligatures.
4699 Accidentals must not be printed within a ligature, but instead need to
4700 be collected and printed in front of it.
4702 Augmentum dots within ligatures are not handled correctly.
4705 @node Ancient note heads
4706 @subsection Ancient note heads
4712 For ancient notation, a note head style other than the @code{default}
4713 style may be chosen. This is accomplished by setting the @code{style}
4714 property of the NoteHead object to the desired value (@code{baroque},
4715 @code{neo_mensural} or @code{mensural}). The @code{baroque} style
4716 differs from the @code{default} style only in using a square shape for
4717 @code{\breve} note heads. The @code{neo_mensural} style differs from
4718 the @code{baroque} style in that it uses rhomboidal heads for whole
4719 notes and all smaller durations. Stems are centered on the note
4720 heads. This style is in particular useful when transcribing mensural
4721 music, e.g. for the incipit. The @code{mensural} style finally
4722 produces note heads that mimick the look of note heads in historic
4723 printings of the 16th century.
4725 The following example demonstrates the @code{neo_mensural} style:
4727 @lilypond[fragment,raggedright,verbatim]
4728 \property Voice.NoteHead \set #'style = #'neo_mensural
4729 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
4732 When typesetting a piece in Gregorian Chant notation, a Gregorian
4733 ligature engraver will automatically select the proper note heads,
4734 such there is no need to explicitly set the note head style. Still,
4735 the note head style can be set e.g. to @code{vaticana_punctum} to
4736 produce punctum neumes. Similarly, a mensural ligature engraver is
4737 used to automatically assemble mensural ligatures. See
4738 @ref{Ligatures} for how ligature engravers work.
4743 @ref{Percussion staves} use note head styles of their own that are
4744 frequently used in contemporary music notation.
4746 Examples: @inputfileref{input/regression,note-head-style.ly} gives an
4747 overview over all available note head styles.
4750 @node Ancient accidentals
4751 @subsection Ancient accidentals
4757 Use the @code{style} property of grob @internalsref{Accidental} to
4758 select ancient accidentals. Supported styles are
4759 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
4761 @lilypond[raggedright,staffsize=26]
4769 { " " \musicglyph #"accidentals-vaticana-1"
4770 " " \musicglyph #"accidentals-vaticana0" }
4774 { " " \musicglyph #"accidentals-medicaea-1" }
4778 { " " \musicglyph #"accidentals-hufnagel-1" }
4782 { " " \musicglyph #"accidentals-mensural-1"
4783 " " \musicglyph #"accidentals-mensural1" }
4792 \remove "Bar_number_engraver"
4796 \remove "Clef_engraver"
4797 \remove "Key_engraver"
4798 \remove "Time_signature_engraver"
4799 \remove "Staff_symbol_engraver"
4800 minimumVerticalExtent = ##f
4806 As shown, not all accidentals are supported by each style. When
4807 trying to access an unsupported accidental, LilyPond will switch to a
4808 different style, as demonstrated in
4809 @inputfileref{input/test,ancient-accidentals.ly}.
4811 Similarly to local accidentals, the style of the key signature can be
4812 controlled by the @code{style} property of the
4813 @internalsref{KeySignature} grob.
4817 In this manual: @ref{Pitches}, @ref{Chromatic alterations} and
4818 @ref{Accidentals} give a general introduction into the use of
4819 accidentals. @ref{Key signature} gives a general introduction into
4820 the use of key signatures.
4822 Internals: @internalsref{KeySignature}
4824 Examples: @inputfileref{input/test,ancient-accidentals.ly}.
4827 @subsection Ancient rests
4833 Use the @code{style} property of grob @internalsref{Rest} to select
4834 ancient accidentals. Supported styles are @code{classical},
4835 @code{neo_mensural} and @code{mensural}. @code{classical} differs
4836 from the @code{default} style only in that the quarter rest looks like
4837 a horizontally mirrored 8th rest. The @code{neo_mensural} style suits
4838 well for e.g. the incipit of a transcribed mensural piece of music.
4839 The @code{mensural} style finally mimicks the appearance of rests as
4840 in historic prints of the 16th century.
4842 The following example demonstrates the @code{neo_mensural} style:
4844 @lilypond[fragment,raggedright,verbatim]
4845 \property Voice.Rest \set #'style = #'neo_mensural
4846 r\longa r\breve r1 r2 r4 r8 r16
4849 There are no 32th and 64th rests specifically for the mensural or
4850 neo-mensural style. Instead, the rests from the default style will be
4851 taken. See @inputfileref{input/test,rests.ly} for a chart of all
4854 There are no rests in Gregorian Chant notation; instead, it uses
4859 In this manual: @ref{Rests} gives a general introduction into the use of rests.
4863 @subsection Ancient clefs
4869 LilyPond supports a variety of clefs, many of them ancient.
4871 The following table shows all ancient clefs that are supported via the
4872 @code{\clef} command. Some of the clefs use the same glyph, but
4873 differ only with respect to the line they are printed on. In such
4874 cases, a trailing number in the name is used to enumerate these clefs.
4875 Still, you can manually force a clef glyph to be typeset on an
4876 arbitrary line, as described in @ref{Clef}. The note printed to the
4877 right side of each clef in the example column denotes the @code{c'}
4878 with respect to that clef.
4880 @multitable @columnfractions .3 .3 .3 .1
4884 @b{Description} @tab
4885 @b{Supported Clefs} @tab
4889 @code{clefs-neo_mensural_c} @tab
4890 modern style mensural C clef @tab
4891 @code{neo_mensural_c1}, @code{neo_mensural_c2},
4892 @code{neo_mensural_c3}, @code{neo_mensural_c4} @tab
4893 @lilypond[relative,notime]
4894 \property Staff.TimeSignature \set #'transparent = ##t
4895 \clef "neo_mensural_c2" c
4899 @code{clefs-petrucci_c1}
4900 @code{clefs-petrucci_c2}
4901 @code{clefs-petrucci_c3}
4902 @code{clefs-petrucci_c4}
4903 @code{clefs-petrucci_c5}
4906 petrucci style mensural C clefs, for use on different stafflines
4907 (the examples shows the 2nd staffline C clef).
4917 @lilypond[relative,notime]
4918 \property Staff.TimeSignature \set #'transparent = ##t
4919 \clef "petrucci_c2" c
4923 @code{clefs-petrucci_f} @tab
4924 petrucci style mensural F clef @tab
4925 @code{petrucci_f} @tab
4926 @lilypond[relative,notime]
4927 \property Staff.TimeSignature \set #'transparent = ##t
4928 \clef "petrucci_f" c
4932 @code{clefs-petrucci_g} @tab
4933 petrucci style mensural G clef @tab
4934 @code{petrucci_g} @tab
4935 @lilypond[relative,notime]
4936 \property Staff.TimeSignature \set #'transparent = ##t
4937 \clef "petrucci_g" c
4941 @code{clefs-mensural_c} @tab
4942 historic style mensural C clef @tab
4943 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
4944 @code{mensural_c4} @tab
4945 @lilypond[relative,notime]
4946 \property Staff.TimeSignature \set #'transparent = ##t
4947 \clef "mensural_c2" c
4951 @code{clefs-mensural_f} @tab
4952 historic style mensural F clef @tab
4953 @code{mensural_f} @tab
4954 @lilypond[relative,notime]
4955 \property Staff.TimeSignature \set #'transparent = ##t
4956 \clef "mensural_f" c
4960 @code{clefs-mensural_g} @tab
4961 historic style mensural G clef @tab
4962 @code{mensural_g} @tab
4963 @lilypond[relative,notime]
4964 \property Staff.TimeSignature \set #'transparent = ##t
4965 \clef "mensural_g" c
4969 @code{clefs-vaticana_do} @tab
4970 Editio Vaticana style do clef @tab
4971 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
4972 @lilypond[relative,notime]
4973 \property Staff.StaffSymbol \set #'line-count = #4
4974 \property Staff.TimeSignature \set #'transparent = ##t
4975 \clef "vaticana_do2" c
4979 @code{clefs-vaticana_fa} @tab
4980 Editio Vaticana style fa clef @tab
4981 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
4982 @lilypond[relative,notime]
4983 \property Staff.StaffSymbol \set #'line-count = #4
4984 \property Staff.TimeSignature \set #'transparent = ##t
4985 \clef "vaticana_fa2" c
4989 @code{clefs-medicaea_do} @tab
4990 Editio Medicaea style do clef @tab
4991 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
4992 @lilypond[relative,notime]
4993 \property Staff.StaffSymbol \set #'line-count = #4
4994 \property Staff.TimeSignature \set #'transparent = ##t
4995 \clef "medicaea_do2" c
4999 @code{clefs-medicaea_fa} @tab
5000 Editio Medicaea style fa clef @tab
5001 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
5002 @lilypond[relative,notime]
5003 \property Staff.StaffSymbol \set #'line-count = #4
5004 \property Staff.TimeSignature \set #'transparent = ##t
5005 \clef "medicaea_fa2" c
5009 @code{clefs-hufnagel_do} @tab
5010 historic style hufnagel do clef @tab
5011 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
5012 @lilypond[relative,notime]
5013 \property Staff.StaffSymbol \set #'line-count = #4
5014 \property Staff.TimeSignature \set #'transparent = ##t
5015 \clef "hufnagel_do2" c
5019 @code{clefs-hufnagel_fa} @tab
5020 historic style hufnagel fa clef @tab
5021 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
5022 @lilypond[relative,notime]
5023 \property Staff.StaffSymbol \set #'line-count = #4
5024 \property Staff.TimeSignature \set #'transparent = ##t
5025 \clef "hufnagel_fa2" c
5029 @code{clefs-hufnagel_do_fa} @tab
5030 historic style hufnagel combined do/fa clef @tab
5031 @code{hufnagel_do_fa} @tab
5032 @lilypond[relative,notime]
5033 \property Staff.TimeSignature \set #'transparent = ##t
5034 \clef "hufnagel_do_fa" c
5039 @c --- This should go somewhere else: ---
5040 @c @item modern style percussion clef (glyph: @code{clefs-percussion})
5043 @c @code{percussion}
5045 @c @lilypond{\property Staff.TimeSignature \set #'transparent = ##t \clef "percussion" c'}
5047 @c @item modern style tab clef (glyph: @code{clefs-tab})
5052 @c @lilypond{\context Staff \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #6 \property Staff.TimeSignature \set #'transparent = ##t \clef "tab" c'}
5054 @emph{Modern style} means ``as is typeset in contemporary editions of
5055 transcribed mensural music''.
5057 @emph{Petrucci style} means ``inspired by printings published by the
5058 famous engraver Petrucci (1466-1539)''.
5060 @emph{Historic style} means ``as was typeset or written in historic
5061 editions (other than those of Petrucci)''.
5063 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
5065 Petrucci used C clefs with differently balanced left-side vertical
5066 beams, depending on which staffline it is printed.
5070 In this manual: for the percussion clef, see @ref{Percussion staves}.
5071 For the @code{TAB} clef, see @ref{Tablatures}.
5073 Internals: for modern clefs, see @ref{Clef}.
5077 The mensural g clef is temporarily mapped to the Petrucci g clef,
5078 until a new mensural g clef will have been implemented.
5083 @subsection Ancient flags
5089 Use the @code{flag-style} property of grob @internalsref{Stem} to
5090 select ancient flags. Besides the @code{default} flag style,
5091 only @code{mensural} style is supported:
5093 @lilypond[fragment,raggedright,verbatim]
5094 \property Voice.Stem \set #'flag-style = #'mensural
5095 \property Voice.Stem \set #'thickness = #1.0
5096 \property Voice.NoteHead \set #'style = #'mensural
5098 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
5099 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5102 Note that the innermost flare of each mensural flag always is
5103 vertically aligned with a staff line. If you do not like this
5104 behaviour, you can set the @code{adjust-if-on-staffline} property of
5105 grob @internalsref{Stem} to @code{##f}. Then, the vertical position
5106 of the end of each flare is different between notes on staff lines and
5107 notes between staff lines:
5109 @lilypond[fragment,raggedright]
5110 \property Voice.Stem \set #'flag-style = #'mensural
5111 \property Voice.Stem \set #'thickness = #1.0
5112 \property Voice.Stem \set #'adjust-if-on-staffline = ##f
5113 \property Voice.NoteHead \set #'style = #'mensural
5115 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
5116 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5119 There is no particular flag style for neo-mensural notation. Hence,
5120 when typesetting e.g. the incipit of a transcibed piece of mensural
5121 music, the default flag style should be used. There are no flags in
5122 Gregorian Chant notation.
5125 @node Ancient time signatures
5126 @subsection Ancient time signatures
5128 @cindex time signatures
5132 There is limited support for mensural time signatures. The
5133 glyphs are hard-wired to particular time fractions. In other words,
5134 to get a particular mensural signature glyph with the @code{\time n/m}
5135 command, @code{n} and @code{m} have to be chosen according to the
5141 \property Score.timing = ##f
5142 \property Score.barAlways = ##t
5143 s_\markup { "$\\backslash$time 4/4" }
5144 ^\markup { " " \musicglyph #"timesig-neo_mensural4/4" }
5146 s_\markup { "$\\backslash$time 2/2" }
5147 ^\markup { " " \musicglyph #"timesig-neo_mensural2/2" }
5149 s_\markup { "$\\backslash$time 6/4" }
5150 ^\markup { " " \musicglyph #"timesig-neo_mensural6/4" }
5152 s_\markup { "$\\backslash$time 6/8" }
5153 ^\markup { " " \musicglyph #"timesig-neo_mensural6/8" }
5155 s_\markup { "$\\backslash$time 3/2" }
5156 ^\markup { " " \musicglyph #"timesig-neo_mensural3/2" }
5158 s_\markup { "$\\backslash$time 3/4" }
5159 ^\markup { " " \musicglyph #"timesig-neo_mensural3/4" }
5161 s_\markup { "$\\backslash$time 9/4" }
5162 ^\markup { " " \musicglyph #"timesig-neo_mensural9/4" }
5164 s_\markup { "$\\backslash$time 9/8" }
5165 ^\markup { " " \musicglyph #"timesig-neo_mensural9/8" }
5167 s_\markup { "$\\backslash$time 4/8" }
5168 ^\markup { " " \musicglyph #"timesig-neo_mensural4/8" }
5170 s_\markup { "$\\backslash$time 2/4" }
5171 ^\markup { " " \musicglyph #"timesig-neo_mensural2/4" }
5179 \remove Staff_symbol_engraver
5180 \remove Clef_engraver
5181 \remove Time_signature_engraver
5187 Use the @code{style} property of grob @internalsref{TimeSignature} to
5188 select ancient time signatures. Supported styles are
5189 @code{neo_mensural} and @code{mensural}. The above table uses the
5190 @code{neo_mensural} style. This style is appropriate e.g. for the
5191 incipit of transcriptions of mensural pieces. The @code{mensural}
5192 style mimicks the look of historical printings of the 16th century.
5194 @inputfileref{input/test,time.ly} gives an overview over all available
5195 ancient and modern styles.
5199 Internals: @ref{Time signature} gives a general introduction into the use of time
5204 Mensural signature glyphs are mapped to time fractions in a
5205 hard-wired way. This mapping is sensible, but still arbitrary: given
5206 a mensural time signature, the time fraction represents a modern meter
5207 that usually will be a good choice when transcribing a mensural piece
5208 of music. For a particular piece of mensural music, however, the
5209 mapping may be unsatisfactory. In particular, the mapping assumes a
5210 fixed transcription of durations (e.g. brevis = half note in 2/2,
5211 i.e. 4:1). Some glyphs (such as the alternate glyph for 6/8 meter)
5212 are not at all accessible through the @code{\time} command.
5214 Mensural time signatures are supported typographically, but not yet
5215 musically. The internal representation of durations is
5216 based on a purely binary system; a ternary division such as 1 brevis =
5217 3 semibrevis (tempus perfectum) or 1 semibrevis = 3 minima (cum
5218 prolatione maiori) is not correctly handled: event times in ternary
5219 modes will be badly computed, resulting e.g. in horizontally
5220 misaligned note heads, and bar checks are likely to erroneously fail.
5222 The syntax and semantics of the @code{\time} command for mensural
5223 music is subject to change.
5226 @subsection Custodes
5231 A @emph{custos} (plural: @emph{custodes}; latin word for `guard') is a
5232 symbol that appears at the end of a staff. It anticipates the pitch
5233 of the first note(s) of the following line and thus helps the player
5234 or singer to manage line breaks during performance, thus enhancing
5235 readability of a score.
5237 Custodes were frequently used in music notation until the 17th
5238 century. Nowadays, they have survived only in a few particular forms
5239 of musical notation such as contemporary editions of Gregorian chant
5240 like the @emph{editio vaticana}. There are different custos glyphs
5241 used in different flavours of notational style.
5245 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
5246 @internalsref{Staff} context when declaring the @code{\paper} block,
5247 as shown in the following example:
5253 \consists Custos_engraver
5254 Custos \override #'style = #'mensural
5259 The result looks like this:
5265 \property Staff.Custos \set #'style = #'mensural
5272 \consists Custos_engraver
5279 The custos glyph is selected by the @code{style} property. The styles
5280 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
5281 @code{mensural}. They are demonstrated in the following fragment:
5291 { " " \musicglyph #"custodes-vaticana-u0" }
5295 { " " \musicglyph #"custodes-medicaea-u0" }
5299 { " " \musicglyph #"custodes-hufnagel-u0" }
5303 { " " \musicglyph #"custodes-mensural-u0" }
5312 \remove "Bar_number_engraver"
5316 \remove "Clef_engraver"
5317 \remove "Key_engraver"
5318 \remove "Time_signature_engraver"
5319 \remove "Staff_symbol_engraver"
5320 minimumVerticalExtent = ##f
5326 If the boolean property @code{adjust-if-on-staffline} is set to
5327 @code{#t} (which it is by default), lily typesets slightly different
5328 variants of the custos glyph, depending on whether the custos, is
5329 typeset on or between stafflines. The glyph will
5330 optically fit well into the staff, with the appendage on the right of
5331 the custos always ending at the same vertical position between two
5332 stafflines regardless of the pitch. If you set
5333 @code{adjust-if-on-staffline} to @code{#f}, then
5334 a compromise between both forms is used.
5336 Just like stems can be attached to noteheads in two directions
5337 @emph{up} and @emph{down}, each custos glyph is available with its
5338 appendage pointing either up or down. If the pitch of a custos is
5339 above a selectable position, the appendage will point downwards; if
5340 the pitch is below this position, the appendage will point upwards.
5341 Use property @code{neutral-position} to select this position. By
5342 default, it is set to @code{0}, such that the neutral position is the
5343 center of the staff. Use property @code{neutral-direction} to control
5344 what happens if a custos is typeset on the neutral position itself.
5345 By default, this property is set to @code{-1}, such that the appendage
5346 will point downwards. If set to @code{1}, the appendage will point
5347 upwards. Other values such as @code{0} are reserved for future
5348 extensions and should not be used.
5352 Internals: @internalsref{Custos}
5354 Examples: @inputfileref{input/regression,custos.ly}.
5358 @subsection Divisiones
5364 A @emph{divisio} (plural: @emph{divisiones}; latin word for
5365 `division') is a staff context symbol that is used to structure
5366 Gregorian music into phrases and sections. The musical meaning of
5367 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
5368 can be characterized as short, medium and long pause, somewhat like
5369 @ref{Breath marks}. The @emph{finalis} sign not only marks the end of
5370 a chant, but is also frequently used within a single
5371 antiphonal/responsorial chant to mark the end of each section.
5375 To use divisiones, include the file @code{gregorian-init.ly}. It
5376 contains definitions that you can apply by just inserting
5377 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
5378 and @code{\finalis} at proper places in the input. Some editions use
5379 @emph{virgula} or @emph{caesura} instead of divisio minima.
5380 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
5383 @lilypondfile[]{divisiones.ly}
5387 @cindex @code{\virgula}
5389 @cindex @code{\caesura}
5391 @cindex @code{\divisioMinima}
5392 @code{\divisioMinima},
5393 @cindex @code{\divisioMaior}
5394 @code{\divisioMaior},
5395 @cindex @code{\divisioMaxima}
5396 @code{\divisioMaxima},
5397 @cindex @code{\finalis}
5402 In this manual: @ref{Breath marks}.
5404 Internals: @internalsref{BreathingSign}, @internalsref{BreathingSignEvent},
5406 Examples: @inputfileref{input/test,divisiones.ly}
5409 @subsection Ligatures
5413 @c TODO: Should double check if I recalled things correctly when I wrote
5414 @c down the following paragraph by heart.
5416 In musical terminology, a ligature is a coherent graphical symbol that
5417 represents at least two distinct notes. Ligatures originally appeared
5418 in the manuscripts of Gregorian chant notation roughly since the 9th
5419 century as an allusion to the accent symbols of greek lyric poetry to
5420 denote ascending or descending sequences of notes. Both, the shape
5421 and the exact meaning of ligatures changed tremendously during the
5422 following centuries: In early notation, ligatures were used for
5423 monophonic tunes (Gregorian chant) and very soon denoted also the way
5424 of performance in the sense of articulation. With upcoming
5425 multiphony, the need for a metric system arised, since multiple voices
5426 of a piece have to be synchronized some way. New notation systems
5427 were invented that used the manifold shapes of ligatures to now denote
5428 rhythmical patterns (e.g. black mensural notation, mannered notation,
5429 ars nova). With the invention of the metric system of the white
5430 mensural notation, the need for ligatures to denote such patterns
5431 disappeared. Nevertheless, ligatures were still in use in the
5432 mensural system for a couple of decades until they finally disappeared
5433 during the late 16th / early 17th century. Still, ligatures have
5434 survived in contemporary editions of Gregorian chant such as the
5435 Editio Vaticana from 1905/08.
5439 Syntactically, ligatures are simply enclosed by @code{\[} and
5440 @code{\]}. Some ligature styles (such as Editio Vaticana) may need
5441 additional input syntax specific for this particular type of ligature.
5442 By default, the @internalsref{LigatureBracket} engraver just puts a
5443 square bracket above the ligature:
5445 @lilypond[raggedright,verbatim]
5447 \notes \transpose c c' {
5455 To select a specific style of ligatures, a proper ligature engraver
5456 has to be added to the @internalsref{Voice} context, as explained in
5457 the following subsections. Only white mensural ligatures
5458 are supported with certain limitations. Support for Editio Vaticana
5459 will be added in the future.
5462 * White mensural ligatures::
5463 * Gregorian square neumes ligatures::
5466 @node White mensural ligatures
5467 @subsubsection White mensural ligatures
5469 @cindex Mensural ligatures
5470 @cindex White mensural ligatures
5472 There is limited support for white mensural ligatures. The
5473 implementation is still experimental; it may output strange
5474 warnings or even crash in some cases or produce weird results on more
5479 To engrave white mensural ligatures, in the paper block the
5480 @internalsref{Mensural_ligature_engraver} has to be put into the
5481 @internalsref{Voice} context, and remove the
5482 @internalsref{Ligature_bracket_engraver}:
5488 \remove Ligature_bracket_engraver
5489 \consists Mensural_ligature_engraver
5494 There is no additional input language to describe the shape of a
5495 white mensural ligature. The shape is rather determined solely from
5496 the pitch and duration of the enclosed notes. While this approach may
5497 take a new user a while to get accustomed, it has the great advantage
5498 that the full musical information of the ligature is known internally.
5499 This is not only required for correct MIDI output, but also allows for
5500 automatic transcription of the ligatures.
5505 \property Score.timing = ##f
5506 \property Score.defaultBarType = "empty"
5507 \property Voice.NoteHead \set #'style = #'neo_mensural
5508 \property Staff.TimeSignature \set #'style = #'neo_mensural
5510 \[ g\longa c\breve a\breve f\breve d'\longa \]
5512 \[ e1 f1 a\breve g\longa \]
5514 @lilypond[raggedright]
5516 \notes \transpose c c' {
5517 \property Score.timing = ##f
5518 \property Score.defaultBarType = "empty"
5519 \property Voice.NoteHead \set #'style = #'neo_mensural
5520 \property Staff.TimeSignature \set #'style = #'neo_mensural
5522 \[ g\longa c\breve a\breve f\breve d'\longa \]
5524 \[ e1 f1 a\breve g\longa \]
5529 \remove Ligature_bracket_engraver
5530 \consists Mensural_ligature_engraver
5536 Without replacing @internalsref{Ligature_bracket_engraver} with
5537 @internalsref{Mensural_ligature_engraver}, the same music transcribes
5540 @lilypond[raggedright]
5542 \notes \transpose c c' {
5543 \property Score.timing = ##f
5544 \property Score.defaultBarType = "empty"
5545 \property Voice.NoteHead \set #'style = #'neo_mensural
5546 \property Staff.TimeSignature \set #'style = #'neo_mensural
5548 \[ g\longa c\breve a\breve f\breve d'\longa \]
5550 \[ e1 f1 a\breve g\longa \]
5556 @node Gregorian square neumes ligatures
5557 @subsubsection Gregorian square neumes ligatures
5559 @cindex Square neumes ligatures
5560 @cindex Gregorian square neumes ligatures
5562 Gregorian square neumes notation (following the style of the Editio
5563 Vaticana) is under heavy development, but not yet really usable for
5564 production purposes. Core ligatures can already be typeset, but
5565 essential issues for serious typesetting are still under development,
5566 such as (among others) horizontal alignment of multiple ligatures,
5567 lyrics alignment and proper accidentals handling. Still, this section
5568 gives a sneak preview of what Gregorian chant may look like once it
5571 The following table contains the extended neumes table of the 2nd
5572 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
5573 1983 by the monks of Solesmes.
5575 @multitable @columnfractions .4 .2 .2 .2
5578 @b{Neuma aut@*Neumarum Elementa} @tab
5579 @b{Figurae@*Rectae} @tab
5580 @b{Figurae@*Liquescentes Auctae} @tab
5581 @b{Figurae@*Liquescentes Deminutae}
5583 @c TODO: \paper block is identical in all of the below examples.
5584 @c Therefore, it should somehow be included rather than duplicated all
5587 @c why not make identifiers in ly/engraver-init.ly? --hwn
5589 @c Because it's just used to typeset plain notes without
5590 @c a staff for demonstration purposes rather than something
5591 @c special of Gregorian chant notation. --jr
5596 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.5\cm]
5597 \include "gregorian-init.ly"
5599 \notes \transpose c c' {
5602 \noBreak s^\markup {"a"} \noBreak
5604 % Punctum Inclinatum
5606 \noBreak s^\markup {"b"}
5612 \remove "Bar_number_engraver"
5616 \remove "Clef_engraver"
5617 \remove "Key_engraver"
5618 StaffSymbol \set #'transparent = ##t
5619 \remove "Time_signature_engraver"
5620 \remove "Bar_engraver"
5621 minimumVerticalExtent = ##f
5625 \remove Ligature_bracket_engraver
5626 \consists Vaticana_ligature_engraver
5627 NoteHead \set #'style = #'vaticana_punctum
5628 Stem \set #'transparent = ##t
5634 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.5\cm]
5635 \include "gregorian-init.ly"
5637 \notes \transpose c c' {
5638 % Punctum Auctum Ascendens
5639 \[ \auctum \ascendens b \]
5640 \noBreak s^\markup {"c"} \noBreak
5642 % Punctum Auctum Descendens
5643 \[ \auctum \descendens b \]
5644 \noBreak s^\markup {"d"} \noBreak
5646 % Punctum Inclinatum Auctum
5647 \[ \inclinatum \auctum b \]
5648 \noBreak s^\markup {"e"}
5654 \remove "Bar_number_engraver"
5658 \remove "Clef_engraver"
5659 \remove "Key_engraver"
5660 StaffSymbol \set #'transparent = ##t
5661 \remove "Time_signature_engraver"
5662 \remove "Bar_engraver"
5663 minimumVerticalExtent = ##f
5667 \remove Ligature_bracket_engraver
5668 \consists Vaticana_ligature_engraver
5669 NoteHead \set #'style = #'vaticana_punctum
5670 Stem \set #'transparent = ##t
5676 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5677 \include "gregorian-init.ly"
5679 \notes \transpose c c' {
5680 % Punctum Inclinatum Parvum
5681 \[ \inclinatum \deminutum b \]
5682 \noBreak s^\markup {"f"}
5688 \remove "Bar_number_engraver"
5692 \remove "Clef_engraver"
5693 \remove "Key_engraver"
5694 StaffSymbol \set #'transparent = ##t
5695 \remove "Time_signature_engraver"
5696 \remove "Bar_engraver"
5697 minimumVerticalExtent = ##f
5701 \remove Ligature_bracket_engraver
5702 \consists Vaticana_ligature_engraver
5703 NoteHead \set #'style = #'vaticana_punctum
5704 Stem \set #'transparent = ##t
5713 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5714 \include "gregorian-init.ly"
5716 \notes \transpose c c' {
5719 \noBreak s^\markup {"g"}
5725 \remove "Bar_number_engraver"
5729 \remove "Clef_engraver"
5730 \remove "Key_engraver"
5731 StaffSymbol \set #'transparent = ##t
5732 \remove "Time_signature_engraver"
5733 \remove "Bar_engraver"
5734 minimumVerticalExtent = ##f
5738 \remove Ligature_bracket_engraver
5739 \consists Vaticana_ligature_engraver
5740 NoteHead \set #'style = #'vaticana_punctum
5741 Stem \set #'transparent = ##t
5750 @code{3. Apostropha vel Stropha}
5752 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5753 \include "gregorian-init.ly"
5755 \notes \transpose c c' {
5758 \noBreak s^\markup {"h"}
5764 \remove "Bar_number_engraver"
5768 \remove "Clef_engraver"
5769 \remove "Key_engraver"
5770 StaffSymbol \set #'transparent = ##t
5771 \remove "Time_signature_engraver"
5772 \remove "Bar_engraver"
5773 minimumVerticalExtent = ##f
5777 \remove Ligature_bracket_engraver
5778 \consists Vaticana_ligature_engraver
5779 NoteHead \set #'style = #'vaticana_punctum
5780 Stem \set #'transparent = ##t
5786 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5787 \include "gregorian-init.ly"
5789 \notes \transpose c c' {
5791 \[ \stropha \auctum b \]
5792 \noBreak s^\markup {"i"}
5798 \remove "Bar_number_engraver"
5802 \remove "Clef_engraver"
5803 \remove "Key_engraver"
5804 StaffSymbol \set #'transparent = ##t
5805 \remove "Time_signature_engraver"
5806 \remove "Bar_engraver"
5807 minimumVerticalExtent = ##f
5811 \remove Ligature_bracket_engraver
5812 \consists Vaticana_ligature_engraver
5813 NoteHead \set #'style = #'vaticana_punctum
5814 Stem \set #'transparent = ##t
5824 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5825 \include "gregorian-init.ly"
5827 \notes \transpose c c' {
5830 \noBreak s^\markup {"j"}
5836 \remove "Bar_number_engraver"
5840 \remove "Clef_engraver"
5841 \remove "Key_engraver"
5842 StaffSymbol \set #'transparent = ##t
5843 \remove "Time_signature_engraver"
5844 \remove "Bar_engraver"
5845 minimumVerticalExtent = ##f
5849 \remove Ligature_bracket_engraver
5850 \consists Vaticana_ligature_engraver
5851 NoteHead \set #'style = #'vaticana_punctum
5852 Stem \set #'transparent = ##t
5861 @code{5. Clivis vel Flexa}
5863 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5864 \include "gregorian-init.ly"
5866 \notes \transpose c c' {
5875 \remove "Bar_number_engraver"
5879 \remove "Clef_engraver"
5880 \remove "Key_engraver"
5881 StaffSymbol \set #'transparent = ##t
5882 \remove "Time_signature_engraver"
5883 \remove "Bar_engraver"
5884 minimumVerticalExtent = ##f
5888 \remove Ligature_bracket_engraver
5889 \consists Vaticana_ligature_engraver
5890 NoteHead \set #'style = #'vaticana_punctum
5891 Stem \set #'transparent = ##t
5897 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.0\cm]
5898 \include "gregorian-init.ly"
5900 \notes \transpose c c' {
5901 % Clivis Aucta Descendens
5902 \[ b \flexa \auctum \descendens g \]
5903 \noBreak s^\markup {"l"} \noBreak
5905 % Clivis Aucta Ascendens
5906 \[ b \flexa \auctum \ascendens g \]
5907 \noBreak s^\markup {"m"}
5913 \remove "Bar_number_engraver"
5917 \remove "Clef_engraver"
5918 \remove "Key_engraver"
5919 StaffSymbol \set #'transparent = ##t
5920 \remove "Time_signature_engraver"
5921 \remove "Bar_engraver"
5922 minimumVerticalExtent = ##f
5926 \remove Ligature_bracket_engraver
5927 \consists Vaticana_ligature_engraver
5928 NoteHead \set #'style = #'vaticana_punctum
5929 Stem \set #'transparent = ##t
5935 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5936 \include "gregorian-init.ly"
5938 \notes \transpose c c' {
5940 \[ b \flexa \deminutum g \]
5947 \remove "Bar_number_engraver"
5951 \remove "Clef_engraver"
5952 \remove "Key_engraver"
5953 StaffSymbol \set #'transparent = ##t
5954 \remove "Time_signature_engraver"
5955 \remove "Bar_engraver"
5956 minimumVerticalExtent = ##f
5960 \remove Ligature_bracket_engraver
5961 \consists Vaticana_ligature_engraver
5962 NoteHead \set #'style = #'vaticana_punctum
5963 Stem \set #'transparent = ##t
5970 @code{6. Podatus vel Pes}
5972 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5973 \include "gregorian-init.ly"
5975 \notes \transpose c c' {
5984 \remove "Bar_number_engraver"
5988 \remove "Clef_engraver"
5989 \remove "Key_engraver"
5990 StaffSymbol \set #'transparent = ##t
5991 \remove "Time_signature_engraver"
5992 \remove "Bar_engraver"
5993 minimumVerticalExtent = ##f
5997 \remove Ligature_bracket_engraver
5998 \consists Vaticana_ligature_engraver
5999 NoteHead \set #'style = #'vaticana_punctum
6000 Stem \set #'transparent = ##t
6006 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6007 \include "gregorian-init.ly"
6009 \notes \transpose c c' {
6010 % Pes Auctus Descendens
6011 \[ g \pes \auctum \descendens b \]
6012 \noBreak s^\markup {"p"} \noBreak
6014 % Pes Auctus Ascendens
6015 \[ g \pes \auctum \ascendens b \]
6016 \noBreak s^\markup {"q"}
6022 \remove "Bar_number_engraver"
6026 \remove "Clef_engraver"
6027 \remove "Key_engraver"
6028 StaffSymbol \set #'transparent = ##t
6029 \remove "Time_signature_engraver"
6030 \remove "Bar_engraver"
6031 minimumVerticalExtent = ##f
6035 \remove Ligature_bracket_engraver
6036 \consists Vaticana_ligature_engraver
6037 NoteHead \set #'style = #'vaticana_punctum
6038 Stem \set #'transparent = ##t
6044 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6045 \include "gregorian-init.ly"
6047 \notes \transpose c c' {
6049 \[ g \pes \deminutum b \]
6056 \remove "Bar_number_engraver"
6060 \remove "Clef_engraver"
6061 \remove "Key_engraver"
6062 StaffSymbol \set #'transparent = ##t
6063 \remove "Time_signature_engraver"
6064 \remove "Bar_engraver"
6065 minimumVerticalExtent = ##f
6069 \remove Ligature_bracket_engraver
6070 \consists Vaticana_ligature_engraver
6071 NoteHead \set #'style = #'vaticana_punctum
6072 Stem \set #'transparent = ##t
6079 @code{7. Pes Quassus}
6081 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6082 \include "gregorian-init.ly"
6084 \notes \transpose c c' {
6086 \[ \oriscus g \pes \virga b \]
6093 \remove "Bar_number_engraver"
6097 \remove "Clef_engraver"
6098 \remove "Key_engraver"
6099 StaffSymbol \set #'transparent = ##t
6100 \remove "Time_signature_engraver"
6101 \remove "Bar_engraver"
6102 minimumVerticalExtent = ##f
6106 \remove Ligature_bracket_engraver
6107 \consists Vaticana_ligature_engraver
6108 NoteHead \set #'style = #'vaticana_punctum
6109 Stem \set #'transparent = ##t
6115 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6116 \include "gregorian-init.ly"
6118 \notes \transpose c c' {
6119 % Pes Quassus Auctus Descendens
6120 \[ \oriscus g \pes \auctum \descendens b \]
6127 \remove "Bar_number_engraver"
6131 \remove "Clef_engraver"
6132 \remove "Key_engraver"
6133 StaffSymbol \set #'transparent = ##t
6134 \remove "Time_signature_engraver"
6135 \remove "Bar_engraver"
6136 minimumVerticalExtent = ##f
6140 \remove Ligature_bracket_engraver
6141 \consists Vaticana_ligature_engraver
6142 NoteHead \set #'style = #'vaticana_punctum
6143 Stem \set #'transparent = ##t
6151 @code{8. Quilisma Pes}
6153 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6154 \include "gregorian-init.ly"
6156 \notes \transpose c c' {
6158 \[ \quilisma g \pes b \]
6165 \remove "Bar_number_engraver"
6169 \remove "Clef_engraver"
6170 \remove "Key_engraver"
6171 StaffSymbol \set #'transparent = ##t
6172 \remove "Time_signature_engraver"
6173 \remove "Bar_engraver"
6174 minimumVerticalExtent = ##f
6178 \remove Ligature_bracket_engraver
6179 \consists Vaticana_ligature_engraver
6180 NoteHead \set #'style = #'vaticana_punctum
6181 Stem \set #'transparent = ##t
6187 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6188 \include "gregorian-init.ly"
6190 \notes \transpose c c' {
6191 % Quilisma Pes Auctus Descendens
6192 \[ \quilisma g \pes \auctum \descendens b \]
6199 \remove "Bar_number_engraver"
6203 \remove "Clef_engraver"
6204 \remove "Key_engraver"
6205 StaffSymbol \set #'transparent = ##t
6206 \remove "Time_signature_engraver"
6207 \remove "Bar_engraver"
6208 minimumVerticalExtent = ##f
6212 \remove Ligature_bracket_engraver
6213 \consists Vaticana_ligature_engraver
6214 NoteHead \set #'style = #'vaticana_punctum
6215 Stem \set #'transparent = ##t
6223 @code{9. Podatus Initio Debilis}
6225 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6226 \include "gregorian-init.ly"
6228 \notes \transpose c c' {
6229 % Pes Initio Debilis
6230 \[ \deminutum g \pes b \]
6237 \remove "Bar_number_engraver"
6241 \remove "Clef_engraver"
6242 \remove "Key_engraver"
6243 StaffSymbol \set #'transparent = ##t
6244 \remove "Time_signature_engraver"
6245 \remove "Bar_engraver"
6246 minimumVerticalExtent = ##f
6250 \remove Ligature_bracket_engraver
6251 \consists Vaticana_ligature_engraver
6252 NoteHead \set #'style = #'vaticana_punctum
6253 Stem \set #'transparent = ##t
6259 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6260 \include "gregorian-init.ly"
6262 \notes \transpose c c' {
6263 % Pes Auctus Descendens Initio Debilis
6264 \[ \deminutum g \pes \auctum \descendens b \]
6271 \remove "Bar_number_engraver"
6275 \remove "Clef_engraver"
6276 \remove "Key_engraver"
6277 StaffSymbol \set #'transparent = ##t
6278 \remove "Time_signature_engraver"
6279 \remove "Bar_engraver"
6280 minimumVerticalExtent = ##f
6284 \remove Ligature_bracket_engraver
6285 \consists Vaticana_ligature_engraver
6286 NoteHead \set #'style = #'vaticana_punctum
6287 Stem \set #'transparent = ##t
6297 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6298 \include "gregorian-init.ly"
6300 \notes \transpose c c' {
6302 \[ a \pes b \flexa g \]
6309 \remove "Bar_number_engraver"
6313 \remove "Clef_engraver"
6314 \remove "Key_engraver"
6315 StaffSymbol \set #'transparent = ##t
6316 \remove "Time_signature_engraver"
6317 \remove "Bar_engraver"
6318 minimumVerticalExtent = ##f
6322 \remove Ligature_bracket_engraver
6323 \consists Vaticana_ligature_engraver
6324 NoteHead \set #'style = #'vaticana_punctum
6325 Stem \set #'transparent = ##t
6331 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6332 \include "gregorian-init.ly"
6334 \notes \transpose c c' {
6335 % Torculus Auctus Descendens
6336 \[ a \pes b \flexa \auctum \descendens g \]
6343 \remove "Bar_number_engraver"
6347 \remove "Clef_engraver"
6348 \remove "Key_engraver"
6349 StaffSymbol \set #'transparent = ##t
6350 \remove "Time_signature_engraver"
6351 \remove "Bar_engraver"
6352 minimumVerticalExtent = ##f
6356 \remove Ligature_bracket_engraver
6357 \consists Vaticana_ligature_engraver
6358 NoteHead \set #'style = #'vaticana_punctum
6359 Stem \set #'transparent = ##t
6365 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6366 \include "gregorian-init.ly"
6368 \notes \transpose c c' {
6369 % Torculus Deminutus
6370 \[ a \pes b \flexa \deminutum g \]
6377 \remove "Bar_number_engraver"
6381 \remove "Clef_engraver"
6382 \remove "Key_engraver"
6383 StaffSymbol \set #'transparent = ##t
6384 \remove "Time_signature_engraver"
6385 \remove "Bar_engraver"
6386 minimumVerticalExtent = ##f
6390 \remove Ligature_bracket_engraver
6391 \consists Vaticana_ligature_engraver
6392 NoteHead \set #'style = #'vaticana_punctum
6393 Stem \set #'transparent = ##t
6400 @code{11. Torculus Initio Debilis}
6402 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6403 \include "gregorian-init.ly"
6405 \notes \transpose c c' {
6406 % Torculus Initio Debilis
6407 \[ \deminutum a \pes b \flexa g \]
6414 \remove "Bar_number_engraver"
6418 \remove "Clef_engraver"
6419 \remove "Key_engraver"
6420 StaffSymbol \set #'transparent = ##t
6421 \remove "Time_signature_engraver"
6422 \remove "Bar_engraver"
6423 minimumVerticalExtent = ##f
6427 \remove Ligature_bracket_engraver
6428 \consists Vaticana_ligature_engraver
6429 NoteHead \set #'style = #'vaticana_punctum
6430 Stem \set #'transparent = ##t
6436 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6437 \include "gregorian-init.ly"
6439 \notes \transpose c c' {
6440 % Torculus Auctus Descendens Initio Debilis
6441 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6448 \remove "Bar_number_engraver"
6452 \remove "Clef_engraver"
6453 \remove "Key_engraver"
6454 StaffSymbol \set #'transparent = ##t
6455 \remove "Time_signature_engraver"
6456 \remove "Bar_engraver"
6457 minimumVerticalExtent = ##f
6461 \remove Ligature_bracket_engraver
6462 \consists Vaticana_ligature_engraver
6463 NoteHead \set #'style = #'vaticana_punctum
6464 Stem \set #'transparent = ##t
6470 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6471 \include "gregorian-init.ly"
6473 \notes \transpose c c' {
6474 % Torculus Deminutus Initio Debilis
6475 \[ \deminutum a \pes b \flexa \deminutum g \]
6482 \remove "Bar_number_engraver"
6486 \remove "Clef_engraver"
6487 \remove "Key_engraver"
6488 StaffSymbol \set #'transparent = ##t
6489 \remove "Time_signature_engraver"
6490 \remove "Bar_engraver"
6491 minimumVerticalExtent = ##f
6495 \remove Ligature_bracket_engraver
6496 \consists Vaticana_ligature_engraver
6497 NoteHead \set #'style = #'vaticana_punctum
6498 Stem \set #'transparent = ##t
6505 @code{12. Porrectus}
6507 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6508 \include "gregorian-init.ly"
6510 \notes \transpose c c' {
6512 \[ a \flexa g \pes b \]
6519 \remove "Bar_number_engraver"
6523 \remove "Clef_engraver"
6524 \remove "Key_engraver"
6525 StaffSymbol \set #'transparent = ##t
6526 \remove "Time_signature_engraver"
6527 \remove "Bar_engraver"
6528 minimumVerticalExtent = ##f
6532 \remove Ligature_bracket_engraver
6533 \consists Vaticana_ligature_engraver
6534 NoteHead \set #'style = #'vaticana_punctum
6535 Stem \set #'transparent = ##t
6541 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6542 \include "gregorian-init.ly"
6544 \notes \transpose c c' {
6545 % Porrectus Auctus Descendens
6546 \[ a \flexa g \pes \auctum \descendens b \]
6553 \remove "Bar_number_engraver"
6557 \remove "Clef_engraver"
6558 \remove "Key_engraver"
6559 StaffSymbol \set #'transparent = ##t
6560 \remove "Time_signature_engraver"
6561 \remove "Bar_engraver"
6562 minimumVerticalExtent = ##f
6566 \remove Ligature_bracket_engraver
6567 \consists Vaticana_ligature_engraver
6568 NoteHead \set #'style = #'vaticana_punctum
6569 Stem \set #'transparent = ##t
6575 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6576 \include "gregorian-init.ly"
6578 \notes \transpose c c' {
6579 % Porrectus Deminutus
6580 \[ a \flexa g \pes \deminutum b \]
6587 \remove "Bar_number_engraver"
6591 \remove "Clef_engraver"
6592 \remove "Key_engraver"
6593 StaffSymbol \set #'transparent = ##t
6594 \remove "Time_signature_engraver"
6595 \remove "Bar_engraver"
6596 minimumVerticalExtent = ##f
6600 \remove Ligature_bracket_engraver
6601 \consists Vaticana_ligature_engraver
6602 NoteHead \set #'style = #'vaticana_punctum
6603 Stem \set #'transparent = ##t
6612 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6613 \include "gregorian-init.ly"
6615 \notes \transpose c c' {
6617 \[ \virga b \inclinatum a \inclinatum g \]
6624 \remove "Bar_number_engraver"
6628 \remove "Clef_engraver"
6629 \remove "Key_engraver"
6630 StaffSymbol \set #'transparent = ##t
6631 \remove "Time_signature_engraver"
6632 \remove "Bar_engraver"
6633 minimumVerticalExtent = ##f
6637 \remove Ligature_bracket_engraver
6638 \consists Vaticana_ligature_engraver
6639 NoteHead \set #'style = #'vaticana_punctum
6640 Stem \set #'transparent = ##t
6646 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6647 \include "gregorian-init.ly"
6649 \notes \transpose c c' {
6651 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6658 \remove "Bar_number_engraver"
6662 \remove "Clef_engraver"
6663 \remove "Key_engraver"
6664 StaffSymbol \set #'transparent = ##t
6665 \remove "Time_signature_engraver"
6666 \remove "Bar_engraver"
6667 minimumVerticalExtent = ##f
6671 \remove Ligature_bracket_engraver
6672 \consists Vaticana_ligature_engraver
6673 NoteHead \set #'style = #'vaticana_punctum
6674 Stem \set #'transparent = ##t
6680 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6681 \include "gregorian-init.ly"
6683 \notes \transpose c c' {
6684 % Climacus Deminutus
6685 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6692 \remove "Bar_number_engraver"
6696 \remove "Clef_engraver"
6697 \remove "Key_engraver"
6698 StaffSymbol \set #'transparent = ##t
6699 \remove "Time_signature_engraver"
6700 \remove "Bar_engraver"
6701 minimumVerticalExtent = ##f
6705 \remove Ligature_bracket_engraver
6706 \consists Vaticana_ligature_engraver
6707 NoteHead \set #'style = #'vaticana_punctum
6708 Stem \set #'transparent = ##t
6715 @code{14. Scandicus}
6717 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6718 \include "gregorian-init.ly"
6720 \notes \transpose c c' {
6722 \[ g \pes a \virga b \]
6729 \remove "Bar_number_engraver"
6733 \remove "Clef_engraver"
6734 \remove "Key_engraver"
6735 StaffSymbol \set #'transparent = ##t
6736 \remove "Time_signature_engraver"
6737 \remove "Bar_engraver"
6738 minimumVerticalExtent = ##f
6742 \remove Ligature_bracket_engraver
6743 \consists Vaticana_ligature_engraver
6744 NoteHead \set #'style = #'vaticana_punctum
6745 Stem \set #'transparent = ##t
6751 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6752 \include "gregorian-init.ly"
6754 \notes \transpose c c' {
6755 % Scandicus Auctus Descendens
6756 \[ g \pes a \pes \auctum \descendens b \]
6763 \remove "Bar_number_engraver"
6767 \remove "Clef_engraver"
6768 \remove "Key_engraver"
6769 StaffSymbol \set #'transparent = ##t
6770 \remove "Time_signature_engraver"
6771 \remove "Bar_engraver"
6772 minimumVerticalExtent = ##f
6776 \remove Ligature_bracket_engraver
6777 \consists Vaticana_ligature_engraver
6778 NoteHead \set #'style = #'vaticana_punctum
6779 Stem \set #'transparent = ##t
6785 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6786 \include "gregorian-init.ly"
6788 \notes \transpose c c' {
6789 % Scandicus Deminutus
6790 \[ g \pes a \pes \deminutum b \]
6797 \remove "Bar_number_engraver"
6801 \remove "Clef_engraver"
6802 \remove "Key_engraver"
6803 StaffSymbol \set #'transparent = ##t
6804 \remove "Time_signature_engraver"
6805 \remove "Bar_engraver"
6806 minimumVerticalExtent = ##f
6810 \remove Ligature_bracket_engraver
6811 \consists Vaticana_ligature_engraver
6812 NoteHead \set #'style = #'vaticana_punctum
6813 Stem \set #'transparent = ##t
6822 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6823 \include "gregorian-init.ly"
6825 \notes \transpose c c' {
6827 \[ g \oriscus a \pes \virga b \]
6834 \remove "Bar_number_engraver"
6838 \remove "Clef_engraver"
6839 \remove "Key_engraver"
6840 StaffSymbol \set #'transparent = ##t
6841 \remove "Time_signature_engraver"
6842 \remove "Bar_engraver"
6843 minimumVerticalExtent = ##f
6847 \remove Ligature_bracket_engraver
6848 \consists Vaticana_ligature_engraver
6849 NoteHead \set #'style = #'vaticana_punctum
6850 Stem \set #'transparent = ##t
6856 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6857 \include "gregorian-init.ly"
6859 \notes \transpose c c' {
6860 % Salicus Auctus Descendens
6861 \[ g \oriscus a \pes \auctum \descendens b \]
6868 \remove "Bar_number_engraver"
6872 \remove "Clef_engraver"
6873 \remove "Key_engraver"
6874 StaffSymbol \set #'transparent = ##t
6875 \remove "Time_signature_engraver"
6876 \remove "Bar_engraver"
6877 minimumVerticalExtent = ##f
6881 \remove Ligature_bracket_engraver
6882 \consists Vaticana_ligature_engraver
6883 NoteHead \set #'style = #'vaticana_punctum
6884 Stem \set #'transparent = ##t
6894 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6895 \include "gregorian-init.ly"
6897 \notes \transpose c c' {
6899 \[ \stropha b \stropha b \stropha a \]
6906 \remove "Bar_number_engraver"
6910 \remove "Clef_engraver"
6911 \remove "Key_engraver"
6912 StaffSymbol \set #'transparent = ##t
6913 \remove "Time_signature_engraver"
6914 \remove "Bar_engraver"
6915 minimumVerticalExtent = ##f
6919 \remove Ligature_bracket_engraver
6920 \consists Vaticana_ligature_engraver
6921 NoteHead \set #'style = #'vaticana_punctum
6922 Stem \set #'transparent = ##t
6934 Unlike most other neumes notation systems, the input language for
6935 neumes does not necessarily reflect directly the typographical
6936 appearance, but is designed to solely focuse on musical meaning. For
6937 example, @code{\[ a \pes b \flexa g \]} produces a Torculus consisting
6938 of three Punctum heads, while @code{\[ a \flexa g \pes b \]} produces
6939 a Porrectus with a curved flexa shape and only a single Punctum head.
6940 There is no command to explicitly typeset the curved flexa shape; the
6941 decision of when to typeset a curved flexa shape is purely taken from
6942 the musical input. The idea of this approach is to separate the
6943 musical aspects of the input from the notation style of the output.
6944 This way, the same input can be reused to typeset the same music in a
6945 different style of Gregorian chant notation such as Hufnagel (also
6946 known as German gothic neumes) or Medicaea (kind of a very simple
6947 forerunner of the Editio Vaticana). As soon as Hufnagel ligature
6948 engraver and Medicaea ligature engraver will have been implemented, it
6949 will be as simple as replacing the ligature engraver in the
6950 @internalsref{Voice} context to get the desired notation style from
6953 The following table shows the code fragments that produce the
6954 ligatures in the above neumes table. The letter in the first column
6955 in each line of the below table indicates to which ligature in the
6956 above table it refers. The second column gives the name of the
6957 ligature. The third column shows the code fragment that produces this
6958 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
6960 @multitable @columnfractions .1 .4 .5
6974 Punctum Inclinatum @tab
6975 @code{\[ \inclinatum b \]}
6979 Punctum Auctum Ascendens @tab
6980 @code{\[ \auctum \ascendens b \]}
6984 Punctum Auctum Descendens @tab
6985 @code{\[ \auctum \descendens b \]}
6989 Punctum Inclinatum Auctum @tab
6990 @code{\[ \inclinatum \auctum b \]}
6994 Punctum Inclinatum Parvum @tab
6995 @code{\[ \inclinatum \deminutum b \]}
7000 @code{\[ \virga b \]}
7005 @code{\[ \stropha b \]}
7010 @code{\[ \stropha \auctum b \]}
7015 @code{\[ \oriscus b \]}
7019 Clivis vel Flexa @tab
7020 @code{\[ b \flexa g \]}
7024 Clivis Aucta Descendens @tab
7025 @code{\[ b \flexa \auctum \descendens g \]}
7029 Clivis Aucta Ascendens @tab
7030 @code{\[ b \flexa \auctum \ascendens g \]}
7035 @code{\[ b \flexa \deminutum g \]}
7039 Podatus vel Pes @tab
7040 @code{\[ g \pes b \]}
7044 Pes Auctus Descendens @tab
7045 @code{\[ g \pes \auctum \descendens b \]}
7049 Pes Auctus Ascendens @tab
7050 @code{\[ g \pes \auctum \ascendens b \]}
7055 @code{\[ g \pes \deminutum b \]}
7060 @code{\[ \oriscus g \pes \virga b \]}
7064 Pes Quassus Auctus Descendens @tab
7065 @code{\[ \oriscus g \pes \auctum \descendens b \]}
7070 @code{\[ \quilisma g \pes b \]}
7074 Quilisma Pes Auctus Descendens @tab
7075 @code{\[ \quilisma g \pes \auctum \descendens b \]}
7079 Pes Initio Debilis @tab
7080 @code{\[ \deminutum g \pes b \]}
7084 Pes Auctus Descendens Initio Debilis @tab
7085 @code{\[ \deminutum g \pes \auctum \descendens b \]}
7090 @code{\[ a \pes b \flexa g \]}
7094 Torculus Auctus Descendens @tab
7095 @code{\[ a \pes b \flexa \auctum \descendens g \]}
7099 Torculus Deminutus @tab
7100 @code{\[ a \pes b \flexa \deminutum g \]}
7104 Torculus Initio Debilis @tab
7105 @code{\[ \deminutum a \pes b \flexa g \]}
7109 Torculus Auctus Descendens Initio Debilis @tab
7110 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
7114 Torculus Deminutus Initio Debilis @tab
7115 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
7120 @code{\[ a \flexa g \pes b \]}
7124 Porrectus Auctus Descendens @tab
7125 @code{\[ a \flexa g \pes \auctum \descendens b \]}
7129 Porrectus Deminutus @tab
7130 @code{\[ a \flexa g \pes \deminutum b \]}
7135 @code{\[ \virga b \inclinatum a \inclinatum g \]}
7139 Climacus Auctus @tab
7140 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
7144 Climacus Deminutus @tab
7145 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
7150 @code{\[ g \pes a \virga b \]}
7154 Scandicus Auctus Descendens @tab
7155 @code{\[ g \pes a \pes \auctum \descendens b \]}
7159 Scandicus Deminutus @tab
7160 @code{\[ g \pes a \pes \deminutum b \]}
7165 @code{\[ g \oriscus a \pes \virga b \]}
7169 Salicus Auctus Descendens @tab
7170 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
7175 @code{\[ \stropha b \stropha b \stropha a \]}
7181 The following head prefixes are supported:
7183 @cindex @code{\virga}
7185 @cindex @code{\stropha}
7187 @cindex @code{\inclinatum}
7189 @cindex @code{\auctum}
7191 @cindex @code{\descendens}
7193 @cindex @code{\ascendens}
7195 @cindex @code{\oriscus}
7197 @cindex @code{\quilisma}
7199 @cindex @code{\deminutum}
7202 Head prefixes can be accumulated, though restrictions apply. For
7203 example, either @code{\descendens} or @code{\ascendens} can be applied
7204 to a head, but not both to the same head.
7207 @cindex @code{\flexa}
7208 Two adjacent heads can be tied together with the @code{\pes} and
7209 @code{\flexa} infix commands for a rising and falling line of melody,
7214 Trigonus: apply equal spacing, regardless of pitch.
7217 @subsection Figured bass
7219 @cindex Basso continuo
7221 @c TODO: musicological blurb about FB
7225 LilyPond has limited support for figured bass:
7227 @lilypond[verbatim,fragment]
7229 \context Voice \notes { \clef bass dis4 c d ais}
7230 \context FiguredBass
7232 < 6 >4 < 7 >8 < 6+ [_!] >
7238 The support for figured bass consists of two parts: there is an input
7239 mode, introduced by @code{\figures}, where you can enter bass figures
7240 as numbers, and there is a context called @internalsref{FiguredBass} that
7241 takes care of making @internalsref{BassFigure} objects.
7243 In figures input mode, a group of bass figures is delimited by
7244 @code{<} and @code{>}. The duration is entered after the @code{>>}:
7249 \context FiguredBass
7253 Accidentals are added when you append @code{-}, @code{!} and @code{+}
7260 \context FiguredBass
7261 \figures { <4- 6+ 7!> }
7264 Spaces or dashes may be inserted by using @code{_}. Brackets are
7265 introduced with @code{[} and @code{]}:
7271 \context FiguredBass
7272 \figures { < [4 6] 8 [_! 12]> }
7275 Although the support for figured bass may superficially resemble chord
7276 support, it works much simpler. The @code{\figures} mode simply
7277 stores the numbers , and @internalsref{FiguredBass} context prints
7278 them as entered. There is no conversion to pitches, and no
7279 realizations of the bass are played in the MIDI file.
7281 Internally, the code produces markup texts. You can use any of the
7282 markup text properties to override formatting. For example, the
7283 vertical spacing of the figures may be set with @code{baseline-skip}.
7287 Internals: @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
7288 and @internalsref{FiguredBass} context.
7292 Slash notation for alterations is not supported.
7295 @node Vaticana style contexts
7296 @subsection Vaticana style contexts
7298 @cindex VaticanaVoiceContext
7299 @cindex VaticanaStaffContext
7301 The predefined @code{VaticanaVoiceContext} and
7302 @code{VaticanaStaffContext} can be used to easily engrave a piece of
7303 Gregorian Chant in the style of the Editio Vaticana. These contexts
7304 initialize all relevant context properties and grob properties to
7305 proper values. With these contexts, you can immediately go ahead
7306 entering the chant, as the following short excerpt demonstrates:
7308 @lilypond[raggedright,verbatim,noindent]
7309 \include "gregorian-init.ly"
7312 \context VaticanaVoice = "cantus" {
7313 \property Score.BarNumber \set #'transparent = ##t
7315 \[ c'\melisma c' \flexa a \] \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
7316 \[ f\melisma \pes a c' c' \pes d'\melismaEnd \] c' \divisioMinima \break
7317 \[ c'\melisma c' \flexa a \] \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
7320 \lyricsto "cantus" \new Lyrics \lyrics {
7321 San- ctus, San- ctus, San- ctus
7327 @node Contemporary notation
7328 @section Contemporary notation
7330 In the 20th century, composers have greatly expanded the musical
7331 vocabulary. With this expansion, many innovations in musical notation
7332 have been tried. The book by Stone (1980) gives a comprehensive
7333 overview (see @ref{Literature list}). In general, the use of new,
7334 innovative notation makes a piece harder to understand and perform and
7335 its use should therefore be avoided if possible. For this reason,
7336 support for contemporary notation in LilyPond is limited.
7345 @subsection Clusters
7349 In musical terminology, a @emph{cluster} denotes a range of
7350 simultaneously sounding pitches that may change over time. The set of
7351 available pitches to apply usually depends on the accoustic source.
7352 Thus, in piano music, a cluster typically consists of a continous range
7353 of the semitones as provided by the piano's fixed set of a chromatic
7354 scale. In choral music, each singer of the choir typically may sing an
7355 arbitrary pitch within the cluster's range that is not bound to any
7356 diatonic, chromatic or other scale. In electronic music, a cluster
7357 (theoretically) may even cover a continuous range of pitches, thus
7358 resulting in coloured noise, such as pink noise.
7360 Clusters can be denoted in the context of ordinary staff notation by
7361 engraving simple geometrical shapes that replace ordinary notation of
7362 notes. Ordinary notes as musical events specify starting time and
7363 duration of pitches; however, the duration of a note is expressed by the
7364 shape of the note head rather than by the horizontal graphical extent of
7365 the note symbol. In contrast, the shape of a cluster geometrically
7366 describes the development of a range of pitches (vertical extent) over
7367 time (horizontal extent). Still, the geometrical shape of a cluster
7368 covers the area in wich any single pitch contained in the cluster would
7369 be notated as an ordinary note. From this point of view, it is
7370 reasonable to specify a cluster as the envelope of a set of notes.
7374 A cluster is engraved as the envelope of a set of
7375 cluster-notes. Cluster notes are created by applying the function
7376 @code{notes-to-clusters} to a sequence of chords, e.g.
7378 @lilypond[relative=1,verbatim]
7379 \apply #notes-to-clusters { <c e > <b f'> }
7382 The following example (from
7383 @inputfileref{input/regression,cluster.ly}) shows what the result
7386 @lilypondfile[]{cluster.ly}
7388 By default, @internalsref{Cluster_spanner_engraver} is in the
7389 @internalsref{Voice} context. This allows putting ordinary notes and
7390 clusters together in the same staff, even simultaneously. In such a
7391 case no attempt is made to automatically avoid collisions between
7392 ordinary notes and clusters.
7396 Internals: @internalsref{ClusterSpanner},
7397 @internalsref{ClusterSpannerBeacon},
7398 @internalsref{Cluster_spanner_engraver}, and
7399 @internalsref{ClusterNoteEvent}.
7401 Examples: @inputfileref{input/regression,cluster.ly}.
7405 Music expressions like @code{<< @{ g8 e8 @} a4 >>} are not printed
7406 accurately. Use @code{<g a>8 <e a>8} instead.
7411 @subsection Fermatas
7417 Contemporary music notation frequently uses special fermata symbols to
7418 indicate fermatas of differing lengths.
7422 The following are supported
7424 @lilypond[raggedright]
7426 << \addlyrics \notes {
7446 \context Lyrics \lyrics {
7447 "shortfermata" "fermata" "longfermata" "verylongfermata"
7452 See @ref{Articulations} for general instructions how to apply scripts
7453 such as fermatas to a @code{\notes@{@}} block.
7456 @node Special notation
7457 @section Special notation
7461 * Easy Notation note heads::
7465 @subsection Balloon help
7467 Elements of notation can be marked and named with the help of a square
7468 balloon. The primary purpose of this feature is to explain notation.
7470 The following example demonstrates its use.
7472 @lilypond[verbatim,fragment,raggedright,relative=1]
7475 #(add-balloon-text 'NoteHead "heads, or tails?"
7481 The function @code{add-balloon-text} takes the name of a grob, the
7482 label to print and where to put the label relative to the object. In
7483 the above example, the text ``heads or tails?'' ends 3 spaces below
7487 @cindex notation, explaining
7491 Internals: @internalsref{text-balloon-interface}
7493 Examples: @inputfileref{input/regression,balloon.ly}
7495 @node Easy Notation note heads
7496 @subsection Easy Notation note heads
7498 @cindex easy notation
7501 The `easy play' note head includes a note name inside the head. It is
7502 used in music aimed at beginners:
7504 @lilypond[raggedright,verbatim,staffsize=26]
7506 \notes { c'2 e'4 f' | g'1 }
7507 \paper { \translator { \EasyNotation } }
7511 The @code{EasyNotation} variable overrides a @internalsref{Score}
7512 context. To make the letters readable, it has to be printed in a
7513 large font size. To print with a larger font, see @ref{Font Size}.
7518 If you view the result with Xdvi, then staff lines may show through
7519 the letters. Printing the PostScript file obtained does produce the
7525 @section Tuning output
7527 There are situations where default layout decisions are not
7528 sufficient. In this section we discuss ways to override these
7531 Formatting is internally done by manipulating so called objects
7532 (graphic objects). Each object carries with it a set of properties
7533 (object or layout properties) specific to that object. For example, a
7534 stem object has properties that specify its direction, length and
7537 The most direct way of tuning the output is by altering the values of
7538 these properties. There are two ways of doing that: first, you can
7539 temporarily change the definition of one type of object, thus
7540 affecting a whole set of objects. Second, you can select one specific
7541 object, and set a layout property in that object.
7543 Do not confuse layout properties with translation
7544 properties. Translation properties always use a mixed caps style
7545 naming, and are manipulated using @code{\property}:
7547 \property Context.propertyName = @var{value}
7550 Layout properties are use Scheme style variable naming, i.e. lower
7551 case words separated with dashes. They are symbols, and should always
7552 be quoted using @code{#'}. For example, this could be an imaginary
7553 layout property name:
7555 #'layout-property-name
7560 The introduction of the @ref{Technical manual} gives a more in-depth
7561 treatment of the difference between translation and layout.
7565 * Constructing a tweak::
7572 @node Tuning objects
7573 @subsection Tuning objects
7575 @cindex object description
7577 The definition of an object is a list of default object
7578 properties. For example, the definition of the Stem object (available
7579 in @file{scm/define-grobs.scm}), includes the following definitions
7580 for @internalsref{Stem}:
7584 (beamed-lengths . (3.5 3.5 3.5 4.5 5.0))
7585 (Y-extent-callback . ,Stem::height)
7590 Adding variables on top of this existing definition overrides the
7591 system default, and alters the resulting appearance of the layout
7597 Changing a variable for only one object is commonly achieved with
7601 \once \property @var{context}.@var{objectname}
7602 \override @var{symbol} = @var{value}
7604 Here @var{symbol} is a Scheme expression of symbol type, @var{context}
7605 and @var{objectname} is a string and @var{value} is a Scheme expression.
7606 This command applies a setting only during one moment in the score.
7608 In the following example, only one @internalsref{Stem} object is
7609 changed from its original setting:
7611 @lilypond[verbatim,fragment,relative=1]
7613 \once \property Voice.Stem \set #'thickness = #4
7617 @cindex @code{\once}
7619 For changing more objects, the same command, without @code{\once} can
7622 \property @var{context}.@var{objectname} \override @var{symbol} = @var{value}
7624 This command adds @code{@var{symbol} = @var{value}} to the definition
7625 of @var{objectname} in the context @var{context}, and this definition
7626 stays in place until it is removed.
7628 An existing definition may be removed by the following command:
7631 \property @var{context}.@var{objectname} \revert @var{symbol}
7634 All @code{\override} and @code{\revert} commands should be balanced.
7635 The @code{\set} shorthand performs a revert followed by an override,
7636 and is often more convenient to use
7639 \property @var{context}.@var{objectname} \set @var{symbol} = @var{value}
7643 @lilypond[verbatim,quote]
7644 c'4 \property Voice.Stem \override #'thickness = #4.0
7646 c'4 \property Voice.Stem \revert #'thickness
7650 The following example gives exactly the same result as the previous
7651 one (assuming the system default for stem thickness is 1.3):
7653 @lilypond[verbatim,quote]
7654 c'4 \property Voice.Stem \set #'thickness = #4.0
7656 c'4 \property Voice.Stem \set #'thickness = #1.3
7660 Reverting a setting which was not set in the first place has no
7661 effect. However, if the setting was set as a system default, this may
7662 remove the default value, and this may give surprising results,
7663 including crashes. In other words, @code{\override} and
7664 @code{\revert} must be carefully balanced. The following are examples
7665 of correct nesting of @code{\override}, @code{\set}, @code{\revert}:
7669 a clumsy but correct form:
7671 \override \revert \override \revert \override \revert
7675 shorter version of the same:
7677 \override \set \set \revert
7681 a short form, using only @code{\set}. This requires you to know the
7684 \set \set \set \set @var{to default value}
7688 if there is no default (i.e. by default, the object property is unset),
7691 \set \set \set \revert
7695 The object description is an Scheme association list. Since a Scheme
7696 list is a singly linked list, we can treat it as a stack, and
7697 @code{\override} and @code{\revert} are push and pop operations. The
7698 association list is stored in a normal context property, hence
7700 \property Voice.NoteHead = #'()
7702 will effectively erase @internalsref{NoteHead}s from the current
7703 @internalsref{Voice}. Typically, this will blank the object. However,
7704 this mechanism should not be used: it may cause crashes or other
7709 Internals: @internalsref{OverrideProperty}, @internalsref{RevertProperty},
7710 @internalsref{PropertySet}, @internalsref{All-backend-properties}, and
7711 @internalsref{All-layout-objects}.
7716 The backend is not very strict in type-checking object properties.
7717 Cyclic references in Scheme values for properties cause hangs and/or
7718 crashes. Reverting properties that are system defaults may also lead
7722 * Constructing a tweak::
7728 @node Constructing a tweak
7729 @subsection Constructing a tweak
7732 @cindex internal documentation
7733 @cindex finding graphical objects
7734 @cindex graphical object descriptions
7736 @cindex @code{\override}
7738 @cindex internal documentation
7742 Three pieces of information are required to use @code{\override} and
7743 @code{\set}: the name of the layout object, the context and the name
7744 of the property. We demonstrate how to glean this information from
7745 the notation manual and the generated documentation.
7747 The generated documentation is a set of HTML pages which should be
7748 included if you installed a binary distribution, typically in
7749 @file{/usr/share/doc/lilypond}. They are also available on the web:
7750 go to the @uref{http://lilypond.org,LilyPond website}, click
7751 ``Documentation'', select the correct version, and click then
7752 ``Program reference.'' It is advisable to bookmark the local HTML
7753 files. They will load faster than the ones on the web. If you use the
7754 version from the web, you must check whether the documentation matches
7755 the program version: it is generated from the definitions that the
7756 program uses, and therefore it is strongly tied to the LilyPond
7760 @c [TODO: revise for new site.]
7762 Suppose we want to move the fingering indication in the fragment below:
7764 @lilypond[relative=2,verbatim]
7770 If you visit the documentation of @code{Fingering} (in @ref{Fingering
7771 instructions}), you will notice that there is written:
7776 Internals: @internalsref{FingerEvent} and @internalsref{Fingering}.
7783 In other words, the fingerings once entered, are internally stored as
7784 @code{FingerEvent} music objects. When printed, a @code{Fingering}
7785 layout object is created for every @code{FingerEvent}.
7787 The Fingering object has a number of different functions, and each of
7788 those is captured in an interface. The interfaces are listed under
7789 @internalsref{Fingering} in the program reference.
7793 The @code{Fingering} object has a fixed size
7794 (@internalsref{item-interface}), the symbol is a piece of text
7795 (@internalsref{text-interface}), whose font can be set
7796 (@internalsref{font-interface}). It is centered horizontally
7797 (@internalsref{self-alignment-interface}), it is placed next to other
7798 objects (@internalsref{side-position-interface}) vertically, and its
7799 placement is coordinated with other scripts
7800 (@internalsref{text-script-interface}). It also has the standard
7801 @internalsref{grob-interface} (grob stands for Graphical object)
7803 @cindex graphical object
7804 @cindex layout object
7805 @cindex object, layout
7806 with all the variables that come with
7807 it. Finally, it denotes a fingering instruction, so it has
7808 @internalsref{finger-interface}.
7810 For the vertical placement, we have to look under
7811 @code{side-position-interface}:
7813 @code{side-position-interface}
7815 Position a victim object (this one) next to other objects (the
7816 support). In this case, the property @code{direction} signifies where to put the
7817 victim object relative to the support (left or right, up or down?)
7822 below this description, the variable @code{padding} is described as
7826 (dimension, in staff space)
7828 add this much extra space between objects that are next to each
7829 other. Default value: @code{0.6}
7833 By increasing the value of @code{padding}, we can move away the
7834 fingering. The following command inserts 3 staff spaces of white
7835 between the note and the fingering:
7837 \once \property Voice.Fingering \set #'padding = #3
7840 Inserting this command before the Fingering object is created,
7841 i.e. before @code{c2}, yields the following result:
7843 @lilypond[relative=2,fragment,verbatim]
7844 \once \property Voice.Fingering
7851 The context name @code{Voice} in the example above can be determined
7852 as follows. In the documentation for @internalsref{Fingering}, it says
7854 Fingering grobs are created by: @internalsref{Fingering_engraver}
7857 Clicking @code{Fingering_engraver} shows the documentation of
7858 the module responsible for interpreting the fingering instructions and
7859 translating them to a @code{Fingering} object. Such a module is called
7860 an @emph{engraver}. The documentation of the @code{Fingering_engraver}
7863 Fingering_engraver is part of contexts: Voice
7865 so tuning the settings for Fingering should be done with
7867 \property Voice.Fingering \set @dots{}
7870 Of course, the tweak may also done in a larger context than
7871 @code{Voice}, for example, @internalsref{Staff} or
7872 @internalsref{Score}.
7876 Internals: the program reference also contains alphabetical lists of
7877 @internalsref{Contexts}, @internalsref{All-layout-objects} and
7878 @internalsref{Music-expressions}, so you can also find which objects
7879 to tweak by browsing the internals document.
7883 @subsection Applyoutput
7885 The most versatile way of tuning an object is @code{\applyoutput}. Its
7888 \applyoutput @var{proc}
7892 where @var{proc} is a Scheme function, taking three arguments.
7894 When interpreted, the function @var{proc} is called for every layout
7895 object found in the context, with the following arguments:
7897 @item the layout object itself,
7898 @item the context where the layout object was created, and
7899 @item the context where @code{\applyoutput} is processed.
7903 In addition, the cause of the layout object, i.e. the music
7904 expression or object that was responsible for creating it, is in the
7905 object property @code{cause}. For example, for a note head, this is a
7906 @internalsref{NoteHead} event, and for a @internalsref{Stem} object,
7907 this is a @internalsref{NoteHead} object.
7909 Here is a simple example of @code{\applyoutput}; it blanks note-heads on the
7912 (define (blanker grob grob-origin context)
7913 (if (and (memq (ly:get-grob-property grob 'interfaces)
7914 note-head-interface)
7915 (eq? (ly:get-grob-property grob 'staff-position) 0))
7917 (ly:set-grob-property! grob 'transparent #t)))
7922 @node Font selection
7923 @subsection Font selection
7925 The most common thing to change about the appearance of fonts is their
7926 size. The font size of any context can be easily changed by setting
7927 the @code{fontSize} property for that context. Its value is a number:
7928 negative numbers make the font smaller, positive numbers larger. An
7929 example is given below:
7931 @lilypond[fragment,relative=1,verbatim,quote]
7932 c4 c4 \property Voice.fontSize = #-1
7935 This command will set @code{font-size} (see below), and does
7936 not change the size of variable symbols, such as beams or slurs.
7938 One of the uses of @code{fontSize} is to get smaller symbols for cue
7939 notes. An elaborate example of those is in
7940 @inputfileref{input/test,cue-notes.ly}.
7942 @cindex magnification
7945 The font used for printing a object can be selected by setting
7946 @code{font-name}, e.g.
7948 \property Staff.TimeSignature
7949 \set #'font-name = #"cmr17"
7953 Any font can be used, as long as it is available to @TeX{}. Possible
7954 fonts include foreign fonts or fonts that do not belong to the
7955 Computer Modern font family. The size of fonts selected in this way
7956 can be changed with the @code{font-magnification} property. For
7957 example, @code{2.0} blows up all letters by a factor 2 in both
7961 @cindex font magnification
7963 Font selection for the standard fonts, @TeX{}'s Computer Modern fonts,
7964 can also be adjusted with a more fine-grained mechanism. By setting
7965 the object properties described below, you can select a different font;
7966 all three mechanisms work for every object that supports
7967 @code{font-interface}:
7972 is a symbol indicating the general class of the typeface. Supported are
7973 @code{roman} (Computer Modern), @code{braces} (for piano staff
7974 braces), @code{music} (the standard music font, including ancient
7975 glyphs), @code{dynamic} (for dynamic signs) and @code{typewriter}.
7978 is a symbol indicating the shape of the font, there are typically several
7979 font shapes available for each font family. Choices are @code{italic},
7980 @code{caps} and @code{upright}.
7983 is a symbol indicating the series of the font. There are typically several
7984 font series for each font family and shape. Choices are @code{medium}
7989 For any of these properties, the value @code{*} (i.e. the symbol
7990 @code{*}, entered as @code{#'*}), acts as a wildcard. This can be used
7991 to override default setting, which are always present. For example:
7993 \property Lyrics . LyricText \override #'font-series = #'bold
7994 \property Lyrics . LyricText \override #'font-family = #'typewriter
7995 \property Lyrics . LyricText \override #'font-shape = #'*
7998 @cindex @code{font-style}
8000 The font size is set by modifying the @code{font-size} property. Its
8001 value is a number indicating the size relative to the standard size.
8002 Each step up is an increase of approximately 12% of the font size. Six
8003 steps is exactly a factor two. The Scheme function @code{magstep}
8004 converts a @code{font-size} number to a scaling factor.
8006 LilyPond has fonts in different design sizes: the music fonts for
8007 smaller sizes are chubbier, while the text fonts are relatively wider.
8008 Font size changes are achieved by scaling the design size that is
8009 closest to the desired size.
8011 The @code{font-size} mechanism does not work for fonts selected
8012 through @code{font-name}. These may be scaled with
8013 @code{font-magnification}.
8017 The following commands set @code{fontSize} for the current voice.
8019 @cindex @code{\tiny}
8021 @cindex @code{\small}
8023 @cindex @code{\normalsize}
8028 Init files: @file{ly/declarations-init.ly} contains hints how new
8029 fonts may be added to LilyPond.
8033 There is no style sheet provided for other fonts besides the @TeX{}
8034 Computer Modern family.
8036 @cindex font selection
8037 @cindex font magnification
8038 @cindex @code{font-interface}
8042 @section Text markup
8047 @cindex typeset text
8049 LilyPond has an internal mechanism to typeset texts. You can access it
8050 with the keyword @code{\markup}. Within markup mode, you can enter texts
8051 similar to lyrics: simply enter them, surrounded by spaces:
8054 @lilypond[verbatim,fragment,relative=1]
8055 c1^\markup { hello }
8056 c1_\markup { hi there }
8057 c1^\markup { hi \bold there, is \italic anyone home? }
8060 @cindex font switching
8062 The markup in the example demonstrates font switching commands. The
8063 command @code{\bold} and @code{\italic} only apply to the first
8064 following word; enclose a set of texts with braces to apply a command
8067 \markup @{ \bold @{ hi there @} @}
8071 For clarity, you can also do this for single arguments, e.g.
8074 \markup { is \italic { anyone } home }
8077 @cindex font size, texts
8080 In markup mode you can compose expressions, similar to mathematical
8081 expressions, XML documents and music expressions. The braces group
8082 notes into horizontal lines. Other types of lists also exist: you can
8083 stack expressions grouped with @code{<}, and @code{>} vertically with
8084 the command @code{\column}. Similarly, @code{\center} aligns texts by
8087 @lilypond[verbatim,fragment,relative=1]
8088 c1^\markup { \column < a bbbb c > }
8089 c1^\markup { \center < a bbbb c > }
8090 c1^\markup { \line < a b c > }
8094 Markups can be stored in variables, and these variables
8095 may be attached to notes, like
8097 allegro = \markup { \bold \large { Allegro } }
8098 \notes { a^\allegro b c d }
8102 Some objects have alignment procedures of their own, which cancel out
8103 any effects of alignments applied to their markup arguments as a
8104 whole. For example, the @internalsref{RehearsalMark} is horizontally
8105 centered, so using @code{\mark \markup @{ \left-align .. @}} has no
8106 effect. Similarly, whole texts over notes cannot be moved vertically
8107 with @code{\raise}. For moving and aligning complete objects, grob
8108 properties should be used.
8114 Init files: @file{scm/new-markup.scm}.
8119 Text layout is ultimately done by @TeX{}, which does kerning of
8120 letters. LilyPond does not account for kerning, so texts will be
8121 spaced slightly too wide.
8123 Syntax errors for markup mode are confusing.
8125 Markup texts cannot be used in the titling of the @code{\header}
8126 field. Titles are made by La@TeX{}, so La@TeX{} commands should be used
8132 * Overview of text markup commands::
8133 * Markup construction in scheme::
8134 * Markup command definition::
8137 @node Overview of text markup commands
8138 @subsection Overview of text markup commands
8140 @include markup-commands.tely
8142 @node Markup construction in scheme
8143 @subsection Markup construction in scheme
8145 @cindex defining markup commands
8147 The @code{markup} macro builds markup expressions in Scheme while
8148 providing a LilyPond-like syntax. For example,
8150 (markup #:column (#:line (#:bold #:italic "hello" #:raise 0.4 "world")
8151 #:bigger #:line ("foo" "bar" "baz")))
8157 \markup \column < @{ \bold \italic "hello" \raise #0.4 "world" @}
8158 \bigger @{ foo bar baz @} >
8162 This example exposes the main translation rules between regular
8163 LilyPond markup syntax and scheme markup syntax, which are summed up
8165 @multitable @columnfractions .5 .5
8166 @item @b{LilyPond} @tab @b{Scheme}
8167 @item @code{\command} @tab @code{#:command}
8168 @item @code{\variable} @tab @code{variable}
8169 @item @code{@{ ... @}} @tab @code{#:line ( ... )}
8170 @item @code{\center < ... >} @tab @code{#:center ( ... )}
8171 @item @code{string} @tab @code{"string"}
8172 @item @code{#scheme-arg} @tab @code{scheme-arg}
8175 Besides, the whole scheme language is accessible inside the
8176 @code{markup} macro: thus, one may use function calls inside
8177 @code{markup} in order to manipulate character strings for
8178 instance. This proves useful when defining new markup commands (see
8179 @ref{Markup command definition}).
8183 One can not feed the @code{#:line} (resp @code{#:center},
8184 @code{#:column}) command with a variable or the result of a function
8187 (markup #:line (fun-that-returns-markups))
8189 is illegal. One should use the @code{make-line-markup} (resp
8190 @code{make-center-markup}, @code{make-column-markup}) function
8193 (markup (make-line-markup (fun-that-returns-markups)))
8196 @node Markup command definition
8197 @subsection Markup command definition
8199 New markup commands can be defined thanks to the @code{def-markup-command} scheme macro.
8201 (def-markup-command (@var{command-name} @var{paper} @var{props} @var{arg1} @var{arg2} ...)
8202 (@var{arg1-type?} @var{arg2-type?} ...)
8205 @var{argi}: i@var{th} command argument
8206 @var{argi-type?}: a type predicate for the i@var{th} argument
8207 @var{paper}: the `paper' definition
8208 @var{props}: a list of alists, containing all active properties.
8211 As a simple example, we show how to add a @code{\smallcaps} command,
8212 which selects @TeX{}'s small caps font. Normally, we could select the
8213 small caps font as follows:
8216 \markup { \override #'(font-shape . caps) Text-in-caps }
8219 This selects the caps font by setting the @code{font-shape} property to
8220 @code{#'caps} for interpreting @code{Text-in-caps}.
8222 To make the above available as @code{\smallcaps} command, we have to
8223 define a function using @code{def-markup-command}. The command should
8224 take a single argument, of markup type. Therefore, the start of the
8225 definition should read
8227 (def-markup-command (smallcaps paper props argument) (markup?)
8232 What follows is the content of the command: we should interpret
8233 the @code{argument} as a markup, i.e.
8236 (interpret-markup paper @dots{} argument)
8240 This interpretation should add @code{'(font-shape . caps)} to the active
8241 properties, so we substitute the the following for the @dots{} in the
8245 (cons (list '(font-shape . caps) ) props)
8249 The variable @code{props} is a list of alists, and we prepend to it by
8250 consing a list with the extra setting.
8252 However, suppose that we are using a font that does not have a
8253 small-caps variant. In that case, we have to fake the small caps font,
8254 by setting a string in upcase, with the first letter a little larger:
8257 #(def-markup-command (smallcaps paper props str) (string?)
8258 "Print the string argument in small caps. Syntax: \\smallcaps #\"string\""
8259 (interpret-markup paper props
8262 (if (= (string-length s) 0)
8264 (markup #:large (string-upcase (substring s 0 1))
8265 #:translate (cons -0.6 0)
8266 #:tiny (string-upcase (substring s 1)))))
8267 (string-split str #\Space)))))
8270 The @code{smallcaps} command first splits its string argument into
8271 tokens separated by spaces (@code{(string-split str #\Space)}); for
8272 each token, a markup is built with the first letter made large and
8273 upcased (@code{#:large (string-upcase (substring s 0 1))}), and a
8274 second markup built with the following letters made tiny and upcased
8275 (@code{#:tiny (string-upcase (substring s 1))}). As LilyPond
8276 introduces a space between markups on a line, the second markup is
8277 translated to the left (@code{#:translate (cons -0.6 0) ...}). Then,
8278 the markups built for each token are put in a line
8279 (@code{(make-line-markup ...)}). Finally, the resulting markup is
8280 passed to the @code{interpret-markup} function, with the @code{paper}
8281 and @code{props} arguments.
8283 Finally, suppose that we are typesetting a recitative in an opera, and
8284 we would like to define a command that will show character names in a
8285 custom manner. Names should be printed with small caps and translated a
8286 bit to the left and top. We will define a @code{\character} command
8287 that takes into account the needed translation, and uses the newly
8288 defined @code{\smallcaps} command:
8291 #(def-markup-command (character paper props name) (string?)
8292 "Print the character name in small caps, translated to the left and
8293 top. Syntax: \\character #\"name\""
8294 (interpret-markup paper props
8295 (markup "" #:translate (cons -4 2) #:smallcaps name)))
8298 There is one complication that needs explanation: texts above and below
8299 the staff are moved vertically to be at a certain distance (the
8300 @code{padding} property) from the staff and the notes. To make sure
8301 that this mechanism does not annihilate the vertical effect of our
8302 @code{#:translate}, we add an empty string (@code{""}) before the
8303 translated text. Now the @code{""} will be put above the notes, and the
8304 @code{name} is moved in relation to that empty string. The net effect is
8305 that the text is moved to the upper left.
8307 The final result is as follows:
8311 c''^\markup \character #"Cleopatra"
8312 e'^\markup \character #"Giulio Cesare"
8317 @lilypond[raggedright]
8318 #(def-markup-command (smallcaps paper props str) (string?)
8319 "Print the string argument in small caps. Syntax: \\smallcaps #\"string\""
8320 (interpret-markup paper props
8323 (if (= (string-length s) 0)
8325 (markup #:large (string-upcase (substring s 0 1))
8326 #:translate (cons -0.6 0)
8327 #:tiny (string-upcase (substring s 1)))))
8328 (string-split str #\Space)))))
8330 #(def-markup-command (character paper props name) (string?)
8331 "Print the character name in small caps, translated to the left and
8332 top. Syntax: \\character #\"name\""
8333 (interpret-markup paper props
8334 (markup "" #:translate (cons -4 0) #:smallcaps name)))
8338 c''^\markup \character #"Cleopatra"
8339 e'^\markup \character #"Giulio Cesare"
8347 @section Global layout
8349 The global layout determined by three factors: the page layout, the
8350 line breaks and the spacing. These all influence each other. The
8351 choice of spacing determines how densely each system of music is set,
8352 which influences where line breaks breaks are chosen, and thus
8353 ultimately how many pages a piece of music takes. This section
8354 explains how to tune the algorithm for spacing.
8356 Globally spoken, this procedure happens in three steps: first,
8357 flexible distances (``springs'') are chosen, based on durations. All
8358 possible line breaking combination are tried, and the one with the
8359 best results---a layout that has uniform density and requires as
8360 little stretching or cramping as possible---is chosen. When the score
8361 is processed by @TeX{}, each page is filled with systems, and page breaks
8362 are chosen whenever the page gets full.
8367 * Vertical spacing::
8368 * Horizontal spacing::
8375 @node Vertical spacing
8376 @subsection Vertical spacing
8378 @cindex vertical spacing
8379 @cindex distance between staves
8380 @cindex staff distance
8381 @cindex between staves, distance
8382 @cindex staffs per page
8383 @cindex space between staves
8385 The height of each system is determined automatically by LilyPond, to
8386 keep systems from bumping into each other, some minimum distances are
8387 set. By changing these, you can put staves closer together, and thus
8388 put more systems onto one page.
8390 Normally staves are stacked vertically. To make
8391 staves maintain a distance, their vertical size is padded. This is
8392 done with the property @code{minimumVerticalExtent}. It takes a pair
8393 of numbers, so if you want to make it smaller from its, then you could
8396 \property Staff.minimumVerticalExtent = #'(-4 . 4)
8398 This sets the vertical size of the current staff to 4 staff spaces on
8399 either side of the center staff line. The argument of
8400 @code{minimumVerticalExtent} is interpreted as an interval, where the
8401 center line is the 0, so the first number is generally negative. The
8402 staff can be made larger at the bottom by setting it to @code{(-6
8405 The piano staves are handled a little differently: to make cross-staff
8406 beaming work correctly, it is necessary that the distance between staves
8407 is fixed beforehand. This is also done with a
8408 @internalsref{VerticalAlignment} object, created in
8409 @internalsref{PianoStaff}. In this object the distance between the
8410 staves is fixed by setting @code{forced-distance}. If you want to
8411 override this, use a @code{\translator} block as follows:
8415 VerticalAlignment \override #'forced-distance = #9
8418 This would bring the staves together at a distance of 9 staff spaces,
8419 measured from the center line of each staff.
8423 Internals: Vertical alignment of staves is handled by the
8424 @internalsref{VerticalAlignment} object.
8428 @node Horizontal spacing
8429 @subsection Horizontal Spacing
8431 The spacing engine translates differences in durations into
8432 stretchable distances (``springs'') of differing lengths. Longer
8433 durations get more space, shorter durations get less. The shortest
8434 durations get a fixed amount of space (which is controlled by
8435 @code{shortest-duration-space} in the @internalsref{SpacingSpanner} object).
8436 The longer the duration, the more space it gets: doubling a
8437 duration adds a fixed amount (this amount is controlled by
8438 @code{spacing-increment}) of space to the note.
8440 For example, the following piece contains lots of half, quarter and
8441 8th notes, the eighth note is followed by 1 note head width (NHW).
8442 The quarter note is followed by 2 NHW, the half by 3 NHW, etc.
8443 @lilypond[fragment,verbatim,relative=1] c2 c4. c8 c4. c8 c4. c8 c8
8447 Normally, @code{shortest-duration-space} is set to 1.2, which is the
8448 width of a note head, and @code{shortest-duration-space} is set to
8449 2.0, meaning that the shortest note gets 2 NHW (i.e. 2 times
8450 @code{shortest-duration-space}) of space. For normal notes, this space
8451 is always counted from the left edge of the symbol, so the shortest
8452 notes are generally followed by one NHW of space.
8454 If one would follow the above procedure exactly, then adding a single
8455 32th note to a score that uses 8th and 16th notes, would widen up the
8456 entire score a lot. The shortest note is no longer a 16th, but a 32nd,
8457 thus adding 1 NHW to every note. To prevent this, the
8458 shortest duration for spacing is not the shortest note in the score,
8459 but the most commonly found shortest note. Notes that are even
8460 shorter this are followed by a space that is proportional to their
8461 duration relative to the common shortest note. So if we were to add
8462 only a few 16th notes to the example above, they would be followed by
8465 @lilypond[fragment,verbatim,relative=2]
8466 c2 c4. c8 c4. c16[ c] c4. c8 c8 c8 c4 c4 c4
8469 The most common shortest duration is determined as follows: in every
8470 measure, the shortest duration is determined. The most common short
8471 duration, is taken as the basis for the spacing, with the stipulation
8472 that this shortest duration should always be equal to or shorter than
8473 1/8th note. The shortest duration is printed when you run lilypond
8474 with @code{--verbose}. These durations may also be customized. If you
8475 set the @code{common-shortest-duration} in
8476 @internalsref{SpacingSpanner}, then this sets the base duration for
8477 spacing. The maximum duration for this base (normally 1/8th), is set
8478 through @code{base-shortest-duration}.
8480 @cindex @code{common-shortest-duration}
8481 @cindex @code{base-shortest-duration}
8482 @cindex @code{stem-spacing-correction}
8483 @cindex @code{spacing}
8485 In the introduction it was explained that stem directions influence
8486 spacing. This is controlled with @code{stem-spacing-correction}
8487 property in @internalsref{NoteSpacing}, which are generated for every
8488 @internalsref{Voice} context. The @code{StaffSpacing} object
8489 (generated at @internalsref{Staff} context) contains the same property
8490 for controlling the stem/barline spacing. The following example
8491 shows these corrections, once with default settings, and once with
8492 exaggerated corrections:
8498 \property Staff.NoteSpacing \override #'stem-spacing-correction
8500 \property Staff.StaffSpacing \override #'stem-spacing-correction
8505 \paper { raggedright = ##t } }
8508 @cindex SpacingSpanner, overriding properties
8510 Properties of the @internalsref{SpacingSpanner} must be overridden
8511 from the @code{\paper} block, since the @internalsref{SpacingSpanner} is
8512 created before any @code{\property} statements are interpreted.
8514 \paper @{ \translator @{
8516 SpacingSpanner \override #'spacing-increment = #3.0
8523 Internals: @internalsref{SpacingSpanner}, @internalsref{NoteSpacing},
8524 @internalsref{StaffSpacing}, @internalsref{SeparationItem}, and
8525 @internalsref{SeparatingGroupSpanner}.
8529 Spacing is determined on a score wide basis. If you have a score that
8530 changes its character (measured in durations) halfway during the
8531 score, the part containing the longer durations will be spaced too
8534 There is no convenient mechanism to manually override spacing.
8539 @subsection Font size
8540 @cindex font size, setting
8541 @cindex staff size, setting
8542 @cindex @code{paper} file
8544 The Feta font provides musical symbols at eight seven different
8545 sizes. Each font is tuned for a different staff size: at smaller sizes
8546 the font gets heavier, to match the relatively heavier staff lines.
8547 The recommended font sizes are listed in the following table:
8549 @multitable @columnfractions .25 .25 .25 .25
8552 @tab @b{staff height (pt)}
8553 @tab @b{staff height (mm)}
8595 @c modern rental material ?
8599 These fonts are available in any sizes. The context property
8600 @code{fontSize} and the layout property @code{staff-space} (in
8601 @internalsref{StaffSymbol}) can be used to tune size for individual
8602 staffs. The size of individual staffs are relative to the global size,
8603 which can be set in the following manner:
8606 #(set-global-staff-size 14)
8609 This sets the global default size to 14pt staff height, and scales all
8615 @subsection Line breaking
8618 @cindex breaking lines
8620 Line breaks are normally computed automatically. They are chosen such
8621 that lines look neither cramped nor loose, and that consecutive lines
8622 have similar density.
8624 Occasionally you might want to override the automatic breaks; you can
8625 do this by specifying @code{\break}. This will force a line break at
8626 this point. Line breaks can only occur at places where there are bar
8627 lines. If you want to have a line break where there is no bar line,
8628 you can force an invisible bar line by entering @code{\bar
8629 ""}. Similarly, @code{\noBreak} forbids a line break at a
8633 @cindex regular line breaks
8634 @cindex four bar music.
8636 For linebreaks at regular intervals use @code{\break} separated by
8637 skips and repeated with @code{\repeat}:
8639 << \repeat unfold 7 @{
8640 s1 \noBreak s1 \noBreak
8641 s1 \noBreak s1 \break @}
8642 @emph{the real music}
8647 This makes the following 28 measures (assuming 4/4 time) be broken every
8648 4 measures, and only there.
8652 @code{\break}, @code{\noBreak}
8653 @cindex @code{\break}
8654 @cindex @code{\noBreak}
8658 Internals: @internalsref{BreakEvent}.
8662 @subsection Page layout
8665 @cindex breaking pages
8667 @cindex @code{indent}
8668 @cindex @code{linewidth}
8670 The most basic settings influencing the spacing are @code{indent} and
8671 @code{linewidth}. They are set in the @code{\paper} block. They
8672 control the indentation of the first line of music, and the lengths of
8675 If @code{raggedright} is set to true in the @code{\paper}
8676 block, then the lines are justified at their natural length. This
8677 useful for short fragments, and for checking how tight the natural
8681 @cindex vertical spacing
8683 The page layout process happens outside the LilyPond formatting
8684 engine: variables controlling page layout are passed to the output,
8685 and are further interpreted by @code{lilypond} wrapper program. It
8686 responds to the following variables in the @code{\paper} block. The
8687 variable @code{textheight} sets the total height of the music on each
8688 page. The spacing between systems is controlled with
8689 @code{interscoreline}, its default is 16pt. The distance between the
8690 score lines will stretch in order to fill the full page
8691 @code{interscorelinefill} is set to a positive number. In that case
8692 @code{interscoreline} specifies the minimum spacing.
8694 @cindex @code{textheight}
8695 @cindex @code{interscoreline}
8696 @cindex @code{interscorelinefill}
8698 If the variable @code{lastpagefill} is defined,
8699 @c fixme: this should only be done if lastpagefill= #t
8700 systems are evenly distributed vertically on the last page. This
8701 might produce ugly results in case there are not enough systems on the
8702 last page. The @command{lilypond-book} command ignores
8703 @code{lastpagefill}. See @ref{lilypond-book manual} for more
8706 @cindex @code{lastpagefill}
8708 Page breaks are normally computed by @TeX{}, so they are not under
8709 direct control of LilyPond. However, you can insert a commands into
8710 the @file{.tex} output to instruct @TeX{} where to break pages. This
8711 is done by setting the @code{between-systems-strings} on the
8712 @internalsref{NonMusicalPaperColumn} where the system is broken.
8713 An example is shown in @inputfileref{input/regression,between-systems.ly}.
8714 The predefined command @code{\newpage} also does this.
8718 @cindex @code{papersize}
8720 To change the paper size, use the following Scheme code:
8723 #(set-paper-size "a4")
8730 @cindex @code{\newpage}
8736 In this manual @ref{Invoking lilypond}
8738 Examples: @inputfileref{input/regression,between-systems.ly}
8740 Internals: @internalsref{NonMusicalPaperColumn}.
8744 LilyPond has no concept of page layout, which makes it difficult to
8745 reliably choose page breaks in longer pieces.
8754 Entered music can also be converted to MIDI output. The performance
8755 is good enough for proof-hearing the music for errors.
8757 Ties, dynamics and tempo changes are interpreted. Dynamic marks,
8758 crescendi and decrescendi translate into MIDI volume levels. Dynamic
8759 marks translate to a fixed fraction of the available MIDI volume
8760 range, crescendi and decrescendi make the volume vary linearly between
8761 their two extremities. The fractions can be adjusted by
8762 @code{dynamicAbsoluteVolumeFunction} in @internalsref{Voice} context.
8763 For each type of MIDI instrument, a volume range can be defined. This
8764 gives a basic equalizer control, which can enhance the quality of
8765 the MIDI output remarkably. The equalizer can be controlled by
8766 setting @code{instrumentEqualizer}.
8770 Many musically interesting effects, such as swing, articulation,
8771 slurring, etc., are not translated to MIDI.
8773 Since slurs are not interpreted, @code{\lyricsto} and
8774 @code{\addlyrics} sections will be interpreted wrongly.
8776 The MIDI output allocates a channel for each Staff, and one for global
8777 settings. Hence, the MIDI file should not have more than 15 staves
8778 (or 14 if you do not use drums).
8783 * MIDI instrument names::
8788 @subsection MIDI block
8792 The MIDI block is analogous to the paper block, but it is somewhat
8793 simpler. The @code{\midi} block can contain:
8797 @item a @code{\tempo} definition, and
8798 @item context definitions.
8801 Assignments in the @code{\midi} block are not allowed.
8803 A number followed by a period is interpreted as a real number, so
8804 for setting the tempo for dotted notes, an extra space should be
8805 inserted, for example:
8808 \midi @{ \tempo 4 . = 120 @}
8812 @cindex context definition
8814 Context definitions follow precisely the same syntax as within the
8815 \paper block. Translation modules for sound are called performers.
8816 The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
8819 @node MIDI instrument names
8820 @subsection MIDI instrument names
8822 @cindex instrument names
8823 @cindex @code{Staff.midiInstrument}
8825 The MIDI instrument name is set by the @code{Staff.midiInstrument}
8826 property. The instrument name should be chosen from the list in
8827 @ref{MIDI instruments}.
8831 If the selected string does not exactly match, then the default is
8832 used, which is the Grand Piano.