3 @c A menu is needed before every deeper *section nesting of @node's; run
4 @c M-x texinfo-all-menus-update
5 @c to automagically fill in these menus before saving changes
7 @c FIXME: singular vs. plural: Beams/Beam
11 @chapter Notation manual
15 * Easier music entry::
22 * Fingering instructions::
31 * Contemporary notation::
37 @c FIXME: Note entry vs Music entry at top level menu is confusing.
43 This chapter describes all the different types of notation supported
44 by LilyPond. It is intended as a reference for users that are already
45 somewhat familiar with using LilyPond.
51 * Chromatic alterations::
59 * Easy Notation note heads ::
67 A note is printed by specifying its pitch and then its duration:
68 @footnote{Notes constitute the most basic elements of LilyPond input,
69 but they do not form valid input on their own without a @code{\score}
70 block. However, for the sake of brevity and simplicity we will
71 generally omit @code{\score} blocks and @code{\paper} declarations in
74 @lilypond[fragment,verbatim]
83 @cindex Note specification
85 @cindex entering notes
87 The most common syntax for pitch entry is used in @code{\chords} and
88 @code{\notes} mode. In Note and Chord mode, pitches may be designated
89 by names. The notes are specified by the letters @code{a} through
90 @code{g}, while the octave is formed with notes ranging from @code{c}
91 to @code{b}. The pitch @code{c} is an octave below middle C and the
92 letters span the octave above that C:
94 @lilypond[fragment,verbatim]
96 a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
99 @cindex note names, Dutch
101 A sharp is formed by adding @code{-is} to the end of a pitch name and
102 a flat is formed by adding @code{-es}. Double sharps and double flats
103 are obtained by adding @code{-isis} or @code{-eses}. These
104 names are the Dutch note names. In Dutch, @code{aes} is contracted to
105 @code{as} in Dutch, but both forms are accepted. Similarly, both
106 @code{es} and @code{ees} are accepted.
108 There are predefined sets of note names for various other languages.
109 To use them, include the language specific init file. For
110 example: @code{\include "english.ly"}. The available language files
111 and the note names they define are:
116 Note Names sharp flat
117 nederlands.ly c d e f g a bes b -is -es
118 english.ly c d e f g a bf b -s/-sharp -f/-flat
119 deutsch.ly c d e f g a b h -is -es
120 norsk.ly c d e f g a b h -iss/-is -ess/-es
121 svenska.ly c d e f g a b h -iss -ess
122 italiano.ly do re mi fa sol la sib si -d -b
123 catalan.ly do re mi fa sol la sib si -d/-s -b
124 espanol.ly do re mi fa sol la sib si -s -b
133 The optional octave specification takes the form of a series of
134 single quote (`@code{'}') characters or a series of comma
135 (`@code{,}') characters. Each @code{'} raises the pitch by one
136 octave; each @code{,} lowers the pitch by an octave:
138 @lilypond[fragment,verbatim,center]
139 c' c'' es' g' as' gisis' ais'
143 There is also a verbose syntax for pitch specification:
146 @cindex @code{\pitch}
148 \pitch @var{scmpitch}
152 where @var{scmpitch} is a Scheme object of the @code{Pitch} type.
156 Notes can be hidden and unhidden with the following commands:
158 @cindex @code{\hideNotes}
160 @cindex @code{\unHideNotes}
167 @internalsref{NoteEvent}, and @internalsref{NoteHead}.
169 @node Chromatic alterations
170 @subsection Chromatic alterations
172 Normally accidentals are printed automatically, but you may also
173 print them manually. A reminder accidental
174 @cindex reminder accidental
176 can be forced by adding an exclamation mark @code{!}
177 after the pitch. A cautionary accidental
178 @cindex cautionary accidental
179 @cindex parenthesized accidental
180 (an accidental within parentheses) can be obtained by adding the
181 question mark `@code{?}' after the pitch:
183 @lilypond[fragment,verbatim]
184 cis' cis' cis'! cis'?
188 The automatic production of accidentals can be tuned in many
189 ways. For more information, refer to @ref{Accidentals}.
194 A chord is formed by a enclosing a set of pitches in @code{<<} and
195 @code{>>}. A chord may be followed by a duration, and a set of
196 articulations, just like simple notes.
206 Rests are entered like notes, with the note name @code{r}:
208 @lilypond[singleline,verbatim]
212 Whole bar rests, centered in middle of the bar,
213 must be done with multi measure rests. They are discussed in
214 @ref{Multi measure rests}.
217 A rest's vertical position may be explicitly specified by entering a
218 note with the @code{\rest} keyword appended. This makes manual
219 formatting in polyphonic music easier. Rest collision testing will
220 leave these rests alone:
222 @lilypond[singleline,verbatim]
228 @internalsref{RestEvent}, and @internalsref{Rest}.
235 @cindex Invisible rest
238 An invisible rest (also called a `skip') can be entered like a note
239 with note name `@code{s}' or with @code{\skip @var{duration}}:
241 @lilypond[singleline,verbatim]
245 The @code{s} syntax is only available in Note mode and Chord mode. In
246 other situations, you should use the @code{\skip} command:
248 @lilypond[singleline,verbatim]
251 { \time 4/8 \skip 2 \time 4/4 }
252 \notes\relative c'' { a2 a1 }
257 The skip command is merely an empty musical placeholder. It does not
258 produce any output, not even transparent output.
262 @internalsref{SkipEvent}.
267 @subsection Durations
271 @cindex @code{\duration}
274 In Note, Chord, and Lyrics mode, durations are designated by numbers
275 and dots: durations are entered as their reciprocal values. For example,
276 a quarter note is entered using a @code{4} (since it is a 1/4 note), while
277 a half note is entered using a @code{2} (since it is a 1/2 note). For notes
278 longer than a whole you must use variables:
280 @c FIXME: what is an identifier? I do not think it's been introduced yet.
281 @c and if it has, I obviously skipped that part. - Graham
285 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
287 r1 r2 r4 r8 r16 r32 r64 r64
292 \notes \relative c'' {
294 a1 a2 a4 a8 a16 a32 a64 a64
296 r1 r2 r4 r8 r16 r32 r64 r64
301 \remove "Clef_engraver"
302 \remove "Staff_symbol_engraver"
303 \remove "Time_signature_engraver"
304 \consists "Pitch_squash_engraver"
311 If the duration is omitted then it is set to the previously entered
312 duration. The default for the first note is a quarter note. The duration
313 can be followed by dots (`@code{.}') in order to obtain dotted note
317 @lilypond[fragment,verbatim,center]
318 a' b' c''8 b' a'4 a'4. b'4.. c'8.
323 You can alter the length of duration by a fraction @var{N/M}
324 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
325 will not affect the appearance of the notes or rests produced.
326 In the following example, the first three notes take up exactly two
328 @lilypond[fragment,relative 2,verbatim]
330 a4*2/3 gis4*2/3 a4*2/3
334 Durations can also be produced using the verbose syntax
335 @code{\duration @var{Scheme object}}:
336 @lilypond[verbatim,fragment]
337 c'\duration #(ly:make-duration 4 1)
344 Dots are normally moved up to avoid staff lines, except in polyphonic
345 situations. The following commands may be used to force a particular
348 @cindex @code{\dotsUp}
350 @cindex @code{\dotsDown}
352 @cindex @code{\dotsBoth}
357 @internalsref{Dots}, and @internalsref{DotColumn}.
361 In dense chords, dots can overlap.
366 Whenever a note is found, a
367 @internalsref{Stem} object is created automatically. For whole notes
368 and rests, stem objects are also created, but in those cases, the stem
373 @cindex @code{\stemUp}
375 @cindex @code{\stemDown}
377 @cindex @code{\stemBoth}
388 A tie connects two adjacent note heads of the same pitch. The tie in
389 effect extends the length of a note. Ties should not be confused with
390 slurs, which indicate articulation, or phrasing slurs, which indicate
391 musical phrasing. A tie is entered using the tilde symbol `@code{~}':
393 @lilypond[fragment,verbatim,center]
394 e' ~ e' <<c' e' g'>> ~ <<c' e' g'>>
397 When a tie is applied to a chord, all note heads whose pitches match
398 are connected. When no note heads match, no ties will be created.
400 In its meaning a tie is just a way of extending a note duration, similar
401 to the augmentation dot; in the following example there are two ways of
402 notating exactly the same concept:
404 @lilypond[fragment, singleline,quote]
405 \time 3/4 c'2. c'2 ~ c'4
407 If you need to tie a lot of notes over bars, it may be easier to use automatic
408 note splitting (See @ref{Automatic note splitting}).
413 @cindex @code{\tieUp}
415 @cindex @code{\tieDown}
417 @cindex @code{\tieBoth}
419 @cindex @code{\tieDotted}
421 @cindex @code{\tieSolid}
426 @internalsref{TieEvent}, @internalsref{NewTieEvent},
427 @internalsref{Tie}, and @ref{Automatic note splitting}.
430 ties created for a chord, see @inputfileref{input/test,tie-sparse.ly}.
434 Tieing only a subset of the note heads of a pair of chords is not
435 supported in a simple way. It can be achieved by moving the
436 tie-engraver into the @internalsref{Thread} context and turning on and
437 off ties per @internalsref{Thread}.
439 Switching staves when a tie is active, will not produce a slanted tie.
441 Formatting of ties is a difficult subject. The results are often not
451 @cindex @code{\times}
453 Tuplets are made out of a music expression by multiplying all durations
456 @cindex @code{\times}
458 \times @var{fraction} @var{musicexpr}
461 The duration of @var{musicexpr} will be multiplied by the fraction.
462 In the sheet music, the fraction's denominator will be printed over
463 the notes, optionally with a bracket. The most common tuplet is the
464 triplet in which 3 notes have the length of 2, so the notes are 2/3
465 of their written length:
467 @lilypond[fragment,verbatim,center]
468 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
471 The property @code{tupletSpannerDuration} specifies how long each
472 bracket should last. With this, you can make lots of tuplets while
473 typing @code{\times} only once, saving lots of typing. In the next
474 example, there are two triplets shown, while @code{\times} was only
477 @lilypond[fragment, relative, singleline, verbatim]
478 \property Voice.tupletSpannerDuration = #(ly:make-moment 1 4)
479 \times 2/3 { c'8 c c c c c }
482 The format of the number is determined by the property
483 @code{tupletNumberFormatFunction}. The default prints only the
484 denominator, but if it is set to the Scheme function
485 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
489 @cindex @code{tupletNumberFormatFunction}
490 @cindex tuplet formatting
495 @cindex @code{\tupletUp}
497 @cindex @code{\tupletDown}
499 @cindex @code{\tupletBoth}
504 @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
508 Nested tuplets are not formatted automatically. In this case, outer
509 tuplet brackets should be moved manually.
511 @node Easy Notation note heads
512 @subsection Easy Notation note heads
514 @cindex easy notation
517 The `easy play' note head includes a note name inside the head. It is
518 used in music aimed at beginners:
520 @lilypond[singleline,verbatim,26pt]
522 \notes { c'2 e'4 f' | g'1 }
523 \paper { \translator { \EasyNotation } }
527 The @code{EasyNotation} variable overrides a @internalsref{Score} context.
528 You probably will want to print it with magnification or a
529 large font size to make it more readable. To print with
530 magnification, you must create a DVI file (with @file{lilypond}) and
531 then enlarge it with something like @file{dvips -x 2000 file.dvi}.
532 See the @code{dvips} documentation for more details. To print with a
533 larger font, see @ref{Font Size}.
539 If you view the result with Xdvi, then staff lines will show through
540 the letters. Printing the PostScript file obtained does produce the
544 @node Easier music entry
545 @section Easier music entry
548 When entering music it is easy to introduce errors. This section deals
549 with tricks and features of the input language that help when entering
550 music, and find and correct mistakes. Some features of the input
551 language ease entering music, but also have other applications. They
552 are not described in this section.
554 It is also possible to use external programs, for example GUI
555 interfaces, or MIDI transcription programs, to enter or edit
556 music. Refer to the website for more information. Finally, there are
557 tools make debugging easier, by linking the input file and the output
558 shown on screen. See @ref{Point and click} for more information.
565 * Skipping corrected music::
566 * Automatic note splitting ::
572 @node Relative octaves
573 @subsection Relative octaves
575 @cindex relative octave specification
577 Octaves are specified by adding @code{'} and @code{,} to pitch names.
578 When you copy existing music, it is easy to accidentally put a pitch
579 in the wrong octave and hard to find such an error. The relative
580 octave mode prevents these errors: a single error puts the rest of the
581 piece off by one octave:
583 @cindex @code{\relative}
585 \relative @var{startpitch} @var{musicexpr}
588 The octave of notes that appear in @var{musicexpr} are calculated as
589 follows: If no octave changing marks are used, the basic interval
590 between this and the last note is always taken to be a fourth or less
591 (; this distance is determined without regarding alterations: a
592 @code{fisis} following a @code{ceses} will be put above the
595 The octave changing marks @code{'} and @code{,} can be added to raise
596 or lower the pitch by an extra octave. Upon entering relative mode,
597 an absolute starting pitch must be specified that will act as the
598 predecessor of the first note of @var{musicexpr}.
600 Here is the relative mode shown in action:
601 @lilypond[fragment,singleline,verbatim,center]
607 Octave changing marks are used for intervals greater than a fourth:
608 @lilypond[fragment,verbatim,center]
613 If the preceding item is a chord, the first note of the chord is used
614 to determine the first note of the next chord:
616 @lilypond[fragment,verbatim,center]
623 @cindex @code{\notes}
625 The pitch after the @code{\relative} contains a note name. To parse
626 the pitch as a note name, you have to be in note mode, so there must
627 be a surrounding @code{\notes} keyword (which is not
630 The relative conversion will not affect @code{\transpose},
631 @code{\chords} or @code{\relative} sections in its argument. If you
632 want to use relative within transposed music, you must place an
633 additional @code{\relative} inside the @code{\transpose}.
636 @subsection Octave check
639 Octave checks make octave errors easier to correct.
645 This checks that @var{pitch} (without octave) yields @var{pitch} (with
646 octave) in \relative mode. If not, a warning is printed, and the
647 octave is corrected, for example, the first check is passed
648 successfully. The second check fails with an error message. The
649 octave is adjusted so the following notes are in the correct octave
660 The octave of a note following an octave check is determined with
661 respect to the note preceding it. In the next fragment, the last note
662 is a @code{a'}, above central C. Hence, the @code{\octave} check may
663 be deleted without changing the meaning of the piece.
665 @lilypond[verbatim,fragment]
676 @subsection Bar check
680 @cindex @code{barCheckSynchronize}
683 Bar checks help detect errors in the durations. A bar check is
684 entered using the bar symbol, `@code{|}'. Whenever it is encountered
685 during interpretation, it should fall on a measure boundary. If it
686 does not, a warning is printed. Depending on the value of
687 @code{barCheckSynchronize}, the beginning of the measure will be
690 In the next example, the second bar check will signal an error:
692 \time 3/4 c2 e4 | g2 |
697 @cindex skipTypesetting
699 Failed bar checks are caused by entering incorrect
700 durations. Incorrect durations often completely garble up the score,
701 especially if it is polyphonic, so you should start correcting the
702 score by scanning for failed bar checks and incorrect durations. To
703 speed up this process, you can use @code{skipTypesetting}, described
706 @node Skipping corrected music
707 @subsection Skipping corrected music
709 The property @code{Score.skipTypesetting} can be used to switch on and
710 off typesetting completely during the interpretation phase. When
711 typesetting is switched off, the music is processed much more quickly.
712 This can be used to skip over the parts of a score that have already
713 been checked for errors:
715 @lilypond[fragment,singleline,verbatim]
717 \property Score.skipTypesetting = ##t
719 \property Score.skipTypesetting = ##f
723 @node Automatic note splitting
724 @subsection Automatic note splitting
726 Long notes can be converted automatically to tied notes. This is done
727 by replacing the @internalsref{Note_heads_engraver} by the
728 @internalsref{Completion_heads_engraver}:
731 \paper @{ \translator @{
733 \remove "Note_heads_engraver"
734 \consists "Completion_heads_engraver"
738 which will make long notes tied in the following example:
741 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
748 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
750 \paper { \translator {
752 \remove "Note_heads_engraver"
753 \consists "Completion_heads_engraver"
758 This engraver splits all running notes at the bar line, and inserts
759 ties. One of its uses is to debug complex scores: if the measures are
760 not entirely filled, then the ties exactly show how much each measure
765 Not all durations (especially those containing tuplets) can be
766 represented exactly; the engraver will not insert tuplets.
772 @section Staff notation
774 This section describes music notation that occurs on staff level,
775 such as keys, clefs and time signatures.
777 @cindex Staff notation
791 @subsection Staff symbol
793 @cindex adjusting staff symbol
794 @cindex StaffSymbol, using \property
796 Notes, dynamic signs, etc. are grouped
797 with a set of horizontal lines, into a staff (plural `staves'). In our
798 system, these lines are drawn using a separate layout object called
802 @cindex staff lines, setting number of
803 @cindex staff lines, setting thickness of
804 @cindex thickness of staff lines, setting
805 @cindex number of staff lines, setting
807 This object is created whenever a @internalsref{Staff} context is
808 created. The appearance of the staff symbol cannot be changed by
809 using @code{\override} or @code{\set}. At the moment that
810 @code{\property Staff} is interpreted, a @internalsref{Staff} context
811 is made, and the @internalsref{StaffSymbol} is created before any
812 @code{\override} is effective. Properties can be changed in a
813 @code{\translator} definition, or by using @code{\outputproperty}.
817 If a staff is ended halfway a piece, the staff symbol may not end
818 exactly on the barline.
822 @subsection Key signature
823 @cindex Key signature
827 The key signature indicates the scale in which a piece is played. It
828 is denoted by a set of alterations (flats or sharps) at the start of
833 Setting or changing the key signature is done with the @code{\key}
836 @code{\key} @var{pitch} @var{type}
839 @cindex @code{\minor}
840 @cindex @code{\major}
841 @cindex @code{\minor}
842 @cindex @code{\ionian}
843 @cindex @code{\locrian}
844 @cindex @code{\aeolian}
845 @cindex @code{\mixolydian}
846 @cindex @code{\lydian}
847 @cindex @code{\phrygian}
848 @cindex @code{\dorian}
850 Here, @var{type} should be @code{\major} or @code{\minor} to get
851 @var{pitch}-major or @var{pitch}-minor, respectively.
852 The standard mode names @code{\ionian},
853 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
854 @code{\phrygian}, and @code{\dorian} are also defined.
856 This command sets the context property
857 @internalsref{Staff}.@code{keySignature}. Non-standard key signatures
858 can be specified by setting this property directly.
862 The ordering of a key cancellation is wrong when it is combined with
863 repeat bar lines. The cancellation is also printed after a line break.
867 @internalsref{KeyChangeEvent}, and @internalsref{KeySignature}.
869 @cindex @code{keySignature}
876 The clef indicates which lines of the staff correspond to which
881 The clef can be set or changed with the @code{\clef} command:
882 @lilypond[fragment,verbatim]
883 \key f\major c''2 \clef alto g'2
886 Supported clef-names include:
887 @c Moved standard clefs to the top /MB
891 @item treble, violin, G, G2
904 G clef on 1st line, so-called French violin clef
909 @cindex mezzosoprano clef
912 @cindex baritone clef
915 @cindex varbaritone clef
924 By adding @code{_8} or @code{^8} to the clef name, the clef is
925 transposed one octave down or up, respectively. Argument @var{clefname}
926 must be enclosed in quotes when it contains underscores or digits. For
930 @cindex choral tenor clef
931 @lilypond[verbatim,fragment,relative]
935 This command is equivalent to setting @code{clefGlyph},
936 @code{clefPosition} (which controls the Y position of the clef),
937 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
938 when any of these properties are changed.
942 The object for this symbol is @internalsref{Clef}.
946 @node Ottava brackets
947 @subsection Ottava brackets
949 ``Ottava'' brackets introduce an extra transposition of an octave for
950 the staff. They are created by invoking the function
951 @code{set-octavation}:
957 @lilypond[verbatim,fragment]
966 Internally the @code{set-octavation} function sets the properties
967 @code{ottavation} (eg. to @code{"8va"}) and @code{centralCPosition}.
971 @internalsref{OttavaSpanner}.
975 @code{set-octavation} will get confused when clef changes happen
976 during an octavation bracket.
979 @subsection Time signature
980 @cindex Time signature
984 Time signature indicates the metrum of a piece: a regular pattern of
985 strong and weak beats. It is denoted by a fraction at the start of the
990 The time signature is set or changed by the @code{\time}
992 @lilypond[fragment,verbatim]
993 \time 2/4 c'2 \time 3/4 c'2.
996 The symbol that is printed can be customized with the @code{style}
997 property. Setting it to @code{#'()} uses fraction style for 4/4 and
998 2/2 time. There are many more options for its layout. See
999 @inputfileref{input/test,time.ly} for more examples.
1002 This command sets the property @code{timeSignatureFraction},
1003 @code{beatLength} and @code{measureLength} in the @code{Timing}
1004 context, which is normally aliased to @internalsref{Score}. The
1005 property @code{measureLength} determines where bar lines should be
1006 inserted, and how automatic beams should be generated. Changing the
1007 value of @code{timeSignatureFraction} also causes the symbol to be
1010 More options are available through the Scheme function
1011 @code{set-time-signature}. In combination with the
1012 @internalsref{Measure_grouping_engraver}, it will create
1013 @internalsref{MeasureGrouping} signs. Such signs ease reading
1014 rhythmically complex modern music. In the following example, the 9/8
1015 measure is subdivided in 2, 2, 2 and 3. This is passed to
1016 @code{set-time-signature} as the third argument @code{(2 2 2 3)}:
1019 \score { \notes \relative c'' {
1020 #(set-time-signature 9 8 '(2 2 2 3))
1021 g8[ g] d[ d] g[ g] a8[( bes g]) |
1022 #(set-time-signature 5 8 '(3 2))
1027 \translator { \StaffContext
1028 \consists "Measure_grouping_engraver"
1034 @internalsref{TimeSignature}, and @internalsref{Timing_engraver}.
1039 Automatic beaming does not use measure grouping specified with
1040 @code{set-time-signature}.
1042 @node Partial measures
1043 @subsection Partial measures
1046 @cindex partial measure
1047 @cindex measure, partial
1048 @cindex shorten measures
1049 @cindex @code{\partial}
1051 Partial measures, for example in upsteps, are entered using the
1052 @code{\partial} command:
1053 @lilypond[fragment,verbatim]
1054 \partial 16*5 c'16 c4 | a'2. ~ a'8. a'16 | g'1
1057 The syntax for this command is
1059 \partial @var{duration}
1061 This is internally translated into
1063 \property Timing.measurePosition = -@var{length of duration}
1066 The property @code{measurePosition} contains a rational number
1067 indicating how much of the measure has passed at this point.
1069 @node Unmetered music
1070 @subsection Unmetered music
1072 Bar lines and bar numbers are calculated automatically. For unmetered
1073 music (e.g. cadenzas), this is not desirable. By setting
1074 @code{Score.timing} to false, this automatic timing can be switched
1080 @cindex @code{\cadenzaOn}
1082 @cindex @code{\cadenzaOff}
1086 @subsection Bar lines
1090 @cindex measure lines
1094 Bar lines delimit measures, but are also used to indicate repeats.
1095 Normally, they are inserted automatically. Line breaks may only
1101 of barlines can be forced with the @code{\bar} command:
1102 @lilypond[relative=1,fragment,verbatim]
1106 The following bar types are available:
1107 @lilypond[fragment, relative, singleline, verbatim]
1119 In scores with many staves, a @code{\bar} command in one staff is
1120 automatically applied to all staves. The resulting bar lines are
1121 connected between different staves of a @internalsref{StaffGroup}:
1123 @lilypond[fragment, verbatim]
1124 < \context StaffGroup <
1128 \new Staff { \clef bass c4 g e g } >
1129 \new Staff { \clef bass c2 c2 } >
1133 The command @code{\bar @var{bartype}} is a short cut for doing
1134 @code{\property Score.whichBar = @var{bartype}} Whenever
1135 @code{whichBar} is set to a string, a bar line of that type is
1136 created. At the start of a measure it is set to
1137 @code{defaultBarType}. The contents of @code{repeatCommands} are used
1138 to override default measure bars.
1140 Property @code{whichBar} can also be set directly, using @code{\property}
1141 or @code{\bar}. These settings take precedence over the automatic
1142 @code{whichBar} settings.
1145 @cindex repeatCommands
1146 @cindex defaultBarType
1148 You are encouraged to use @code{\repeat} for repetitions. See
1158 The bar line objects that are created at @internalsref{Staff} level
1159 are called @internalsref{BarLine}, the bar lines that span staves are
1160 @internalsref{SpanBar}s.
1162 @cindex bar lines at start of system
1163 @cindex start of system
1165 The barlines at the start of each system are
1166 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
1167 @internalsref{SystemStartBracket}. They are spanner objects and
1168 typically must be tuned from a @code{\translator} block.
1175 The easiest way to enter fragments with more than one voice on a staff
1176 is to split chords using the separator @code{\\}. You can use it for
1177 small, short-lived voices or for single chords:
1179 @lilypond[verbatim,fragment]
1180 \context Staff \relative c'' {
1181 c4 < { f d e } \\ { b c2 } > c4 < g' \\ b, \\ f' \\ d >
1185 The separator causes @internalsref{Voice} contexts to be
1187 bear the names @code{"1"}, @code{"2"}, etc. In each of these
1188 contexts, vertical direction of slurs, stems, etc. is set
1191 This can also be done by instantiating @internalsref{Voice} contexts
1192 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1193 a stem directions and horizontal shift for each part:
1196 @lilypond[singleline, verbatim]
1198 \context Staff < \new Voice { \voiceOne cis2 b }
1199 \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
1200 \new Voice { \voiceTwo fis4~ fis4 f ~ f } >
1203 Normally, note heads with a different number of dots are not merged, but
1204 when the object property @code{merge-differently-dotted} is set in
1205 the @internalsref{NoteCollision} object, they are merged:
1206 @lilypond[verbatim,fragment,singleline]
1207 \relative c'' \context Voice < {
1209 \property Staff.NoteCollision \override
1210 #'merge-differently-dotted = ##t
1212 } \\ { g8.[ f16] g8.[ f16] }
1216 Similarly, you can merge half note heads with eighth notes, by setting
1217 @code{merge-differently-headed}:
1218 @lilypond[fragment, relative=2,verbatim]
1221 \property Staff.NoteCollision
1222 \override #'merge-differently-headed = ##t
1223 c8 c4. } \\ { c2 c2 } >
1226 LilyPond also vertically shifts rests that are opposite of a stem:
1229 @lilypond[singleline,fragment,verbatim]
1230 \context Voice < c''4 \\ r4 >
1238 @cindex @code{\oneVoice}
1240 @cindex @code{\voiceOne}
1242 @cindex @code{\voiceTwo}
1244 @cindex @code{\voiceThree}
1246 @cindex @code{\voiceFour}
1249 The following commands specify in what chords of the current voice
1250 should be shifted: the outer voice has @code{\shiftOff}, and the inner
1251 voices have @code{\shiftOn}, @code{\shiftOnn}, etc.
1254 @cindex @code{\shiftOn}
1256 @cindex @code{\shiftOnn}
1258 @cindex @code{\shiftOnnn}
1260 @cindex @code{\shiftOff}
1267 The objects responsible for resolving collisions are
1268 @internalsref{NoteCollision} and @internalsref{RestCollision}. See
1269 also example files @inputfileref{input/regression,collision-dots.ly},
1270 @inputfileref{input/regression,collision-head-chords.ly},
1271 @inputfileref{input/regression,collision-heads.ly},
1272 @inputfileref{input/regression,collision-mesh.ly}, and
1273 @inputfileref{input/regression,collisions.ly}.
1278 Resolving collisions is a intricate subject, and only a few situations
1279 are handled. When LilyPond cannot cope, the @code{force-hshift}
1280 property of the @internalsref{NoteColumn} object and pitched rests can
1281 be used to override typesetting decisions.
1283 When using @code{merge-differently-headed} with an upstem 8th or a shorter
1284 note, and a downstem half note, the 8th note gets the wrong offset.
1289 Beams are used to group short notes into chunks that are aligned with
1290 the metrum. They are inserted automatically in most cases:
1292 @lilypond[fragment,verbatim, relative=2]
1293 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1296 When these automatic decisions are not good enough, beaming can be
1297 entered explicitly. It is also possible to define beaming patterns
1298 that differ from the defaults.
1302 @internalsref{Beam}.
1305 @cindex Automatic beams
1306 @subsection Manual beams
1307 @cindex beams, manual
1311 In some cases it may be necessary to override the automatic beaming
1312 algorithm. For example, the auto beamer will not put beams over rests
1313 or bar lines. Such beams are specified by manually: the begin and end
1314 point are marked with @code{[} and @code{]}:
1316 @lilypond[fragment,relative,verbatim]
1318 r4 r8[ g' a r8] r8 g[ | a] r8
1322 @cindex @code{stemLeftBeamCount}
1324 Normally, beaming patterns within a beam are determined automatically.
1325 When this mechanism fouls up, the properties
1326 @code{Voice.stemLeftBeamCount} and @code{Voice.stemRightBeamCount} can
1327 be used to control the beam subdivision on a stem. If either property
1328 is set, its value will be used only once, and then it is erased.
1330 @lilypond[fragment,relative,verbatim]
1333 f8[ r16 \property Voice.stemLeftBeamCount = #1 f g a]
1336 @cindex @code{stemRightBeamCount}
1339 The property @code{subdivideBeams} can be set in order to subdivide
1340 all 16th or shorter beams at beat positions, as defined by the
1341 @code{beatLength} property . This accomplishes the same effect as
1342 twiddling with @code{stemLeftBeamCount} and @code{stemRightBeamCount},
1343 but it take less typing:
1346 @lilypond[relative=1,verbatim,noindent]
1348 \property Voice.subdivideBeams = ##t
1350 \property Score.beatLength = #(ly:make-moment 1 8)
1353 @cindex subdivideBeams
1355 Kneed beams are inserted automatically, when a large gap is detected
1356 between the note heads. This behavior can be tuned through the object
1357 property @code{auto-knee-gap}.
1359 Normally, line breaks are forbidden when beams cross bar lines. This
1360 behavior can be changed by setting @code{allowBeamBreak}.
1362 @cindex @code{allowBeamBreak}
1363 @cindex beams and line breaks
1365 @cindex beams, kneed
1367 @cindex auto-knee-gap
1373 @cindex Frenched staves
1375 Automatically kneed beams cannot be used together with hidden staves.
1380 * Setting automatic beam behavior ::
1384 @no de Beam typography
1385 @sub section Beam typography
1387 One of the strong points of LilyPond is how beams are formatted. Beams
1388 are quantized, meaning that the left and right endpoints beams start
1389 exactly on staff lines. Without quantization, small wedges of white
1390 space appear between the beam and staff line, and this looks untidy.
1392 Beams are also slope-damped: melodies that go up or down should also
1393 have beams that go up or down, but the slope of the beams should be
1394 less than the slope of the notes themselves.
1396 Some beams should be horizontal. These are so-called concave beams.
1398 [TODO: some pictures.]
1402 @node Setting automatic beam behavior
1403 @subsection Setting automatic beam behavior
1405 @cindex @code{autoBeamSettings}
1406 @cindex @code{(end * * * *)}
1407 @cindex @code{(begin * * * *)}
1408 @cindex automatic beams, tuning
1409 @cindex tuning automatic beaming
1411 @c [TODO: use \applycontext]
1413 In normal time signatures, automatic beams can start on any note but can
1414 only end in a few positions within the measure: beams can end on a beat,
1415 or at durations specified by the properties in
1416 @code{Voice.autoBeamSettings}. The defaults for @code{autoBeamSettings}
1417 are defined in @file{scm/auto-beam.scm}.
1419 The value of @code{autoBeamSettings} is changed using
1420 @code{\override} and restored with @code{\revert}:
1422 \property Voice.autoBeamSettings \override #'(@var{BE} @var{P} @var{Q} @var{N} @var{M}) = @var{dur}
1423 \property Voice.autoBeamSettings \revert #'(@var{BE} @var{P} @var{Q} @var{N} @var{M})
1425 Here, @var{BE} is the symbol @code{begin} or @code{end}. It determines
1426 whether the rule applies to begin or end-points. The quantity
1427 @var{P}/@var{Q} refers to the length of the beamed notes (and `@code{*
1428 *}' designates notes of any length), @var{N}/@var{M} refers to a time
1429 signature (wildcards, `@code{* *}' may be entered to designate all time
1432 For example, if automatic beams should end on every quarter note, use
1435 \property Voice.autoBeamSettings \override
1436 #'(end * * * *) = #(ly:make-moment 1 4)
1438 Since the duration of a quarter note is 1/4 of a whole note, it is
1439 entered as @code{(ly:make-moment 1 4)}.
1441 The same syntax can be used to specify beam starting points. In this
1442 example, automatic beams can only end on a dotted quarter note:
1444 \property Voice.autoBeamSettings \override
1445 #'(end * * * *) = #(ly:make-moment 3 8)
1447 In 4/4 time signature, this means that automatic beams could end only on
1448 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1449 3/8 has passed within the measure).
1451 Rules can also be restricted to specific time signatures. A rule that
1452 should only be applied in @var{N}/@var{M} time signature is formed by
1453 replacing the second asterisks by @var{N} and @var{M}. For example, a
1454 rule for 6/8 time exclusively looks like
1456 \property Voice.autoBeamSettings \override
1457 #'(begin * * 6 8) = ...
1460 If a rule should be to applied only to certain types of beams, use the
1461 first pair of asterisks. Beams are classified according to the
1462 shortest note they contain. For a beam ending rule that only applies
1463 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1466 If a score ends while an automatic beam has not been ended and is still
1467 accepting notes, this last beam will not be typeset at all.
1469 @cindex automatic beam generation
1471 @cindex @code{Voice.autoBeaming}
1474 For melodies that have lyrics, you may want to switch off
1475 automatic beaming. This is done by setting @code{Voice.autoBeaming} to
1480 @cindex @code{\autoBeamOff}
1481 @code{\autoBeamOff},
1482 @cindex @code{\autoBeamOn}
1488 The rules for ending a beam depend on the shortest note in a beam.
1489 So, while it is possible to have different ending rules for eight
1490 beams and sixteenth beams, a beam that contains both eight and
1491 sixteenth notes will use the rules for the sixteenth beam.
1493 In the example below, the autobeamer makes eight beams and sixteenth
1494 end at 3 eights; the third beam can only be corrected by specifying
1497 @lilypond[singleline,fragment,relative,noverbatim,quote]
1498 \property Voice.autoBeamSettings
1499 \override #'(end * * * *) = #(ly:make-moment 3 8)
1500 % rather show case where it goes wrong
1501 %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
1502 \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
1504 It is not possible to specify beaming parameters that act differently in
1505 different parts of a measure. This means that it is not possible to use
1506 automatic beaming in irregular meters such as @code{5/8}.
1509 @section Accidentals
1512 This section describes how to change the way that accidentals are
1513 inserted automatically before the running notes.
1517 * Using the predefined accidental variables::
1518 * Customized accidental rules::
1521 @node Using the predefined accidental variables
1522 @subsection Using the predefined accidental variables
1524 The constructs for describing the accidental typesetting rules are
1525 quite hairy, so non-experts should stick to the variables
1526 defined in @file{ly/property-init.ly}.
1527 @cindex @file{property-init.ly}
1529 The variables set properties in the ``@code{Current}'' context (see
1530 @ref{Context properties}). This means that the variables should
1531 normally be added right after the creation of the context in which the
1532 accidental typesetting described by the variable is to take
1533 effect. For example, if you want to use piano-accidentals in a piano
1534 staff then issue @code{\pianoAccidentals} first thing after the
1535 creation of the piano staff:
1538 \notes \relative c'' <
1539 \new Staff @{ cis4 d e2 @}
1540 \context GrandStaff <
1542 \new Staff @{ cis4 d e2 @}
1543 \new Staff @{ es2 c @}
1545 \new Staff @{ es2 c @}
1549 @lilypond[singleline]
1551 \notes \relative c'' <
1552 \new Staff { cis4 d e2 }
1553 \context GrandStaff <
1555 \new Staff { cis4 d e2 }
1556 \new Staff { es2 c }
1558 \new Staff { es2 c }
1563 minimumVerticalExtent = #'(-4.0 . 4.0)
1571 @item \defaultAccidentals
1572 @cindex @code{\defaultAccidentals}
1573 This is the default typesetting behaviour. It should correspond
1574 to 18th century common practice: Accidentals are
1575 remembered to the end of the measure in which they occur and
1576 only on their own octave.
1578 @item \voiceAccidentals
1579 @cindex @code{\voiceAccidentals}
1581 The normal behaviour is to
1582 remember the accidentals on Staff-level. This variable, however,
1583 typesets accidentals individually for each voice. Apart from that the
1584 rule is similar to @code{\defaultAccidentals}.
1586 This leads to some weird and often unwanted results
1587 because accidentals from one voice do not get cancelled in other
1589 @lilypond[singleline,relative,fragment,verbatim,quote]
1597 Hence you should only use @code{\voiceAccidentals} if the voices
1598 are to be read solely by individual musicians. If the staff is to be
1599 used by one musician (e.g. a conductor) then you use
1600 @code{\modernVoiceAccidentals} or @code{\modernVoiceCautionaries}
1603 @item \modernAccidentals
1604 @cindex @code{\modernAccidentals}
1605 This rule corresponds to the common practice in the 20th
1607 The rule is more complex than @code{\defaultAccidentals}.
1608 You get all the same accidentals, but temporary
1609 accidentals also get cancelled in other octaves. Furthermore,
1610 in the same octave, they also get cancelled in the following measure:
1611 @lilypond[singleline,fragment,verbatim]
1613 cis' c'' cis'2 | c'' c'
1616 @item \modernCautionaries
1617 @cindex @code{\modernCautionaries}
1618 This rule is similar to @code{\modernAccidentals}, but the
1619 ``extra'' accidentals (the ones not typeset by
1620 @code{\defaultAccidentals}) are typeset as cautionary accidentals.
1621 They are printed in reduced size or with parentheses:
1622 @lilypond[singleline,fragment,verbatim]
1624 cis' c'' cis'2 | c'' c'
1627 @cindex @code{\modernVoiceAccidentals}
1628 @item \modernVoiceAccidentals
1629 is used for multivoice accidentals to be read both by musicians
1630 playing one voice and musicians playing all voices. Accidentals are
1631 typeset for each voice, but they @emph{are} cancelled across voices in
1632 the same @internalsref{Staff}.
1634 @cindex @code{\modernVoiceCautionaries}
1635 @item \modernVoiceCautionaries
1636 is the same as @code{\modernVoiceAccidentals}, but with the extra
1637 accidentals (the ones not typeset by @code{\voiceAccidentals}) typeset
1638 as cautionaries. Even though all accidentals typeset by
1639 @code{\defaultAccidentals} @emph{are} typeset by this variable then
1640 some of them are typeset as cautionaries.
1642 @item \pianoAccidentals
1643 @cindex @code{\pianoAccidentals}
1644 20th century practice for piano notation. Very similar to
1645 @code{\modernAccidentals} but accidentals also get cancelled
1646 across the staves in the same @internalsref{GrandStaff} or
1647 @internalsref{PianoStaff}.
1649 @item \pianoCautionaries
1650 @cindex @code{\pianoCautionaries}
1651 As @code{\pianoAccidentals} but with the extra accidentals
1652 typeset as cautionaries.
1655 @cindex @code{\noResetKey}
1656 Same as @code{\defaultAccidentals} but with accidentals lasting
1657 ``forever'' and not only until the next measure:
1658 @lilypond[singleline,fragment,verbatim,relative]
1663 @item \forgetAccidentals
1664 @cindex @code{\forgetAccidentals}
1665 This is sort of the opposite of @code{\noResetKey}: Accidentals
1666 are not remembered at all---and hence all accidentals are
1667 typeset relative to the key signature, regardless of what was
1668 before in the music:
1669 @lilypond[singleline,fragment,verbatim,relative]
1671 \key d\major c4 c cis cis d d dis dis
1675 @node Customized accidental rules
1676 @subsection Customized accidental rules
1678 This section must be considered gurus-only, and hence it must be
1679 sufficient with a short description of the system and a reference to
1680 the internal documentation.
1682 The algorithm tries several different rules, and uses the rule
1683 that gives the highest number of accidentals. Each rule consists of
1686 In which context is the rule applied. For example, if
1687 @var{context} is @internalsref{Score} then all staves share
1688 accidentals, and if @var{context} is @internalsref{Staff} then all
1689 voices in the same staff share accidentals, but staves do not.
1691 Whether the accidental changes all octaves or only the current
1694 Over how many barlines the accidental lasts.
1695 If @var{lazyness} is @code{-1} then the accidental is forget
1696 immediately, and if @var{lazyness} is @code{#t} then the accidental
1699 @c [TODO: should use +infinity for this case?]
1705 @cindex @code{\defaultAccidentals}
1706 @code{\defaultAccidentals},
1707 @cindex @code{\voiceAccidentals}
1708 @code{\voiceAccidentals},
1709 @cindex @code{\modernAccidentals}
1710 @code{\modernAccidentals},
1711 @cindex @code{\modernCautionaries}
1712 @code{\modernCautionaries},
1713 @cindex @code{\modernVoiceAccidentals}
1714 @code{\modernVoiceAccidentals},
1715 @cindex @code{\modernVoiceCautionaries}
1716 @code{\modernVoiceCautionaries},
1717 @cindex @code{\pianoAccidentals}
1718 @code{\pianoAccidentals},
1719 @cindex @code{\pianoCautionaries}
1720 @code{\pianoCautionaries},
1721 @cindex @code{\noResetKey}
1723 @cindex @code{\forgetAccidentals}
1724 @code{\forgetAccidentals}.
1728 @internalsref{Accidental_engraver}, @internalsref{Accidental}, and
1729 @internalsref{AccidentalPlacement}.
1734 Currently the simultaneous notes are considered to be entered in
1735 sequential mode. This means that in a chord the accidentals are
1736 typeset as if the notes in the chord happened once at a time - in the
1737 order in which they appear in the input file.
1739 This is only a problem when there are simultaneous notes whose
1740 accidentals depend on each other. The problem only occurs when using
1741 non-default accidentals. In the default scheme, accidentals only
1742 depend on other accidentals with the same pitch on the same staff, so
1743 no conflicts possible.
1745 This example shows two examples of the same music giving different
1746 accidentals depending on the order in which the notes occur in the
1749 @lilypond[singleline,fragment,verbatim]
1750 \property Staff.autoAccidentals = #'( Staff (any-octave . 0) )
1751 cis'4 <<c'' c'>> r2 | cis'4 <<c' c''>> r2
1752 | <<cis' c''>> r | <<c'' cis'>> r |
1755 This problem can be solved by manually inserting @code{!} and @code{?}
1756 for the problematic notes.
1758 @node Expressive marks
1759 @section Expressive marks
1767 * Analysis brackets::
1774 A slur indicates that notes are to be played bound or @emph{legato}.
1778 They are entered using parentheses:
1779 @lilypond[fragment,verbatim,center]
1780 f'( g')( a') a'8[ b'(] a'4 g'2 f'4)
1781 <<c' e'>>2( <<b d'>>2)
1785 @c TODO: should explain that ^( and _( set directions
1786 @c should set attachments with ^ and _ ?
1788 Slurs avoid crossing stems, and are generally attached to note heads.
1789 However, in some situations with beams, slurs may be attached to stem
1790 ends. If you want to override this layout you can do this through the
1791 object property @code{attachment} of @internalsref{Slur} in
1792 @internalsref{Voice} context. Its value is a pair of symbols, specifying
1793 the attachment type of the left and right end points:
1795 @lilypond[fragment,relative,verbatim]
1797 \property Voice.Stem \set #'length = #5.5
1799 \property Voice.Slur \set #'attachment = #'(stem . stem)
1803 If a slur would strike through a stem or beam, the slur will be moved
1804 away upward or downward. If this happens, attaching the slur to the
1805 stems might look better:
1807 @lilypond[fragment,relative,verbatim]
1810 \property Voice.Slur \set #'attachment = #'(stem . stem)
1817 @cindex @code{\slurUp}
1819 @cindex @code{\slurDown}
1821 @cindex @code{\slurBoth}
1823 @cindex @code{\slurDotted}
1825 @cindex @code{\slurSolid}
1830 @seeinternals{Slur}, and @internalsref{SlurEvent}.
1835 Producing nice slurs is a difficult problem, and LilyPond currently
1836 uses a simple, empiric method to produce slurs. In some cases, its
1840 @cindex Adjusting slurs
1842 @node Phrasing slurs
1843 @subsection Phrasing slurs
1845 @cindex phrasing slurs
1846 @cindex phrasing marks
1848 A phrasing slur (or phrasing mark) connects chords and is used to
1849 indicate a musical sentence. It is started using @code{\(} and @code{\)}
1852 @lilypond[fragment,verbatim,center,relative]
1853 \time 6/4 c'\( d( e) f( e) d\)
1856 Typographically, the phrasing slur behaves almost exactly like a
1857 normal slur. However, they are treated as different objects. A
1858 @code{\slurUp} will have no effect on a phrasing slur; instead, you
1859 should use @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
1860 @code{\phrasingSlurBoth}.
1862 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth}
1863 will only affect normal slurs and not phrasing slurs.
1867 @cindex @code{\phrasingSlurUp}
1868 @code{\phrasingSlurUp},
1869 @cindex @code{\phrasingSlurDown}
1870 @code{\phrasingSlurDown},
1871 @cindex @code{\phrasingSlurBoth}
1872 @code{\phrasingSlurBoth},
1876 See also @internalsref{PhrasingSlur}, and
1877 @internalsref{PhrasingSlurEvent}.
1881 Phrasing slurs have the same limitations in their formatting as normal
1882 slurs. Putting phrasing slurs over rests leads to spurious warnings.
1885 @subsection Breath marks
1887 Breath marks are entered using @code{\breathe}:
1890 @lilypond[fragment,relative,verbatim]
1894 The glyph of the breath mark can be tweaked by overriding the
1895 @code{text} property of the @code{BreathingSign} layout object with the name of
1896 any glyph of @ref{The Feta font}. For example,
1897 @lilypond[fragment,verbatim,relative]
1899 \property Voice.BreathingSign \override #'text = #"scripts-rvarcomma"
1906 @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}, and
1907 @inputfileref{input/regression,breathing-sign.ly}.
1910 @node Metronome marks
1911 @subsection Metronome marks
1914 @cindex beats per minute
1915 @cindex metronome marking
1917 Metronome settings can be entered as follows:
1919 \tempo @var{duration} = @var{perminute}
1922 In the MIDI output, they are interpreted as a tempo change, and in the
1923 paper output, a metronome marking is printed:
1924 @cindex @code{\tempo}
1925 @lilypond[fragment,verbatim]
1931 @internalsref{MetronomeChangeEvent}.
1936 @subsection Text spanners
1937 @cindex Text spanners
1939 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
1940 are written as texts, and extended over many measures with dotted
1941 lines. You can create such texts using text spanners: attach
1942 @code{\startTextSpan} and @code{\stopTextSpan} to the
1943 start and ending note of the spanner.
1945 The string to be printed, as well as the style, is set through object
1948 @lilypond[fragment,relative,verbatim]
1950 \property Voice.TextSpanner \set #'direction = #-1
1951 \property Voice.TextSpanner \set #'edge-text = #'("rall " . "")
1952 c2\startTextSpan b c\stopTextSpan a }
1958 @internalsref{TextSpanEvent},
1959 @internalsref{TextSpanner}, and
1960 @inputfileref{input/regression,text-spanner.ly}.
1963 @node Analysis brackets
1964 @subsection Analysis brackets
1966 @cindex phrasing brackets
1967 @cindex musicological analysis
1968 @cindex note grouping bracket
1970 Brackets are used in musical analysis to indicate structure in musical
1971 pieces. LilyPond supports a simple form of nested horizontal brackets.
1972 To use this, add the @internalsref{Horizontal_bracket_engraver} to
1973 @internalsref{Staff} context. A bracket is started with
1974 @code{\startGroup} and closed with @code{\stopGroup}:
1976 @lilypond[singleline,verbatim]
1977 \score { \notes \relative c'' {
1978 c4\startGroup\startGroup
1981 c4\stopGroup\stopGroup
1983 \paper { \translator {
1984 \StaffContext \consists "Horizontal_bracket_engraver"
1990 @internalsref{HorizontalBracket}, @internalsref{NoteGroupingEvent}, and
1991 @inputfileref{input/regression,note-group-bracket.ly}.
1995 @section Articulations
1996 @cindex Articulations
1998 @cindex articulations
2002 A variety of symbols can appear above and below notes to indicate
2003 different characteristics of the performance. They are added to a note
2004 by adding a dash and the character signifying the
2005 articulation. They are demonstrated here:
2007 @lilypondfile[notexidoc]{script-abbreviations.ly}
2009 The meanings of these shorthands can be changed: see
2010 @file{ly/script-init.ly} for examples.
2013 The script is automatically placed, but if you need to force
2014 directions, you can use @code{_} to force them down, or @code{^} to
2016 @lilypond[fragment, verbatim]
2020 Other symbols can be added using the syntax
2021 @var{note}@code{\}@var{name}, e.g. @code{c4\fermata}. Again, they
2022 can be forced up or down using @code{^} and @code{_},
2025 @lilypond[verbatim,fragment,relative 2]
2026 c\fermata c^\fermata c_\fermata
2033 @cindex staccatissimo
2042 @cindex organ pedal marks
2051 @cindex prallmordent
2055 @cindex thumb marking
2060 @lilypondfile[notexidoc]{script-chart.ly}
2065 @cindex @code{\scriptUp}
2067 @cindex @code{\scriptDown}
2069 @cindex @code{\scriptBoth}
2074 @internalsref{ScriptEvent}, and @internalsref{Script}.
2078 All of these note ornaments appear in the printed output but have no
2079 effect on the MIDI rendering of the music.
2082 @node Fingering instructions
2083 @section Fingering instructions
2087 Fingering instructions can be entered using
2089 @var{note}-@var{digit}
2091 For finger changes, use markup texts:
2093 @lilypond[verbatim, singleline, fragment]
2094 c'4-1 c'4-2 c'4-3 c'4-4
2095 c'^\markup { \fontsize #-3 \number "2-3" }
2098 @cindex finger change
2103 You can use the thumb-script to indicate that a note should be
2104 played with your thumb (used in cello music):
2106 @lilypond[verbatim, singleline, fragment]
2107 <<a' a''-3>>8(_\thumb[ <<b' b''-3>>)_\thumb
2108 <<c'' c'''-3>>(_\thumb <<d'' d'''-3>>)_\thumb]
2111 Fingerings for chords can also be added to individual notes
2112 of the chord by adding them after the pitches:
2113 @lilypond[verbatim,singleline,fragment,relative=1]
2114 << c-1 e-2 g-3 b-5 >> 4
2117 Setting @code{fingeringOrientations} will put fingerings next
2120 @lilypond[verbatim,singleline,fragment,relative=1]
2121 \property Voice.fingeringOrientations = #'(left down)
2122 <<c-1 es-2 g-4 bes-5 >> 4
2123 \property Voice.fingeringOrientations = #'(up right down)
2124 <<c-1 es-2 g-4 bes-5 >> 4
2129 @internalsref{FingerEvent}, and @internalsref{Fingering}.
2140 @subsection Text scripts
2141 @cindex Text scripts
2143 It is possible to place arbitrary strings of text or markup text (see
2144 @ref{Text markup}) above or below notes by using a string:
2145 @code{c^"text"}. By default, these indications do not influence the
2146 note spacing, but by using the command @code{\fatText}, the widths
2147 will be taken into account:
2149 @lilypond[fragment,singleline,verbatim] \relative c' {
2150 c4^"longtext" \fatText c4_"longlongtext" c4 }
2153 It is possible to use @TeX{} commands in the strings, but this should
2154 be avoided because the exact dimensions of the string can then no
2160 @internalsref{TextScriptEvent}, @internalsref{TextScript}, and
2166 @subsection Grace notes
2169 @c should have blurb about accaciatura / appogiatura
2171 @cindex @code{\grace}
2175 Grace notes are ornaments that are written out. The most common ones
2176 are acciaccatura, which should be played as very short. It is denoted
2177 by a slurred small note with a slashed stem. The appoggiatura is a
2178 grace note that takes a fixed fraction of the main note, is and
2179 denoted as a slurred note in small print without a slash.
2180 They are entered with the commands @code{\acciaccatura} and
2181 @code{\appoggiatura}, as demonstrated in the following example:
2184 @cindex appoggiatura
2185 @cindex acciaccatura
2187 @lilypond[relative=2,verbatim,fragment]
2188 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
2189 \acciaccatura { g16 f } e4
2192 Both are special forms of the @code{\grace} command. By prefixing this
2193 keyword to a music expression, a new one is formed, which will be
2194 printed in a smaller font and takes up no logical time in a measure.
2195 @lilypond[relative=2,verbatim,fragment]
2196 c4 \grace c16 c4 \grace {
2199 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
2200 @code{\grace} command does not start a slur.
2202 Internally, timing for grace notes is done using a second, `grace'
2203 time. Every point in time consists of two rational numbers: one
2204 denotes the logical time, one denotes the grace timing. The above
2205 example is shown here with timing tuples:
2207 @lilypond[singleline]
2210 c4 \grace c16 c4 \grace {
2213 \new Lyrics \lyrics {
2216 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
2217 \markup { (\fraction 1 4 , 0 ) } 4
2219 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2220 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2222 \markup { ( \fraction 2 4 , 0 ) }
2227 The placement of grace notes is synchronized between different staves.
2228 In the following example, there are two sixteenth graces notes for
2229 every eighth grace note:
2231 @lilypond[relative=2,verbatim,fragment]
2232 < \new Staff { e4 \grace { c16[ d e f] } e4 }
2233 \new Staff { c'4 \grace { g8[ b] } c4 } >
2238 If you want to end a note with a grace note, then the standard trick
2239 is to put the grace notes before a phantom ``space note'', e.g.
2240 @lilypond[fragment,verbatim, relative=2]
2243 { s2 \grace { c16[ d] } } >
2249 By adjusting the duration of the skip note (here it is a half-note),
2250 the space between the main-note and the grace is adjusted.
2253 A @code{\grace} section will introduce special typesetting settings,
2254 for example, to produce smaller type, and set directions. Hence, when
2255 introducing layout tweaks, they should be inside the grace section,
2257 @lilypond[fragment,verbatim,relative 2]
2260 \property Voice.Stem \override #'direction = #-1
2262 \property Voice.Stem \revert #'direction
2267 The overrides should also be reverted inside the grace section.
2269 If the layout of grace sections must be changed throughout the music,
2270 then this can be accomplished through the function
2271 @code{add-grace-property}. The following example
2272 undefines the Stem direction grace section, so stems do not always
2277 #(add-grace-property "Voice" Stem direction '())
2283 Another option is to change the variables @code{startGraceMusic},
2284 @code{stopGraceMusic}, @code{startAccacciaturaMusic},
2285 @code{stopAccacciaturaMusic}, @code{startAppoggiaturaMusic},
2286 @code{stopAppoggiaturaMstuic}. More information is in the file
2287 @file{ly/grace-init.ly}
2292 @internalsref{GraceMusic}.
2296 Grace notes cannot be used in the smallest size (@file{paper11.ly}).
2298 A score that starts with an @code{\grace} section needs an explicit
2299 @code{\context Voice} declaration, otherwise the main note and grace
2300 note end up on different staves.
2302 Grace note synchronization can also lead to surprises. Staff notation,
2303 such as key signatures, barlines, etc. are also synchronized. Take
2304 care when you mix staves with grace notes and staves without, for example,
2306 @lilypond[relative=2,verbatim,fragment]
2307 < \new Staff { e4 \bar "|:" \grace c16 d4 }
2308 \new Staff { c4 \bar "|:" d4 } >
2311 Grace sections should only be used within sequential music
2312 expressions. Nesting or juxtaposing grace sections is not supported,
2313 and might produce crashes or other errors.
2315 Overriding settings cannot be done in separate styles for appoggiatura
2320 @subsection Glissando
2323 @cindex @code{\glissando}
2325 A glissando is a smooth change in pitch. It is denoted by a line or a
2326 wavy line between two notes.
2330 A glissando line can be requested by attaching a @code{\glissando} to
2333 @lilypond[fragment,relative,verbatim]
2339 @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2344 Additional texts (such as @emph{gliss.}) is not supported.
2348 @subsection Dynamics
2361 @cindex @code{\ffff}
2371 Absolute dynamic marks are specified using an variable after a
2372 note: @code{c4\ff}. The available dynamic marks are @code{\ppp},
2373 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2374 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2375 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}:
2377 @lilypond[verbatim,singleline,fragment,relative]
2378 c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2384 @cindex @code{\decr}
2385 @cindex @code{\rced}
2392 A crescendo mark is started with @code{\<} and terminated with
2393 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2394 with @code{\!}. Because these marks are bound to notes, if you must
2395 use spacer notes if multiple marks during one note are needed:
2397 @lilypond[fragment,verbatim,center,quote]
2398 c''\< c''\! d''\decr e''\rced
2399 < f''1 { s4 s4\< s4\! \> s4\! } >
2401 This may give rise to very short hairpins. Use @code{minimum-length}
2402 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2406 \property Staff.Hairpin \override #'minimum-length = #5
2409 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2410 is an example how to do it:
2412 @lilypond[fragment,relative=2,verbatim]
2413 c4 \cresc c4 c c c \endcresc c4
2419 You can also supply your own texts:
2420 @lilypond[fragment,relative,verbatim]
2422 \property Voice.crescendoText = \markup { \italic "cresc. poco" }
2423 \property Voice.crescendoSpanner = #'dashed-line
2433 @cindex @code{\dynamicUp}
2435 @cindex @code{\dynamicDown}
2436 @code{\dynamicDown},
2437 @cindex @code{\dynamicBoth}
2438 @code{\dynamicBoth}.
2440 @cindex direction, of dynamics
2444 @internalsref{CrescendoEvent}, @internalsref{DecrescendoEvent}, and
2445 @internalsref{AbsoluteDynamicEvent}.
2447 Dynamics are objects of @internalsref{DynamicText} and
2448 @internalsref{Hairpin}. Vertical positioning of these symbols is
2449 handled by the @internalsref{DynamicLineSpanner} object.
2451 If you want to adjust padding or vertical direction of the dynamics, you
2452 must set properties for the @internalsref{DynamicLineSpanner} object.
2460 @cindex @code{\repeat}
2463 Repetition is a central concept in music, and multiple notations exist
2464 for repetitions. In LilyPond, most of these notations can be captured
2465 in a uniform syntax. One of the advantages is, all these repetitions
2466 can be rendered in MIDI accurately.
2468 The following types of repetition are supported:
2472 Repeated music is fully written (played) out. Useful for MIDI
2473 output, and entering repetitive music.
2476 This is the normal notation: Repeats are not written out, but
2477 alternative endings (voltas) are printed, left to right.
2481 Alternative endings are written stacked. This has limited use but may be
2482 used to typeset two lines of lyrics in songs with repeats, see
2483 @inputfileref{input,star-spangled-banner.ly}.
2490 Make beat or measure repeats. These look like percent signs.
2496 * Repeats and MIDI::
2497 * Manual repeat commands::
2499 * Tremolo subdivisions::
2504 @subsection Repeat syntax
2508 LilyPond has one syntactic construct for specifying different types of
2509 repeats. The syntax is
2512 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2515 If you have alternative endings, you may add
2516 @cindex @code{\alternative}
2518 \alternative @code{@{} @var{alternative1}
2520 @var{alternative3} @dots{} @code{@}}
2522 where each @var{alternative} is a music expression. If you do not
2523 give enough alternatives for all of the repeats, then the first
2524 alternative is assumed to be played more than once.
2526 Normal notation repeats are used like this:
2527 @lilypond[fragment,verbatim]
2529 \repeat volta 2 { c'4 d' e' f' }
2530 \repeat volta 2 { f' e' d' c' }
2533 With alternative endings:
2534 @lilypond[fragment,verbatim]
2536 \repeat volta 2 {c'4 d' e' f'}
2537 \alternative { {d'2 d'} {f' f} }
2541 @lilypond[fragment,verbatim]
2545 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2546 \alternative { { g4 g g } { a | a a a a | b2. } }
2553 If you do a nested repeat like
2562 then it is ambiguous to which @code{\repeat} the @code{\alternative}
2563 belongs. This ambiguity is resolved by always having the
2564 @code{\alternative} belong to the inner @code{\repeat}. For clarity,
2565 it is advisable to use braces in such situations.
2568 @node Repeats and MIDI
2569 @subsection Repeats and MIDI
2571 @cindex expanding repeats
2573 For instructions on how to unfold repeats for MIDI output, see the
2574 example file @inputfileref{input/test,unfold-all-repeats.ly}.
2579 Timing information is not remembered at the start of an alternative,
2580 so after a repeat timing information must be reset by hand, for
2581 example by setting @code{Score.measurePosition} or entering
2582 @code{\partial}. Similarly, slurs or ties are also not repeated.
2585 @node Manual repeat commands
2586 @subsection Manual repeat commands
2588 @cindex @code{repeatCommands}
2590 The property @code{repeatCommands} can be used to control the layout of
2591 repeats. Its value is a Scheme list of repeat commands, where each repeat
2595 @item the symbol @code{start-repeat},
2596 which prints a @code{|:} bar line,
2597 @item the symbol @code{end-repeat},
2598 which prints a @code{:|} bar line,
2599 @item the list @code{(volta @var{text})},
2600 which prints a volta bracket saying @var{text}: The text can be specified as
2601 a text string or as a markup text, see @ref{Text markup}. Do not
2602 forget to change the font, as the default number font does not contain
2603 alphabetic characters. Or,
2604 @item the list @code{(volta #f)}, which
2605 stops a running volta bracket:
2608 @lilypond[verbatim, fragment]
2610 \property Score.repeatCommands = #'((volta "93") end-repeat)
2612 \property Score.repeatCommands = #'((volta #f))
2619 @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2620 @internalsref{VoltaRepeatedMusic},
2621 @internalsref{UnfoldedRepeatedMusic}, and
2622 @internalsref{FoldedRepeatedMusic}.
2624 @node Tremolo repeats
2625 @subsection Tremolo repeats
2626 @cindex tremolo beams
2628 To place tremolo marks between notes, use @code{\repeat} with tremolo
2630 @lilypond[verbatim,center,singleline]
2632 \context Voice \notes\relative c' {
2633 \repeat "tremolo" 8 { c16 d16 }
2634 \repeat "tremolo" 4 { c16 d16 }
2635 \repeat "tremolo" 2 { c16 d16 }
2636 \repeat "tremolo" 4 c16
2643 Tremolo beams are @internalsref{Beam} objects. Single stem tremolos
2644 are @internalsref{StemTremolo}s. The music expression is
2645 @internalsref{TremoloEvent}.
2650 The single stem tremolo must be entered without @code{@{} and
2653 @node Tremolo subdivisions
2654 @subsection Tremolo subdivisions
2655 @cindex tremolo marks
2656 @cindex @code{tremoloFlags}
2658 Tremolo marks can be printed on a single note by adding
2659 `@code{:}[@var{length}]' after the note. The length must be at least 8.
2660 A @var{length} value of 8 gives one line across the note stem. If the
2661 length is omitted, then then the last value (stored in
2662 @code{Voice.tremoloFlags}) is used:
2664 @lilypond[verbatim,fragment,center]
2665 c'2:8 c':32 | c': c': |
2668 @c [TODO : stok is te kort bij 32en]
2672 Tremolos in this style do not carry over into the MIDI output.
2675 @node Measure repeats
2676 @subsection Measure repeats
2678 @cindex percent repeats
2679 @cindex measure repeats
2681 In the @code{percent} style, a note pattern can be repeated. It is
2682 printed once, and then the pattern is replaced with a special sign.
2683 Patterns of a one and two measures are replaced by percent-like signs,
2684 patterns that divide the measure length are replaced by slashes:
2686 @lilypond[verbatim,singleline]
2687 \context Voice { \repeat "percent" 4 { c'4 }
2688 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
2694 @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
2695 @internalsref{PercentRepeatedMusic}, and
2696 @internalsref{DoublePercentRepeat}.
2700 @node Rhythmic music
2701 @section Rhythmic music
2703 Sometimes you might want to show only the rhythm of a melody. This
2704 can be done with the rhythmic staff. All pitches of notes on such a
2705 staff are squashed, and the staff itself has a single line:
2707 @lilypond[fragment,relative,verbatim]
2708 \context RhythmicStaff {
2710 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
2715 * Percussion staves::
2716 * Percussion MIDI output::
2719 @node Percussion staves
2720 @subsection Percussion staves
2724 A percussion part for more than one instrument typically uses a
2725 multiline staff where each position in the staff refers to one piece
2730 Percussion staves are typeset with help of a set of Scheme
2731 functions. The system is based on the general MIDI drum-pitches.
2732 Include @file{drumpitch-init.ly} to use drum pitches. This file
2733 defines the pitches from the Scheme variable @code{drum-pitch-names},
2734 the definition of which can be read in @file{scm/drums.scm}. Each
2735 piece of percussion has a full name and an abbreviated name, and either
2736 the full name or the abbreviation may be used in input files.
2738 To typeset the music on a staff apply the function @code{drums->paper}
2739 to the percussion music. This function takes a list of percussion
2740 instrument names, notehead scripts and staff positions (that is:
2741 pitches relative to the C-clef) and transforms the input
2742 music by moving the pitch, changing the notehead and (optionally)
2745 @lilypond[singleline,verbatim,quote]
2746 \include "drumpitch-init.ly"
2747 up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2748 down = \notes { bassdrum4 snare8 bd r bd sn4 }
2750 \apply #(drums->paper 'drums) \context Staff <
2752 \new Voice { \voiceOne \up }
2753 \new Voice { \voiceTwo \down }
2758 In the above example the music was transformed using the list @code{'drums}.
2759 Currently the following lists are defined in @file{scm/drums.scm}:
2762 to typeset a typical drum kit on a five-line staff:
2765 \include "drumpitch-init.ly"
2766 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
2767 bd sn ss tomh tommh tomml toml tomfh tomfl }
2768 mus = \notes { cymc cyms cymr hh hhc hho hhho hhp cb hc
2769 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
2772 \apply #(drums->paper 'drums) \context Staff <
2776 \context Lyrics \nam
2779 linewidth = 100.0\mm
2782 \remove Bar_engraver
2783 \remove Time_signature_engraver
2784 minimumVerticalExtent = #'(-4.0 . 5.0)
2788 \remove Stem_engraver
2794 The drum scheme supports six different toms. When there fewer toms, simply
2795 select the toms that produce the desired result, i.e. to get toms on
2796 the three middle lines you use @code{tommh}, @code{tomml} and
2799 Because general MIDI does not contain rimshots the sidestick is used
2800 for this purpose instead.
2802 to typeset timbales on a two line staff:
2804 @lilypond[singleline]
2805 \include "drumpitch-init.ly"
2806 nam = \lyrics { timh ssh timl ssl cb }
2807 mus = \notes { timh ssh timl ssl cb s16 }
2810 \apply #(drums->paper 'timbales) \context Staff <
2814 \context Lyrics \nam
2819 \remove Bar_engraver
2820 \remove Time_signature_engraver
2821 StaffSymbol \override #'line-count = #2
2822 StaffSymbol \override #'staff-space = #2
2823 minimumVerticalExtent = #'(-3.0 . 4.0)
2827 \remove Stem_engraver
2834 to typeset congas on a two line staff:
2836 @lilypond[singleline]
2837 \include "drumpitch-init.ly"
2838 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
2839 mus = \notes { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
2842 \apply #(drums->paper 'congas) \context Staff <
2846 \context Lyrics \nam
2851 \remove Bar_engraver
2852 \remove Time_signature_engraver
2853 StaffSymbol \override #'line-count = #2
2854 StaffSymbol \override #'staff-space = #2
2855 minimumVerticalExtent = #'(-3.0 . 4.0)
2859 \remove Stem_engraver
2865 to typeset bongos on a two line staff:
2867 @lilypond[singleline]
2868 \include "drumpitch-init.ly"
2869 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
2870 mus = \notes { boh boho bohm ssh bol bolo bolm ssl s16 }
2873 \apply #(drums->paper 'bongos) \context Staff <
2877 \context Lyrics \nam
2882 \remove Bar_engraver
2883 \remove Time_signature_engraver
2884 StaffSymbol \override #'line-count = #2
2885 StaffSymbol \override #'staff-space = #2
2886 minimumVerticalExtent = #'(-3.0 . 4.0)
2890 \remove Stem_engraver
2896 to typeset all kinds of simple percussion on one line staves:
2897 @lilypond[singleline]
2898 \include "drumpitch-init.ly"
2899 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
2900 mus = \notes { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
2903 \apply #(drums->paper 'percussion) \context Staff <
2907 \context Lyrics \nam
2912 \remove Bar_engraver
2913 \remove Time_signature_engraver
2914 StaffSymbol \override #'line-count = #1
2915 minimumVerticalExtent = #'(-2.0 . 3.0)
2919 \remove Stem_engraver
2926 If you do not like any of the predefined lists you can define your own
2927 list at the top of your file:
2929 @lilypond[singleline, verbatim]
2930 #(set-drum-kit 'mydrums `(
2931 (bassdrum default #f ,(ly:make-pitch -1 2 0))
2932 (snare default #f ,(ly:make-pitch 0 1 0))
2933 (hihat cross #f ,(ly:make-pitch 0 5 0))
2934 (pedalhihat xcircle "stopped" ,(ly:make-pitch 0 5 0))
2935 (lowtom diamond #f ,(ly:make-pitch -1 6 0))
2937 \include "drumpitch-init.ly"
2938 up = \notes { hh8 hh hh hh hhp4 hhp }
2939 down = \notes { bd4 sn bd toml8 toml }
2941 \apply #(drums->paper 'mydrums) \context Staff <
2943 \new Voice { \voiceOne \up }
2944 \new Voice { \voiceTwo \down }
2949 To use a modified existing list, one can prepend modifications to the
2953 #(set-drum-kit 'mydrums (append `(
2954 (bassdrum default #f ,(ly:make-pitch -1 2 0))
2955 (lowtom diamond #f ,(ly:make-pitch -1 6 0))
2956 ) (get-drum-kit 'drums)))
2959 You can easily combine percussion notation with pitched notation.
2960 Indeed, the file @file{drumpitch-init.ly} replaces the normal pitch
2961 names, so you will have to reinclude @file{nederlands.ly} after the
2962 drum-pattern-definitions to enter normal notes:
2964 @lilypond[singleline,verbatim]
2965 \include "drumpitch-init.ly"
2966 up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2967 down = \notes { bassdrum4 snare8 bd r bd sn4 }
2968 \include "nederlands.ly"
2969 bass = \notes \transpose c c,, { a4. e8 r e g e }
2972 \apply #(drums->paper 'drums) \new Staff <
2974 \new Voice { \voiceOne \up }
2975 \new Voice { \voiceTwo \down }
2977 \new Staff { \clef "F_8" \bass }
2982 @node Percussion MIDI output
2983 @subsection Percussion MIDI output
2985 In order to produce correct MIDI output you need to produce two score
2986 blocks---one for the paper and one for the MIDI output. To use the
2987 percussion channel you set the property @code{instrument} to
2988 @code{'drums}. Because the drum-pitches themselves are similar to the
2989 general MIDI pitches all you have to do is to insert the voices with
2990 none of the scheme functions to get the correct MIDI output:
2994 \apply #(drums->paper 'mydrums) \context Staff <
3003 \property Staff.instrument = #'drums
3012 This scheme is a temporary implementation.
3016 @section Piano music
3018 Piano staves are two normal staves coupled with a brace. The staves
3019 are largely independent, but sometimes voices can cross between the
3020 two staves. The same notation is also used for harps and other key
3021 instruments. The @internalsref{PianoStaff} is especially built to
3022 handle this cross-staffing behavior. In this section we discuss the
3023 @internalsref{PianoStaff} and some other pianistic peculiarities.
3027 * Automatic staff changes::
3028 * Manual staff switches::
3031 * Staff switch lines::
3036 There is no support for putting chords across staves. You can get
3037 this result by increasing the length of the stem in the lower stave so
3038 it reaches the stem in the upper stave, or vice versa. An example is
3039 included with the distribution as @inputfileref{input/test,stem-cross-staff.ly}.
3041 Dynamics are not centered, but kludges do exist. See
3042 @inputfileref{input/template,piano-dynamics.ly}.
3044 @cindex cross staff stem
3045 @cindex stem, cross staff
3048 @c fixme: should have hyperlinks as well.
3054 @node Automatic staff changes
3055 @subsection Automatic staff changes
3056 @cindex Automatic staff changes
3058 Voices can switch automatically between the top and the bottom
3059 staff. The syntax for this is
3061 \autochange Staff \context Voice @{ @dots{}@var{music}@dots{} @}
3063 The two staffs of the piano staff must be named @code{up} and
3066 The autochanger switches on basis of pitch (central C is the turning
3067 point), and it looks ahead skipping over rests to switch in
3068 advance. Here is a practical example:
3070 @lilypond[verbatim,singleline,quote]
3071 \score { \notes \context PianoStaff <
3072 \context Staff = "up" {
3073 \autochange Staff \context Voice = VA < \relative c' {
3074 g4 a b c d r4 a g } > }
3075 \context Staff = "down" {
3082 In this example, spacer rests are used to prevent the bottom staff from
3083 terminating too soon.
3088 @internalsref{AutoChangeMusic}.
3092 The staff switches often do not end up in optimal places. For high
3093 quality output staff switches should be specified manually.
3097 @node Manual staff switches
3098 @subsection Manual staff switches
3100 @cindex manual staff switches
3101 @cindex staff switch, manual
3103 Voices can be switched between staves manually, using the following command:
3105 \translator Staff = @var{staffname} @var{music}
3109 The string @var{staffname} is the name of the staff. It switches the
3110 current voice from its current staff to the Staff called
3111 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3119 Pianos have pedals that alter the way sound are produced. Generally, a
3120 piano has three pedals, sustain, una corda, and sostenuto.
3124 Piano pedal instruction can be expressed by attaching
3125 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3126 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3129 @lilypond[fragment,verbatim]
3130 c'4\sustainDown c'4\sustainUp
3133 What is printed can be modified by setting @code{pedal@var{X}Strings},
3134 where @var{X} is one of the pedal types: @code{Sustain},
3135 @code{Sostenuto} or @code{UnaCorda}. Refer to the generated
3136 documentation of @internalsref{SustainPedal} for more information.
3138 Pedals can also be indicated by a sequence of brackets, by setting the
3139 @code{pedalSustainStyle} property to @code{bracket} objects:
3141 @lilypond[fragment,verbatim]
3142 \property Staff.pedalSustainStyle = #'bracket
3143 c''4\sustainDown d''4 e''4
3144 a'4\sustainUp\sustainDown
3145 f'4 g'4 a'4\sustainUp
3148 A third style of pedal notation is a mixture of text and brackets,
3149 obtained by setting @code{pedal-type} to @code{mixed}:
3151 @lilypond[fragment,verbatim]
3152 \property Staff.pedalSustainStyle = #'mixed
3153 c''4\sustainDown d''4 e''4
3154 c'4\sustainUp\sustainDown
3155 f'4 g'4 a'4\sustainUp
3158 The default `*Ped' style for sustain and damper pedals corresponds to
3159 @code{\pedal-type = #'text}. However, @code{mixed} is the default style
3160 for a sostenuto pedal:
3162 @lilypond[fragment,verbatim]
3163 c''4\sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4\sostenutoUp
3166 For fine-tuning of the appearance of a pedal bracket, the properties
3167 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3168 @code{PianoPedalBracket} objects (, see the detailed documentation of
3169 @internalsref{PianoPedalBracket},) can be modified. For example, the bracket
3170 may be extended to the end of the note head:
3172 @lilypond[fragment,verbatim]
3173 \property Staff.PianoPedalBracket \override
3174 #'shorten-pair = #'(0 . -1.0)
3175 c''4\sostenutoDown d''4 e''4 c'4
3176 f'4 g'4 a'4\sostenutoUp
3180 @subsection Arpeggio
3183 @cindex broken arpeggio
3184 @cindex @code{\arpeggio}
3186 You can specify an arpeggio sign on a chord by attaching an
3187 @code{\arpeggio} to a chord:
3190 @lilypond[fragment,relative,verbatim]
3191 <<c e g c>>\arpeggio
3194 When an arpeggio crosses staves, you attach an arpeggio to the chords
3195 in both staves, and set
3196 @internalsref{PianoStaff}.@code{connectArpeggios}:
3198 @lilypond[fragment,relative,verbatim]
3199 \context PianoStaff <
3200 \property PianoStaff.connectArpeggios = ##t
3201 \new Staff { <<c' e g c>>\arpeggio }
3202 \new Staff { \clef bass <<c,, e g>>\arpeggio }
3206 The direction of the arpeggio is sometimes denoted by adding an
3207 arrowhead to the wiggly line. This can be typeset by setting
3208 @code{arpeggio-direction}:
3210 @lilypond[fragment,relative,verbatim]
3212 \property Voice.Arpeggio \set #'arpeggio-direction = #1
3213 <<c e g c>>\arpeggio
3214 \property Voice.Arpeggio \set #'arpeggio-direction = #-1
3215 <<c e g c>>\arpeggio
3219 A square bracket on the left indicates that the player should not
3220 arpeggiate the chord. To draw these brackets, set the
3221 @code{molecule-callback} property of @code{Arpeggio} or
3222 @code{PianoStaff.Arpeggio} objects to @code{\arpeggioBracket}, and use
3223 @code{\arpeggio} statements within the chords as before:
3225 @lilypond[fragment,relative,verbatim]
3226 \property PianoStaff.Arpeggio \override
3227 #'molecule-callback = \arpeggioBracket
3228 <<c' e g c>>\arpeggio
3233 @cindex @code{\arpeggioBracket}
3234 @code{\arpeggioBracket},
3235 @cindex @code{\arpeggio}
3240 @internalsref{ArpeggioEvent} expression lead to
3241 @internalsref{Arpeggio} objects. Cross staff arpeggios are
3242 @internalsref{PianoStaff}.@internalsref{Arpeggio}.
3246 It is not possible to mix connected arpeggios and unconnected
3247 arpeggios in one @internalsref{PianoStaff} at the same time.
3249 @node Staff switch lines
3250 @subsection Staff switch lines
3253 @cindex follow voice
3254 @cindex staff switching
3257 @cindex @code{followVoice}
3259 Whenever a voice switches to another staff a line connecting the notes
3260 can be printed automatically. This is enabled if the property
3261 @code{PianoStaff.followVoice} is set to true:
3263 @lilypond[fragment,relative,verbatim]
3264 \context PianoStaff <
3265 \property PianoStaff.followVoice = ##t
3266 \context Staff \context Voice {
3268 \translator Staff=two
3271 \context Staff=two { \clef bass \skip 1*2 }
3275 The associated object is @internalsref{VoiceFollower}.
3279 @cindex @code{\showStaffSwitch}
3280 @code{\showStaffSwitch},
3281 @cindex @code{\hideStaffSwitch}
3282 @code{\hideStaffSwitch}.
3286 @section Vocal music
3288 This section discusses how to enter and print lyrics.
3292 * The Lyrics context::
3297 @node Entering lyrics
3298 @subsection Entering lyrics
3302 @cindex @code{\lyrics}
3305 Lyrics are entered in a special input mode. This mode is is introduced
3306 by the keyword @code{\lyrics}. In this mode you can enter lyrics, with
3307 punctuation and accents without any hassle. Syllables are entered like
3308 notes, but with pitches replaced by text. For example,
3310 \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
3313 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3314 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3315 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3316 any 8-bit character with ASCII code over 127, or a two-character
3317 combination of a backslash followed by one of @code{`}, @code{'},
3318 @code{"}, or @code{^}.
3320 Subsequent characters of a word can be any character that is not a digit
3321 and not white space. One important consequence of this is that a word
3322 can end with @code{@}}. The following example is usually a bug. The
3323 syllable includes a @code{@}}, and hence the opening brace is not balanced:
3325 \lyrics @{ twinkle@}
3328 @cindex @code{\property}, in @code{\lyrics}
3329 Similarly, a period following a alphabetic sequence, is included in the
3330 resulting string. As a consequence, spaces must be inserted around
3331 @code{\property} commands:
3333 \property Lyrics . LyricText \set #'font-shape = #'italic
3337 @cindex spaces, in lyrics
3338 @cindex quotes, in lyrics
3340 Any @code{_} character which appears in an unquoted word is converted
3341 to a space. This provides a mechanism for introducing spaces into words
3342 without using quotes. Quoted words can also be used in Lyrics mode to
3343 specify words that cannot be written with the above rules:
3346 \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3350 Hyphens can be entered as ordinary hyphens at the end of a syllable, i.e.
3355 These will be attached to the end of the first syllable.
3357 Centered hyphens are entered using the special `@code{-}@code{-}' lyric
3358 as a separate word between syllables. The hyphen will have variable
3359 length depending on the space between the syllables and it will be
3360 centered between the syllables.
3365 When a lyric is sung over many notes (this is called a melisma), this is
3366 indicated with a horizontal line centered between a syllable and the
3367 next one. Such a line is called an extender line, and it is entered as
3372 @internalsref{LyricEvent}, @internalsref{HyphenEvent}, and
3373 @internalsref{ExtenderEvent}.
3377 The definition of lyrics mode is too complex.
3379 @node The Lyrics context
3380 @subsection The Lyrics context
3382 Lyrics are printed by interpreting them in @internalsref{Lyrics} context:
3384 \context Lyrics \lyrics @dots{}
3387 @cindex automatic syllable durations
3388 @cindex @code{\addlyrics}
3389 @cindex lyrics and melodies
3391 This will place the lyrics according to the durations that were
3392 entered. The lyrics can also be aligned under a given melody
3393 automatically. In this case, it is no longer necessary to enter the
3394 correct duration for each syllable. This is achieved by combining the
3395 melody and the lyrics with the @code{\addlyrics} expression:
3399 \context Lyrics @dots{}
3402 @cindex staff order, with @code{\addlyrics}
3404 Normally, this will put the lyrics below the staff. For different or
3405 more complex orderings, the best way is to setup the hierarchy of
3406 staves and lyrics first, e.g.
3408 \context ChoirStaff \notes <
3409 \new Lyrics @{ s1 @}
3411 \new Lyrics @{ s1 @}
3415 and then combine the appropriate melodies and lyric lines:
3418 \new Staff @emph{the music}
3419 \new Lyrics @emph{the lyrics}
3422 putting both together, you would get
3424 \context ChoirStaff \notes <
3432 @cindex choral score
3434 A complete example of a SATB score setup is in the file
3435 @inputfileref{input/template,satb.ly}.
3439 @internalsref{LyricCombineMusic}, @internalsref{Lyrics}, and
3440 @inputfileref{input/template,satb.ly}.
3444 @code{\addlyrics} is not automatic enough: melismata are not detected
3445 automatically, and melismata are not stopped when they hit a rest. A
3446 melisma on the last note in a melody is not printed.
3450 @subsection More stanzas
3453 @cindex phrasing, in lyrics
3455 When multiple stanzas are printed underneath each other, the vertical
3456 groups of syllables should be aligned around punctuation. This can be
3457 done automatically when corresponding lyric lines and melodies are
3460 To this end, give the @internalsref{Voice} context an identity:
3462 \context Voice = duet @{
3467 Then set the @internalsref{LyricsVoice} contexts to names starting with
3468 that identity followed by a dash. In the preceding example, the
3469 @internalsref{Voice} identity is @code{duet}, so the identities of the
3470 @internalsref{LyricsVoice}s are marked @code{duet-1} and @code{duet-2}:
3472 \context LyricsVoice = "duet-1" @{
3473 Hi, my name is bert. @}
3474 \context LyricsVoice = "duet-2" @{
3475 Ooooo, ch\'e -- ri, je t'aime. @}
3477 The convention for naming @internalsref{LyricsVoice} and
3478 @internalsref{Voice} must also be used to get melismata correct in
3479 conjunction with rests.
3481 The complete example is shown here:
3482 @lilypond[singleline,verbatim]
3485 \notes \relative c'' \context Voice = duet { \time 3/4
3487 \lyrics \context Lyrics <
3488 \context LyricsVoice = "duet-1" {
3489 \property LyricsVoice . stanza = "Bert"
3490 Hi, my name is bert. }
3491 \context LyricsVoice = "duet-2" {
3492 \property LyricsVoice . stanza = "Ernie"
3493 Ooooo, ch\'e -- ri, je t'aime. }
3498 Stanza numbers, or the names of the singers can be added by setting
3499 @code{LyricsVoice.Stanza} (for the first system) and
3500 @code{LyricsVoice.stz} for the following systems. Notice how dots are
3501 surrounded with spaces in @code{\lyrics} mode:
3504 \property LyricsVoice . stanza = "Bert"
3506 \property LyricsVoice . stanza = "Ernie"
3509 To make empty spaces in lyrics, use @code{\skip}.
3517 Input for lyrics introduces a syntactical ambiguity:
3524 is interpreted as assigning a string identifier @code{\foo} such that
3525 it contains @code{"bar"}. However, it could also be interpreted as
3526 making or a music identifier @code{\foo} containing the syllable
3527 `bar'. The force the latter interpretation, use
3537 The term @emph{ambitus} denotes a range of pitches for a given voice in
3538 a part of music. It also may denote the pitch range that a musical
3539 instrument is capable of playing. Most musical instruments have their
3540 ambitus standardized (or at least there is agreement upon the minimal
3541 ambitus of a particular type of instrument), such that a composer or
3542 arranger of a piece of music can easily meet the ambitus constraints of
3543 the targeted instrument. However, the ambitus of the human voice
3544 depends on individual physiological state, including education and
3545 training of the voice. Therefore, a singer potentially has to check for
3546 each piece of music if the ambitus of that piece meets his individual
3547 capabilities. This is why the ambitus of a piece may be of particular
3548 value to vocal performers.
3550 The ambitus is typically notated on a per-voice basis at the very
3551 beginning of a piece, e.g. nearby the initial clef or time signature of
3552 each staff. The range is graphically specified by two noteheads, that
3553 represent the minimum and maximum pitch. Some publishers use a textual
3554 notation: they put the range in words in front of the corresponding
3555 staff. LilyPond currently only supports the graphical ambitus notation.
3557 To apply, add the @internalsref{Ambitus_engraver} to the
3558 @internalsref{Voice} context, i.e.
3561 \paper @{ \translator @{
3563 \consists Ambitus_engraver
3569 @lilypond[singleline]
3570 upper = \notes \relative c {
3573 as'' c e2 bes f cis d4 e f2 g
3575 lower = \notes \relative c {
3578 e'4 b g a c es fis a cis b a g f e d2
3581 \context ChoirStaff {
3583 \new Staff { \upper }
3584 \new Staff { \lower }
3590 \consists Ambitus_engraver
3599 @internalsref{Ambitus}, and @inputfileref{input/regression,ambitus.ly}.
3604 Tablature notation is used for notating music for plucked string
3605 instruments. It notates pitches not by using note heads, but by
3606 indicating on which string and fret a note must be played. LilyPond
3607 offers limited support for tablature.
3610 * Tablatures basic::
3611 * Non-guitar tablatures::
3614 @node Tablatures basic
3615 @subsection Tablatures basic
3616 @cindex Tablatures basic
3618 The string number associated to a note is given as a backslash
3619 followed by a number, e.g. @code{c4\3} for a C quarter on the third
3620 string. By default, string 1 is the highest one, and the tuning
3621 defaults to the standard guitar tuning (with 6 strings). The notes
3622 are printed as tablature, by using @internalsref{TabStaff} and
3623 @internalsref{TabVoice} contexts:
3625 @lilypond[fragment,verbatim]
3626 \notes \context TabStaff {
3632 When no string is specified, the first string that does not give a
3633 fret number less than @code{minimumFret} is selected. The default
3634 value for @code{minimumFret} is 0:
3638 e8 fis gis a b cis' dis' e'
3639 \property TabStaff.minimumFret = #8
3640 e8 fis gis a b cis' dis' e'
3645 e8 fis gis a b cis' dis' e'
3646 \property TabStaff.minimumFret = #8
3647 e8 fis gis a b cis' dis' e'
3650 \context StaffGroup <
3651 \context Staff { \clef "G_8" \frag }
3652 \context TabStaff { \frag }
3659 @internalsref{TabStaff}, @internalsref{TabVoice}, and
3660 @internalsref{StringNumberEvent}.
3664 Chords are not handled in a special way, and hence the automatic
3665 string selector may easily select the same string to two notes in a
3669 @node Non-guitar tablatures
3670 @subsection Non-guitar tablatures
3671 @cindex Non-guitar tablatures
3673 You can change the number of strings, by setting the number of lines
3674 in the @internalsref{TabStaff} (the @code{line-count} property of
3675 @internalsref{TabStaff} can only be changed using
3676 @code{\outputproperty}, for more information, see @ref{Tuning
3679 You can change the tuning of the strings. A string tuning is given as
3680 a Scheme list with one integer number for each string, the number
3681 being the pitch (measured in semitones relative to central C) of an
3682 open string. The numbers specified for @code{stringTuning} are the
3683 numbers of semitones to subtract or add, starting the specified pitch
3684 by default middle C, in string order. Thus, the notes are e, a, d, and
3687 @lilypond[fragment,verbatim]
3690 \outputproperty #(make-type-checker 'staff-symbol-interface)
3692 \property TabStaff.stringTunings = #'(-5 -10 -15 -20)
3695 a,4 c' a e' e c' a e'
3700 It is possible to change the Scheme function to format the tablature
3701 note text. The default is @code{fret-number-tablature-format}, which
3702 uses the fret number. For instruments that do not use this notation,
3703 you can create a special tablature formatting function. This function
3704 takes three argument: string number, string tuning and note pitch.
3708 Most of the guitar special effects such as bend have not been
3714 @section Chord names
3717 LilyPond has support for both printing chord names. Chords may be
3718 entered in musical chord notation, i.e. @code{<< .. >>}, but they can
3719 also be entered by name. Internally, the chords are represented as a
3720 set of pitches, so they can be transposed:
3723 @lilypond[verbatim,singleline]
3724 twoWays = \notes \transpose c c' {
3734 < \context ChordNames \twoWays
3735 \context Voice \twoWays > }
3738 This example also shows that the chord printing routines do not try to
3739 be intelligent. The last chord (@code{f bes d}) is not interpreted as
3745 * Printing chord names::
3750 @subsection Chords mode
3753 Chord mode is a mode where you can input sets of pitches using common
3754 names. It is introduced by the keyword @code{\chords}.
3755 In chords mode, a chord is entered by the root, which is entered
3756 like a common pitch:
3757 @lilypond[fragment,verbatim,quote, relative=1]
3758 \chords { es4. d8 c2 }
3763 Other chords may be entered by suffixing a colon, and introducing a
3764 modifier, and optionally, a number:
3766 @lilypond[fragment,verbatim,quote]
3767 \chords { e1:m e1:7 e1:m7 }
3769 The first number following the root is taken to be the `type' of the
3770 chord, thirds are added to the root until it reaches the specified
3772 @lilypond[fragment,verbatim]
3773 \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
3776 @cindex root of chord
3777 @cindex additions, in chords
3778 @cindex removals, in chords
3780 More complex chords may also be constructed adding separate steps
3781 to a chord. Additions are added after the number following
3782 the colon, and are separated by dots:
3784 @lilypond[verbatim,fragment,quote]
3785 \chords { c:5.6 c:3.7.8 c:3.6.13 }
3787 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
3789 @lilypond[verbatim,fragment,quote]
3790 \chords { c:7+ c:5+.3- c:3-.5-.7- }
3792 Removals are specified similarly, and are introduced by a caret. They
3793 must come after the additions:
3794 @lilypond[verbatim,fragment]
3795 \chords { c^3 c:7^5 c:9^3.5 }
3798 Modifiers can be used to change pitches. The following modifiers are
3802 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
3804 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
3807 is the augmented chord. This modifier raises the 5th step.
3809 is the major 7th chord. This modifier raises the 7th step if present.
3811 is the suspended 4th or 2nd. This modifier removes the 3rd
3812 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
3815 Modifiers can be mixed with additions:
3816 @lilypond[verbatim,fragment]
3817 \chords { c:sus4 c:7sus4 c:dim7 c:m6 }
3820 @cindex modifiers, in chords.
3827 Since an unaltered 11 does not sound good when combined with an
3828 unaltered 13, the 11 is removed in this case (, unless it is added
3830 @lilypond[fragment,verbatim]
3831 \chords { c:13 c:13.11 c:m13 }
3836 An inversion (putting one pitch of the chord on the bottom), as well
3837 as bass notes, can be specified by appending
3838 @code{/}@var{pitch} to the chord:
3839 @lilypond[fragment,verbatim,center]
3840 \chords { c1 c/g c/f }
3844 A bass note can be added instead of transposed out of the chord,
3845 by using @code{/+}@var{pitch}.
3847 @lilypond[fragment,verbatim,center]
3848 \chords { c1 c/+g c/+f }
3851 Chords is a mode similar to @code{\lyrics}, @code{\notes} etc. Most
3852 of the commands continue to work, for example, @code{r} and
3853 @code{\skip} can be used to insert rests and spaces, and
3854 @code{\property} may be used to change various settings.
3860 Each step can only be present in a chord once. The following
3861 simply produces the augmented chord, since @code{5+} is interpreted
3864 @lilypond[verbatim,fragment]
3865 \chords { c:5.5-.5+ }
3869 @node Printing chord names
3870 @subsection Printing chord names
3872 @cindex printing chord names
3876 For displaying printed chord names, use the @internalsref{ChordNames} context.
3877 The chords may be entered either using the notation
3878 described above, or directly using @code{<<} and @code{>>}:
3880 @lilypond[verbatim,singleline]
3882 \chords {a1 b c} <<d' f' a'>> <<e' g' b'>>
3886 \context ChordNames \scheme
3887 \context Staff \scheme
3892 You can make the chord changes stand out by setting
3893 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
3894 display chord names when there is a change in the chords scheme and at
3895 the start of a new line:
3897 @lilypond[verbatim, linewidth=9cm]
3899 c1:m c:m \break c:m c:m d
3903 \context ChordNames {
3904 \property ChordNames.chordChanges = ##t
3906 \context Staff \transpose c c' \scheme
3911 The default chord name layout is a system for Jazz music, proposed by
3912 Klaus Ignatzek (see @ref{Literature}). It can be tuned through the
3913 following properties:
3916 @cindex chordNameExceptions
3917 @item chordNameExceptions
3918 This is a list that contains the chords that have special formatting.
3920 @inputfileref{input/regression,chord-name-exceptions.ly}.
3921 @cindex exceptions, chord names.
3924 @cindex majorSevenSymbol
3925 @item majorSevenSymbol
3926 This property contains the markup object used for the 7th step, when
3927 it is major. Predefined options are @code{whiteTriangleMarkup} and
3928 @code{blackTriangleMarkup}. See
3929 @inputfileref{input/regression,chord-name-major7.ly} for an example.
3931 @cindex chordNameSeparator
3932 @item chordNameSeparator
3933 Different parts of a chord name are normally separated by a
3934 slash. By setting @code{chordNameSeparator}, you can specify other
3936 @lilypond[fragment,verbatim]
3937 \context ChordNames \chords {
3939 \property ChordNames.chordNameSeparator
3940 = \markup { \typewriter "|" }
3944 @cindex chordRootNamer
3945 @item chordRootNamer
3946 The root of a chord is usually printed as a letter with an optional
3947 alteration. The transformation from pitch to letter is done by this
3948 function. Special note names (for example, the German ``H'' for a
3949 B-chord) can be produced by storing a new function in this property.
3951 @cindex chordNoteNamer
3952 @item chordNoteNamer
3953 The default is to print single pitch, e.g. the bass note, using the
3954 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
3955 to a specialized function to change this behavior. For example, the
3956 base can be printed in lower case.
3961 There are also two other chord name schemes implemented: an alternate
3962 Jazz chord notation, and a systematic scheme called Banter chords. The
3963 alternate jazz notation is also shown on the chart in @ref{Chord name
3964 chart}. Turning on these styles is described in the input file
3965 @inputfileref{input/test/,chord-names-jazz.ly}.
3969 @cindex chords, jazz
3974 @cindex @code{\germanChords}
3975 @code{\germanChords},
3976 @cindex @code{\semiGermanChords}
3977 @code{\semiGermanChords}.
3984 @inputfileref{input/regression,chord-name-major7.ly},
3985 @inputfileref{input/regression,chord-name-exceptions.ly},
3986 @inputfileref{input/test,chord-names-jazz.ly},
3987 @inputfileref{input/test,chord-names-german.ly},
3988 @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
3993 Chord names are determined solely from the list of pitches. Chord
3994 inversions are not identified, and neither are added bass notes. This
3995 may result in strange chord names when chords are entered with the
3996 @code{<< .. >>} syntax.
4001 @node Orchestral music
4002 @section Orchestral music
4004 @cindex Writing parts
4006 Orchestral music involves some special notation, both in the full
4007 score and the individual parts. This section explains how to tackle
4008 some common problems in orchestral music.
4013 * Multiple staff contexts::
4016 * Instrument names::
4018 * Multi measure rests::
4019 * Automatic part combining::
4021 * Different editions from one source::
4022 * Sound output for transposing instruments::
4025 @node Multiple staff contexts
4026 @subsection Multiple staff contexts
4028 Polyphonic scores consist of many staves. These staves can be
4029 constructed in three different ways:
4031 @item The group is started with a brace at the left. This is done with the
4032 @internalsref{GrandStaff} context.
4033 @item The group is started with a bracket. This is done with the
4034 @internalsref{StaffGroup} context
4035 @item The group is started with a vertical line. This is the default
4039 @cindex Staff, multiple
4040 @cindex bracket, vertical
4041 @cindex brace, vertical
4048 @node Rehearsal marks
4049 @subsection Rehearsal marks
4050 @cindex Rehearsal marks
4052 @cindex @code{\mark}
4054 To print a rehearsal mark, use the @code{\mark} command:
4055 @lilypond[fragment,verbatim]
4065 The mark is incremented automatically if you use @code{\mark
4066 \default}. The value to use is stored in the property
4067 @code{rehearsalMark} is used and automatically incremented.
4069 The @code{\mark} command can also be used to put signs like coda,
4070 segno and fermatas on a barline. Use @code{\markup} to
4071 to access the appropriate symbol:
4073 @lilypond[fragment,verbatim,relative=1]
4074 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4078 In this case, during line breaks,
4079 marks must also be printed at the end of the line, and not at the
4080 beginning. Use the following to force that behavior:
4082 \property Score.RehearsalMark \override
4083 #'break-visibility = #begin-of-line-invisible
4086 See @inputfileref{input/test,boxed-molecule.ly} for putting boxes
4092 @cindex barlines, putting symbols on
4096 @internalsref{MarkEvent}, @internalsref{RehearsalMark}, and
4097 @inputfileref{input/test,boxed-molecule.ly}.
4101 @subsection Bar numbers
4105 @cindex measure numbers
4106 @cindex currentBarNumber
4108 Bar numbers are printed by default at the start of the line. The
4109 number itself is stored in the
4110 @code{currentBarNumber} property,
4111 which is normally updated automatically for every measure.
4113 Bar numbers can be typeset at regular intervals instead of at the
4114 beginning of each line. This is illustrated in the following example,
4115 whose source is available as
4116 @inputfileref{input/test,bar-number-regular-interval.ly}:
4118 @lilypondfile[notexidoc]{bar-number-regular-interval.ly}
4123 @internalsref{BarNumber},
4124 @inputfileref{input/test,bar-number-every-five-reset.ly}, and
4125 @inputfileref{input/test,bar-number-regular-interval.ly}.
4129 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4130 there is one at the top. To solve this, the
4131 @code{padding} property of @internalsref{BarNumber} can be
4132 used to position the number correctly.
4134 @node Instrument names
4135 @subsection Instrument names
4137 In an orchestral score, instrument names are printed left side of the
4140 This can be achieved by setting @internalsref{Staff}.@code{instrument}
4141 and @internalsref{Staff}.@code{instr}. This will print a string before
4142 the start of the staff. For the first start, @code{instrument} is
4143 used, for the next ones @code{instr} is used:
4145 @lilypond[verbatim,singleline]
4146 \property Staff.instrument = "ploink " { c''4 }
4149 You can also use markup texts to construct more complicated instrument
4152 @lilypond[fragment,verbatim,singleline]
4154 \property Staff.instrument = \markup {
4155 \column << "Clarinetti"
4157 \smaller \musicglyph #"accidentals--1"
4168 @internalsref{InstrumentName}.
4172 When you put a name on a grand staff or piano staff the width of the
4173 brace is not taken into account. You must add extra spaces to the end of
4174 the name to avoid a collision.
4177 @subsection Transpose
4179 @cindex transposition of pitches
4180 @cindex @code{\transpose}
4182 A music expression can be transposed with @code{\transpose}. The syntax
4185 \transpose @var{from} @var{to} @var{musicexpr}
4188 This means that @var{musicexpr} is transposed by the interval
4189 between @var{from} and @var{to}.
4191 @code{\transpose} distinguishes between enharmonic pitches: both
4192 @code{\transpose c cis} or @code{\transpose c des} will transpose up
4193 half a tone. The first version will print sharps and the second
4194 version will print flats:
4196 @lilypond[singleline, verbatim]
4197 mus =\notes { \key d \major cis d fis g }
4198 \score { \notes \context Staff {
4201 \transpose c g' \mus
4202 \transpose c f' \mus
4208 @internalsref{TransposedMusic}, and @internalsref{UntransposableMusic}.
4212 If you want to use both @code{\transpose} and @code{\relative}, then
4213 you must put @code{\transpose} outside of @code{\relative}, since
4214 @code{\relative} will have no effect music that appears inside a
4220 @node Multi measure rests
4221 @subsection Multi measure rests
4222 @cindex multi measure rests
4223 @cindex Rests, multi measure
4227 Multi measure rests are entered using `@code{R}'. It is specifically
4228 meant for full bar rests and for entering parts: the rest can expand to
4229 fill a score with rests, or it can be printed as a single multimeasure
4230 rest. This expansion is controlled by the property
4231 @code{Score.skipBars}. If this is set to true, Lily will not expand
4232 empty measures, and the appropriate number is added automatically:
4234 @lilypond[fragment,verbatim]
4235 \time 4/4 r1 | R1 | R1*2
4236 \property Score.skipBars = ##t R1*17 R1*4
4239 The @code{1} in @code{R1} is similar to the duration notation used for
4240 notes. Hence, for time signatures other than 4/4, you must enter other
4241 durations. This can be done with augmentation dots or fractions:
4243 @lilypond[fragment,verbatim]
4244 \property Score.skipBars = ##t
4252 An @code{R} spanning a single measure is printed as either a whole rest
4253 or a breve, centered in the measure regardless of the time signature.
4255 @cindex text on multi-measure rest
4256 @cindex script on multi-measure rest
4257 @cindex fermata on multi-measure rest
4259 Texts can be added to multi-measure rests by using the
4260 @var{note}-@code{markup} syntax (see @ref{Text markup}). In this case, the number is
4261 replaced. If you need both texts and the number, you must add the
4262 number by hand. A variable (@code{\fermataMarkup}) is provided for
4266 @lilypond[verbatim,fragment]
4268 R2._\markup { "Ad lib" }
4273 @cindex whole rests for a full measure
4277 @internalsref{MultiMeasureRestEvent},
4278 @internalsref{MultiMeasureTextEvent},
4279 @internalsref{MultiMeasureRestMusicGroup}, and
4280 @internalsref{MultiMeasureRest}.
4282 The layout object @internalsref{MultiMeasureRestNumber} is for the
4283 default number, and @internalsref{MultiMeasureRestText} for user
4288 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
4289 over multi-measure rests.
4291 @cindex condensing rests
4293 There is no way to automatically condense multiple rests into a single
4294 multimeasure rest. Multi measure rests do not take part in rest
4297 Be careful when entering multimeasure rests followed by whole notes,
4301 will enter two notes lasting four measures each. When @code{skipBars}
4302 is set, then the result will look OK, but the bar numbering will be
4305 @node Automatic part combining
4306 @subsection Automatic part combining
4307 @cindex automatic part combining
4308 @cindex part combiner
4311 Automatic part combining is used to merge two parts of music onto a
4312 staff. It is aimed at typesetting orchestral scores. When the two
4313 parts are identical for a period of time, only one is shown. In
4314 places where the two parts differ, they are typeset as separate
4315 voices, and stem directions are set automatically. Also, solo and
4316 @emph{a due} parts are identified and can be marked.
4320 The syntax for part combining is
4323 \partcombine @var{context} @var{musicexpr1} @var{musicexpr2}
4325 where the pieces of music @var{musicexpr1} and @var{musicexpr2} will be
4326 combined into one context of type @var{context}. The music expressions
4327 must be interpreted by contexts whose names should start with @code{one}
4330 The following example demonstrates the basic functionality of the part
4331 combiner: putting parts on one staff, and setting stem directions and
4334 @lilypond[verbatim,singleline,fragment]
4336 \context Voice=one \partcombine Voice
4337 \context Thread=one \relative c'' {
4340 \context Thread=two \relative c'' {
4346 The first @code{g} appears only once, although it was
4347 specified twice (once in each part). Stem, slur and tie directions are
4348 set automatically, depending whether there is a solo or unisono. The
4349 first part (with context called @code{one}) always gets up stems, and
4350 `solo', while the second (called @code{two}) always gets down stems and
4353 If you just want the merging parts, and not the textual markings, you
4354 may set the property @var{soloADue} to false:
4356 @lilypond[verbatim,singleline,fragment]
4358 \property Staff.soloADue = ##f
4359 \context Voice=one \partcombine Voice
4360 \context Thread=one \relative c'' {
4363 \context Thread=two \relative c'' {
4371 @internalsref{PartCombineMusic},
4372 @internalsref{Thread_devnull_engraver}, and
4373 @internalsref{Voice_devnull_engraver} and @internalsref{A2_engraver}.
4377 The syntax for naming contexts in inconsistent with the syntax for
4380 In @code{soloADue} mode, when the two voices play the same notes on and
4381 off, the part combiner may typeset @code{a2} more than once in a
4384 @lilypond[fragment,singleline]
4386 \context Voice=one \partcombine Voice
4387 \context Thread=one \relative c'' {
4390 \context Thread=two \relative c'' {
4396 The part combiner is rather buggy, and it will be replaced by a better
4397 mechanism in the near future.
4399 @cindex @code{Thread_devnull_engraver}
4400 @cindex @code{Voice_engraver}
4401 @cindex @code{A2_engraver}
4404 @subsection Hiding staves
4406 @cindex Frenched scores
4407 @cindex Hiding staves
4409 In orchestral scores, staff lines that only have rests are usually
4410 removed. This saves some space. This style is called `French Score'.
4411 For @internalsref{Lyrics}, @internalsref{LyricsVoice},
4412 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
4413 switched on by default. When these line of these contexts turn out
4414 empty after the line-breaking process, they are removed.
4416 For normal staves, a specialized @internalsref{Staff} context is
4417 available, which does the same: staves containing nothing (or only
4418 multi measure rests) are removed. The context definition is stored in
4419 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
4420 in this example disappears in the second line:
4425 \notes \relative c' <
4426 \new Staff { e4 f g a \break c1 }
4427 \new Staff { c4 d e f \break R1 }
4431 \translator { \RemoveEmptyStaffContext }
4437 @node Different editions from one source
4438 @subsection Different editions from one source
4440 The @code{\tag} command marks music expressions with a name. These
4441 tagged expressions can be filtered out later. With this mechanism it
4442 is possible to make different versions of the same music source.
4444 In the following example, we see two versions of a piece of music, one
4445 for the full score, and one with cue notes for the instrumental part:
4453 \property Voice.fontSize = #-1
4461 The same can be applied to articulations, texts, etc.: they are
4464 -\tag #@var{your-tag}
4466 to an articulation, for example,
4471 This defines a note with a conditional fingering indication.
4473 By applying the @code{remove-tag} function, tagged expressions can be
4474 filtered. For example,
4478 \apply #(remove-tag 'score) @var{the music}
4479 \apply #(remove-tag 'part) @var{the music}
4484 @lilypondfile[notexidoc]{tag-filter.ly}
4486 The argument of the @code{\tag} command should be a symbol, or a list
4487 of symbols, for example,
4489 \tag #'(original-part transposed-part) @dots{}
4494 @inputfileref{input/regression,tag-filter.ly}
4497 @node Sound output for transposing instruments
4498 @subsection Sound output for transposing instruments
4500 When you want to make a MIDI file from a score containing transposed
4501 and untransposed instruments, you have to instruct LilyPond the pitch
4502 offset (in semitones) for the transposed instruments. This is done
4503 using the @code{transposing} property. It does not affect printed
4506 @cindex @code{transposing}
4509 \property Staff.instrument = #"Cl. in B-flat"
4510 \property Staff.transposing = #-2
4514 @node Ancient notation
4515 @section Ancient notation
4517 @cindex Vaticana, Editio
4518 @cindex Medicaea, Editio
4523 @c [TODO: write more comprehensive introduction on ancient notation]
4525 Support for ancient notation is still under heavy development.
4526 Regardless of all of the current limitations (see the bugs section
4527 below for details), it currently includes features for mensural
4528 notation and Gregorian Chant notation. There is also limited support
4529 for figured bass notation.
4531 Many graphical objects provide a @code{style} property, see
4532 @ref{Ancient note heads}, @ref{Ancient accidentals}, @ref{Ancient
4533 rests}, @ref{Ancient clefs}, @ref{Ancient flags} and @ref{Ancient time
4534 signatures}. By manipulating such a grob property, the typographical
4535 appearance of the affected graphical objects can be accomodated for a
4536 specific notation flavour without need for introducing any new
4540 Other aspects of ancient notation can not that easily be expressed as
4541 in terms of just changing a style property of a graphical object.
4542 Therefore, some notational concepts are introduced specifically for
4543 ancient notation, see @ref{Custodes}, @ref{Divisiones},
4544 @ref{Ligatures}, and @ref{Figured bass}.
4548 * Ancient note heads::
4549 * Ancient accidentals::
4553 * Ancient time signatures::
4558 * Vaticana style contexts::
4561 If this all is way too much of documentation for you, and you just
4562 want to dive into typesetting without worrying too much about the
4563 details on how to customize a context, then you may have a look at the
4564 predefined contexts (see @ref{Vaticana style contexts}). Use them to
4565 set up predefined style-specific voice and staff contexts, and
4566 directly go ahead with the note entry.
4570 Ligatures need special spacing that has not yet been implemented. As
4571 a result, there is too much space between ligatures most of the time,
4572 and line breaking often is unsatisfactory. Also, lyrics do not
4573 correctly align with ligatures.
4575 Accidentals must not be printed within a ligature, but instead need to
4576 be collected and printed in front of it.
4578 Augmentum dots within ligatures are currently not handled correctly.
4581 @node Ancient note heads
4582 @subsection Ancient note heads
4588 For ancient notation, a note head style other than the @code{default}
4589 style may be chosen. This is accomplished by setting the @code{style}
4590 property of the NoteHead object to the desired value (@code{baroque},
4591 @code{neo_mensural} or @code{mensural}). The @code{baroque} style
4592 differs from the @code{default} style only in using a square shape for
4593 @code{\breve} note heads. The @code{neo_mensural} style differs from
4594 the @code{baroque} style in that it uses rhomboidal heads for whole
4595 notes and all smaller durations. Stems are centered on the note
4596 heads. This style is in particular useful when transcribing mensural
4597 music, e.g. for the incipit. The @code{mensural} style finally
4598 produces note heads that mimick the look of note heads in historic
4599 printings of the 16th century.
4601 The following example demonstrates the @code{neo_mensural} style:
4603 @lilypond[fragment,singleline,verbatim]
4604 \property Voice.NoteHead \set #'style = #'neo_mensural
4605 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
4608 When typesetting a piece in Gregorian Chant notation, a Gregorian
4609 ligature engraver will automatically select the proper note heads,
4610 such there is no need to explicitly set the note head style. Still,
4611 the note head style can be set e.g. to @code{vaticana_punctum} to
4612 produce punctum neumes. Similarly, a mensural ligature engraver is
4613 used to automatically assemble mensural ligatures. See
4614 @ref{Ligatures} for how ligature engravers work.
4618 @inputfileref{input/regression,note-head-style.ly} gives an overview
4619 over all available note head styles.
4621 @ref{Percussion staves} use note head styles of their own that are
4622 frequently used in contemporary music notation.
4624 @node Ancient accidentals
4625 @subsection Ancient accidentals
4631 Use the @code{style} property of grob @internalsref{Accidental} to
4632 select ancient accidentals. Currently supported styles are
4633 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
4635 @lilypond[singleline,26pt]
4643 { " " \musicglyph #"accidentals-vaticana-1"
4644 " " \musicglyph #"accidentals-vaticana0" }
4648 { " " \musicglyph #"accidentals-medicaea-1" }
4652 { " " \musicglyph #"accidentals-hufnagel-1" }
4656 { " " \musicglyph #"accidentals-mensural-1"
4657 " " \musicglyph #"accidentals-mensural1" }
4666 \remove "Bar_number_engraver"
4670 \remove "Clef_engraver"
4671 \remove "Key_engraver"
4672 \remove "Time_signature_engraver"
4673 \remove "Staff_symbol_engraver"
4674 minimumVerticalExtent = ##f
4680 As shown, not all accidentals are supported by each style. When
4681 trying to access an unsupported accidental, LilyPond will switch to a
4682 different style, as demonstrated in
4683 @inputfileref{input/test,ancient-accidentals.ly}.
4685 Similarly to local accidentals, the style of the key signature can be
4686 controlled by the @code{style} property of the
4687 @internalsref{KeySignature} grob.
4691 @ref{Pitches}, @ref{Chromatic alterations} and @ref{Accidentals} give
4692 a general introduction into the use of accidentals. @ref{Key
4693 signature} gives a general introduction into the use of key
4698 @subsection Ancient rests
4704 Use the @code{style} property of grob @internalsref{Rest} to select
4705 ancient accidentals. Currently supported styles are @code{classical},
4706 @code{neo_mensural} and @code{mensural}. @code{classical} differs
4707 from the @code{default} style only in that the quarter rest looks like
4708 a horizontally mirrored 8th rest. The @code{neo_mensural} style suits
4709 well for e.g. the incipit of a transcribed mensural piece of music.
4710 The @code{mensural} style finally mimicks the appearance of rests as
4711 in historic prints of the 16th century.
4713 The following example demonstrates the @code{neo_mensural} style:
4715 @lilypond[fragment,singleline,verbatim]
4716 \property Voice.Rest \set #'style = #'neo_mensural
4717 r\longa r\breve r1 r2 r4 r8 r16
4720 There are no 32th and 64th rests specifically for the mensural or
4721 neo-mensural style. Instead, the rests from the default style will be
4722 taken. See @inputfileref{input/test,rests.ly} for a chart of all
4725 There are no rests in Gregorian Chant notation; instead, it uses
4730 @ref{Rests} gives a general introduction into the use of rests.
4734 @subsection Ancient clefs
4740 LilyPond supports a variety of clefs, many of them ancient.
4742 The following table shows all ancient clefs that are supported via the
4743 @code{\clef} command. Some of the clefs use the same glyph, but
4744 differ only with respect to the line they are printed on. In such
4745 cases, a trailing number in the name is used to enumerate these clefs.
4746 Still, you can manually force a clef glyph to be typeset on an
4747 arbitrary line, as described in @ref{Clef}. The note printed to the
4748 right side of each clef in the example column denotes the @code{c'}
4749 with respect to that clef.
4751 @multitable @columnfractions .3 .3 .3 .1
4755 @b{Description} @tab
4756 @b{Supported Clefs} @tab
4760 @code{clefs-neo_mensural_c} @tab
4761 modern style mensural C clef @tab
4762 @code{neo_mensural_c1}, @code{neo_mensural_c2},
4763 @code{neo_mensural_c3}, @code{neo_mensural_c4} @tab
4764 @lilypond[relative 0, notime]
4765 \property Staff.TimeSignature \set #'transparent = ##t
4766 \clef "neo_mensural_c2" c
4770 @code{clefs-petrucci_c1}
4771 @code{clefs-petrucci_c2}
4772 @code{clefs-petrucci_c3}
4773 @code{clefs-petrucci_c4}
4774 @code{clefs-petrucci_c5}
4777 petrucci style mensural C clefs, for use on different stafflines
4778 (the examples shows the 2nd staffline C clef).
4788 @lilypond[relative 0, notime]
4789 \property Staff.TimeSignature \set #'transparent = ##t
4790 \clef "petrucci_c2" c
4794 @code{clefs-petrucci_f} @tab
4795 petrucci style mensural F clef @tab
4796 @code{petrucci_f} @tab
4797 @lilypond[relative 0, notime]
4798 \property Staff.TimeSignature \set #'transparent = ##t
4799 \clef "petrucci_f" c
4803 @code{clefs-petrucci_g} @tab
4804 petrucci style mensural G clef @tab
4805 @code{petrucci_g} @tab
4806 @lilypond[relative 0, notime]
4807 \property Staff.TimeSignature \set #'transparent = ##t
4808 \clef "petrucci_g" c
4812 @code{clefs-mensural_c} @tab
4813 historic style mensural C clef @tab
4814 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
4815 @code{mensural_c4} @tab
4816 @lilypond[relative 0, notime]
4817 \property Staff.TimeSignature \set #'transparent = ##t
4818 \clef "mensural_c2" c
4822 @code{clefs-mensural_f} @tab
4823 historic style mensural F clef @tab
4824 @code{mensural_f} @tab
4825 @lilypond[relative 0, notime]
4826 \property Staff.TimeSignature \set #'transparent = ##t
4827 \clef "mensural_f" c
4831 @code{clefs-mensural_g} @tab
4832 historic style mensural G clef @tab
4833 @code{mensural_g} @tab
4834 @lilypond[relative 0, notime]
4835 \property Staff.TimeSignature \set #'transparent = ##t
4836 \clef "mensural_g" c
4840 @code{clefs-vaticana_do} @tab
4841 Editio Vaticana style do clef @tab
4842 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
4843 @lilypond[relative 0, notime]
4845 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4846 \property Staff.TimeSignature \set #'transparent = ##t
4847 \clef "vaticana_do2" c
4851 @code{clefs-vaticana_fa} @tab
4852 Editio Vaticana style fa clef @tab
4853 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
4854 @lilypond[relative 0, notime]
4856 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4857 \property Staff.TimeSignature \set #'transparent = ##t
4858 \clef "vaticana_fa2" c
4862 @code{clefs-medicaea_do} @tab
4863 Editio Medicaea style do clef @tab
4864 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
4865 @lilypond[relative 0, notime]
4867 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4868 \property Staff.TimeSignature \set #'transparent = ##t
4869 \clef "medicaea_do2" c
4873 @code{clefs-medicaea_fa} @tab
4874 Editio Medicaea style fa clef @tab
4875 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
4876 @lilypond[relative 0, notime]
4878 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4879 \property Staff.TimeSignature \set #'transparent = ##t
4880 \clef "medicaea_fa2" c
4884 @code{clefs-hufnagel_do} @tab
4885 historic style hufnagel do clef @tab
4886 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
4887 @lilypond[relative 0, notime]
4889 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4890 \property Staff.TimeSignature \set #'transparent = ##t
4891 \clef "hufnagel_do2" c
4895 @code{clefs-hufnagel_fa} @tab
4896 historic style hufnagel fa clef @tab
4897 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
4898 @lilypond[relative 0, notime]
4900 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4901 \property Staff.TimeSignature \set #'transparent = ##t
4902 \clef "hufnagel_fa2" c
4906 @code{clefs-hufnagel_do_fa} @tab
4907 historic style hufnagel combined do/fa clef @tab
4908 @code{hufnagel_do_fa} @tab
4909 @lilypond[relative 0, notime]
4910 \property Staff.TimeSignature \set #'transparent = ##t
4911 \clef "hufnagel_do_fa" c
4916 @c --- This should go somewhere else: ---
4917 @c @item modern style percussion clef (glyph: @code{clefs-percussion})
4920 @c @code{percussion}
4922 @c @lilypond{\property Staff.TimeSignature \set #'transparent = ##t \clef "percussion" c'}
4924 @c @item modern style tab clef (glyph: @code{clefs-tab})
4929 @c @lilypond{\context Staff \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #6 \property Staff.TimeSignature \set #'transparent = ##t \clef "tab" c'}
4931 @emph{Modern style} means ``as is typeset in contemporary editions of
4932 transcribed mensural music''.
4934 @emph{Petrucci style} means ``inspired by printings published by the
4935 famous engraver Petrucci (1466-1539)''.
4937 @emph{Historic style} means ``as was typeset or written in historic
4938 editions (other than those of Petrucci)''.
4940 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
4942 Petrucci used C clefs with differently balanced left-side vertical
4943 beams, depending on which staffline it is printed.
4947 For modern clefs, see @ref{Clef}. For the percussion clef, see
4948 @ref{Percussion staves}. For the @code{TAB} clef, see
4953 @subsection Ancient flags
4959 Use the @code{flag-style} property of grob @internalsref{Stem} to
4960 select ancient flags. Besides the @code{default} flag style,
4961 currently only @code{mensural} style is supported:
4963 @lilypond[fragment,singleline,verbatim]
4964 \property Voice.Stem \set #'flag-style = #'mensural
4965 \property Voice.Stem \set #'thickness = #1.0
4966 \property Voice.NoteHead \set #'style = #'mensural
4968 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
4969 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
4972 Note that the innermost flare of each mensural flag always is
4973 vertically aligned with a staff line. If you do not like this
4974 behaviour, you can set the @code{adjust-if-on-staffline} property of
4975 grob @internalsref{Stem} to @code{##f}. Then, the vertical position
4976 of the end of each flare is different between notes on staff lines and
4977 notes between staff lines:
4979 @lilypond[fragment,singleline]
4980 \property Voice.Stem \set #'flag-style = #'mensural
4981 \property Voice.Stem \set #'thickness = #1.0
4982 \property Voice.Stem \set #'adjust-if-on-staffline = ##f
4983 \property Voice.NoteHead \set #'style = #'mensural
4985 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
4986 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
4989 There is no particular flag style for neo-mensural notation. Hence,
4990 when typesetting e.g. the incipit of a transcibed piece of mensural
4991 music, the default flag style should be used. There are no flags in
4992 Gregorian Chant notation.
4995 @node Ancient time signatures
4996 @subsection Ancient time signatures
4998 @cindex time signatures
5002 There is limited support for mensural time signatures. Currently, the
5003 glyphs are hard-wired to particular time fractions. In other words,
5004 to get a particular mensural signature glyph with the @code{\time n/m}
5005 command, @code{n} and @code{m} have to be chosen according to the
5011 \property Score.timing = ##f
5012 \property Score.barAlways = ##t
5013 s_\markup { "$\\backslash$time 4/4" }
5014 ^\markup { " " \musicglyph #"timesig-neo\_mensural4/4" }
5016 s_\markup { "$\\backslash$time 2/2" }
5017 ^\markup { " " \musicglyph #"timesig-neo\_mensural2/2" }
5019 s_\markup { "$\\backslash$time 6/4" }
5020 ^\markup { " " \musicglyph #"timesig-neo\_mensural6/4" }
5022 s_\markup { "$\\backslash$time 6/8" }
5023 ^\markup { " " \musicglyph #"timesig-neo\_mensural6/8" }
5025 s_\markup { "$\\backslash$time 3/2" }
5026 ^\markup { " " \musicglyph #"timesig-neo\_mensural3/2" }
5028 s_\markup { "$\\backslash$time 3/4" }
5029 ^\markup { " " \musicglyph #"timesig-neo\_mensural3/4" }
5031 s_\markup { "$\\backslash$time 9/4" }
5032 ^\markup { " " \musicglyph #"timesig-neo\_mensural9/4" }
5034 s_\markup { "$\\backslash$time 9/8" }
5035 ^\markup { " " \musicglyph #"timesig-neo\_mensural9/8" }
5037 s_\markup { "$\\backslash$time 4/8" }
5038 ^\markup { " " \musicglyph #"timesig-neo\_mensural4/8" }
5040 s_\markup { "$\\backslash$time 2/4" }
5041 ^\markup { " " \musicglyph #"timesig-neo\_mensural2/4" }
5049 \remove Staff_symbol_engraver
5050 \remove Clef_engraver
5051 \remove Time_signature_engraver
5057 Use the @code{style} property of grob @internalsref{TimeSignature} to
5058 select ancient time signatures. Currently supported styles are
5059 @code{neo_mensural} and @code{mensural}. The above table uses the
5060 @code{neo_mensural} style. This style is appropriate e.g. for the
5061 incipit of transcriptions of mensural pieces. The @code{mensural}
5062 style mimicks the look of historical printings of the 16th century.
5064 @inputfileref{input/test,time.ly} gives an overview over all available
5065 ancient and modern styles.
5069 @ref{Time signature} gives a general introduction into the use of time
5074 Mensural signature glyphs are currently mapped to time fractions in a
5075 hard-wired way. This mapping is sensible, but still arbitrary: given
5076 a mensural time signature, the time fraction represents a modern meter
5077 that usually will be a good choice when transcribing a mensural piece
5078 of music. For a particular piece of mensural music, however, the
5079 mapping may be unsatisfactory. In particular, the mapping assumes a
5080 fixed transcription of durations (e.g. brevis = half note in 2/2,
5081 i.e. 4:1). Some glyphs (such as the alternate glyph for 6/8 meter)
5082 are currently not at all accessible through the @code{\time} command.
5084 Mensural time signatures are supported typographically, but not yet
5085 musically. The internal representation of durations is currently
5086 based on a purely binary system; a ternary division such as 1 brevis =
5087 3 semibrevis (tempus perfectum) or 1 semibrevis = 3 minima (cum
5088 prolatione maiori) is not correctly handled: event times in ternary
5089 modes will be badly computed, resulting e.g. in horizontally
5090 misaligned note heads, and bar checks are likely to erroneously fail.
5092 The syntax and semantics of the @code{\time} command for mensural
5093 music is subject to change.
5096 @subsection Custodes
5101 A @emph{custos} (plural: @emph{custodes}; latin word for `guard') is a
5102 symbol that appears at the end of a staff. It anticipates the pitch
5103 of the first note(s) of the following line and thus helps the player
5104 or singer to manage line breaks during performance, thus enhancing
5105 readability of a score.
5107 Custodes were frequently used in music notation until the 17th
5108 century. Nowadays, they have survived only in a few particular forms
5109 of musical notation such as contemporary editions of Gregorian chant
5110 like the @emph{editio vaticana}. There are different custos glyphs
5111 used in different flavours of notational style.
5115 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
5116 @internalsref{Staff} context when declaring the @code{\paper} block,
5117 as shown in the following example:
5123 \consists Custos_engraver
5124 Custos \override #'style = #'mensural
5129 The result looks like this:
5135 \property Staff.Custos \set #'style = #'mensural
5142 \consists Custos_engraver
5149 The custos glyph is selected by the @code{style} property. The styles
5150 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
5151 @code{mensural}. They are demonstrated in the following fragment:
5161 { " " \musicglyph #"custodes-vaticana-u0" }
5165 { " " \musicglyph #"custodes-medicaea-u0" }
5169 { " " \musicglyph #"custodes-hufnagel-u0" }
5173 { " " \musicglyph #"custodes-mensural-u0" }
5182 \remove "Bar_number_engraver"
5186 \remove "Clef_engraver"
5187 \remove "Key_engraver"
5188 \remove "Time_signature_engraver"
5189 \remove "Staff_symbol_engraver"
5190 minimumVerticalExtent = ##f
5196 If the boolean property @code{adjust-if-on-staffline} is set to
5197 @code{#t} (which it is by default), lily typesets slightly different
5198 variants of the custos glyph, depending on whether the custos, is
5199 typeset on or between stafflines. The glyph will
5200 optically fit well into the staff, with the appendage on the right of
5201 the custos always ending at the same vertical position between two
5202 stafflines regardless of the pitch. If you set
5203 @code{adjust-if-on-staffline} to @code{#f}, then
5204 a compromise between both forms is used.
5206 Just like stems can be attached to noteheads in two directions
5207 @emph{up} and @emph{down}, each custos glyph is available with its
5208 appendage pointing either up or down. If the pitch of a custos is
5209 above a selectable position, the appendage will point downwards; if
5210 the pitch is below this position, the appendage will point upwards.
5211 Use property @code{neutral-position} to select this position. By
5212 default, it is set to @code{0}, such that the neutral position is the
5213 center of the staff. Use property @code{neutral-direction} to control
5214 what happens if a custos is typeset on the neutral position itself.
5215 By default, this property is set to @code{-1}, such that the appendage
5216 will point downwards. If set to @code{1}, the appendage will point
5217 upwards. Other values such as @code{0} are reserved for future
5218 extensions and should not be used.
5222 @internalsref{Custos} and @inputfileref{input/regression,custos.ly}.
5226 @subsection Divisiones
5232 A @emph{divisio} (plural: @emph{divisiones}; latin word for
5233 `division') is a staff context symbol that is used to structure
5234 Gregorian music into phrases and sections. The musical meaning of
5235 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
5236 can be characterized as short, medium and long pause, somewhat like
5237 @ref{Breath marks}. The @emph{finalis} sign not only marks the end of
5238 a chant, but is also frequently used within a single
5239 antiphonal/responsorial chant to mark the end of each section.
5243 To use divisiones, include the file @code{gregorian-init.ly}. It
5244 contains definitions that you can apply by just inserting
5245 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
5246 and @code{\finalis} at proper places in the input. Some editions use
5247 @emph{virgula} or @emph{caesura} instead of divisio minima.
5248 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
5251 @lilypondfile[notexidoc]{divisiones.ly}
5255 @cindex @code{\virgula}
5257 @cindex @code{\caesura}
5259 @cindex @code{\divisioMinima}
5260 @code{\divisioMinima},
5261 @cindex @code{\divisioMaior}
5262 @code{\divisioMaior},
5263 @cindex @code{\divisioMaxima}
5264 @code{\divisioMaxima},
5265 @cindex @code{\finalis}
5270 @internalsref{BreathingSign}, @internalsref{BreathingSignEvent},
5271 @inputfileref{input/test,divisiones.ly}, and @ref{Breath marks}.
5274 @subsection Ligatures
5278 @c TODO: Should double check if I recalled things correctly when I wrote
5279 @c down the following paragraph by heart.
5281 In musical terminology, a ligature is a coherent graphical symbol that
5282 represents at least two distinct notes. Ligatures originally appeared
5283 in the manuscripts of Gregorian chant notation roughly since the 9th
5284 century as an allusion to the accent symbols of greek lyric poetry to
5285 denote ascending or descending sequences of notes. Both, the shape
5286 and the exact meaning of ligatures changed tremendously during the
5287 following centuries: In early notation, ligatures were used for
5288 monophonic tunes (Gregorian chant) and very soon denoted also the way
5289 of performance in the sense of articulation. With upcoming
5290 multiphony, the need for a metric system arised, since multiple voices
5291 of a piece have to be synchronized some way. New notation systems
5292 were invented that used the manifold shapes of ligatures to now denote
5293 rhythmical patterns (e.g. black mensural notation, mannered notation,
5294 ars nova). With the invention of the metric system of the white
5295 mensural notation, the need for ligatures to denote such patterns
5296 disappeared. Nevertheless, ligatures were still in use in the
5297 mensural system for a couple of decades until they finally disappeared
5298 during the late 16th / early 17th century. Still, ligatures have
5299 survived in contemporary editions of Gregorian chant such as the
5300 Editio Vaticana from 1905/08.
5304 Syntactically, ligatures are simply enclosed by @code{\[} and
5305 @code{\]}. Some ligature styles (such as Editio Vaticana) may need
5306 additional input syntax specific for this particular type of ligature.
5307 By default, the @internalsref{LigatureBracket} engraver just puts a
5308 square bracket above the ligature:
5310 @lilypond[singleline,verbatim]
5312 \notes \transpose c c' {
5320 To select a specific style of ligatures, a proper ligature engraver
5321 has to be added to the @internalsref{Voice} context, as explained in
5322 the following subsections. Currently, only white mensural ligatures
5323 are supported with certain limitations. Support for Editio Vaticana
5324 will be added in the future.
5327 * White mensural ligatures::
5328 * Gregorian square neumes ligatures::
5331 @node White mensural ligatures
5332 @subsubsection White mensural ligatures
5334 @cindex Mensural ligatures
5335 @cindex White mensural ligatures
5337 There is limited support for white mensural ligatures. The
5338 implementation is still experimental; it currently may output strange
5339 warnings or even crash in some cases or produce weird results on more
5344 To engrave white mensural ligatures, in the paper block the
5345 @internalsref{Mensural_ligature_engraver} has to be put into the
5346 @internalsref{Voice} context, and remove the
5347 @internalsref{Ligature_bracket_engraver}:
5353 \remove Ligature_bracket_engraver
5354 \consists Mensural_ligature_engraver
5359 There is no additional input language to describe the shape of a
5360 white mensural ligature. The shape is rather determined solely from
5361 the pitch and duration of the enclosed notes. While this approach may
5362 take a new user a while to get accustomed, it has the great advantage
5363 that the full musical information of the ligature is known internally.
5364 This is not only required for correct MIDI output, but also allows for
5365 automatic transcription of the ligatures.
5370 \property Score.timing = ##f
5371 \property Score.defaultBarType = "empty"
5372 \property Voice.NoteHead \set #'style = #'neo_mensural
5373 \property Staff.TimeSignature \set #'style = #'neo_mensural
5375 \[ g\longa c\breve a\breve f\breve d'\longa \]
5377 \[ e1 f1 a\breve g\longa \]
5379 @lilypond[singleline]
5381 \notes \transpose c c' {
5382 \property Score.timing = ##f
5383 \property Score.defaultBarType = "empty"
5384 \property Voice.NoteHead \set #'style = #'neo_mensural
5385 \property Staff.TimeSignature \set #'style = #'neo_mensural
5387 \[ g\longa c\breve a\breve f\breve d'\longa \]
5389 \[ e1 f1 a\breve g\longa \]
5394 \remove Ligature_bracket_engraver
5395 \consists Mensural_ligature_engraver
5401 Without replacing @internalsref{Ligature_bracket_engraver} with
5402 @internalsref{Mensural_ligature_engraver}, the same music transcribes
5405 @lilypond[singleline]
5407 \notes \transpose c c' {
5408 \property Score.timing = ##f
5409 \property Score.defaultBarType = "empty"
5410 \property Voice.NoteHead \set #'style = #'neo_mensural
5411 \property Staff.TimeSignature \set #'style = #'neo_mensural
5413 \[ g\longa c\breve a\breve f\breve d'\longa \]
5415 \[ e1 f1 a\breve g\longa \]
5421 @node Gregorian square neumes ligatures
5422 @subsubsection Gregorian square neumes ligatures
5424 @cindex Square neumes ligatures
5425 @cindex Gregorian square neumes ligatures
5427 Gregorian square neumes notation (following the style of the Editio
5428 Vaticana) is under heavy development, but not yet really usable for
5429 production purposes. Core ligatures can already be typeset, but
5430 essential issues for serious typesetting are still under development,
5431 such as (among others) horizontal alignment of multiple ligatures,
5432 lyrics alignment and proper accidentals handling. Still, this section
5433 gives a sneak preview of what Gregorian chant may look like once it
5436 The following table contains the extended neumes table of the 2nd
5437 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
5438 1983 by the monks of Solesmes.
5440 @multitable @columnfractions .4 .2 .2 .2
5443 @b{Neuma aut@*Neumarum Elementa} @tab
5444 @b{Figurae@*Rectae} @tab
5445 @b{Figurae@*Liquescentes Auctae} @tab
5446 @b{Figurae@*Liquescentes Deminutae}
5448 @c TODO: \paper block is identical in all of the below examples.
5449 @c Therefore, it should somehow be included rather than duplicated all
5452 @c why not make identifiers in ly/engraver-init.ly? --hwn
5454 @c Because it's just used to typeset plain notes without
5455 @c a staff for demonstration purposes rather than something
5456 @c special of Gregorian chant notation. --jr
5461 @lilypond[noindent, 26pt, nofragment, linewidth=1.5cm]
5462 \include "gregorian-init.ly"
5464 \notes \transpose c c' {
5467 \noBreak s^\markup {"a"} \noBreak
5469 % Punctum Inclinatum
5471 \noBreak s^\markup {"b"}
5477 \remove "Bar_number_engraver"
5481 \remove "Clef_engraver"
5482 \remove "Key_engraver"
5483 StaffSymbol \set #'transparent = ##t
5484 \remove "Time_signature_engraver"
5485 \remove "Bar_engraver"
5486 minimumVerticalExtent = ##f
5490 \remove Ligature_bracket_engraver
5491 \consists Vaticana_ligature_engraver
5492 NoteHead \set #'style = #'vaticana_punctum
5493 Stem \set #'transparent = ##t
5499 @lilypond[noindent, 26pt, nofragment, linewidth=2.5cm]
5500 \include "gregorian-init.ly"
5502 \notes \transpose c c' {
5503 % Punctum Auctum Ascendens
5504 \[ \auctum \ascendens b \]
5505 \noBreak s^\markup {"c"} \noBreak
5507 % Punctum Auctum Descendens
5508 \[ \auctum \descendens b \]
5509 \noBreak s^\markup {"d"} \noBreak
5511 % Punctum Inclinatum Auctum
5512 \[ \inclinatum \auctum b \]
5513 \noBreak s^\markup {"e"}
5519 \remove "Bar_number_engraver"
5523 \remove "Clef_engraver"
5524 \remove "Key_engraver"
5525 StaffSymbol \set #'transparent = ##t
5526 \remove "Time_signature_engraver"
5527 \remove "Bar_engraver"
5528 minimumVerticalExtent = ##f
5532 \remove Ligature_bracket_engraver
5533 \consists Vaticana_ligature_engraver
5534 NoteHead \set #'style = #'vaticana_punctum
5535 Stem \set #'transparent = ##t
5541 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5542 \include "gregorian-init.ly"
5544 \notes \transpose c c' {
5545 % Punctum Inclinatum Parvum
5546 \[ \inclinatum \deminutum b \]
5547 \noBreak s^\markup {"f"}
5553 \remove "Bar_number_engraver"
5557 \remove "Clef_engraver"
5558 \remove "Key_engraver"
5559 StaffSymbol \set #'transparent = ##t
5560 \remove "Time_signature_engraver"
5561 \remove "Bar_engraver"
5562 minimumVerticalExtent = ##f
5566 \remove Ligature_bracket_engraver
5567 \consists Vaticana_ligature_engraver
5568 NoteHead \set #'style = #'vaticana_punctum
5569 Stem \set #'transparent = ##t
5578 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5579 \include "gregorian-init.ly"
5581 \notes \transpose c c' {
5584 \noBreak s^\markup {"g"}
5590 \remove "Bar_number_engraver"
5594 \remove "Clef_engraver"
5595 \remove "Key_engraver"
5596 StaffSymbol \set #'transparent = ##t
5597 \remove "Time_signature_engraver"
5598 \remove "Bar_engraver"
5599 minimumVerticalExtent = ##f
5603 \remove Ligature_bracket_engraver
5604 \consists Vaticana_ligature_engraver
5605 NoteHead \set #'style = #'vaticana_punctum
5606 Stem \set #'transparent = ##t
5615 @code{3. Apostropha vel Stropha}
5617 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5618 \include "gregorian-init.ly"
5620 \notes \transpose c c' {
5623 \noBreak s^\markup {"h"}
5629 \remove "Bar_number_engraver"
5633 \remove "Clef_engraver"
5634 \remove "Key_engraver"
5635 StaffSymbol \set #'transparent = ##t
5636 \remove "Time_signature_engraver"
5637 \remove "Bar_engraver"
5638 minimumVerticalExtent = ##f
5642 \remove Ligature_bracket_engraver
5643 \consists Vaticana_ligature_engraver
5644 NoteHead \set #'style = #'vaticana_punctum
5645 Stem \set #'transparent = ##t
5651 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5652 \include "gregorian-init.ly"
5654 \notes \transpose c c' {
5656 \[ \stropha \auctum b \]
5657 \noBreak s^\markup {"i"}
5663 \remove "Bar_number_engraver"
5667 \remove "Clef_engraver"
5668 \remove "Key_engraver"
5669 StaffSymbol \set #'transparent = ##t
5670 \remove "Time_signature_engraver"
5671 \remove "Bar_engraver"
5672 minimumVerticalExtent = ##f
5676 \remove Ligature_bracket_engraver
5677 \consists Vaticana_ligature_engraver
5678 NoteHead \set #'style = #'vaticana_punctum
5679 Stem \set #'transparent = ##t
5689 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5690 \include "gregorian-init.ly"
5692 \notes \transpose c c' {
5695 \noBreak s^\markup {"j"}
5701 \remove "Bar_number_engraver"
5705 \remove "Clef_engraver"
5706 \remove "Key_engraver"
5707 StaffSymbol \set #'transparent = ##t
5708 \remove "Time_signature_engraver"
5709 \remove "Bar_engraver"
5710 minimumVerticalExtent = ##f
5714 \remove Ligature_bracket_engraver
5715 \consists Vaticana_ligature_engraver
5716 NoteHead \set #'style = #'vaticana_punctum
5717 Stem \set #'transparent = ##t
5726 @code{5. Clivis vel Flexa}
5728 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5729 \include "gregorian-init.ly"
5731 \notes \transpose c c' {
5740 \remove "Bar_number_engraver"
5744 \remove "Clef_engraver"
5745 \remove "Key_engraver"
5746 StaffSymbol \set #'transparent = ##t
5747 \remove "Time_signature_engraver"
5748 \remove "Bar_engraver"
5749 minimumVerticalExtent = ##f
5753 \remove Ligature_bracket_engraver
5754 \consists Vaticana_ligature_engraver
5755 NoteHead \set #'style = #'vaticana_punctum
5756 Stem \set #'transparent = ##t
5762 @lilypond[noindent, 26pt, nofragment, linewidth=2.0cm]
5763 \include "gregorian-init.ly"
5765 \notes \transpose c c' {
5766 % Clivis Aucta Descendens
5767 \[ b \flexa \auctum \descendens g \]
5768 \noBreak s^\markup {"l"} \noBreak
5770 % Clivis Aucta Ascendens
5771 \[ b \flexa \auctum \ascendens g \]
5772 \noBreak s^\markup {"m"}
5778 \remove "Bar_number_engraver"
5782 \remove "Clef_engraver"
5783 \remove "Key_engraver"
5784 StaffSymbol \set #'transparent = ##t
5785 \remove "Time_signature_engraver"
5786 \remove "Bar_engraver"
5787 minimumVerticalExtent = ##f
5791 \remove Ligature_bracket_engraver
5792 \consists Vaticana_ligature_engraver
5793 NoteHead \set #'style = #'vaticana_punctum
5794 Stem \set #'transparent = ##t
5800 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5801 \include "gregorian-init.ly"
5803 \notes \transpose c c' {
5805 \[ b \flexa \deminutum g \]
5812 \remove "Bar_number_engraver"
5816 \remove "Clef_engraver"
5817 \remove "Key_engraver"
5818 StaffSymbol \set #'transparent = ##t
5819 \remove "Time_signature_engraver"
5820 \remove "Bar_engraver"
5821 minimumVerticalExtent = ##f
5825 \remove Ligature_bracket_engraver
5826 \consists Vaticana_ligature_engraver
5827 NoteHead \set #'style = #'vaticana_punctum
5828 Stem \set #'transparent = ##t
5835 @code{6. Podatus vel Pes}
5837 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5838 \include "gregorian-init.ly"
5840 \notes \transpose c c' {
5849 \remove "Bar_number_engraver"
5853 \remove "Clef_engraver"
5854 \remove "Key_engraver"
5855 StaffSymbol \set #'transparent = ##t
5856 \remove "Time_signature_engraver"
5857 \remove "Bar_engraver"
5858 minimumVerticalExtent = ##f
5862 \remove Ligature_bracket_engraver
5863 \consists Vaticana_ligature_engraver
5864 NoteHead \set #'style = #'vaticana_punctum
5865 Stem \set #'transparent = ##t
5871 @lilypond[noindent, 26pt, nofragment, linewidth=2.0cm]
5872 \include "gregorian-init.ly"
5874 \notes \transpose c c' {
5875 % Pes Auctus Descendens
5876 \[ g \pes \auctum \descendens b \]
5877 \noBreak s^\markup {"p"} \noBreak
5879 % Pes Auctus Ascendens
5880 \[ g \pes \auctum \ascendens b \]
5881 \noBreak s^\markup {"q"}
5887 \remove "Bar_number_engraver"
5891 \remove "Clef_engraver"
5892 \remove "Key_engraver"
5893 StaffSymbol \set #'transparent = ##t
5894 \remove "Time_signature_engraver"
5895 \remove "Bar_engraver"
5896 minimumVerticalExtent = ##f
5900 \remove Ligature_bracket_engraver
5901 \consists Vaticana_ligature_engraver
5902 NoteHead \set #'style = #'vaticana_punctum
5903 Stem \set #'transparent = ##t
5909 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5910 \include "gregorian-init.ly"
5912 \notes \transpose c c' {
5914 \[ g \pes \deminutum b \]
5921 \remove "Bar_number_engraver"
5925 \remove "Clef_engraver"
5926 \remove "Key_engraver"
5927 StaffSymbol \set #'transparent = ##t
5928 \remove "Time_signature_engraver"
5929 \remove "Bar_engraver"
5930 minimumVerticalExtent = ##f
5934 \remove Ligature_bracket_engraver
5935 \consists Vaticana_ligature_engraver
5936 NoteHead \set #'style = #'vaticana_punctum
5937 Stem \set #'transparent = ##t
5944 @code{7. Pes Quassus}
5946 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5947 \include "gregorian-init.ly"
5949 \notes \transpose c c' {
5951 \[ \oriscus g \pes \virga b \]
5958 \remove "Bar_number_engraver"
5962 \remove "Clef_engraver"
5963 \remove "Key_engraver"
5964 StaffSymbol \set #'transparent = ##t
5965 \remove "Time_signature_engraver"
5966 \remove "Bar_engraver"
5967 minimumVerticalExtent = ##f
5971 \remove Ligature_bracket_engraver
5972 \consists Vaticana_ligature_engraver
5973 NoteHead \set #'style = #'vaticana_punctum
5974 Stem \set #'transparent = ##t
5980 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5981 \include "gregorian-init.ly"
5983 \notes \transpose c c' {
5984 % Pes Quassus Auctus Descendens
5985 \[ \oriscus g \pes \auctum \descendens b \]
5992 \remove "Bar_number_engraver"
5996 \remove "Clef_engraver"
5997 \remove "Key_engraver"
5998 StaffSymbol \set #'transparent = ##t
5999 \remove "Time_signature_engraver"
6000 \remove "Bar_engraver"
6001 minimumVerticalExtent = ##f
6005 \remove Ligature_bracket_engraver
6006 \consists Vaticana_ligature_engraver
6007 NoteHead \set #'style = #'vaticana_punctum
6008 Stem \set #'transparent = ##t
6016 @code{8. Quilisma Pes}
6018 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6019 \include "gregorian-init.ly"
6021 \notes \transpose c c' {
6023 \[ \quilisma g \pes b \]
6030 \remove "Bar_number_engraver"
6034 \remove "Clef_engraver"
6035 \remove "Key_engraver"
6036 StaffSymbol \set #'transparent = ##t
6037 \remove "Time_signature_engraver"
6038 \remove "Bar_engraver"
6039 minimumVerticalExtent = ##f
6043 \remove Ligature_bracket_engraver
6044 \consists Vaticana_ligature_engraver
6045 NoteHead \set #'style = #'vaticana_punctum
6046 Stem \set #'transparent = ##t
6052 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6053 \include "gregorian-init.ly"
6055 \notes \transpose c c' {
6056 % Quilisma Pes Auctus Descendens
6057 \[ \quilisma g \pes \auctum \descendens b \]
6064 \remove "Bar_number_engraver"
6068 \remove "Clef_engraver"
6069 \remove "Key_engraver"
6070 StaffSymbol \set #'transparent = ##t
6071 \remove "Time_signature_engraver"
6072 \remove "Bar_engraver"
6073 minimumVerticalExtent = ##f
6077 \remove Ligature_bracket_engraver
6078 \consists Vaticana_ligature_engraver
6079 NoteHead \set #'style = #'vaticana_punctum
6080 Stem \set #'transparent = ##t
6088 @code{9. Podatus Initio Debilis}
6090 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6091 \include "gregorian-init.ly"
6093 \notes \transpose c c' {
6094 % Pes Initio Debilis
6095 \[ \deminutum g \pes b \]
6102 \remove "Bar_number_engraver"
6106 \remove "Clef_engraver"
6107 \remove "Key_engraver"
6108 StaffSymbol \set #'transparent = ##t
6109 \remove "Time_signature_engraver"
6110 \remove "Bar_engraver"
6111 minimumVerticalExtent = ##f
6115 \remove Ligature_bracket_engraver
6116 \consists Vaticana_ligature_engraver
6117 NoteHead \set #'style = #'vaticana_punctum
6118 Stem \set #'transparent = ##t
6124 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6125 \include "gregorian-init.ly"
6127 \notes \transpose c c' {
6128 % Pes Auctus Descendens Initio Debilis
6129 \[ \deminutum g \pes \auctum \descendens b \]
6136 \remove "Bar_number_engraver"
6140 \remove "Clef_engraver"
6141 \remove "Key_engraver"
6142 StaffSymbol \set #'transparent = ##t
6143 \remove "Time_signature_engraver"
6144 \remove "Bar_engraver"
6145 minimumVerticalExtent = ##f
6149 \remove Ligature_bracket_engraver
6150 \consists Vaticana_ligature_engraver
6151 NoteHead \set #'style = #'vaticana_punctum
6152 Stem \set #'transparent = ##t
6162 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6163 \include "gregorian-init.ly"
6165 \notes \transpose c c' {
6167 \[ a \pes b \flexa g \]
6174 \remove "Bar_number_engraver"
6178 \remove "Clef_engraver"
6179 \remove "Key_engraver"
6180 StaffSymbol \set #'transparent = ##t
6181 \remove "Time_signature_engraver"
6182 \remove "Bar_engraver"
6183 minimumVerticalExtent = ##f
6187 \remove Ligature_bracket_engraver
6188 \consists Vaticana_ligature_engraver
6189 NoteHead \set #'style = #'vaticana_punctum
6190 Stem \set #'transparent = ##t
6196 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6197 \include "gregorian-init.ly"
6199 \notes \transpose c c' {
6200 % Torculus Auctus Descendens
6201 \[ a \pes b \flexa \auctum \descendens g \]
6208 \remove "Bar_number_engraver"
6212 \remove "Clef_engraver"
6213 \remove "Key_engraver"
6214 StaffSymbol \set #'transparent = ##t
6215 \remove "Time_signature_engraver"
6216 \remove "Bar_engraver"
6217 minimumVerticalExtent = ##f
6221 \remove Ligature_bracket_engraver
6222 \consists Vaticana_ligature_engraver
6223 NoteHead \set #'style = #'vaticana_punctum
6224 Stem \set #'transparent = ##t
6230 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6231 \include "gregorian-init.ly"
6233 \notes \transpose c c' {
6234 % Torculus Deminutus
6235 \[ a \pes b \flexa \deminutum g \]
6242 \remove "Bar_number_engraver"
6246 \remove "Clef_engraver"
6247 \remove "Key_engraver"
6248 StaffSymbol \set #'transparent = ##t
6249 \remove "Time_signature_engraver"
6250 \remove "Bar_engraver"
6251 minimumVerticalExtent = ##f
6255 \remove Ligature_bracket_engraver
6256 \consists Vaticana_ligature_engraver
6257 NoteHead \set #'style = #'vaticana_punctum
6258 Stem \set #'transparent = ##t
6265 @code{11. Torculus Initio Debilis}
6267 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6268 \include "gregorian-init.ly"
6270 \notes \transpose c c' {
6271 % Torculus Initio Debilis
6272 \[ \deminutum a \pes b \flexa g \]
6279 \remove "Bar_number_engraver"
6283 \remove "Clef_engraver"
6284 \remove "Key_engraver"
6285 StaffSymbol \set #'transparent = ##t
6286 \remove "Time_signature_engraver"
6287 \remove "Bar_engraver"
6288 minimumVerticalExtent = ##f
6292 \remove Ligature_bracket_engraver
6293 \consists Vaticana_ligature_engraver
6294 NoteHead \set #'style = #'vaticana_punctum
6295 Stem \set #'transparent = ##t
6301 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6302 \include "gregorian-init.ly"
6304 \notes \transpose c c' {
6305 % Torculus Auctus Descendens Initio Debilis
6306 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6313 \remove "Bar_number_engraver"
6317 \remove "Clef_engraver"
6318 \remove "Key_engraver"
6319 StaffSymbol \set #'transparent = ##t
6320 \remove "Time_signature_engraver"
6321 \remove "Bar_engraver"
6322 minimumVerticalExtent = ##f
6326 \remove Ligature_bracket_engraver
6327 \consists Vaticana_ligature_engraver
6328 NoteHead \set #'style = #'vaticana_punctum
6329 Stem \set #'transparent = ##t
6335 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6336 \include "gregorian-init.ly"
6338 \notes \transpose c c' {
6339 % Torculus Deminutus Initio Debilis
6340 \[ \deminutum a \pes b \flexa \deminutum g \]
6347 \remove "Bar_number_engraver"
6351 \remove "Clef_engraver"
6352 \remove "Key_engraver"
6353 StaffSymbol \set #'transparent = ##t
6354 \remove "Time_signature_engraver"
6355 \remove "Bar_engraver"
6356 minimumVerticalExtent = ##f
6360 \remove Ligature_bracket_engraver
6361 \consists Vaticana_ligature_engraver
6362 NoteHead \set #'style = #'vaticana_punctum
6363 Stem \set #'transparent = ##t
6370 @code{12. Porrectus}
6372 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6373 \include "gregorian-init.ly"
6375 \notes \transpose c c' {
6377 \[ a \flexa g \pes b \]
6384 \remove "Bar_number_engraver"
6388 \remove "Clef_engraver"
6389 \remove "Key_engraver"
6390 StaffSymbol \set #'transparent = ##t
6391 \remove "Time_signature_engraver"
6392 \remove "Bar_engraver"
6393 minimumVerticalExtent = ##f
6397 \remove Ligature_bracket_engraver
6398 \consists Vaticana_ligature_engraver
6399 NoteHead \set #'style = #'vaticana_punctum
6400 Stem \set #'transparent = ##t
6406 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6407 \include "gregorian-init.ly"
6409 \notes \transpose c c' {
6410 % Porrectus Auctus Descendens
6411 \[ a \flexa g \pes \auctum \descendens b \]
6418 \remove "Bar_number_engraver"
6422 \remove "Clef_engraver"
6423 \remove "Key_engraver"
6424 StaffSymbol \set #'transparent = ##t
6425 \remove "Time_signature_engraver"
6426 \remove "Bar_engraver"
6427 minimumVerticalExtent = ##f
6431 \remove Ligature_bracket_engraver
6432 \consists Vaticana_ligature_engraver
6433 NoteHead \set #'style = #'vaticana_punctum
6434 Stem \set #'transparent = ##t
6440 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6441 \include "gregorian-init.ly"
6443 \notes \transpose c c' {
6444 % Porrectus Deminutus
6445 \[ a \flexa g \pes \deminutum b \]
6452 \remove "Bar_number_engraver"
6456 \remove "Clef_engraver"
6457 \remove "Key_engraver"
6458 StaffSymbol \set #'transparent = ##t
6459 \remove "Time_signature_engraver"
6460 \remove "Bar_engraver"
6461 minimumVerticalExtent = ##f
6465 \remove Ligature_bracket_engraver
6466 \consists Vaticana_ligature_engraver
6467 NoteHead \set #'style = #'vaticana_punctum
6468 Stem \set #'transparent = ##t
6477 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6478 \include "gregorian-init.ly"
6480 \notes \transpose c c' {
6482 \[ \virga b \inclinatum a \inclinatum g \]
6489 \remove "Bar_number_engraver"
6493 \remove "Clef_engraver"
6494 \remove "Key_engraver"
6495 StaffSymbol \set #'transparent = ##t
6496 \remove "Time_signature_engraver"
6497 \remove "Bar_engraver"
6498 minimumVerticalExtent = ##f
6502 \remove Ligature_bracket_engraver
6503 \consists Vaticana_ligature_engraver
6504 NoteHead \set #'style = #'vaticana_punctum
6505 Stem \set #'transparent = ##t
6511 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6512 \include "gregorian-init.ly"
6514 \notes \transpose c c' {
6516 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6523 \remove "Bar_number_engraver"
6527 \remove "Clef_engraver"
6528 \remove "Key_engraver"
6529 StaffSymbol \set #'transparent = ##t
6530 \remove "Time_signature_engraver"
6531 \remove "Bar_engraver"
6532 minimumVerticalExtent = ##f
6536 \remove Ligature_bracket_engraver
6537 \consists Vaticana_ligature_engraver
6538 NoteHead \set #'style = #'vaticana_punctum
6539 Stem \set #'transparent = ##t
6545 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6546 \include "gregorian-init.ly"
6548 \notes \transpose c c' {
6549 % Climacus Deminutus
6550 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6557 \remove "Bar_number_engraver"
6561 \remove "Clef_engraver"
6562 \remove "Key_engraver"
6563 StaffSymbol \set #'transparent = ##t
6564 \remove "Time_signature_engraver"
6565 \remove "Bar_engraver"
6566 minimumVerticalExtent = ##f
6570 \remove Ligature_bracket_engraver
6571 \consists Vaticana_ligature_engraver
6572 NoteHead \set #'style = #'vaticana_punctum
6573 Stem \set #'transparent = ##t
6580 @code{14. Scandicus}
6582 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6583 \include "gregorian-init.ly"
6585 \notes \transpose c c' {
6587 \[ g \pes a \virga b \]
6594 \remove "Bar_number_engraver"
6598 \remove "Clef_engraver"
6599 \remove "Key_engraver"
6600 StaffSymbol \set #'transparent = ##t
6601 \remove "Time_signature_engraver"
6602 \remove "Bar_engraver"
6603 minimumVerticalExtent = ##f
6607 \remove Ligature_bracket_engraver
6608 \consists Vaticana_ligature_engraver
6609 NoteHead \set #'style = #'vaticana_punctum
6610 Stem \set #'transparent = ##t
6616 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6617 \include "gregorian-init.ly"
6619 \notes \transpose c c' {
6620 % Scandicus Auctus Descendens
6621 \[ g \pes a \pes \auctum \descendens b \]
6628 \remove "Bar_number_engraver"
6632 \remove "Clef_engraver"
6633 \remove "Key_engraver"
6634 StaffSymbol \set #'transparent = ##t
6635 \remove "Time_signature_engraver"
6636 \remove "Bar_engraver"
6637 minimumVerticalExtent = ##f
6641 \remove Ligature_bracket_engraver
6642 \consists Vaticana_ligature_engraver
6643 NoteHead \set #'style = #'vaticana_punctum
6644 Stem \set #'transparent = ##t
6650 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6651 \include "gregorian-init.ly"
6653 \notes \transpose c c' {
6654 % Scandicus Deminutus
6655 \[ g \pes a \pes \deminutum b \]
6662 \remove "Bar_number_engraver"
6666 \remove "Clef_engraver"
6667 \remove "Key_engraver"
6668 StaffSymbol \set #'transparent = ##t
6669 \remove "Time_signature_engraver"
6670 \remove "Bar_engraver"
6671 minimumVerticalExtent = ##f
6675 \remove Ligature_bracket_engraver
6676 \consists Vaticana_ligature_engraver
6677 NoteHead \set #'style = #'vaticana_punctum
6678 Stem \set #'transparent = ##t
6687 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6688 \include "gregorian-init.ly"
6690 \notes \transpose c c' {
6692 \[ g \oriscus a \pes \virga b \]
6699 \remove "Bar_number_engraver"
6703 \remove "Clef_engraver"
6704 \remove "Key_engraver"
6705 StaffSymbol \set #'transparent = ##t
6706 \remove "Time_signature_engraver"
6707 \remove "Bar_engraver"
6708 minimumVerticalExtent = ##f
6712 \remove Ligature_bracket_engraver
6713 \consists Vaticana_ligature_engraver
6714 NoteHead \set #'style = #'vaticana_punctum
6715 Stem \set #'transparent = ##t
6721 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6722 \include "gregorian-init.ly"
6724 \notes \transpose c c' {
6725 % Salicus Auctus Descendens
6726 \[ g \oriscus a \pes \auctum \descendens b \]
6733 \remove "Bar_number_engraver"
6737 \remove "Clef_engraver"
6738 \remove "Key_engraver"
6739 StaffSymbol \set #'transparent = ##t
6740 \remove "Time_signature_engraver"
6741 \remove "Bar_engraver"
6742 minimumVerticalExtent = ##f
6746 \remove Ligature_bracket_engraver
6747 \consists Vaticana_ligature_engraver
6748 NoteHead \set #'style = #'vaticana_punctum
6749 Stem \set #'transparent = ##t
6759 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6760 \include "gregorian-init.ly"
6762 \notes \transpose c c' {
6764 \[ \stropha b \stropha b \stropha a \]
6771 \remove "Bar_number_engraver"
6775 \remove "Clef_engraver"
6776 \remove "Key_engraver"
6777 StaffSymbol \set #'transparent = ##t
6778 \remove "Time_signature_engraver"
6779 \remove "Bar_engraver"
6780 minimumVerticalExtent = ##f
6784 \remove Ligature_bracket_engraver
6785 \consists Vaticana_ligature_engraver
6786 NoteHead \set #'style = #'vaticana_punctum
6787 Stem \set #'transparent = ##t
6799 Unlike most other neumes notation systems, the input language for
6800 neumes does not necessarily reflect directly the typographical
6801 appearance, but is designed to solely focuse on musical meaning. For
6802 example, @code{\[ a \pes b \flexa g \]} produces a Torculus consisting
6803 of three Punctum heads, while @code{\[ a \flexa g \pes b \]} produces
6804 a Porrectus with a curved flexa shape and only a single Punctum head.
6805 There is no command to explicitly typeset the curved flexa shape; the
6806 decision of when to typeset a curved flexa shape is purely taken from
6807 the musical input. The idea of this approach is to separate the
6808 musical aspects of the input from the notation style of the output.
6809 This way, the same input can be reused to typeset the same music in a
6810 different style of Gregorian chant notation such as Hufnagel (also
6811 known as German gothic neumes) or Medicaea (kind of a very simple
6812 forerunner of the Editio Vaticana). As soon as Hufnagel ligature
6813 engraver and Medicaea ligature engraver will have been implemented, it
6814 will be as simple as replacing the ligature engraver in the
6815 @internalsref{Voice} context to get the desired notation style from
6818 The following table shows the code fragments that produce the
6819 ligatures in the above neumes table. The letter in the first column
6820 in each line of the below table indicates to which ligature in the
6821 above table it refers. The second column gives the name of the
6822 ligature. The third column shows the code fragment that produces this
6823 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
6825 @multitable @columnfractions .1 .4 .5
6839 Punctum Inclinatum @tab
6840 @code{\[ \inclinatum b \]}
6844 Punctum Auctum Ascendens @tab
6845 @code{\[ \auctum \ascendens b \]}
6849 Punctum Auctum Descendens @tab
6850 @code{\[ \auctum \descendens b \]}
6854 Punctum Inclinatum Auctum @tab
6855 @code{\[ \inclinatum \auctum b \]}
6859 Punctum Inclinatum Parvum @tab
6860 @code{\[ \inclinatum \deminutum b \]}
6865 @code{\[ \virga b \]}
6870 @code{\[ \stropha b \]}
6875 @code{\[ \stropha \auctum b \]}
6880 @code{\[ \oriscus b \]}
6884 Clivis vel Flexa @tab
6885 @code{\[ b \flexa g \]}
6889 Clivis Aucta Descendens @tab
6890 @code{\[ b \flexa \auctum \descendens g \]}
6894 Clivis Aucta Ascendens @tab
6895 @code{\[ b \flexa \auctum \ascendens g \]}
6900 @code{\[ b \flexa \deminutum g \]}
6904 Podatus vel Pes @tab
6905 @code{\[ g \pes b \]}
6909 Pes Auctus Descendens @tab
6910 @code{\[ g \pes \auctum \descendens b \]}
6914 Pes Auctus Ascendens @tab
6915 @code{\[ g \pes \auctum \ascendens b \]}
6920 @code{\[ g \pes \deminutum b \]}
6925 @code{\[ \oriscus g \pes \virga b \]}
6929 Pes Quassus Auctus Descendens @tab
6930 @code{\[ \oriscus g \pes \auctum \descendens b \]}
6935 @code{\[ \quilisma g \pes b \]}
6939 Quilisma Pes Auctus Descendens @tab
6940 @code{\[ \quilisma g \pes \auctum \descendens b \]}
6944 Pes Initio Debilis @tab
6945 @code{\[ \deminutum g \pes b \]}
6949 Pes Auctus Descendens Initio Debilis @tab
6950 @code{\[ \deminutum g \pes \auctum \descendens b \]}
6955 @code{\[ a \pes b \flexa g \]}
6959 Torculus Auctus Descendens @tab
6960 @code{\[ a \pes b \flexa \auctum \descendens g \]}
6964 Torculus Deminutus @tab
6965 @code{\[ a \pes b \flexa \deminutum g \]}
6969 Torculus Initio Debilis @tab
6970 @code{\[ \deminutum a \pes b \flexa g \]}
6974 Torculus Auctus Descendens Initio Debilis @tab
6975 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
6979 Torculus Deminutus Initio Debilis @tab
6980 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
6985 @code{\[ a \flexa g \pes b \]}
6989 Porrectus Auctus Descendens @tab
6990 @code{\[ a \flexa g \pes \auctum \descendens b \]}
6994 Porrectus Deminutus @tab
6995 @code{\[ a \flexa g \pes \deminutum b \]}
7000 @code{\[ \virga b \inclinatum a \inclinatum g \]}
7004 Climacus Auctus @tab
7005 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
7009 Climacus Deminutus @tab
7010 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
7015 @code{\[ g \pes a \virga b \]}
7019 Scandicus Auctus Descendens @tab
7020 @code{\[ g \pes a \pes \auctum \descendens b \]}
7024 Scandicus Deminutus @tab
7025 @code{\[ g \pes a \pes \deminutum b \]}
7030 @code{\[ g \oriscus a \pes \virga b \]}
7034 Salicus Auctus Descendens @tab
7035 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
7040 @code{\[ \stropha b \stropha b \stropha a \]}
7046 The following head prefixes are supported:
7048 @cindex @code{\virga}
7050 @cindex @code{\stropha}
7052 @cindex @code{\inclinatum}
7054 @cindex @code{\auctum}
7056 @cindex @code{\descendens}
7058 @cindex @code{\ascendens}
7060 @cindex @code{\oriscus}
7062 @cindex @code{\quilisma}
7064 @cindex @code{\deminutum}
7067 Head prefixes can be accumulated, though restrictions apply. For
7068 example, either @code{\descendens} or @code{\ascendens} can be applied
7069 to a head, but not both to the same head.
7072 @cindex @code{\flexa}
7073 Two adjacent heads can be tied together with the @code{\pes} and
7074 @code{\flexa} infix commands for a rising and falling line of melody,
7079 Trigonus: apply equal spacing, regardless of pitch.
7082 @subsection Figured bass
7084 @cindex Basso continuo
7086 @c TODO: musicological blurb about FB
7090 LilyPond has limited support for figured bass:
7092 @lilypond[verbatim,fragment]
7094 \context Voice \notes { \clef bass dis4 c d ais}
7095 \context FiguredBass
7097 < 6 >4 < 7 >8 < 6+ [_!] >
7103 The support for figured bass consists of two parts: there is an input
7104 mode, introduced by @code{\figures}, where you can enter bass figures
7105 as numbers, and there is a context called @internalsref{FiguredBass} that
7106 takes care of making @internalsref{BassFigure} objects.
7108 In figures input mode, a group of bass figures is delimited by
7109 @code{<} and @code{>}. The duration is entered after the @code{>}:
7114 \context FiguredBass
7118 Accidentals are added when you append @code{-}, @code{!} and @code{+}
7125 \context FiguredBass
7126 \figures { <4- 6+ 7!> }
7129 Spaces or dashes may be inserted by using @code{_}. Brackets are
7130 introduced with @code{[} and @code{]}:
7136 \context FiguredBass
7137 \figures { < [4 6] 8 [_! 12]> }
7140 Although the support for figured bass may superficially resemble chord
7141 support, it works much simpler. The @code{\figures} mode simply
7142 stores the numbers , and @internalsref{FiguredBass} context prints
7143 them as entered. There is no conversion to pitches, and no
7144 realizations of the bass are played in the MIDI file.
7146 Internally, the code produces markup texts. You can use any of the
7147 markup text properties to override formatting. For example, the
7148 vertical spacing of the figures may be set with @code{baseline-skip}.
7152 @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
7153 and @internalsref{FiguredBass} context.
7157 Slash notation for alterations is not supported.
7160 @node Vaticana style contexts
7161 @subsection Vaticana style contexts
7163 @cindex VaticanaVoiceContext
7164 @cindex VaticanaStaffContext
7166 The predefined @code{VaticanaVoiceContext} and
7167 @code{VaticanaStaffContext} can be used to easily engrave a piece of
7168 Gregorian Chant in the style of the Editio Vaticana. These contexts
7169 initialize all relevant context properties and grob properties to
7170 proper values. With these contexts, you can immediately go ahead
7171 entering the chant, as the following short excerpt demonstrates:
7173 @lilypond[raggedright,verbatim,noindent]
7174 \include "gregorian-init.ly"
7177 \context VaticanaVoice {
7178 \property Score.BarNumber \set #'transparent = ##t
7180 \[ c'( c' \flexa a \] \[ a \flexa \deminutum g) \] f \divisioMinima
7181 \[ f( \pes a c' c' \pes d') \] c' \divisioMinima \break
7182 \[ c'( c' \flexa a \] \[ a \flexa \deminutum g) \] f \divisioMinima
7185 \context Lyrics \lyrics {
7186 San- ctus, San- ctus, San- ctus
7191 @node Contemporary notation
7192 @section Contemporary notation
7194 In the 20th century, composers have greatly expanded the musical
7195 vocabulary. With this expansion, many innovations in musical notation
7196 have been tried. For a comprehensive overview, refer to @cite{Stone
7197 1980} (see @ref{Literature}). In general, the use of new, innovative
7198 notation makes a piece harder to understand and perform and its use
7199 should therefore be avoided if possible. For this reason, support for
7200 contemporary notation in LilyPond is limited.
7209 @subsection Clusters
7213 In musical terminology, a @emph{cluster} denotes a range of
7214 simultaneously sounding pitches that may change over time. The set of
7215 available pitches to apply usually depends on the accoustic source.
7216 Thus, in piano music, a cluster typically consists of a continous range
7217 of the semitones as provided by the piano's fixed set of a chromatic
7218 scale. In choral music, each singer of the choir typically may sing an
7219 arbitrary pitch within the cluster's range that is not bound to any
7220 diatonic, chromatic or other scale. In electronic music, a cluster
7221 (theoretically) may even cover a continuous range of pitches, thus
7222 resulting in coloured noise, such as pink noise.
7224 Clusters can be denoted in the context of ordinary staff notation by
7225 engraving simple geometrical shapes that replace ordinary notation of
7226 notes. Ordinary notes as musical events specify starting time and
7227 duration of pitches; however, the duration of a note is expressed by the
7228 shape of the note head rather than by the horizontal graphical extent of
7229 the note symbol. In contrast, the shape of a cluster geometrically
7230 describes the development of a range of pitches (vertical extent) over
7231 time (horizontal extent). Still, the geometrical shape of a cluster
7232 covers the area in wich any single pitch contained in the cluster would
7233 be notated as an ordinary note. From this point of view, it is
7234 reasonable to specify a cluster as the envelope of a set of notes.
7238 A cluster is engraved as the envelope of a set of
7239 cluster-notes. Cluster notes are created by applying the function
7240 @code{notes-to-clusters} to a sequence of chords, e.g.
7242 @lilypond[relative 1,verbatim]
7243 \apply #notes-to-clusters { <<c e >> <<b f'>> }
7246 The following example (from
7247 @inputfileref{input/regression,cluster.ly}) shows what the result
7250 @lilypondfile[notexidoc]{cluster.ly}
7252 By default, @internalsref{Cluster_spanner_engraver} is in the
7253 @internalsref{Voice} context. This allows putting ordinary notes and
7254 clusters together in the same staff, even simultaneously. In such a
7255 case no attempt is made to automatically avoid collisions between
7256 ordinary notes and clusters.
7260 @internalsref{ClusterSpanner}, @internalsref{ClusterSpannerBeacon},
7261 @inputfileref{input/regression,cluster.ly},
7262 @internalsref{Cluster_spanner_engraver}, and @internalsref{ClusterNoteEvent}.
7266 Music expressions like @code{< @{ g8 e8 @} a4 >} are not printed
7267 accurately. Use @code{<<g a>>8 <<e a>>8} instead.
7272 @subsection Fermatas
7278 Contemporary music notation frequently uses special fermata symbols to
7279 indicate fermatas of differing lengths.
7283 The following are supported
7285 @lilypond[singleline]
7287 < \addlyrics \notes {
7307 \context Lyrics \lyrics {
7308 "shortfermata" "fermata" "longfermata" "verylongfermata"
7313 See @ref{Articulations} for general instructions how to apply scripts
7314 such as fermatas to a @code{\notes@{@}} block.
7317 @section Tuning output
7319 There are situations where default layout decisions are not
7320 sufficient. In this section we discuss ways to override these
7323 Formatting is internally done by manipulating so called objects
7324 (graphic objects). Each object carries with it a set of properties
7325 (object or layout properties) specific to that object. For example, a
7326 stem object has properties that specify its direction, length and
7329 The most direct way of tuning the output is by altering the values of
7330 these properties. There are two ways of doing that: first, you can
7331 temporarily change the definition of one type of object, thus
7332 affecting a whole set of objects. Second, you can select one specific
7333 object, and set a layout property in that object.
7335 Do not confuse layout properties with translation
7336 properties. Translation properties always use a mixed caps style
7337 naming, and are manipulated using @code{\property}:
7339 \property Context.propertyName = @var{value}
7341 Layout properties are use Scheme style variable naming, i.e. lower
7342 case words separated with dashes. They are symbols, and should always
7343 be quoted using @code{#'}. For example, this could be an imaginary
7344 layout property name:
7346 #'layout-property-name
7351 * Constructing a tweak::
7360 @node Tuning objects
7361 @subsection Tuning objects
7363 @cindex object description
7365 The definition of an object is a list of default object
7366 properties. For example, the definition of the Stem object (available
7367 in @file{scm/define-grobs.scm}), includes the following definitions
7368 for @internalsref{Stem}:
7372 (beamed-lengths . (0.0 2.5 2.0 1.5))
7373 (Y-extent-callback . ,Stem::height)
7378 Adding variables on top of this existing definition overrides the
7379 system default, and alters the resulting appearance of the layout
7385 Changing a variable for only one object is commonly achieved with
7389 \once \property @var{context}.@var{objectname}
7390 \override @var{symbol} = @var{value}
7392 Here @var{symbol} is a Scheme expression of symbol type, @var{context}
7393 and @var{objectname} is a string and @var{value} is a Scheme expression.
7394 This command applies a setting only during one moment in the score.
7396 In the following example, only one @internalsref{Stem} object is
7397 changed from its original setting:
7399 @lilypond[verbatim, fragment, relative=1]
7401 \once \property Voice.Stem \set #'thickness = #4
7405 @cindex @code{\once}
7407 For changing more objects, the same command, without @code{\once} can
7410 \property @var{context}.@var{objectname} \override @var{symbol} = @var{value}
7412 This command adds @code{@var{symbol} = @var{value}} to the definition
7413 of @var{objectname} in the context @var{context}, and this definition
7414 stays in place until it is removed.
7416 An existing definition may be removed by the following command:
7419 \property @var{context}.@var{objectname} \revert @var{symbol}
7422 All @code{\override} and @code{\revert} commands should be balanced.
7423 The @code{\set} shorthand performs a revert followed by an override,
7424 and is often more convenient to use
7427 \property @var{context}.@var{objectname} \set @var{symbol} = @var{value}
7431 @lilypond[verbatim,quote]
7432 c'4 \property Voice.Stem \override #'thickness = #4.0
7434 c'4 \property Voice.Stem \revert #'thickness
7438 The following example gives exactly the same result as the previous
7439 one (assuming the system default for stem thickness is 1.3):
7441 @lilypond[verbatim,quote]
7442 c'4 \property Voice.Stem \set #'thickness = #4.0
7444 c'4 \property Voice.Stem \set #'thickness = #1.3
7448 Reverting a setting which was not set in the first place has no
7449 effect. However, if the setting was set as a system default, this may
7450 remove the default value, and this may give surprising results,
7451 including crashes. In other words, @code{\override} and
7452 @code{\revert} must be carefully balanced. The following are examples
7453 of correct nesting of @code{\override}, @code{\set}, @code{\revert}:
7457 a clumsy but correct form:
7459 \override \revert \override \revert \override \revert
7463 shorter version of the same:
7465 \override \set \set \revert
7469 a short form, using only @code{\set}. This requires you to know the
7472 \set \set \set \set @var{to default value}
7476 if there is no default (i.e. by default, the object property is unset),
7479 \set \set \set \revert
7483 For the digirati, the object description is an Scheme association
7484 list. Since a Scheme list is a singly linked list, we can treat it as
7485 a stack, and @code{\override} and @code{\revert} are push and pop
7486 operations. The association list is stored in a normal context
7489 \property Voice.NoteHead = #'()
7491 will effectively erase @internalsref{NoteHead}s from the current
7492 @internalsref{Voice}. However, this mechanism is not guaranteed to
7493 work, and may cause crashes or other anomalous behavior.
7497 @internalsref{OverrideProperty}, @internalsref{RevertProperty},
7498 @internalsref{PropertySet}, @internalsref{All-backend-properties}, and
7499 @internalsref{All-layout-objects}.
7504 The backend is not very strict in type-checking object properties.
7505 Cyclic references in @var{value} cause hangs and/or crashes.
7506 Similarly, reverting properties that are system defaults may also lead
7509 @node Constructing a tweak
7510 @subsection Constructing a tweak
7513 @cindex internal documentation
7514 @cindex finding graphical objects
7515 @cindex graphical object descriptions
7517 @cindex @code{\override}
7519 @cindex internal documentation
7523 Three pieces of information are required to use @code{\override} and
7524 @code{\set}: the name of the layout object, the context and the name
7525 of the property. We demonstrate how to glean this information from
7526 the notation manual and the generated documentation.
7528 The generated documentation is a set of HTML pages which should be
7529 included if you installed a binary distribution, typically in
7530 @file{/usr/share/doc/lilypond}. They are also available on the web:
7531 go to the @uref{http://lilypond.org,LilyPond website}, click
7532 ``Documentation'', and then ``Program reference'' on the side bar. It
7533 is advisable to bookmark either the local HTML files if possible. They
7534 will load faster than the ones on the web. If you use the version
7535 from the web, you must check whether the documentation matches the
7536 program version: the documentation is generated from the definitions
7537 that the program uses, and therefore it is strongly tied to the
7541 @c [TODO: revise for new site.]
7543 Suppose we want to move the fingering indication in the fragment below:
7545 @lilypond[relative=2,verbatim]
7551 If you visit the documentation of @code{Fingering} (in @ref{Fingering
7552 instructions}), you will notice that there is written:
7557 @internalsref{FingerEvent} and @internalsref{Fingering}.
7561 In other words, the fingerings once entered, are internally stored as
7562 @code{FingerEvent} music objects. When printed, a @code{Fingering}
7563 layout object is created for every @code{FingerEvent}.
7565 The Fingering object has a number of different functions, and each of
7566 those is captured in an interface, when we look up
7567 @internalsref{Fingering} in the generated documentation.
7571 The @code{Fingering} object has a fixed size
7572 (@internalsref{item-interface}), the symbol is a piece of text
7573 (@internalsref{text-interface}), whose font can be set
7574 (@internalsref{font-interface}). It is centered horizontally
7575 (@internalsref{self-alignment-interface}), it is placed next to other
7576 objects (@internalsref{side-position-interface}) vertically, and its
7577 placement is coordinated with other scripts
7578 (@internalsref{text-script-interface}). It also has the standard
7579 @internalsref{grob-interface} (grob stands for Graphical object)
7581 @cindex graphical object
7582 @cindex layout object
7583 @cindex object, layout
7584 with all the variables that come with
7585 it. Finally, it denotes a fingering instruction, so it has
7586 @internalsref{finger-interface}.
7588 For the vertical placement, we have to look under
7589 @code{side-position-interface}:
7591 @code{side-position-interface}
7593 Position a victim object (this one) next to other objects (the
7594 support). In this case, the direction signifies where to put the
7595 victim object relative to the support (left or right, up or down?)
7600 below this description, the variable @code{padding} is described as
7604 (dimension, in staff space)
7606 add this much extra space between objects that are next to each
7607 other. Default value: @code{0.6}
7611 By increasing the value of @code{padding}, we can move away the
7612 fingering. The following command inserts 3 staff spaces of white
7613 between the note and the fingering:
7615 \once \property Voice.Fingering \set #'padding = #3
7618 Inserting this command before the Fingering object is created,
7619 i.e. before @code{c2}, yields the following result:
7621 @lilypond[relative=2,fragment,verbatim]
7622 \once \property Voice.Fingering
7629 The context name @code{Voice} in the example above can be determined
7630 as follows. In the documentation for @internalsref{Fingering}, it says
7632 Fingering grobs are created by: @internalsref{Fingering_engraver}
7635 Clicking @code{Fingering_engraver} shows the documentation of
7636 the module responsible for interpreting the fingering instructions and
7637 translating them to a @code{Fingering} object. Such a module is called
7638 an @emph{engraver}. The documentation of the @code{Fingering_engraver}
7641 Fingering_engraver is part of contexts: Voice
7643 so tuning the settings for Fingering should be done with
7645 \property Voice.Fingering \set @dots{}
7648 Of course, the tweak may also done in a larger context than
7649 @code{Voice}, for example, @internalsref{Staff} or
7650 @internalsref{Score}.
7652 The internals document also contains alphabetical lists of
7653 @internalsref{Contexts}, @internalsref{All-layout-objects} and
7654 @internalsref{Music-expressions}, so you can also find which objects to
7655 tweak by browsing the internals document.
7659 @subsection Applyoutput
7661 The most versatile way of tuning an object is @code{\applyoutput}. Its
7664 \applyoutput @var{proc}
7668 where @var{proc} is a Scheme function, taking four arguments.
7670 When interpreted, the function @var{proc} is called for every layout object found
7671 in the context, with the following arguments:
7673 @item the layout object itself,
7674 @item the context where the layout object was created, and
7675 @item the context where @code{\applyoutput} is processed.
7678 In addition, the cause of the layout object, i.e. the music
7679 expression or object that was responsible for creating it, is in the
7680 object property @code{cause}. For example, for a note head, this is a
7681 @internalsref{NoteHead} event, and for a @internalsref{Stem} object,
7682 this is a @internalsref{NoteHead} object.
7685 @node Outputproperty
7686 @subsection Outputproperty
7688 @cindex @code{\outputproperty}
7690 Another way of tuning objects is the more arcane @code{\outputproperty}
7691 feature. The syntax is as follows:
7693 \outputproperty @var{predicate} @var{symbol} = @var{value}
7695 Here @code{predicate} is a Scheme function taking an object argument, and
7696 returning a boolean. This statement is processed by the
7697 @code{Output_property_engraver}. It instructs the engraver to feed all
7698 objects that it sees to @var{predicate}. Whenever the predicate returns
7699 true, the object property @var{symbol} will be set to @var{value}.
7701 You will need to combine this statement with @code{\context} to select
7702 the appropriate context to apply this to.
7703 @inputfileref{input/regression,output-property.ly} shows an example of
7704 the use of @code{\outputproperty}.
7708 This command is slated for removal. Please use the
7709 @code{\applyoutput} command, see @ref{Applyoutput}.
7712 @node Font selection
7713 @subsection Font selection
7715 The most common thing to change about the appearance of fonts is their
7716 size. The font size of any context can be easily changed by setting
7717 the @code{fontSize} property for that context. Its value is an
7718 integer: negative numbers make the font smaller, positive numbers
7719 larger. An example is given below:
7721 @lilypond[fragment,relative=1,verbatim,quote]
7722 c4 c4 \property Voice.fontSize = #-1
7725 This command will set @code{font-relative-size} (see below), and does
7726 not change the size of variable symbols, such as beams or slurs.
7729 One of the uses of @code{fontSize} is to get smaller symbol for cue
7730 notes. An elaborate example of those is in
7731 @inputfileref{input/test,cue-notes.ly}.
7733 @cindex magnification
7735 The size of the font may be scaled with the object property
7736 @code{font-magnification}. For example, @code{2.0} blows up all
7737 letters by a factor 2 in both directions.
7746 The font used for printing a object can be selected by setting
7747 @code{font-name}, e.g.
7749 \property Staff.TimeSignature
7750 \set #'font-name = #"cmr17"
7754 Any font can be used, as long as it is available to @TeX{}. Possible
7755 fonts include foreign fonts or fonts that do not belong to the
7756 Computer Modern font family.
7758 Font selection for the standard fonts, @TeX{}'s Computer Modern fonts,
7759 can also be adjusted with a more fine-grained mechanism. By setting
7760 the object properties described below, you can select a different font;
7761 all three mechanisms work for every object that supports
7762 @code{font-interface}:
7766 is a symbol indicating the general class of the typeface. Supported are
7767 @code{roman} (Computer Modern), @code{braces} (for piano staff
7768 braces), @code{music} (the standard music font, including ancient
7769 glyphs), @code{dynamic} (for dynamic signs) and @code{typewriter}.
7772 is a symbol indicating the shape of the font, there are typically several
7773 font shapes available for each font family. Choices are @code{italic},
7774 @code{caps} and @code{upright}.
7777 is a symbol indicating the series of the font. There are typically several
7778 font series for each font family and shape. Choices are @code{medium}
7781 @item font-relative-size
7782 is a number indicating the size relative the standard size. For example,
7783 with 20pt staff height, relative size -1 corresponds to 16pt staff
7784 height, and relative size +1 corresponds to 23 pt staff height.
7786 There are small differences in design between fonts designed for
7787 different sizes, hence @code{font-relative-size} is preferred over
7788 @code{font-magnification} for changing font sizes.
7791 @item font-design-size
7792 is a number indicating the design size of the font.
7794 This is a feature of the Computer Modern Font: each point size has a
7795 slightly different design. Smaller design sizes are relatively wider,
7796 which enhances readability.
7799 For any of these properties, the value @code{*} (i.e. the symbol
7800 @code{*}, entered as @code{#'*}), acts as a wildcard. This can be used
7801 to override default setting, which are always present. For example:
7803 \property Lyrics . LyricText \override #'font-series = #'bold
7804 \property Lyrics . LyricText \override #'font-family = #'typewriter
7805 \property Lyrics . LyricText \override #'font-shape = #'*
7808 @cindex @code{font-style}
7812 The following commands set @code{fontSize} for the current voice.
7814 @cindex @code{\tiny}
7816 @cindex @code{\small}
7818 @cindex @code{\normalsize}
7823 Relative size is not linked to any real size.
7825 There is no style sheet provided for other fonts besides the @TeX{}
7826 family, and the style sheet cannot be modified easily.
7828 @cindex font selection
7829 @cindex font magnification
7830 @cindex @code{font-interface}
7834 @subsection Text markup
7839 @cindex typeset text
7841 LilyPond has an internal mechanism to typeset texts. You can access it
7842 with the keyword @code{\markup}. Within markup mode, you can enter texts
7843 similar to lyrics: simply enter them, surrounded by spaces:
7846 @lilypond[verbatim,fragment,relative=1]
7847 c1^\markup { hello }
7848 c1_\markup { hi there }
7849 c1^\markup { hi \bold there, is \italic anyone home? }
7852 @cindex font switching
7854 The markup in the example demonstrates font switching commands. The
7855 command @code{\bold} and @code{\italic} only apply to the first
7856 following word; enclose a set of texts with braces to apply a command
7859 \markup @{ \bold @{ hi there @} @}
7863 For clarity, you can also do this for single arguments, e.g.
7865 \markup @{ is \italic @{ anyone @} home @}
7868 @cindex font size, texts
7870 The following size commands set absolute sizes:
7872 @cindex @code{\teeny}
7873 @cindex @code{\tiny}
7874 @cindex @code{\small}
7875 @cindex @code{\large}
7876 @cindex @code{\huge}
7886 You can also make letter larger or smaller relative to their neighbors,
7887 with the commands @code{\larger} and @code{\smaller}.
7891 @cindex font style, for texts
7892 @cindex @code{\bold}
7893 @cindex @code{\dynamic}
7894 @cindex @code{\number}
7895 @cindex @code{\italic}
7897 The following font change commands are defined:
7900 changes to the font used in dynamic signs. This font does not
7901 contain all characters of the alphabet, so when producing ``piu f'',
7902 the ``piu'' should be done in a different font.
7906 changes to the font used in time signatures. It only contains
7907 numbers and a few punctuation marks.
7909 changes @code{font-shape} to @code{italic}.
7911 changes @code{font-series} to @code{bold}.
7914 @cindex raising text
7915 @cindex lowering text
7917 @cindex translating text
7920 @cindex @code{\super}
7922 Raising and lowering texts can be done with @code{\super} and
7925 @lilypond[verbatim,fragment,relative=1]
7926 c1^\markup { E "=" mc \super "2" }
7929 @cindex @code{\raise}
7931 If you want to give an explicit amount for lowering or raising, use
7932 @code{\raise}. This command takes a Scheme valued first argument, and
7933 a markup object as second argument:
7935 @lilypond[verbatim,fragment,relative=1,quote]
7936 c1^\markup { C \small \raise #1.0 \bold { "9/7+" }}
7938 The argument to @code{\raise} is the vertical displacement amount,
7939 measured in (global) staff spaces. @code{\raise} and @code{\super}
7940 raise objects in relation to their surrounding markups. They cannot be
7941 used to move a single text up or down, when it is above or below a
7942 note, since the mechanism that positions it next to the note cancels
7943 any vertical shift. For vertical positioning, use the @code{padding}
7944 and/or @code{extra-offset} properties.
7946 Other commands taking single arguments include
7949 @item \bracket, \hbracket
7950 Bracket the argument markup with normal and horizontal brackets
7954 @cindex @code{\musicglyph}
7955 This is converted to a musical symbol, e.g. @code{\musicglyph
7956 #"accidentals-0"} will select the natural sign from the music font.
7957 See @ref{The Feta font} for a complete listing of the possible glyphs.
7959 This produces a single character, e.g. @code{\char #65} produces the
7962 @item \note @var{log} @var{dots} @var{dir}
7963 @cindex @code{\note}
7965 This produces a note with a stem pointing in @var{dir} direction, with
7966 duration log @var{log} and @var{dots} augmentation dots. The duration
7967 log is the negative 2-logarithm of the duration denominator. For
7968 example, a quarter note has log 2, an eighth note 3 and a breve has
7971 @item \hspace #@var{amount}
7972 @cindex @code{\hspace}
7973 This produces a invisible object taking horizontal space.
7975 \markup @{ A \hspace #2.0 B @}
7977 will put extra space between A and B, on top of the space that is
7978 normally inserted before elements on a line.
7980 @item \fontsize #@var{size}
7981 @cindex @code{\fontsize}
7982 This sets the relative font size, eg.
7984 A \fontsize #2 @{ B C @} D
7988 This will enlarge the B and the C by two steps.
7989 @item \translate #(cons @var{x} @var{y})
7991 This translates an object. Its first argument is a cons of numbers
7993 A \translate #(cons 2 -3) @{ B C @} D
7995 This moves `B C' 2 spaces to the right, and 3 down.
7997 @item \magnify #@var{mag}
7998 @cindex @code{\magnify}
7999 This sets the font magnification for the its argument. In the following
8000 example, the middle A will be 10% larger:
8002 A \magnify #1.1 @{ A @} A
8006 @item \override #(@var{key} . @var{value})
8007 @cindex @code{\override}
8008 This overrides a formatting property for its argument. The argument
8009 should be a key/value pair, e.g.
8011 m \override #'(font-family . math) m m
8015 In markup mode you can compose expressions, similar to mathematical
8016 expressions, XML documents and music expressions. The braces group
8017 notes into horizontal lines. Other types of lists also exist: you can
8018 stack expressions grouped with @code{<<}, and @code{>>} vertically with
8019 the command @code{\column}. Similarly, @code{\center} aligns texts by
8022 @lilypond[verbatim,fragment,relative=1]
8023 c1^\markup { \column << a bbbb c >> }
8024 c1^\markup { \center << a bbbb c >> }
8025 c1^\markup { \line << a b c >> }
8028 The markup mechanism is extensible. Refer to
8029 @file{scm/new-markup.scm} for more information.
8035 @internalsref{Markup-functions}, and @file{scm/new-markup.scm}.
8042 Text layout is ultimately done by @TeX{}, which does kerning of
8043 letters. LilyPond does not account for kerning, so texts will be
8044 spaced slightly too wide.
8046 Syntax errors for markup mode are confusing.
8048 Markup texts cannot be used in the titling of the @code{\header}
8049 field. Titles are made by La@TeX{}, so La@TeX{} commands should be used
8056 @section Global layout
8058 The global layout determined by three factors: the page layout, the
8059 line breaks and the spacing. These all influence each other. The
8060 choice of spacing determines how densely each system of music is set,
8061 which influences where line breaks breaks are chosen, and thus
8062 ultimately how many pages a piece of music takes. In this section, the
8063 algorithm for spacing music is explained, and how spacing can be
8066 Globally spoken, this procedure happens in three steps: first,
8067 flexible distances (``springs'') are chosen, based on durations. All
8068 possible line breaking combination are tried, and the one with the
8069 best results---a layout that has uniform density and requires as
8070 little stretching or cramping as possible---is chosen. When the score
8071 is processed by @TeX{}, each page is filled with systems, and page breaks
8072 are chosen whenever the page gets full.
8077 * Vertical spacing::
8078 * Horizontal spacing::
8085 @node Vertical spacing
8086 @subsection Vertical spacing
8088 @cindex vertical spacing
8089 @cindex distance between staves
8090 @cindex staff distance
8091 @cindex between staves, distance
8092 @cindex staffs per page
8093 @cindex space between staves
8095 The height of each system is determined automatically by LilyPond, to
8096 keep systems from bumping into each other, some minimum distances are
8097 set. By changing these, you can put staves closer together, and thus
8098 put more systems onto one page.
8100 Normally staves are stacked vertically. To make
8101 staves maintain a distance, their vertical size is padded. This is
8102 done with the property @code{minimumVerticalExtent}. It takes a pair
8103 of numbers, so if you want to make it smaller from its, then you could
8106 \property Staff.minimumVerticalExtent = #'(-4 . 4)
8108 This sets the vertical size of the current staff to 4 staff-space on
8109 either side of the center staff line. The argument of
8110 @code{minimumVerticalExtent} is interpreted as an interval, where the
8111 center line is the 0, so the first number is generally negative. The
8112 staff can be made larger at the bottom by setting it to @code{(-6
8115 The piano staves are handled a little differently: to make cross-staff
8116 beaming work correctly, it is necessary that the distance between staves
8117 is fixed beforehand. This is also done with a
8118 @internalsref{VerticalAlignment} object, created in
8119 @internalsref{PianoStaff}. In this object the distance between the
8120 staves is fixed by setting @code{forced-distance}. If you want to
8121 override this, use a @code{\translator} block as follows:
8125 VerticalAlignment \override #'forced-distance = #9
8128 This would bring the staves together at a distance of 9 staff spaces,
8129 measured from the center line of each staff.
8133 Vertical alignment of staves is handled by the
8134 @internalsref{VerticalAlignment} object.
8138 @node Horizontal spacing
8139 @subsection Horizontal Spacing
8141 The spacing engine translates differences in durations into
8142 stretchable distances (``springs'') of differing lengths. Longer
8143 durations get more space, shorter durations get less. The shortest
8144 durations get a fixed amount of space (which is controlled by
8145 @code{shortest-duration-space} in the @internalsref{SpacingSpanner} object).
8146 /The longer the duration, the more space it gets: doubling a
8147 duration adds a fixed amount (this amount is controlled by
8148 @code{spacing-increment}) of space to the note.
8150 For example, the following piece contains lots of half, quarter and
8151 8th notes, the eighth note is followed by 1 note head width (NHW).
8152 The quarter note is followed by 2 NHW, the half by 3 NHW, etc.
8153 @lilypond[fragment, verbatim, relative=1] c2 c4. c8 c4. c8 c4. c8 c8
8157 Normally, @code{shortest-duration-space} is set to 1.2, which is the
8158 width of a note head, and @code{shortest-duration-space} is set to
8159 2.0, meaning that the shortest note gets 2 NHW (2 times
8160 @code{shortest-duration-space}) of space. For normal notes, this space
8161 is always counted from the left edge of the symbol, so the shortest
8162 notes are generally followed by one NHW of space.
8164 If one would follow the above procedure exactly, then adding a single
8165 32th note to a score that uses 8th and 16th notes, would widen up the
8166 entire score a lot. The shortest note is no longer a 16th, but a 32nd,
8167 thus adding 2 noteheads of space to every note. To prevent this, the
8168 shortest duration for spacing is not the shortest note in the score,
8169 but the most commonly found shortest note. Notes that are even
8170 shorter this are followed by a space that is proportonial to their
8171 duration relative to the common shortest note. So if we were to add
8172 only a few 16th notes to the example above, they would be followed by
8175 @lilypond[fragment, verbatim, relative=2]
8176 c2 c4. c8 c4. c16[ c] c4. c8 c8 c8 c4 c4 c4
8179 The most common shortest duration is determined as follows: in every
8180 measure, the shortest duration is determined. The most common short
8181 duration, is taken as the basis for the spacing, with the stipulation
8182 that this shortest duration should always be equal to or shorter than
8183 1/8th note. The shortest duration is printed when you run lilypond
8184 with @code{--verbose}. These durations may also be customized. If you
8185 set the @code{common-shortest-duration} in
8186 @internalsref{SpacingSpanner}, then this sets the base duration for
8187 spacing. The maximum duration for this base (normally 1/8th), is set
8188 through @code{base-shortest-duration}.
8190 @cindex @code{common-shortest-duration}
8191 @cindex @code{base-shortest-duration}
8192 @cindex @code{stem-spacing-correction}
8193 @cindex @code{spacing}
8195 In the introduction it was explained that stem directions influence
8196 spacing. This is controlled with @code{stem-spacing-correction}
8197 property in @internalsref{NoteSpacing}, which are generated for every
8198 @internalsref{Voice} context. The @code{StaffSpacing} object
8199 (generated at @internalsref{Staff} context) contains the same property
8200 for controlling the stem/barline spacing. The following example
8201 shows these corrections, once with default settings, and once with
8202 exaggerated corrections:
8208 \property Staff.NoteSpacing \override #'stem-spacing-correction
8210 \property Staff.StaffSpacing \override #'stem-spacing-correction
8215 \paper { raggedright = ##t } }
8218 @cindex SpacingSpanner, overriding properties
8220 Properties of the @internalsref{SpacingSpanner} must be overridden
8221 from the @code{\paper} block, since the @internalsref{SpacingSpanner} is
8222 created before any @code{\property} statements are interpreted.
8224 \paper @{ \translator @{
8226 SpacingSpanner \override #'spacing-increment = #3.0
8233 @internalsref{SpacingSpanner}, @internalsref{NoteSpacing},
8234 @internalsref{StaffSpacing}, @internalsref{SeparationItem}, and
8235 @internalsref{SeparatingGroupSpanner}.
8239 Spacing is determined on a score wide basis. If you have a score that
8240 changes its character (measured in durations) halfway during the
8241 score, the part containing the longer durations will be spaced too
8244 There is no convenient mechanism to manually override spacing.
8249 @subsection Font size
8250 @cindex font size, setting
8251 @cindex staff size, setting
8252 @cindex @code{paper} file
8254 The Feta font provides musical symbols at seven different sizes.
8255 These fonts are 11 point, 13 point, 16 point, 20 point, 23 point, and
8256 26 point. The point size of a font is the height of the corresponding
8257 staff (excluding line thicknesses).
8259 Definitions for these sizes are the files @file{paperSZ.ly}, where
8260 @code{SZ} is one of 11, 13, 16, 20, 23 and 26. If you include any
8261 of these files, the variables @code{paperEleven},
8262 @code{paperThirteen}, @code{paperSixteen},
8263 @code{paperTwenty}, @code{paperTwentythree}, and @code{paperTwentysix}
8264 are defined respectively. The default @code{\paper} block is also
8265 set. These files should be imported at toplevel, i.e.
8267 \include "paper26.ly"
8271 The default font size settings for each staff heights are generated
8272 from the 20pt style sheet. For more details, see the file
8273 @file{scm/font.scm}.
8277 @subsection Line breaking
8280 @cindex breaking lines
8282 Line breaks are normally computed automatically. They are chosen such
8283 that lines look neither cramped nor loose, and that consecutive lines
8284 have similar density.
8286 Occasionally you might want to override the automatic breaks; you can
8287 do this by specifying @code{\break}. This will force a line break at
8288 this point. Line breaks can only occur at places where there are bar
8289 lines. If you want to have a line break where there is no bar line,
8290 you can force an invisible bar line by entering @code{\bar
8291 ""}. Similarly, @code{\noBreak} forbids a line break at a
8295 @cindex regular line breaks
8296 @cindex four bar music.
8298 For linebreaks at regular intervals use @code{\break} separated by
8299 skips and repeated with @code{\repeat}:
8301 < \repeat unfold 7 @{ s1 * 4 \break @}
8302 @emph{the real music}
8307 This makes the following 28 measures (assuming 4/4 time) be broken every
8312 @internalsref{BreakEvent}.
8316 @subsection Page layout
8319 @cindex breaking pages
8321 @cindex @code{indent}
8322 @cindex @code{linewidth}
8324 The most basic settings influencing the spacing are @code{indent} and
8325 @code{linewidth}. They are set in the @code{\paper} block. They
8326 control the indentation of the first line of music, and the lengths of
8329 If @code{raggedright} is set to true in the @code{\paper}
8330 block, then the lines are justified at their natural length. This
8331 useful for short fragments, and for checking how tight the natural
8335 @cindex vertical spacing
8337 The page layout process happens outside the LilyPond formatting
8338 engine: variables controlling page layout are passed to the output,
8339 and are further interpreted by @code{lilypond} wrapper program. It
8340 responds to the following variables in the @code{\paper} block. The
8341 variable @code{textheight} sets the total height of the music on each
8342 page. The spacing between systems is controlled with
8343 @code{interscoreline}, its default is 16pt. The distance between the
8344 score lines will stretch in order to fill the full page
8345 @code{interscorelinefill} is set to a positive number. In that case
8346 @code{interscoreline} specifies the minimum spacing.
8348 @cindex @code{textheight}
8349 @cindex @code{interscoreline}
8350 @cindex @code{interscorelinefill}
8352 If the variable @code{lastpagefill} is defined,
8353 @c fixme: this should only be done if lastpagefill == #t
8354 systems are evenly distributed vertically on the last page. This
8355 might produce ugly results in case there are not enough systems on the
8356 last page. The @command{lilypond-book} command ignores
8357 @code{lastpagefill}. See @ref{lilypond-book manual} for more
8360 @cindex @code{lastpagefill}
8362 Page breaks are normally computed by @TeX{}, so they are not under
8363 direct control of LilyPond. However, you can insert a commands into
8364 the @file{.tex} output to instruct @TeX{} where to break pages. This
8365 is done by setting the @code{between-systems-strings} on the
8366 @internalsref{NonMusicalPaperColumn} where the system is broken.
8367 An example is shown in @inputfileref{input/regression,between-systems.ly}.
8368 The predefined command @code{\newpage} also does this.
8372 @cindex @code{papersize}
8374 To change the paper size, you must first set the @code{papersize} paper
8375 variable variable as in the example below. Set it to
8376 the strings @code{a4}, @code{letter}, or @code{legal}. After this
8377 specification, you must set the font as described above. If you want
8378 the default font, then use the 20 point font.
8381 \paper@{ papersize = "a4" @}
8382 \include "paper16.ly"
8385 The file @code{paper16.ly} will now include a file named @file{a4.ly}, which
8386 will set the paper variables @code{hsize} and @code{vsize} (used by
8387 @code{lilypond-book} and @code{lilypond}).
8392 @cindex @code{\newpage}
8398 @ref{Invoking lilypond},
8399 @inputfileref{input/regression,between-systems.ly}, and
8400 @internalsref{NonMusicalPaperColumn}.
8404 LilyPond has no concept of page layout, which makes it difficult to
8405 reliably choose page breaks in longer pieces.
8414 Entered music can also be converted to MIDI output. The performance
8415 is good enough for proof-hearing the music for errors.
8417 Ties, dynamics and tempo changes are interpreted. Dynamic marks,
8418 crescendi and decrescendi translate into MIDI volume levels. Dynamic
8419 marks translate to a fixed fraction of the available MIDI volume
8420 range, crescendi and decrescendi make the volume vary linearly between
8421 their two extremities. The fractions can be adjusted by
8422 @code{dynamicAbsoluteVolumeFunction} in @internalsref{Voice} context.
8423 For each type of MIDI instrument, a volume range can be defined. This
8424 gives a basic equalizer control, which can enhance the quality of
8425 the MIDI output remarkably. The equalizer can be controlled by
8426 setting @code{instrumentEqualizer}.
8430 Many musically interesting effects, such as swing, articulation,
8431 slurring, etc., are not translated to MIDI.
8436 * MIDI instrument names::
8441 @subsection MIDI block
8445 The MIDI block is analogous to the paper block, but it is somewhat
8446 simpler. The @code{\midi} block can contain:
8450 @item a @code{\tempo} definition, and
8451 @item context definitions.
8454 Assignments in the @code{\midi} block are not allowed.
8456 A number followed by a period is interpreted as a real number, so
8457 for setting the tempo for dotted notes, an extra space should be
8458 inserted, for example:
8461 \midi @{ \tempo 4 . = 120 @}
8465 @cindex context definition
8467 Context definitions follow precisely the same syntax as within the
8468 \paper block. Translation modules for sound are called performers.
8469 The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
8472 @node MIDI instrument names
8473 @subsection MIDI instrument names
8475 @cindex instrument names
8476 @cindex @code{Staff.midiInstrument}
8477 @cindex @code{Staff.instrument}
8479 The MIDI instrument name is set by the @code{Staff.midiInstrument}
8480 property or, if that property is not set, the @code{Staff.instrument}
8481 property. The instrument name should be chosen from the list in
8482 @ref{MIDI instruments}.
8486 If the selected string does not exactly match, then LilyPond uses the
8487 default (Grand Piano). It is not possible to select an instrument by