Fixes Issue 1504, allowing feather beam line breaking.
[lilypond/patrick.git] / Documentation / notation / vocal.itely
blobb337d262054ac2ef75c0337a23c0bf166b57de55
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @ignore
3     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5     When revising a translation, copy the HEAD committish of the
6     version that you are working on.  For details, see the Contributors'
7     Guide, node Updating translation committishes..
8 @end ignore
10 @c \version "2.13.36"
12 @node Vocal music
13 @section Vocal music
15 @lilypondfile[quote]{vocal-headword.ly}
17 This section explains how to typeset vocal music, and make sure
18 that the lyrics will be aligned with the notes of their melody.
20 @menu
21 * Common notation for vocal music::
22 * Techniques specific to lyrics::
23 * Stanzas::
24 * Songs::
25 * Choral::
26 * Opera and stage musicals::
27 * Chants psalms and hymns::
28 * Ancient vocal music::
30 @end menu
33 @node Common notation for vocal music
34 @subsection Common notation for vocal music
36 This section discusses issues common to most types of vocal music.
38 @menu
39 * References for vocal music::
40 * Entering lyrics::
41 * Aligning lyrics to a melody::
42 * Automatic syllable durations::
43 * Manual syllable durations::
44 * Multiple syllables to one note::
45 * Multiple notes to one syllable::
46 * Extenders and hyphens::
47 @end menu
50 @node References for vocal music
51 @unnumberedsubsubsec References for vocal music
53 This section indicates where to find details of notation issues
54 that may arise in any type of vocal music.
56 @itemize
58 @item
59 Most styles of vocal music use written text as lyrics.  An
60 introduction to this notation is to be found in
61 @rlearning{Setting simple songs}.
63 @item
64 Vocal music is likely to require the use of @code{markup} mode,
65 either for lyrics or for other text elements (characters' names,
66 etc.)  This syntax is described in @ref{Text markup introduction}.
68 @item
69 @notation{Ambitus} may be added at the beginning of vocal staves,
70 as explained in @ref{Ambitus}.
72 @item
73 Dynamic markings by default are placed below the staff, but in
74 choral music they are usually placed above the staff in order to
75 avoid the lyrics, as explained in @ref{Score layouts for choral}.
77 @end itemize
79 @seealso
80 Music Glossary:
81 @rglos{ambitus}.
83 Learning Manual:
84 @rlearning{Setting simple songs}.
86 Notation Reference:
87 @ref{Text markup introduction},
88 @ref{Ambitus},
89 @ref{Score layouts for choral}.
91 Snippets:
92 @rlsr{Vocal music}.
94 @node Entering lyrics
95 @unnumberedsubsubsec Entering lyrics
97 @cindex lyrics, entering
98 @cindex entering lyrics
99 @cindex formatting in lyrics
100 @cindex lyrics, formatting
101 @cindex punctuation in lyrics
102 @cindex lyrics punctuation
103 @cindex spaces in lyrics
104 @cindex quotes in lyrics
105 @funindex \lyricmode
107 @c TODO should we explain hyphens here
109 Lyrics are entered in a special input mode, which can be introduced
110 by the keyword @code{\lyricmode}, or by using @code{\addlyrics} or
111 @code{\lyricsto}.  In this special input mode, the input @code{d}
112 is not parsed as the pitch @notation{D}, but rather as a one-letter
113 syllable of text.  In other words, syllables are entered like notes
114 but with pitches replaced by text.
116 For example:
118 @example
119 \lyricmode @{ Three4 blind mice,2 three4 blind mice2 @}
120 @end example
122 There are two main methods for specifying the horizontal placement
123 of the syllables, either by specifying the duration of each syllable
124 explicitly, as in the example above, or by leaving the lyrics to be
125 aligned automatically to a melody or other voice of music, using
126 @code{\addlyrics} or @code{\lyricsto}.  The former method is
127 described below in @ref{Manual syllable durations}.  The latter
128 method is described in @ref{Automatic syllable durations}.
130 A word or syllable of lyrics begins with an alphabetic character
131 (plus some other characters, see below) and is terminated by any
132 white space or a digit.  Later characters in the syllable can be any
133 character that is not a digit or white space.
135 Because any character that is not a digit or white space is regarded
136 as part of the syllable, a word is valid even if it ends with
137 @code{@}}, which often leads to the following mistake:
139 @example
140 \lyricmode @{ lah lah lah@}
141 @end example
143 In this example, the @code{@}} is included in the final syllable, so the
144 opening brace is not balanced and the input file will probably not
145 compile.  Instead, braces should always be surrounded with white space:
147 @example
148 \lyricmode @{ lah lah lah @}
149 @end example
151 @cindex overrides in lyric mode
152 @funindex \override in \lyricmode
154 Similarly, in lyric mode, a period will be included in the
155 alphabetic sequence that it follows.  As a consequence, spaces
156 must be inserted around the period in @code{\override} commands.
157 Do @emph{not} write
159 @example
160 \override Score.LyricText #'font-shape = #'italic
161 @end example
163 @noindent
164 but instead use
166 @example
167 \override Score . LyricText #'font-shape = #'italic
168 @end example
170 Punctuation, lyrics with accented characters, characters from
171 non-English languages, or special characters (such as the heart
172 symbol or slanted quotes), may simply be inserted directly
173 into the input file, providing it is saved with UTF-8 encoding.
174 For more information, see @ref{Text encoding}.
176 @lilypond[quote,verbatim]
177 \relative c'' { d8 c16 a bes8 f e' d c4 }
178 \addlyrics { „Schad’ um das schö -- ne grü -- ne Band, }
179 @end lilypond
181 Normal quotes may be used in lyrics, but they have to be preceded
182 with a backslash character and the whole syllable has to be
183 enclosed between additional quotes.  For example,
185 @lilypond[quote,verbatim]
186 \relative c' { \time 3/4 e4 e4. e8 d4 e d c2. }
187 \addlyrics { "\"I" am so lone -- "ly,\"" said she }
188 @end lilypond
190 The full definition of a word start in lyrics mode is somewhat more
191 complex.  A word in lyrics mode is one that begins with an
192 alphabetic character, @code{_}, @code{?}, @code{!}, @code{:},
193 @code{'}, the control characters @code{^A} through @code{^F},
194 @code{^Q} through @code{^W}, @code{^Y}, @code{^^}, any 8-bit
195 character with an ASCII code over 127, or a two-character
196 combination of a backslash followed by one of @code{`}, @code{'},
197 @code{"}, or @code{^}.
199 @c " to balance double quotes for not-so-bright context-sensitive editors
201 Great control over the appearance of lyrics comes from using
202 @code{\markup} inside the lyrics themselves. For explanation of many
203 options, see @ref{Formatting text}.
205 @snippets
207 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
208 {formatting-lyrics-syllables.ly}
211 @seealso
212 Learning Manual:
213 @rlearning{Songs}.
215 Notation Reference:
216 @ref{Automatic syllable durations},
217 @ref{Fonts},
218 @ref{Formatting text},
219 @ref{Input modes},
220 @ref{Manual syllable durations},
221 @ref{Text encoding}.
223 Internals Reference:
224 @rinternals{LyricText}.
226 Snippets:
227 @rlsr{Text}
229 @node Aligning lyrics to a melody
230 @unnumberedsubsubsec Aligning lyrics to a melody
232 @cindex lyrics, aligning to a melody
233 @cindex @code{associatedVoice}
234 @funindex \lyricmode
235 @funindex \addlyrics
236 @funindex \lyricsto
238 Lyrics are printed by interpreting them in the context called
239 @code{Lyrics}, see @ref{Contexts explained}.
241 @example
242 \new Lyrics \lyricmode @{ @dots{} @}
243 @end example
245 Lyrics can be aligned with melodies in two main ways:
247 @itemize
249 @item
250 Lyrics can be aligned automatically, with the durations of the
251 syllables being taken from another voice of music or (in special
252 circumstances) an associated melody, using @code{\addlyrics},
253 @code{\lyricsto}, or by setting the @code{associatedVoice} property.
254 For more details, see @ref{Automatic syllable durations}.
256 @lilypond[quote,ragged-right,verbatim]
258   \new Staff <<
259     \time 2/4
260     \new Voice = "one" \relative c'' {
261       \voiceOne
262       c4 b8. a16 g4. r8 a4 ( b ) c2
263     }
264     \new Voice = "two" \relative c' {
265       \voiceTwo
266        s2 s4. f8 e4 d c2
267     }
268   >>
270 % takes durations and alignment from notes in "one"
271   \new Lyrics \lyricsto "one" {
272     Life is __ _ love, live __ life.
273   }
275 % takes durations and alignment from notes in "one" initially
276 % then switches to "two"
277   \new Lyrics \lyricsto "one" {
278     No more let
279     \set associatedVoice = "two"  % must be set one syllable early
280     sins and sor -- rows grow.
281   }
283 @end lilypond
285 The first stanza shows the normal way of entering lyrics.
287 The second stanza shows how the voice from which the lyric
288 durations are taken can be changed.  This is useful if the words to
289 different stanzas fit the notes in different ways and all the
290 durations are available in Voice contexts.  For more details, see
291 @ref{Stanzas}.
293 @item
294 Lyrics can be aligned independently of the duration of any notes
295 if the durations of the syllables are specified explicitly,
296 and entered with @code{\lyricmode}.
298 @lilypond[quote,ragged-right,verbatim]
300   \new Voice = "one" \relative c'' {
301     \time 2/4
302     c4 b8. a16 g4. f8 e4 d c2
303   }
305 % uses previous explicit duration of 2;
306   \new Lyrics \lyricmode {
307     Joy to the earth!
308   }
310 % explicit durations, set to a different rhythm
311   \new Lyrics \lyricmode {
312     Life4 is love,2. live4 life.2
313   }
315 @end lilypond
317 The first stanza is not aligned with the notes because the durations
318 were not specified, and the previous value of 2 is used for each
319 word.
321 The second stanza shows how the words can be aligned quite
322 independently from the notes.  This is useful if the words to
323 different stanzas fit the notes in different ways and the required
324 durations are not available in a music context.  For more details
325 see @ref{Manual syllable durations}.  This technique is also useful
326 when setting dialogue over music; for examples showing this, see
327 @ref{Dialogue over music}.
329 When entered in this way the words are left-aligned to the notes
330 by default, but may be center-aligned to the notes of a melody by
331 specifying an associated voice, if one exists.  For details, see
332 @ref{Manual syllable durations}.
334 @end itemize
336 @seealso
337 Learning Manual:
338 @rlearning{Aligning lyrics to a melody}.
340 Notation Reference:
341 @ref{Contexts explained},
342 @ref{Automatic syllable durations}.
343 @ref{Stanzas},
344 @ref{Manual syllable durations},
345 @ref{Dialogue over music},
346 @ref{Manual syllable durations}.
348 Internals Reference:
349 @rinternals{Lyrics}.
351 @node Automatic syllable durations
352 @unnumberedsubsubsec Automatic syllable durations
354 @cindex syllable durations, automatic
355 @cindex lyrics and melodies
356 @cindex associatedVoice
357 @funindex \addlyrics
358 @funindex \lyricsto
360 Lyrics can be automatically aligned to the notes of a melody in
361 three ways:
363 @itemize
365 @item
366 by specifying the named Voice context containing the melody with
367 @code{\lyricsto},
369 @item
370 by introducing the lyrics with @code{\addlyrics} and placing them
371 immediately after the Voice context containing the melody,
373 @item
374 by setting the @code{associatedVoice} property, the alignment of
375 the lyrics may be switched to a different named Voice context at
376 any musical moment.
378 @end itemize
380 In all three methods hyphens can be drawn between the syllables of
381 a word and extender lines can be drawn beyond the end of a word.  For
382 details, see @ref{Extenders and hyphens}.
384 The @code{Voice} context containing the melody to which the lyrics
385 are being aligned must not have @qq{died}, or the lyrics after that
386 point will be lost.  This can happen if there are periods when that
387 voice has nothing to do.  For methods of keeping contexts alive, see
388 @ref{Keeping contexts alive}.
390 @subheading Using @code{\lyricsto}
392 @cindex \lyricsto
393 @funindex \lyricsto
395 Lyrics can be aligned under a melody automatically by specifying
396 the named Voice context containing the melody with
397 @code{\lyricsto}:
399 @lilypond[quote,verbatim,relative=2]
401   \new Voice = "melody" {
402     a4 a a a
403   }
404   \new Lyrics \lyricsto "melody" {
405     These are the words
406   }
408 @end lilypond
410 @noindent
411 This aligns the lyrics to the notes of the named @code{Voice}
412 context, which must already exist.  Therefore normally the
413 @code{Voice} context is specified first, followed by the
414 @code{Lyrics} context.  The lyrics themselves follow the
415 @code{\lyricsto} command.  The @code{\lyricsto} command
416 invokes lyric mode automatically, so the @code{\lyricmode} keyword
417 may be omitted.  By default, the lyrics are placed underneath the
418 notes.  For other placements, see @ref{Placing lyrics vertically}.
420 @subheading Using @code{\addlyrics}
422 @cindex \addlyrics
423 @funindex \addlyrics
425 The @code{\addlyrics} command is just a convenient shortcut that
426 can sometimes be used instead of having to set up the lyrics
427 through a more complicated LilyPond structure.
429 @example
430 @{ MUSIC @}
431 \addlyrics @{ LYRICS @}
432 @end example
434 @noindent
435 is the same as
437 @example
438 \new Voice = "blah" @{ MUSIC @}
439 \new Lyrics \lyricsto "blah" @{ LYRICS @}
440 @end example
442 Here is an example,
444 @lilypond[verbatim,quote]
446   \time 3/4
447   \relative c' { c2 e4 g2. }
448   \addlyrics { play the game }
450 @end lilypond
452 More stanzas can be added by adding more
453 @code{\addlyrics} sections:
456 @lilypond[ragged-right,verbatim,quote]
458   \time 3/4
459   \relative c' { c2 e4 g2. }
460   \addlyrics { play the game }
461   \addlyrics { speel het spel }
462   \addlyrics { joue le jeu }
464 @end lilypond
466 The command @code{\addlyrics} cannot handle polyphonic settings.
467 For these cases one should use @code{\lyricsto}.
469 @subheading Using associatedVoice
471 The melody to which the lyrics are being aligned can be changed by
472 setting the @code{associatedVoice} property,
474 @example
475 \set associatedVoice = #"lala"
476 @end example
478 @noindent
480 The value of the property (here: @code{"lala"}) should be the name
481 of a @code{Voice} context.  For technical reasons, the @code{\set}
482 command must be placed one syllable before the one to which the
483 change in voice is to apply.
485 Here is an example demonstrating its use:
487 @lilypond[quote,ragged-right,verbatim]
489   \new Staff <<
490     \time 2/4
491     \new Voice = "one" \relative c'' {
492       \voiceOne
493       c4 b8. a16 g4. r8 a4 ( b ) c2
494     }
495     \new Voice = "two" \relative c' {
496       \voiceTwo
497        s2 s4. f8 e8 d4. c2
498     }
499   >>
500 % takes durations and alignment from notes in "one" initially
501 % then switches to "two"
502   \new Lyrics \lyricsto "one" {
503     No more let
504     \set associatedVoice = "two"  % must be set one syllable early
505     sins and sor -- rows grow.
506   }
508 @end lilypond
510 @seealso
511 Notation Reference:
512 @ref{Extenders and hyphens},
513 @ref{Keeping contexts alive},
514 @ref{Placing lyrics vertically}.
516 @node Manual syllable durations
517 @unnumberedsubsubsec Manual syllable durations
519 In some complex vocal music, it may be desirable to place lyrics
520 completely independently of notes.  In this case do not use
521 @code{\lyricsto} or @code{\addlyrics} and do not set
522 @code{associatedVoice}.  Syllables are entered like notes --
523 but with pitches replaced by text -- and the duration of each
524 syllable is entered explicitly after the syllable.
526 By default, syllables will be left-aligned to the corresponding
527 musical moment.  Hyphenated lines may be drawn between syllables
528 as usual, but extender lines cannot be drawn when there is no
529 associated voice.
531 Here are two examples:
533 @lilypond[relative=1,verbatim,quote]
535   \new Voice = "melody" {
536     \time 3/4
537     c2 e4 g2 f
538   }
539   \new Lyrics \lyricmode {
540     play1 the4 game4
541   }
543 @end lilypond
546 @lilypond[quote,verbatim,ragged-right]
548   \new Staff {
549     \relative c'' {
550       c2 c2
551       d1
552     }
553   }
554   \new Lyrics {
555     \lyricmode {
556       I2 like4. my8 cat!1
557     }
558   }
559   \new Staff {
560     \relative c' {
561       c8 c c c c c c c
562       c8 c c c c c c c
563     }
564   }
566 @end lilypond
568 This technique is useful when writing dialogue over music, see
569 @ref{Dialogue over music}.
571 To center-align syllables on the notes at the corresponding musical
572 moments, set @code{associatedVoice} to the name of the Voice context
573 containing those notes.  When @code{associatedVoice} is set, both
574 double hyphens and double underscores can be used to draw
575 hyphenated lines and extenders under melismata correctly.
577 @lilypond[relative=1,verbatim,quote]
579   \new Voice = "melody" {
580     \time 3/4
581     c2 e4 g f g
582   }
583   \new Lyrics \lyricmode {
584     \set associatedVoice = #"melody"
585     play2 the4 game2. __
586   }
588 @end lilypond
590 @c TODO see also feature request 707 - show how to do this with manual durations
592 @seealso
593 Notation Reference:
594 @ref{Dialogue over music}.
596 Internals Reference:
597 @rinternals{Lyrics},
598 @rinternals{Voice}.
601 @node Multiple syllables to one note
602 @unnumberedsubsubsec Multiple syllables to one note
604 @funindex _
605 @cindex spaces, in lyrics
606 @cindex quotes, in lyrics
607 @cindex ties, in lyrics
609 In order to assign more than one syllable to a single note with
610 spaces between the syllables, you can surround the phrase with
611 quotes or use a @code{_} character.  Alternatively, you can use
612 code the tilde symbol (@code{~}) to get a lyric tie.  The lyric
613 tie is implemented with the Unicode character U+203F, so be
614 sure to use a font for this glyph which actually contains it.
615 Freely available fonts with a lyric tie are, for example,
616 `FreeSerif' (a Times clone), `DejaVuSans' (but not
617 `DejaVuSerif'), or `TeXGyreSchola' (a Century Schoolbook
618 clone).
620 @lilypond[quote,ragged-right,verbatim]
622   \time 3/4
623   \relative c' { c2 e4 g2 e4 }
624   \addlyrics { gran- de_a- mi- go }
625   \addlyrics { pu- "ro y ho-" nes- to }
626   \addlyrics { pu- ro~y~ho- nes- to }
628 @end lilypond
631 @seealso
632 Internals Reference:
633 @rinternals{LyricCombineMusic}.
636 @node Multiple notes to one syllable
637 @unnumberedsubsubsec Multiple notes to one syllable
639 @cindex melisma
640 @cindex melismata
641 @cindex phrasing, in lyrics
642 @funindex \melisma
643 @funindex \melismaEnd
645 Sometimes, particularly in Medieval music, several notes are to be
646 sung on one syllable; such vocalises are called melismata, or
647 @rglos{melisma}s.  The syllable to a melisma is usually
648 left-aligned with the first note of the melisma.
650 When a melisma occurs on a syllable other that the last one in a
651 word, that syllable is usually joined to the following one with a
652 hyphenated line.  This is indicated by placing a double hyphen,
653 @code{--}, immediately after the syllable.
655 Alternatively, when a melisma occurs on the last or only syllable in
656 a word an extender line is usually drawn from the end of the syllable
657 to the last note of the melisma.  This is indicated by placing a
658 double underscore, @code{__}, immediately after the word.
660 There are five ways in which melismata can be indicated:
662 @itemize
664 @item
665 Melismata are created automatically over notes which are tied
666 together:
668 @lilypond[quote,relative=2,verbatim]
670   \new Voice = "melody" {
671     \time 3/4
672     f4 g2 ~ |
673     g4 e2 ~ |
674     e8
675   }
676   \new Lyrics \lyricsto "melody" {
677     Ky -- ri -- e __
678   }
680 @end lilypond
682 @item
683 Melismata can be created automatically from the music by placing
684 slurs over the notes of each melisma.  This is the usual way of
685 entering lyrics:
687 @lilypond[quote,relative=2,verbatim]
689   \new Voice = "melody" {
690     \time 3/4
691     f4 g8 ( f e f )
692     e8 ( d e2 )
693   }
694   \new Lyrics \lyricsto "melody" {
695     Ky -- ri -- e __
696   }
698 @end lilypond
700 @item
701 Notes are considered a melisma if they are manually beamed,
702 providing automatic beaming is switched off.  See
703 @ref{Setting automatic beam behavior}.
705 @lilypond[quote,relative=2,verbatim]
707   \new Voice = "melody" {
708     \time 3/4
709     \autoBeamOff
710     f4 g8[ f e f]
711     e2.
712   }
713   \new Lyrics \lyricsto "melody" {
714     Ky -- ri -- e
715   }
717 @end lilypond
719 Clearly this is not suited to melismata over notes which are longer
720 than eighth notes.
722 @item
723 An unslurred group of notes will be treated as a melisma if they
724 are bracketed between @code{\melisma} and @code{\melismaEnd}.
726 @lilypond[quote,relative=2,verbatim]
728   \new Voice = "melody" {
729     \time 3/4
730     f4 g8
731     \melisma
732     f e f
733     \melismaEnd
734     e2.
735   }
736   \new Lyrics \lyricsto "melody" {
737     Ky -- ri -- e
738   }
740 @end lilypond
742 Note that this method cannot be used to indicate two melismata if
743 the first one is immediately followed by another.
745 @item
746 A melisma can be defined entirely in the lyrics by entering a
747 single underscore character, @code{_}, for every extra note that has
748 to be added to the melisma.
750 @lilypond[verbatim, quote, relative=2]
752   \new Voice = "melody" {
753     \time 3/4
754     f4 g8 f e f
755     e8 d e2
756   }
757   \new Lyrics \lyricsto "melody" {
758     Ky -- ri -- _ _ _ e __ _ _
759   }
761 @end lilypond
763 @end itemize
765 It is possible to have ties, slurs and manual beams in the melody
766 without their indicating melismata.  To do this, set
767 @code{melismaBusyProperties}:
769 @lilypond[relative=1,verbatim,quote]
771   \new Voice = "melody" {
772     \time 3/4
773     \set melismaBusyProperties = #'()
774     c4 d ( e )
775     g8 [ f ] f4 ~ f
776   }
777   \new Lyrics \lyricsto "melody" {
778     Ky -- ri -- e e -- le -- i -- son
779   }
781 @end lilypond
783 Other settings for @code{melismaBusyProperties} can be used to
784 selectively include or exclude ties, slurs, and beams from the
785 automatic detection of melismata; see @code{melismaBusyProperties}
786 in @rinternals{Tunable context properties}.
788 Alternatively, if all melismata indications are to be ignored,
789 @code{ignoreMelismata} may be set true;
790 see @ref{Stanzas with different rhythms}.
792 If a melisma is required during a passage in which
793 @code{melismaBusyProperties} is active, it may be indicated by
794 placing a single underscore in the lyrics for each note which
795 should be included in the melisma:
797 @lilypond[relative=1,verbatim,quote]
799   \new Voice = "melody" {
800     \time 3/4
801     \set melismaBusyProperties = #'()
802     c4 d ( e )
803     g8 [ f ] ~ f4 ~ f
804   }
805   \new Lyrics \lyricsto "melody" {
806     Ky -- ri -- _ e __ _ _ _
807   }
809 @end lilypond
812 @predefined
814 @code{\autoBeamOff},
815 @code{\autoBeamOn},
816 @code{\melisma},
817 @code{\melismaEnd}.
819 @seealso
820 Musical Glossary:
821 @rglos{melisma}.
823 Learning Manual:
824 @rlearning{Aligning lyrics to a melody}.
826 Notation Reference:
827 @ref{Aligning lyrics to a melody},
828 @ref{Automatic syllable durations},
829 @ref{Setting automatic beam behavior},
830 @ref{Stanzas with different rhythms}.
832 Internals Reference:
833 @rinternals{Tunable context properties}.
835 @knownissues
837 Extender lines under melismata are not created automatically; they
838 must be inserted manually with a double underscore.
841 @node Extenders and hyphens
842 @unnumberedsubsubsec Extenders and hyphens
844 @cindex melisma
845 @cindex extender
847 @c TODO cf Multiple notes to one syllable; should this be merged in?
849 @c leave this as samp. -gp
850 In the last syllable of a word, melismata are sometimes indicated with
851 a long horizontal line starting in the melisma syllable, and ending in
852 the next one.  Such a line is called an extender line, and it is
853 entered as @samp{ __ } (note the spaces before and after the two
854 underscore characters).
856 @warning{Melismata are indicated in the score with extender lines,
857 which are entered as one double underscore; but short melismata can
858 also be entered by skipping individual notes, which are entered as
859 single underscore characters; these do not make an extender line to be
860 typeset by default.}
862 @cindex hyphens
864 @c leave this as samp. -gp
865 Centered hyphens are entered as @samp{ -- } between syllables of a
866 same word (note the spaces before and after the two hyphen
867 characters).  The hyphen will be centered between the syllables, and
868 its length will be adjusted depending on the space between the
869 syllables.
871 In tightly engraved music, hyphens can be removed.  Whether this
872 happens can be controlled with the @code{minimum-distance} (minimum
873 distance between two syllables) and the @code{minimum-length}
874 (threshold below which hyphens are removed) properties of
875 @code{LyricHyphen}.
878 @seealso
879 Internals Reference:
880 @rinternals{LyricExtender},
881 @rinternals{LyricHyphen}.
884 @node Techniques specific to lyrics
885 @subsection Techniques specific to lyrics
887 @c TODO this whole section is to be reorganised
889 @menu
890 * Working with lyrics and variables::
891 * Placing lyrics vertically::
892 * Placing syllables horizontally::
893 * Lyrics and repeats::
894 * Divisi lyrics::
895 @end menu
899 @node Working with lyrics and variables
900 @unnumberedsubsubsec Working with lyrics and variables
902 @cindex lyrics, using variables
904 Variables containing lyrics can be created, but the lyrics must be
905 entered in lyric mode:
907 @lilypond[quote,verbatim]
908 musicOne = \relative c'' {
909   c4 b8. a16 g4. f8 e4 d c2
911 verseOne = \lyricmode {
912   Joy to the world, the Lord is come.
914 \score {
915   <<
916     \new Voice = "one" {
917       \time 2/4
918       \musicOne
919     }
920     \new Lyrics \lyricsto "one" {
921       \verseOne
922     }
923   >>
925 @end lilypond
927 Durations do not need to be added if the variable is to be invoked
928 with @code{\addlyrics} or @code{\lyricsto}.
930 For different or more complex orderings, the best way is to define
931 the music and lyric variables first, then set up the hierarchy of
932 staves and lyrics, omitting the lyrics themselves, and then add the
933 lyrics using @code{\context} underneath.  This ensures that the
934 voices referenced by @code{\lyricsto} have always been defined
935 earlier.  For example:
937 @lilypond[quote,verbatim]
938 sopranoMusic = \relative c'' { c4 c c c }
939 contraltoMusic = \relative c'' { a4 a a a }
940 sopranoWords = \lyricmode { Sop -- ra -- no words }
941 contraltoWords = \lyricmode { Con -- tral -- to words }
943 \score {
944   \new ChoirStaff <<
945     \new Staff {
946       \new Voice = "sopranos" {
947         \sopranoMusic
948       }
949     }
950     \new Lyrics = "sopranos"
951     \new Lyrics = "contraltos"
952     \new Staff {
953       \new Voice = "contraltos" {
954         \contraltoMusic
955       }
956     }
957     \context Lyrics = "sopranos" {
958       \lyricsto "sopranos" {
959         \sopranoWords
960       }
961     }
962     \context Lyrics = "contraltos" {
963       \lyricsto "contraltos" {
964         \contraltoWords
965       }
966     }
967   >>
969 @end lilypond
972 @seealso
973 Notation Reference:
974 @ref{Placing lyrics vertically}.
976 Internals Reference:
977 @rinternals{LyricCombineMusic},
978 @rinternals{Lyrics}.
981 @node Placing lyrics vertically
982 @unnumberedsubsubsec Placing lyrics vertically
984 @cindex placement of lyrics
985 @cindex lyrics, positioning
987 Depending on the type of music, lyrics may be positioned
988 above the staff, below the staff, or between staves.  Placing
989 lyrics below the associated staff is the easiest, and can be
990 achieved by simply defining the Lyrics context below the Staff
991 context:
993 @lilypond[quote,verbatim]
994 \score {
995   <<
996     \new Staff {
997       \new Voice = "melody" {
998         \relative c'' { c4 c c c }
999       }
1000     }
1001     \new Lyrics {
1002       \lyricsto "melody" {
1003         Here are the words
1004       }
1005     }
1006   >>
1008 @end lilypond
1010 Lyrics may be positioned above the staff using one of
1011 two methods.  The simplest (and preferred) method
1012 is to use the same syntax as above and explicitly
1013 specify the position of the lyrics:
1015 @lilypond[quote,verbatim]
1016 \score {
1017   <<
1018     \new Staff = "staff" {
1019       \new Voice = "melody" {
1020         \relative c'' { c4 c c c }
1021       }
1022     }
1023     \new Lyrics \with { alignAboveContext = "staff" } {
1024       \lyricsto "melody" {
1025         Here are the words
1026       }
1027     }
1028   >>
1030 @end lilypond
1032 Alternatively, a two-step process may be used.  First the Lyrics
1033 context is declared (without any content) before the Staff and
1034 Voice contexts, then the @code{\lyricsto} command is placed after
1035 the Voice declaration it references by using @code{\context}, as
1036 follows:
1038 @lilypond[quote,verbatim]
1039 \score {
1040   <<
1041     \new Lyrics = "lyrics" \with {
1042       % lyrics above a staff should have this override
1043       \override VerticalAxisGroup #'staff-affinity = #DOWN
1044     }
1045     \new Staff {
1046       \new Voice = "melody" {
1047         \relative c'' { c4 c c c }
1048       }
1049     }
1050     \context Lyrics = "lyrics" {
1051       \lyricsto "melody" {
1052         Here are the words
1053       }
1054     }
1055   >>
1057 @end lilypond
1059 When there are two voices on separate staves the lyrics may be
1060 placed between the staves using either of these methods.  Here
1061 is an example of the second method:
1063 @lilypond[quote,verbatim]
1064 \score {
1065   \new ChoirStaff <<
1066     \new Staff {
1067       \new Voice = "sopranos" {
1068         \relative c'' { c4 c c c }
1069       }
1070     }
1071     \new Lyrics = "sopranos"
1072     \new Lyrics = "contraltos" \with {
1073       % lyrics above a staff should have this override
1074       \override VerticalAxisGroup #'staff-affinity = #DOWN
1075     }
1076     \new Staff {
1077       \new Voice = "contraltos" {
1078         \relative c'' { a4 a a a }
1079       }
1080     }
1081     \context Lyrics = "sopranos" {
1082       \lyricsto "sopranos" {
1083         Sop -- ra -- no words
1084       }
1085     }
1086     \context Lyrics = "contraltos" {
1087       \lyricsto "contraltos" {
1088         Con -- tral -- to words
1089       }
1090     }
1091   >>
1093 @end lilypond
1095 Other combinations of lyrics and staves may be generated by
1096 elaborating these examples, or by examining the
1097 @rlearning{Vocal ensembles} templates in the Learning Manual.
1099 @snippets
1100 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1101 {lyrics-old-spacing-settings.ly}
1103 @seealso
1104 Learning Manual:
1105 @rlearning{Vocal ensembles}.
1107 Notation Reference:
1108 @ref{Aligning contexts},
1109 @ref{Creating contexts}.
1111 @node Placing syllables horizontally
1112 @unnumberedsubsubsec Placing syllables horizontally
1114 @cindex Spacing lyrics
1115 @cindex Lyrics, increasing space between
1117 To increase the spacing between lyrics, set the
1118 @code{minimum-distance} property of @code{LyricSpace}.
1120 @lilypond[relative=1,verbatim,quote,ragged-right]
1122   c c c c
1123   \override Lyrics.LyricSpace #'minimum-distance = #1.0
1124   c c c c
1126 \addlyrics {
1127   longtext longtext longtext longtext
1128   longtext longtext longtext longtext
1130 @end lilypond
1132 @noindent
1133 To make this change for all lyrics in the score, set the property in the
1134 @code{\layout} block.
1136 @lilypond[verbatim,quote,ragged-right]
1137 \score {
1138   \relative c' {
1139   c c c c
1140   c c c c
1141   }
1142   \addlyrics {
1143   longtext longtext longtext longtext
1144   longtext longtext longtext longtext
1145   }
1146   \layout {
1147     \context {
1148       \Lyrics
1149       \override LyricSpace #'minimum-distance = #1.0
1150     }
1151   }
1153 @end lilypond
1155 @snippets
1156 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
1157 {lyrics-alignment.ly}
1159 @c TODO: move to LSR -vv
1161 Checking to make sure that text scripts and lyrics are within the margins
1162 requires additional calculations.  To speed up processing slightly, this
1163 feature can be disabled:
1165 @example
1166 \override Score.PaperColumn #'keep-inside-line = ##f
1167 @end example
1169 To make lyrics avoid bar lines as well, use
1171 @example
1172 \layout @{
1173   \context @{
1174     \Lyrics
1175       \consists "Bar_engraver"
1176       \consists "Separating_line_group_engraver"
1177       \override BarLine #'transparent = ##t
1178   @}
1180 @end example
1182 @c TODO Create and add lsr example of lyricMelismaAlignment
1183 @c It's used like this to center-align all lyric syllables,
1184 @c even when notes are tied. -td
1186 @ignore
1187 \layout
1189      \context { \Score lyricMelismaAlignment = #0 }
1191 @end ignore
1194 @node Lyrics and repeats
1195 @unnumberedsubsubsec Lyrics and repeats
1197 @cindex repeats and lyrics
1198 @cindex lyrics, repeating
1200 @subheading Simple repeats
1202 Repeats in @emph{music} are fully described elsewhere; see
1203 @ref{Repeats}.  This section explains how to add lyrics to repeated
1204 sections of music.
1206 Lyrics to a section of music that is repeated should be surrounded
1207 by exactly the same repeat construct as the music, if the words are
1208 unchanged.
1210 @lilypond[verbatim,quote]
1211 \score {
1212   <<
1213     \new Staff {
1214       \new Voice = "melody" {
1215         \relative c'' {
1216           a4 a a a
1217           \repeat volta 2 { b4 b b b }
1218         }
1219       }
1220     }
1221     \new Lyrics {
1222       \lyricsto "melody" {
1223         Not re -- peat -- ed.
1224         \repeat volta 2 { Re -- peat -- ed twice. }
1225       }
1226     }
1227   >>
1229 @end lilypond
1231 The words will then be correctly expanded if the repeats are
1232 unfolded.
1234 @lilypond[verbatim,quote]
1235 \score {
1236   \unfoldRepeats {
1237     <<
1238       \new Staff {
1239         \new Voice = "melody" {
1240           \relative c'' {
1241             a4 a a a
1242             \repeat volta 2 { b4 b b b }
1243           }
1244         }
1245       }
1246       \new Lyrics {
1247         \lyricsto "melody" {
1248           Not re -- peat -- ed.
1249           \repeat volta 2 { Re -- peat -- ed twice. }
1250         }
1251       }
1252     >>
1253   }
1255 @end lilypond
1257 If the repeated section is to be unfolded and has different words,
1258 simply enter all the words:
1260 @lilypond[verbatim,quote,ragged-right]
1261 \score {
1262   <<
1263     \new Staff {
1264       \new Voice = "melody" {
1265         \relative c'' {
1266           a4 a a a
1267           \repeat unfold 2 { b4 b b b }
1268         }
1269       }
1270     }
1271     \new Lyrics {
1272       \lyricsto "melody" {
1273         Not re -- peat -- ed.
1274         The first time words.
1275         Sec -- ond time words.
1276       }
1277     }
1278   >>
1280 @end lilypond
1282 When the words to a repeated volta section are different, the words
1283 to each repeat must be entered in separate @code{Lyrics} contexts,
1284 correctly nested in parallel sections:
1286 @lilypond[verbatim,quote]
1287 \score {
1288   <<
1289     \new Staff {
1290       \new Voice = "melody" {
1291         \relative c'' {
1292           a4 a a a
1293           \repeat volta 2 { b4 b b b }
1294         }
1295       }
1296     }
1297     \new Lyrics \lyricsto "melody" {
1298       Not re -- peat -- ed.
1299       <<
1300         { The first time words. }
1301         \new Lyrics {
1302           \set associatedVoice = "melody"
1303           Sec -- ond time words.
1304         }
1305       >>
1306     }
1307   >>
1309 @end lilypond
1311 More verses may be added in a similar way:
1313 @lilypond[verbatim,quote]
1314 \score {
1315   <<
1316     \new Staff {
1317       \new Voice = "singleVoice" {
1318         \relative c'' {
1319           a4 a a a
1320           \repeat volta 3 { b4 b b b }
1321           c4 c c c
1322         }
1323       }
1324     }
1325     \new Lyrics \lyricsto "singleVoice" {
1326       Not re -- peat -- ed.
1327       <<
1328         { The first time words. }
1329         \new Lyrics {
1330           \set associatedVoice = "singleVoice"
1331           Sec -- ond time words.
1332         }
1333         \new Lyrics {
1334           \set associatedVoice = "singleVoice"
1335           The third time words.
1336         }
1337       >>
1338       The end sec -- tion.
1339     }
1340   >>
1342 @end lilypond
1345 @c TODO positioning a common line of lyrics
1347 @subheading Repeats with alternative endings
1349 @cindex lyrics, repeats with alternative endings
1350 @cindex repeating lyrics with alternative endings
1351 @cindex alternative endings and lyrics
1353 If the words of the repeated section are the same, exactly the
1354 same structure can be used for both the lyrics and music.
1356 @lilypond[quote,verbatim]
1357 \score {
1358   <<
1359     \new Staff {
1360       \time 2/4
1361       \new Voice = "melody" {
1362         \relative c'' {
1363           a4 a a a
1364           \repeat volta 2 { b4 b }
1365           \alternative { { b b } { b c } }
1366         }
1367       }
1368     }
1369     \new Lyrics {
1370       \lyricsto "melody" {
1371         Not re -- peat -- ed.
1372         \repeat volta 2 { Re -- peat -- }
1373         \alternative { { ed twice. } { ed twice. } }
1374       }
1375     }
1376   >>
1378 @end lilypond
1380 @funindex \skip
1381 @cindex skipping notes in lyrics
1382 @cindex lyrics, skipping notes
1384 But when the repeated section has different words, a repeat
1385 construct cannot be used around the words and @code{\skip} commands
1386 have to be inserted manually to skip over the notes in the
1387 alternative sections which do not apply.
1389 Note: do not use an underscore, @code{_}, to skip notes -- an
1390 underscore indicates a melisma, causing the preceding syllable
1391 to be left-aligned.
1393 @warning{The @code{@bs{}skip} command must be followed by a number,
1394 but this number is ignored in lyrics which derive their durations
1395 from the notes in an associated melody through @code{\addlyrics} or
1396 @code{\lyricsto}.  Each @code{@bs{}skip} skips a single note of any
1397 value, irrespective of the value of the following number.}
1399 @lilypond[verbatim,quote,ragged-right]
1400 \score {
1401   <<
1402     \new Staff {
1403       \time 2/4
1404       \new Voice = "melody" {
1405         \relative c'' {
1406           \repeat volta 2 { b4 b }
1407           \alternative { { b b } { b c } }
1408           c4 c
1409         }
1410       }
1411     }
1412     \new Lyrics {
1413       \lyricsto "melody" {
1414         The first time words.
1415         \repeat unfold 2 { \skip 1 }
1416         End here.
1417       }
1418     }
1419     \new Lyrics {
1420       \lyricsto "melody" {
1421         Sec -- ond
1422         \repeat unfold 2 { \skip 1 }
1423         time words.
1424       }
1425     }
1426   >>
1428 @end lilypond
1430 @cindex lyrics and tied notes
1431 @funindex \repeatTie
1433 When a note is tied over into two or more alternative endings a
1434 tie is used to carry the note into the first alternative ending and
1435 a @code{\repeatTie} is used in the second and subsequent endings.
1436 This structure causes difficult alignment problems when lyrics are
1437 involved and increasing the length of the alternative sections so
1438 the tied notes are contained wholly within them may give a more
1439 acceptable result.
1441 The tie creates a melisma into the first alternative, but not into
1442 the second and subsequent alternatives, so to align the lyrics
1443 correctly it is necessary to disable the automatic creation of
1444 melismata over the volta section and insert manual skips.
1446 @lilypond[quote,verbatim]
1447 \score {
1448   <<
1449     \new Staff {
1450       \time 2/4
1451       \new Voice = "melody" {
1452         \relative c'' {
1453           \set melismaBusyProperties = #'()
1454           \repeat volta 2 { b4 b ~}
1455           \alternative { { b b } { b \repeatTie c } }
1456           \unset melismaBusyProperties
1457           c4 c
1458         }
1459       }
1460     }
1461     \new Lyrics {
1462       \lyricsto "melody" {
1463         \repeat volta 2 { Here's a __ }
1464         \alternative {
1465           { \skip 1 verse }
1466           { \skip 1 sec }
1467         }
1468         ond one.
1469       }
1470     }
1471   >>
1473 @end lilypond
1475 Note that if @code{\unfoldRepeats} is used around a section
1476 containing @code{\repeatTie}, the @code{\repeatTie} should be
1477 removed to avoid both types of tie being printed.
1479 When the repeated section has different words a @code{\repeat}
1480 cannot be used around the lyrics and @code{\skip} commands need to
1481 be inserted manually, as before.
1483 @lilypond[quote,verbatim]
1484 \score {
1485   <<
1486     \new Staff {
1487       \time 2/4
1488       \new Voice = "melody" {
1489         \relative c'' {
1490           \repeat volta 2 { b4 b ~}
1491           \alternative { { b b } { b \repeatTie c } }
1492           c4 c
1493         }
1494       }
1495     }
1496     \new Lyrics {
1497       \lyricsto "melody" {
1498         Here's a __ verse.
1499         \repeat unfold 2 { \skip 1 }
1500       }
1501     }
1502     \new Lyrics {
1503       \lyricsto "melody" {
1504         Here's one
1505         \repeat unfold 2 { \skip 1 }
1506         more to sing.
1507       }
1508     }
1509   >>
1511 @end lilypond
1513 If you wish to show extenders and hyphens into and out of
1514 alternative sections these must be inserted manually.
1516 @lilypond[quote,verbatim]
1517 \score {
1518   <<
1519     \new Staff {
1520       \time 2/4
1521       \new Voice = "melody" {
1522         \relative c'' {
1523           \repeat volta 2 { b4 b ~}
1524           \alternative { { b b } { b \repeatTie c } }
1525           c4 c
1526         }
1527       }
1528     }
1529     \new Lyrics {
1530       \lyricsto "melody" {
1531         Here's a __ verse.
1532         \repeat unfold 2 { \skip 1 }
1533       }
1534     }
1535     \new Lyrics {
1536       \lyricsto "melody" {
1537         Here's "a_"
1538         \skip 1
1539         "_" sec -- ond one.
1540       }
1541     }
1542   >>
1544 @end lilypond
1546 @seealso
1547 Notation Reference:
1548 @ref{Keeping contexts alive},
1549 @ref{Repeats}.
1552 @node Divisi lyrics
1553 @unnumberedsubsubsec Divisi lyrics
1555 @cindex divided lyrics
1556 @cindex lyrics, divided
1558 When just the words and rhythms of the two parts differ with the
1559 pitches remaining the same, temporarily turning off the automatic
1560 detection of melismata and indicating the melisma in the lyrics
1561 may be the appropriate method to use:
1563 @lilypond[quote,verbatim]
1564 \score {
1565   <<
1566     \new Voice = "melody" {
1567       \relative c' {
1568         \set melismaBusyProperties = #'()
1569         \slurDown
1570         \slurDashed
1571         e4 e8 ( e ) c4 c |
1572         \unset melismaBusyProperties
1573         c
1574       }
1575     }
1576     \new Lyrics \lyricsto "melody" {
1577       They shall not o -- ver -- come
1578     }
1579     \new Lyrics \lyricsto "melody" {
1580       We will _
1581     }
1582   >>
1584 @end lilypond
1586 When both music and words differ it may be better to display
1587 the differing music and lyrics by naming voice contexts and
1588 attaching lyrics to those specific contexts:
1590 @lilypond[verbatim,ragged-right,quote]
1591 \score {
1592   <<
1593     \new Voice = "melody" {
1594       \relative c' {
1595         <<
1596           {
1597             \voiceOne
1598             e4 e8 e
1599           }
1600           \new Voice = "splitpart" {
1601             \voiceTwo
1602             c4 c
1603           }
1604         >>
1605         \oneVoice
1606         c4 c |
1607         c
1608       }
1609     }
1610     \new Lyrics \lyricsto "melody" {
1611       They shall not o -- ver -- come
1612     }
1613     \new Lyrics \lyricsto "splitpart" {
1614       We will
1615     }
1616   >>
1618 @end lilypond
1621 @node Stanzas
1622 @subsection Stanzas
1624 @menu
1625 * Adding stanza numbers::
1626 * Adding dynamics marks to stanzas::
1627 * Adding singers' names to stanzas::
1628 * Stanzas with different rhythms::
1629 * Printing stanzas at the end::
1630 * Printing stanzas at the end in multiple columns::
1631 @end menu
1634 @node Adding stanza numbers
1635 @unnumberedsubsubsec Adding stanza numbers
1637 @cindex stanza number
1639 Stanza numbers can be added by setting @code{stanza}, e.g.,
1641 @lilypond[quote,ragged-right,verbatim,relative=2]
1642 \new Voice {
1643   \time 3/4 g2 e4 a2 f4 g2.
1644 } \addlyrics {
1645   \set stanza = #"1. "
1646   Hi, my name is Bert.
1647 } \addlyrics {
1648   \set stanza = #"2. "
1649   Oh, ché -- ri, je t'aime
1651 @end lilypond
1654 @noindent
1655 These numbers are put just before the start of the first syllable.
1657 @c TODO Create and add snippet to show how two lines of a
1658 @c stanza can be grouped together, along these lines:
1659 @c (might need improving a bit) -td
1661 @ignore
1662 leftbrace = \markup { \override #'(font-encoding . fetaBraces) \lookup
1663 #"brace105" }
1665 stanzaOneOne = {
1666   \set stanza = \markup { "1. " \leftbrace }
1667   \lyricmode { Child, you're mine and I love you.
1668     Lend thine ear to what I say.
1670   }
1673 stanzaOneThree =  {
1674 %  \set stanza = \markup { "   "}
1675   \lyricmode { Child, I have no great -- er joy
1676     Than to have you walk in truth.
1678   }
1681 \new Voice {
1682   \repeat volta 2 { c'8 c' c' c' c' c' c'4
1683                     c'8 c' c' c' c' c' c'4   }
1684 }  \addlyrics { \stanzaOneOne }
1685    \addlyrics { \stanzaOneThree }
1687 @end ignore
1689 @node Adding dynamics marks to stanzas
1690 @unnumberedsubsubsec Adding dynamics marks to stanzas
1692 Stanzas differing in loudness may be indicated by putting a
1693 dynamics mark before each stanza.  In LilyPond, everything coming in
1694 front of a stanza goes into the @code{StanzaNumber} object; dynamics
1695 marks are no different.  For technical reasons, you have to set the
1696 stanza outside @code{\lyricmode}:
1698 @lilypond[quote,ragged-right,verbatim]
1699 text = {
1700   \set stanza = \markup { \dynamic "ff" "1. " }
1701   \lyricmode {
1702     Big bang
1703   }
1707   \new Voice = "tune" {
1708     \time 3/4
1709     g'4 c'2
1710   }
1711 \new Lyrics \lyricsto "tune" \text
1713 @end lilypond
1715 @node Adding singers' names to stanzas
1716 @unnumberedsubsubsec Adding singers' names to stanzas
1718 @cindex singer name
1719 @cindex name of singer
1721 Names of singers can also be added.  They are printed at the start of
1722 the line, just like instrument names.  They are created by setting
1723 @code{vocalName}.  A short version may be entered as
1724 @code{shortVocalName}.
1726 @lilypond[ragged-right,quote,verbatim,relative=2]
1727 \new Voice {
1728   \time 3/4 g2 e4 a2 f4 g2.
1729 } \addlyrics {
1730   \set vocalName = #"Bert "
1731   Hi, my name is Bert.
1732 } \addlyrics {
1733   \set vocalName = #"Ernie "
1734   Oh, ché -- ri, je t'aime
1736 @end lilypond
1738 @node Stanzas with different rhythms
1739 @unnumberedsubsubsec Stanzas with different rhythms
1741 Often, different stanzas of one song are put to one melody in slightly
1742 differing ways.  Such variations can still be captured with
1743 @code{\lyricsto}.
1745 @subsubheading Ignoring melismata
1747 One possibility is that the text has a melisma in one stanza, but
1748 multiple syllables in another.  One solution is to make the faster
1749 voice ignore the melisma.  This is done by setting
1750 @code{ignoreMelismata} in the Lyrics context.
1752 @lilypond[verbatim,ragged-right,quote]
1754   \relative c' \new Voice = "lahlah" {
1755     \set Staff.autoBeaming = ##f
1756     c4
1757     \slurDotted
1758     f8.[( g16])
1759     a4
1760   }
1761   \new Lyrics \lyricsto "lahlah" {
1762     more slow -- ly
1763   }
1764   \new Lyrics \lyricsto "lahlah" {
1765     go
1766     \set ignoreMelismata = ##t
1767     fas -- ter
1768     \unset ignoreMelismata
1769     still
1770   }
1772 @end lilypond
1774 @knownissues
1775 Unlike most @code{\set} commands, @code{\set ignoreMelismata} does
1776 not work if prefixed with @code{\once}.  It is necessary to use
1777 @code{\set} and @code{\unset} to bracket the lyrics where melismata
1778 are to be ignored.
1780 @subsubheading Adding syllables to grace notes
1782 @cindex grace notes and lyrics
1783 @cindex lyrics on grace notes
1785 By default, grace notes (e.g. via @code{\grace}) do not get assigned
1786 syllables when using @code{\lyricsto}, but this behavior can be
1787 changed:
1789 @lilypond[verbatim,ragged-right,quote]
1791   \new Voice = melody \relative c' {
1792     f4 \appoggiatura a32 b4
1793     \grace { f16[ a16] } b2
1794     \afterGrace b2 { f16[ a16] }
1795     \appoggiatura a32 b4
1796     \acciaccatura a8 b4
1797   }
1798   \new Lyrics
1799   \lyricsto melody {
1800     normal
1801     \set includeGraceNotes = ##t
1802     case,
1803     gra -- ce case,
1804     after -- grace case,
1805     \set ignoreMelismata = ##t
1806     app. case,
1807     acc. case.
1808   }
1810 @end lilypond
1812 @knownissues
1813 Like @code{associatedVoice}, @code{includeGraceNotes} needs to be
1814 set at latest one syllable before the one which is to be put under a
1815 grace note.  For the case of a grace note at the very beginning of a
1816 piece of music, consider using a @code{\with} or @code{\context}
1817 block:
1819 @lilypond[verbatim,ragged-right,quote]
1821   \new Voice = melody \relative c' {
1822     \grace { c16[( d e f] }
1823     g1) f
1824   }
1825   \new Lyrics \with { includeGraceNotes = ##t }
1826   \lyricsto melody {
1827     Ah __ fa
1828   }
1830 @end lilypond
1832 @subsubheading Switching to an alternative melody
1834 @cindex associatedVoice
1835 @cindex alternative melody, switching to
1837 More complex variations in setting lyrics to music are possible.
1838 The melody to which the lyrics are being set can be changed from
1839 within the lyrics by setting the @code{associatedVoice} property:
1841 @lilypond[verbatim,quote]
1843   \relative c' \new Voice = "lahlah" {
1844     \set Staff.autoBeaming = ##f
1845     c4
1846     <<
1847       \new Voice = "alternative" {
1848         \voiceOne
1849         \times 2/3 {
1850           % show associations clearly.
1851           \override NoteColumn #'force-hshift = #-3
1852           f8 f g
1853         }
1854       }
1855       {
1856         \voiceTwo
1857         f8.[ g16]
1858         \oneVoice
1859       } >>
1860     a8( b) c
1861   }
1862   \new Lyrics \lyricsto "lahlah" {
1863     Ju -- ras -- sic Park
1864   }
1865   \new Lyrics \lyricsto "lahlah" {
1866     % Tricky: need to set associatedVoice
1867     % one syllable too soon!
1868     \set associatedVoice = "alternative" % applies to "ran"
1869     Ty --
1870     ran --
1871     no --
1872     \set associatedVoice = "lahlah" % applies to "rus"
1873     sau -- rus Rex
1874   } >>
1875 @end lilypond
1877 @noindent
1878 The text for the first stanza is set to the melody called
1879 @q{lahlah} in the usual way, but the second stanza is set initally
1880 to the @code{lahlah} context and is then switched to the
1881 @code{alternative} melody for the syllables @q{ran} to @q{sau} by
1882 the lines:
1884 @example
1885 \set associatedVoice = "alternative" % applies to "ran"
1886 Ty --
1887 ran --
1888 no --
1889 \set associatedVoice = "lahlah" % applies to "rus"
1890 sau -- rus Rex
1891 @end example
1893 @noindent
1894 Here, @code{alternative} is the name of the @code{Voice} context
1895 containing the triplet.
1897 Note the placement of the @code{\set associatedVoice} command --
1898 it appears to be one syllable too early, but this is correct.
1900 @warning{The @code{\set associatedVoice} command must be placed
1901 one syllable @emph{before} the one at which the switch to the new
1902 voice is to occur.  In other words, changing the associated Voice
1903 happens one syllable later than expected.  This is for technical
1904 reasons, and it is not a bug.}
1907 @node Printing stanzas at the end
1908 @unnumberedsubsubsec Printing stanzas at the end
1910 Sometimes it is appropriate to have one stanza set
1911 to the music, and the rest added in verse form at
1912 the end of the piece.  This can be accomplished by adding
1913 the extra verses into a @code{\markup} section outside
1914 of the main score block.  Notice that there are two
1915 different ways to force linebreaks when using
1916 @code{\markup}.
1918 @lilypond[ragged-right,verbatim,quote]
1919 melody = \relative c' {
1920 e d c d | e e e e |
1921 d d e d | c1 |
1924 text = \lyricmode {
1925 \set stanza = #"1." Ma- ry had a lit- tle lamb,
1926 its fleece was white as snow.
1929 \score{ <<
1930   \new Voice = "one" { \melody }
1931   \new Lyrics \lyricsto "one" \text
1933   \layout { }
1935 \markup { \column{
1936   \line{ Verse 2. }
1937   \line{ All the children laughed and played }
1938   \line{ To see a lamb at school. }
1939   }
1941 \markup{
1942   \wordwrap-string #"
1943   Verse 3.
1945   Mary took it home again,
1947   It was against the rule."
1949 @end lilypond
1952 @node Printing stanzas at the end in multiple columns
1953 @unnumberedsubsubsec Printing stanzas at the end in multiple columns
1955 When a piece of music has many verses, they are often printed in
1956 multiple columns across the page.  An outdented verse number often
1957 introduces each verse.  The following example shows how to produce such
1958 output in LilyPond.
1960 @lilypond[ragged-right,quote,verbatim]
1961 melody = \relative c' {
1962   c c c c | d d d d
1965 text = \lyricmode {
1966   \set stanza = #"1." This is verse one.
1967   It has two lines.
1970 \score {
1971   <<
1972     \new Voice = "one" { \melody }
1973     \new Lyrics \lyricsto "one" \text
1974   >>
1975   \layout { }
1978 \markup {
1979   \fill-line {
1980     \hspace #0.1 % moves the column off the left margin;
1981         % can be removed if space on the page is tight
1982      \column {
1983       \line { \bold "2."
1984         \column {
1985           "This is verse two."
1986           "It has two lines."
1987         }
1988       }
1989       \hspace #0.1 % adds vertical spacing between verses
1990       \line { \bold "3."
1991         \column {
1992           "This is verse three."
1993           "It has two lines."
1994         }
1995       }
1996     }
1997     \hspace #0.1  % adds horizontal spacing between columns;
1998         % if they are still too close, add more " " pairs
1999         % until the result looks good
2000      \column {
2001       \line { \bold "4."
2002         \column {
2003           "This is verse four."
2004           "It has two lines."
2005         }
2006       }
2007       \hspace #0.1 % adds vertical spacing between verses
2008       \line { \bold "5."
2009         \column {
2010           "This is verse five."
2011           "It has two lines."
2012         }
2013       }
2014     }
2015   \hspace #0.1 % gives some extra space on the right margin;
2016       % can be removed if page space is tight
2017   }
2019 @end lilypond
2022 @seealso
2023 Internals Reference:
2024 @rinternals{LyricText},
2025 @rinternals{StanzaNumber}.
2028 @node Songs
2029 @subsection Songs
2031 @menu
2032 * References for songs::
2033 * Lead sheets::
2034 @end menu
2036 @node References for songs
2037 @unnumberedsubsubsec References for songs
2039 Songs are usually written on three staves with the melody for the
2040 singer on the top staff and two staves of piano accompaniment at
2041 the bottom.  The lyrics of the first stanza are printed immediately
2042 underneath the top staff.  If there are just a small number of
2043 further stanzas these can be printed immediately under the first
2044 one, but if there are more stanzas than can be easily accommodated
2045 there the second and subsequent stanzas are printed after the music
2046 as stand-alone text.
2048 All the notational elements needed to write songs are fully described
2049 elsewhere:
2051 @itemize
2053 @item
2054 For constructing the staff layout, see @ref{Displaying staves}.
2056 @item
2057 For writing piano music, see
2058 @ref{Keyboard and other multi-staff instruments}.
2060 @item
2061 For writing the lyrics to a melody line, see
2062 @ref{Common notation for vocal music}.
2064 @item
2065 For placing the lyrics, see @ref{Placing lyrics vertically}.
2067 @item
2068 For entering stanzas, see @ref{Stanzas}.
2070 @item
2071 Songs are frequently printed with the chording indicated by chord
2072 names above the staves.  This is described in @ref{Displaying chords}.
2074 @item
2075 To print fret diagrams of the chords for guitar accompaniment or
2076 accompaniment by other fretted instruments, see @qq{Fret diagram
2077 markups} in @ref{Common notation for fretted strings}.
2079 @end itemize
2081 @seealso
2082 Learning Manual:
2083 @rlearning{Songs}.
2085 Notation Reference:
2086 @ref{Common notation for vocal music},
2087 @ref{Displaying chords},
2088 @ref{Displaying staves},
2089 @ref{Keyboard and other multi-staff instruments},
2090 @ref{Placing lyrics vertically},
2091 @ref{Stanzas}.
2093 Snippets:
2094 @rlsr{Vocal music}.
2096 @node Lead sheets
2097 @unnumberedsubsubsec Lead sheets
2099 Lead sheets may be printed by combining vocal parts and
2100 @q{chord mode}; this syntax is explained in @ref{Chord notation}.
2102 @snippets
2103 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
2104 {simple-lead-sheet.ly}
2106 @seealso
2107 Notation Reference:
2108 @ref{Chord notation}.
2111 @node Choral
2112 @subsection Choral
2114 @cindex anthems
2115 @cindex part songs
2116 @cindex oratorio
2117 @cindex SATB
2119 This section discusses notation issues that relate most directly
2120 to choral music.  This includes anthems, part songs, oratorio,
2121 etc.
2123 @menu
2124 * References for choral::
2125 * Score layouts for choral::
2126 * Divided voices::
2127 @end menu
2129 @node References for choral
2130 @unnumberedsubsubsec References for choral
2132 Choral music is usually notated on two, three or four staves within
2133 a @code{ChoirStaff} group.  Accompaniment, if required, is placed
2134 beneath in a @code{PianoStaff} group, which is usually reduced in
2135 size for @emph{a capella} choral works.  The notes for each vocal
2136 part are placed in a @code{Voice} context, with each staff
2137 being given either a single vocal part (i.e., one @code{Voice}) or
2138 a pair of vocal parts (i.e., two @code{Voice}s).
2140 Words are placed in @code{Lyrics} contexts, either underneath each
2141 corresponding music staff, or one above and one below the music
2142 staff if this contains the music for two parts.
2144 Several common topics in choral music are described fully elsewhere:
2146 @itemize
2148 @item
2149 An introduction to creating an SATB vocal score can be found in
2150 the Learning Manual, see @rlearning{Four-part SATB vocal score}.
2152 @item
2153 Several templates suitable for various styles of choral music can
2154 also be found in the Learning Manual, see
2155 @rlearning{Vocal ensembles}.
2157 @item
2158 For information about @code{ChoirStaff} and @code{PianoStaff} see
2159 @ref{Grouping staves}.
2161 @item
2162 Shape note heads, as used in Sacred Harp and similar notation, are
2163 described in @ref{Shape note heads}.
2165 @item
2166 When two vocal parts share a staff the stems, ties, slurs, etc., of
2167 the higher part will be directed up and those of the lower part
2168 down.  To do this, use @code{\voiceOne} and @code{\voiceTwo}.  See
2169 @ref{Single-staff polyphony}.
2171 @end itemize
2173 @predefined
2174 @code{\oneVoice},
2175 @code{\voiceOne},
2176 @code{\voiceTwo}.
2178 @seealso
2179 Learning Manual:
2180 @rlearning{Four-part SATB vocal score},
2181 @rlearning{Vocal ensembles}.
2183 Notation Reference:
2184 @ref{Context layout order},
2185 @ref{Grouping staves},
2186 @ref{Shape note heads},
2187 @ref{Single-staff polyphony}.
2189 Snippets:
2190 @rlsr{Vocal music}.
2192 Internals Reference:
2193 @rinternals{ChoirStaff},
2194 @rinternals{Lyrics},
2195 @rinternals{PianoStaff}.
2197 @node Score layouts for choral
2198 @unnumberedsubsubsec Score layouts for choral
2200 Choral music containing four staves, with or without piano
2201 accompaniment, is usually laid out with two systems per page.
2202 Depending on the page size, achieving this may require changes
2203 to several default settings.  The following settings should be
2204 considered:
2206 @itemize
2208 @item
2209 The global staff size can be modified to change the overall size
2210 of the elements of the score.  See @ref{Setting the staff size}.
2212 @item
2213 The distances between the systems, the staves and the lyrics can
2214 all be adjusted independently.  See @ref{Vertical spacing}.
2216 @item
2217 The dimensions of the vertical layout variables can be displayed as
2218 an aid to adjusting the vertical spacing.  This and other
2219 possibilities for fitting the music onto fewer pages are described
2220 in @ref{Fitting music onto fewer pages}.
2222 @item
2223 If the number of systems per page changes from one to two it is
2224 customary to indicate this with a system separator mark between
2225 the two systems.  See @ref{Separating systems}.
2227 @item
2228 For details of other page formatting properties, see
2229 @ref{Page layout}.
2231 @end itemize
2234 Dynamic markings by default are placed below the staff, but in
2235 choral music they are usually placed above the staff in order to
2236 avoid the lyrics.  The predefined command @code{\dynamicUp} does
2237 this for the dynamic markings in a single @code{Voice} context.
2238 If there are many @code{Voice} contexts this predefined command
2239 would have to be placed in every one.  Alternatively its expanded
2240 form can be used to place all dynamic markings in the entire score
2241 above their respective staves, as shown here:
2243 @lilypond[verbatim,quote]
2244 \score {
2245   \new ChoirStaff <<
2246     \new Staff {
2247       \new Voice {
2248         \relative c'' { g4\f g g g }
2249       }
2250     }
2251     \new Staff {
2252       \new Voice {
2253         \relative c' { d4 d d\p d }
2254       }
2255     }
2256   >>
2257   \layout {
2258     \context {
2259       \Score
2260       \override DynamicText #'direction = #UP
2261       \override DynamicLineSpanner #'direction = #UP
2262     }
2263   }
2265 @end lilypond
2267 @predefined
2268 @code{\dynamicUp}, @code{\dynamicDown}, @code{\dynamicNeutral}.
2270 @seealso
2271 Notation Reference:
2272 @ref{Changing spacing},
2273 @ref{Displaying spacing},
2274 @ref{Fitting music onto fewer pages},
2275 @ref{Page layout},
2276 @ref{Score layout},
2277 @ref{Separating systems},
2278 @ref{Setting the staff size},
2279 @ref{Using an extra voice for breaks},
2280 @ref{Vertical spacing}.
2282 Internals Reference:
2283 @rinternals{VerticalAxisGroup},
2284 @rinternals{StaffGrouper}.
2287 @node Divided voices
2288 @unnumberedsubsubsec Divided voices
2290 @cindex voices, divided
2292 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
2293 {using-arpeggiobracket-to-make-divisi-more-visible.ly}
2295 @seealso
2296 Notation Reference:
2297 @ref{Expressive marks as lines}.
2300 @node Opera and stage musicals
2301 @subsection Opera and stage musicals
2303 The music, lyrics and dialogue to opera and stage musicals are
2304 usually set out in one or more of the following forms:
2306 @itemize
2308 @item
2309 A @emph{Conductors' Score} containing the full orchestral and vocal
2310 parts, together with libretto cues if there are spoken passages.
2312 @item
2313 @emph{Orchestral Parts} containing the music for the individual
2314 instruments of the orchestra or band.
2316 @item
2317 A @emph{Vocal Score} containing all vocal parts with piano
2318 accompaniment.  The accompaniment is usually an orchestral
2319 reduction, and if so the name of the original orchestral instrument
2320 is often indicated.  Vocal scores sometimes includes stage
2321 directions and libretto cues.
2323 @item
2324 A @emph{Vocal Book} containing just the vocal parts
2325 (no accompaniment), sometimes combined with the libretto.
2327 @item
2328 A @emph{Libretto} containing the extended passages of spoken
2329 dialogue usually found in musicals, together with the words to the
2330 sung parts.  Stage directions are usually included.  LilyPond can
2331 be used to typeset libretti but as they contain no music
2332 alternative methods may be preferable.
2334 @end itemize
2336 The sections in the LilyPond documentation which cover the topics
2337 needed to create scores in the styles commonly found in opera and
2338 musicals are indicated in the References below.  This is followed
2339 by sections covering those techniques which are peculiar to
2340 typesetting opera and musical scores.
2342 @menu
2343 * References for opera and stage musicals::
2344 * Character names::
2345 * Musical cues::
2346 * Spoken music::
2347 * Dialogue over music::
2348 @end menu
2350 @node References for opera and stage musicals
2351 @unnumberedsubsubsec References for opera and stage musicals
2353 @itemize
2355 @item
2356 A conductors' score contains many grouped staves and lyrics.  Ways
2357 of grouping staves is shown in @ref{Grouping staves}.  To nest
2358 groups of staves see @ref{Nested staff groups}.
2360 @item
2361 The printing of empty staves in conductors' scores and vocal scores
2362 is often suppressed.  To create such a @qq{Frenched score} see
2363 @ref{Hiding staves}.
2365 @item
2366 Writing orchestral parts is covered in @ref{Writing parts}.
2367 Other sections in the Specialist notation chapter may be relevant,
2368 depending on the orchestration used.  Many instruments are
2369 transposing instruments, see @ref{Instrument transpositions}.
2371 @item
2372 If the number of systems per page changes from page to page it is
2373 customary to separate the systems with a system separator mark.
2374 See @ref{Separating systems}.
2376 @item
2377 For details of other page formatting properties, see
2378 @ref{Page layout}.
2380 @item
2381 Dialogue cues and stage directions can be inserted with markup.
2382 See @ref{Text}.  Extensive stage directions can be inserted with
2383 a section of stand-alone markup between two @code{\score} blocks.
2384 See @ref{Separate text}.
2386 @end itemize
2388 @seealso
2389 Musical Glossary:
2390 @rglos{Frenched score},
2391 @rglos{Frenched staves},
2392 @rglos{transposing instrument}.
2394 Notation Reference:
2395 @ref{Grouping staves},
2396 @ref{Hiding staves},
2397 @ref{Instrument transpositions},
2398 @ref{Nested staff groups},
2399 @ref{Page layout},
2400 @ref{Separating systems},
2401 @ref{Transpose},
2402 @ref{Writing parts},
2403 @ref{Writing text}.
2405 Snippets:
2406 @rlsr{Vocal music}.
2409 @node Character names
2410 @unnumberedsubsubsec Character names
2412 @cindex character names
2413 @cindex names, character
2415 Character names are usually shown to the left of the staff when the
2416 staff is dedicated to that character alone:
2418 @lilypond[quote,verbatim,ragged-right]
2419 \score {
2420   <<
2421     \new Staff {
2422       \set Staff.vocalName = \markup \smallCaps Kaspar
2423       \set Staff.shortVocalName = \markup \smallCaps Kas.
2424       \relative c' {
2425         \clef "G_8"
2426         c4 c c c
2427         \break
2428         c4 c c c
2429       }
2430     }
2431     \new Staff {
2432       \set Staff.vocalName = \markup \smallCaps Melchior
2433       \set Staff.shortVocalName = \markup \smallCaps Mel
2434       \clef "bass"
2435       \relative c' {
2436         a4 a a a
2437         a4 a a a
2438       }
2439     }
2440   >>
2442 @end lilypond
2444 When two or more characters share a staff the character's name is
2445 usually printed above the staff at the start of every section
2446 applying to that character.  This can be done with markup.  Often a
2447 specific font is used for this purpose.
2449 @lilypond[quote,verbatim,relative=1]
2450 \clef "G_8"
2451 c4^\markup \fontsize #1 \smallCaps Kaspar
2452 c c c
2453 \clef "bass"
2454 a4^\markup \fontsize #1 \smallCaps Melchior
2455 a a a
2456 \clef "G_8"
2457 c4^\markup \fontsize #1 \smallCaps Kaspar
2458 c c c
2459 @end lilypond
2461 Alternatively, if there are many character changes, it may be
2462 easier to set up @qq{instrument} definitions for each character at
2463 the top level so that @code{\instrumentSwitch} can be used to
2464 indicate each change.
2466 @lilypond[quote,verbatim]
2467 \addInstrumentDefinition #"kaspar"
2468   #`((instrumentTransposition . ,(ly:make-pitch -1 0 0))
2469      (shortInstrumentName . "Kas.")
2470      (clefGlyph . "clefs.G")
2471      (clefOctavation . -7)
2472      (middleCPosition . 1)
2473      (clefPosition . -2)
2474      (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Kaspar"))
2475      (midiInstrument . "voice oohs"))
2477 \addInstrumentDefinition #"melchior"
2478   #`((instrumentTransposition . ,(ly:make-pitch 0 0 0))
2479      (shortInstrumentName . "Mel.")
2480      (clefGlyph . "clefs.F")
2481      (clefOctavation . 0)
2482      (middleCPosition . 6)
2483      (clefPosition . 2)
2484      (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Melchior"))
2485      (midiInstrument . "voice aahs"))
2487 \relative c' {
2488   \instrumentSwitch "kaspar"
2489   c4 c c c
2490   \instrumentSwitch "melchior"
2491   a4 a a a
2492   \instrumentSwitch "kaspar"
2493   c4 c c c
2495 @end lilypond
2497 @seealso
2498 Notation Reference:
2499 @ref{Instrument names},
2500 @ref{Scheme functions},
2501 @ref{Text},
2502 @ref{Text markup commands}.
2504 Extending LilyPond:
2505 @rextend{Markup construction in Scheme}.
2507 @node Musical cues
2508 @unnumberedsubsubsec Musical cues
2510 @cindex musical cues
2511 @cindex cues, musical
2513 Musical cues can be inserted in Vocal Scores, Vocal Books and
2514 Orchestral Parts to indicate what music in another part
2515 immediately precedes an entry.  Also, cues are often inserted in the
2516 piano reduction in Vocal Scores to indicate what each orchestral
2517 instrument is playing.  This aids the conductor when a full
2518 Conductors' Score is not available.
2520 The basic mechanism for inserting cues is fully explained in the
2521 main text, see @ref{Quoting other voices} and
2522 @ref{Formatting cue notes}.  But when many cues have to be
2523 inserted, for example, as an aid to a conductor in a vocal score,
2524 the instrument name must be positioned carefully just before and
2525 close to the start of the cue notes.  The following example shows
2526 how this is done.
2528 @lilypond[quote,verbatim]
2529 flute = \relative c'' {
2530   s4 s4 e g
2532 \addQuote "flute" { \flute }
2534 pianoRH = \relative c'' {
2535   c4. g8
2536   % position name of cue-ing instrument just before the cue notes,
2537   % and above the staff
2538   s1*0^\markup { \right-align { \tiny "Flute" } }
2539   \cueDuring "flute" #UP { g4 bes4 }
2541 pianoLH = \relative c { c4 <c' e> e, <g c> }
2543 \score {
2544   \new PianoStaff <<
2545     \new Staff {
2546       \pianoRH
2547     }
2548     \new Staff {
2549       \clef "bass"
2550       \pianoLH
2551     }
2552   >>
2554 @end lilypond
2556 If a transposing instrument is being quoted the instrument part should
2557 specify its key so the conversion of its cue notes will be done
2558 automatically.  The example below shows this transposition for a
2559 B-flat clarinet.  The notes in this example are low on the staff so
2560 @code{#DOWN} is specified in @code{\cueDuring} (so the stems are
2561 down) and the instrument name is positioned below the staff.  Note
2562 also that the piano right-hand voice is explicitly declared.  This
2563 is because the cue notes in this example begin at the start of the
2564 first bar and this would otherwise cause the entire piano right-hand
2565 notes to be placed in a @code{CueVoice} context.
2567 @lilypond[quote,verbatim]
2568 clarinet = \relative c' {
2569   \transposition bes
2570   fis4 d d c
2572 \addQuote "clarinet" { \clarinet }
2574 pianoRH = \relative c'' {
2575   \transposition c'
2576   % position name of cue-ing instrument below the staff
2577   s1*0_\markup { \right-align { \tiny "Clar." } }
2578   \cueDuring "clarinet" #DOWN { c4. g8 }
2579   g4 bes4
2581 pianoLH = \relative c { c4 <c' e> e, <g c> }
2583 \score {
2584   <<
2585     \new PianoStaff <<
2586       \new Staff {
2587         \new Voice {
2588           \pianoRH
2589         }
2590       }
2591       \new Staff {
2592         \clef "bass"
2593         \pianoLH
2594       }
2595     >>
2596   >>
2598 @end lilypond
2600 From these two examples it is clear that inserting many cues in a
2601 Vocal Score would be tedious, and the notes of the piano part would
2602 become obscured.  However, as the following snippet shows, it is
2603 possible to define a music function to reduce the amount of typing
2604 and to make the piano notes clearer.
2606 @snippets
2607 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
2608 {adding-orchestral-cues-to-a-vocal-score.ly}
2610 @seealso
2611 Musical Glossary:
2612 @rglos{cue-notes}.
2614 Notation Reference:
2615 @ref{Aligning objects},
2616 @ref{Direction and placement},
2617 @ref{Formatting cue notes},
2618 @ref{Quoting other voices},
2619 @ref{Using music functions}.
2621 Snippets:
2622 @rlsr{Vocal music}.
2624 Internals Reference:
2625 @rinternals{InstrumentSwitch},
2626 @rinternals{CueVoice}.
2628 @knownissues
2629 @code{\cueDuring} automatically inserts a @code{CueVoice} context
2630 and all cue notes are placed in that context.  This means it is not
2631 possible to have two overlapping sequences of cue notes by this
2632 technique.  Overlapping sequences could be entered by explicitly
2633 declaring separate @code{CueVoice} contexts and using
2634 @code{\quoteDuring} to extract and insert the cue notes.
2637 @node Spoken music
2638 @unnumberedsubsubsec Spoken music
2640 @cindex parlato
2641 @cindex Sprechgesang
2642 Such effects as @q{parlato} or @q{Sprechgesang} require performers to
2643 speak without pitch but still with rhythm; these are notated by cross
2644 note heads, as demonstrated in @ref{Special note heads}.
2646 @c TODO add "marking-notes-on-spoken-parts" snippet -vv
2647 @c add "showing the rhythm of a melody" snip
2648 @c add "one staff-line notation"
2649 @c add "improvisation" ref
2650 @c add "lyrics independents of notes" ref
2652 @node Dialogue over music
2653 @unnumberedsubsubsec Dialogue over music
2655 Dialogue over music is usually printed over the staves in an italic
2656 font, with the start of each phrase keyed in to a particular music
2657 moment.
2659 For short interjections a simple markup suffices.
2661 @lilypond[quote,verbatim,relative=2]
2662 a4^\markup { \smallCaps { Alex - } \italic { He's gone } } a a a
2663 a4 a a^\markup { \smallCaps { Bethan - } \italic Where? } a
2664 a4 a a a
2665 @end lilypond
2667 For longer phrases it may be necessary to expand the music to make
2668 the words fit neatly.  There is no provision in LilyPond to do this
2669 fully automatically, and some manual intervention to layout the
2670 page will be necessary.
2672 For long phrases or for passages with a lot of closely packed
2673 dialogue, using a Lyrics context will give better results.  The
2674 Lyrics context should not be associated with a music Voice; instead
2675 each section of dialogue should be given an explicit duration.  If
2676 there is a gap in the dialogue, the final word should be separated
2677 from the rest and the duration split between them so that the
2678 underlying music spaces out smoothly.
2680 If the dialogue extends for more than one line it will be necessary
2681 to manually insert @code{\break}s and adjust the placing of the
2682 dialogue to avoid running into the right margin.  The final word of
2683 the last measure on a line should also be separated out, as above.
2685 Here is an example illustrating how this might be done.
2687 @c This should be a snippet, but it can't be as it needs to be
2688 @c manually adjusted to suit the imposed line length.  -td
2690 @lilypond[quote,verbatim,ragged-right]
2691 music = \relative c'' {
2692   \repeat unfold 3 { a4 a a a }
2695 dialogue = \lyricmode {
2696   \markup {
2697     \fontsize #1 \upright \smallCaps Abe:
2698     "Say this over measures one and"
2699   }4*7
2700   "two"4 |
2701   \break
2702   "and this over measure"4*3
2703   "three"4 |
2706 \score {
2707   <<
2708     \new Lyrics \with {
2709       \override LyricText #'font-shape = #'italic
2710       \override LyricText #'self-alignment-X = #LEFT
2711     }
2712     { \dialogue }
2713     \new Staff {
2714       \new Voice { \music }
2715     }
2716   >>
2718 @end lilypond
2720 @c TODO show use of \column to produce dialogue on two lines
2722 @seealso
2723 Notation Reference:
2724 @ref{Manual syllable durations},
2725 @ref{Text}.
2727 Internal Reference:
2728 @rinternals{LyricText}.
2731 @node Chants psalms and hymns
2732 @subsection Chants psalms and hymns
2734 @cindex chants
2735 @cindex psalms
2736 @cindex hymns
2737 @cindex religious music
2739 The music and words for chants, psalms and hymns usually follow a
2740 well-established format in any particular church.  Although the
2741 formats may differ from church to church the type-setting problems
2742 which arise are broadly similar, and are covered in this section.
2744 @menu
2745 * References for chants and psalms::
2746 * Setting a chant::
2747 * Pointing a psalm::
2748 * Partial measures in hymn tunes::
2749 @end menu
2751 @node References for chants and psalms
2752 @unnumberedsubsubsec References for chants and psalms
2754 Typesetting Gregorian chant in various styles of ancient notation
2755 is described in @ref{Ancient notation}.
2757 @seealso
2758 Notation reference:
2759 @ref{Ancient notation}.
2761 Snippets:
2762 @rlsr{Vocal music}.
2765 @node Setting a chant
2766 @unnumberedsubsubsec Setting a chant
2768 Modern chant settings use modern notation with varying numbers of
2769 elements taken from ancient notation.  Some of the elements and
2770 methods to consider are shown here.
2772 Chants often use quarter notes without stems to indicate the pitch,
2773 with the rhythm being taken from the spoken rhythm of the words.
2775 @lilypond[verbatim,quote]
2776 stemOff = { \override Staff.Stem #'transparent = ##t }
2778 \relative c' {
2779   \stemOff
2780   a'4 b c2 |
2783 @end lilypond
2785 Chants often omit the bar lines or use shortened or dotted bar
2786 lines to indicate pauses in the music.  To omit all bar lines from
2787 all staves remove the bar line engraver completely:
2789 @lilypond[verbatim,quote]
2790 \score {
2791   \new StaffGroup <<
2792     \new Staff {
2793       \relative c'' {
2794         a4 b c2 |
2795         a4 b c2 |
2796         a4 b c2 |
2797       }
2798     }
2799     \new Staff {
2800       \relative c'' {
2801         a4 b c2 |
2802         a4 b c2 |
2803         a4 b c2 |
2804       }
2805     }
2806   >>
2807   \layout {
2808     \context {
2809       \Staff
2810       \remove Bar_engraver
2811     }
2812   }
2814 @end lilypond
2816 Bar lines can also be removed on a staff-by-staff basis:
2818 @lilypond[verbatim, quote]
2819 \score {
2820   \new ChoirStaff <<
2821     \new Staff
2822     \with { \remove Bar_engraver } {
2823       \relative c'' {
2824         a4 b c2 |
2825         a4 b c2 |
2826         a4 b c2 |
2827       }
2828     }
2829     \new Staff {
2830       \relative c'' {
2831         a4 b c2 |
2832         a4 b c2 |
2833         a4 b c2 |
2834       }
2835     }
2836   >>
2838 @end lilypond
2840 To remove bar lines from just a section of music treat it as a
2841 cadenza.  If the section is long you may need to insert dummy
2842 bar lines with @code{\bar ""} to show where the line should break.
2844 @lilypond[verbatim,quote,relative=2]
2845 a4 b c2 |
2846 \cadenzaOn
2847 a4 b c2
2848 a4 b c2
2849 \bar ""
2850 a4 b c2
2851 a4 b c2
2852 \cadenzaOff
2853 a4 b c2 |
2854 a4 b c2 |
2855 @end lilypond
2857 Rests or pauses in chants can be indicated by modified bar lines.
2859 @lilypond[verbatim, quote,relative=2]
2861 \cadenzaOn
2862 b c2
2863 a4 b c2
2864 \bar "'"
2865 a4 b c2
2866 a4 b c2
2867 \bar ":"
2868 a4 b c2
2869 \bar "dashed"
2870 a4 b c2
2871 \bar "||"
2872 @end lilypond
2874 Alternatively, the notation used in Gregorian chant for pauses or
2875 rests is sometimes used even though the rest of the notation is
2876 modern.  This uses a modified @code{\breathe} mark:
2878 @lilypond[verbatim,quote]
2879 divisioMinima = {
2880   \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-minima
2881   \once \override BreathingSign  #'Y-offset = #0
2882   \breathe
2884 divisioMaior = {
2885   \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-maior
2886   \once \override BreathingSign  #'Y-offset = #0
2887   \breathe
2889 divisioMaxima = {
2890   \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-maxima
2891   \once \override BreathingSign  #'Y-offset = #0
2892   \breathe
2894 finalis = {
2895   \once \override BreathingSign  #'stencil = #ly:breathing-sign::finalis
2896   \once \override BreathingSign  #'Y-offset = #0
2897   \breathe
2900 \score {
2901   \relative c'' {
2902     g2 a4 g
2903     \divisioMinima
2904     g2 a4 g
2905     \divisioMaior
2906     g2 a4 g
2907     \divisioMaxima
2908     g2 a4 g
2909     \finalis
2910   }
2911   \layout {
2912     \context {
2913       \Staff
2914       \remove Bar_engraver
2915     }
2916   }
2918 @end lilypond
2920 Chants usually omit the time signature and often omit the clef too.
2922 @lilypond[verbatim,quote]
2923 \score {
2924   \new Staff {
2925     \relative c'' {
2926       a4 b c2 |
2927       a4 b c2 |
2928       a4 b c2 |
2929     }
2930   }
2931   \layout {
2932     \context {
2933       \Staff
2934       \remove Bar_engraver
2935       \remove Time_signature_engraver
2936       \remove Clef_engraver
2937     }
2938   }
2940 @end lilypond
2942 Chants for psalms in the Anglican tradition are usually either
2943 @emph{single}, with 7 bars of music, or @emph{double}, with two lots
2944 of 7 bars.  Each group of 7 bars is divided into two halves,
2945 corresponding to the two halves of each verse, usually separated by
2946 a double bar line.  Only whole and half notes are used.  The 1st bar
2947 in each half always contains a single chord of whole notes.  This is
2948 the @qq{reciting note}.  Chants are usually centered on the page.
2950 @lilypond[verbatim,quote]
2951 SopranoMusic = \relative g' {
2952   g1 | c2 b | a1 | \bar "||"
2953   a1 | d2 c | c b | c1 | \bar "||"
2956 AltoMusic = \relative c' {
2957   e1 | g2 g | f1 |
2958   f1 | f2 e | d d | e1 |
2961 TenorMusic = \relative a {
2962   c1 | c2 c | c1 |
2963   d1 | g,2 g | g g | g1 |
2966 BassMusic =  \relative c {
2967   c1 | e2 e | f1 |
2968   d1 | b2 c | g' g | c,1 |
2971 global = {
2972   \time 2/2
2975 % Use markup to center the chant on the page
2976 \markup {
2977   \fill-line {
2978     \score {  % centered
2979       <<
2980         \new ChoirStaff <<
2981           \new Staff <<
2982             \global
2983             \clef "treble"
2984             \new Voice = "Soprano" <<
2985               \voiceOne
2986               \SopranoMusic
2987             >>
2988             \new Voice = "Alto" <<
2989               \voiceTwo
2990               \AltoMusic
2991             >>
2992           >>
2993           \new Staff <<
2994             \clef "bass"
2995             \global
2996             \new Voice = "Tenor" <<
2997               \voiceOne
2998               \TenorMusic
2999             >>
3000             \new Voice = "Bass" <<
3001               \voiceTwo
3002               \BassMusic
3003             >>
3004           >>
3005         >>
3006       >>
3007       \layout {
3008         \context {
3009           \Score
3010           \override SpacingSpanner
3011           #'base-shortest-duration = #(ly:make-moment 1 2)
3012         }
3013         \context {
3014           \Staff
3015           \remove "Time_signature_engraver"
3016         }
3017       }
3018     }  % End score
3019   }
3020 }  % End markup
3021 @end lilypond
3023 Some other approaches to setting such a chant are shown in the first
3024 of the following snippets.
3026 @snippets
3028 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
3029 {chant-or-psalms-notation.ly}
3031 Canticles and other liturgical texts may be set more freely, and
3032 may use notational elements from ancient music.  Often the words
3033 are shown underneath and aligned with the notes.  If so, the notes
3034 are spaced in accordance with the syllables rather than the notes'
3035 durations.
3037 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
3038 {ancient-notation-template----modern-transcription-of-gregorian-music.ly}
3040 @seealso
3041 Learning Manual:
3042 @rlearning{Visibility and color of objects},
3043 @rlearning{Vocal ensembles}.
3045 Notation Reference:
3046 @ref{Ancient notation},
3047 @ref{Bar lines},
3048 @ref{Modifying context plug-ins},
3049 @ref{Typesetting Gregorian chant},
3050 @ref{Unmetered music},
3051 @ref{Visibility of objects}.
3054 @node Pointing a psalm
3055 @unnumberedsubsubsec Pointing a psalm
3057 The words to an Anglican psalm are usually printed in separate
3058 verses centered underneath the chant.
3060 Single chants (with 7 bars) are repeated for every verse.  Double
3061 chants (with 14 bars) are repeated for every pair of verses.  Marks
3062 are inserted in the words to show how they should be fitted to the
3063 chant.  Each verse is divided into two halves.  A colon is usually
3064 used to indicate this division.  This corresponds to the double bar
3065 line in the music.  The words before the colon are sung to the first
3066 three bars of music; the words after the colon are sung to the last
3067 four bars.
3069 Single bar lines (or in some psalters an inverted comma or similar
3070 symbol) are inserted between words to indicate where the bar lines
3071 in the music fall.  In markup mode a single bar line can be entered
3072 with the bar check symbol, @code{|}.
3074 @lilypond[verbatim,quote]
3075 \markup {
3076   \fill-line {
3077     \column {
3078       \left-align {
3079         \line { O come let us sing | unto the | Lord : let }
3080         \line { us heartily rejoice in the | strength of | our }
3081         \line { sal- | -vation. }
3082       }
3083     }
3084   }
3086 @end lilypond
3088 Other symbols may require glyphs from the @code{fetaMusic} fonts.
3089 For details, see @ref{Fonts}.
3091 @lilypond[verbatim,quote]
3092 tick = \markup {
3093   \raise #1 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
3095 \markup {
3096   \fill-line {
3097     \column {
3098       \left-align {
3099         \line { O come let us sing \tick unto the \tick Lord : let }
3100         \line {
3101           us heartily rejoice in the \tick strength of \tick our
3102         }
3103         \line { sal \tick vation. }
3104       }
3105     }
3106   }
3108 @end lilypond
3110 Where there is one whole note in a bar all the words corresponding
3111 to that bar are recited on that one note in speech rhythm.  Where
3112 there are two notes in a bar there will usually be only one or two
3113 corresponding syllables.  If there are more that two syllables a
3114 dot is usually inserted to indicate where the change in note occurs.
3116 @lilypond[verbatim,quote]
3117 dot = \markup {
3118   \raise #0.7 \musicglyph #"dots.dot"
3120 tick = \markup {
3121   \raise #1 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
3123 \markup {
3124   \fill-line {
3125     \column {
3126       \left-align {
3127         \line {
3128           O come let us sing \tick unto \dot the \tick Lord : let
3129         }
3130         \line {
3131           us heartily rejoice in the \tick strength of \tick our
3132         }
3133         \line { sal \tick vation. }
3134       }
3135     }
3136   }
3138 @end lilypond
3140 In some psalters an asterisk is used to indicate a break in a
3141 recited section instead of a comma, and stressed or slightly
3142 lengthened syllables are indicated in bold text.
3144 @lilypond[verbatim,quote]
3145 dot = \markup {
3146   \raise #0.7 \musicglyph #"dots.dot"
3148 tick = \markup {
3149   \raise #1 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
3151 \markup {
3152   \fill-line {
3153     \column {
3154       \left-align {
3155         \line { Today if ye will hear his voice * }
3156         \line {
3157           \concat { \bold hard en }
3158           | not your | hearts : as in the pro-
3159         }
3160         \line { vocation * and as in the \bold day of tempt- | }
3161         \line { -ation | in the | wilderness. }
3162       }
3163     }
3164   }
3166 @end lilypond
3168 In other psalters an accent is placed over the syllable to indicate
3169 stress.
3171 @lilypond[verbatim,quote]
3172 tick = \markup {
3173   \raise #2 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
3175 \markup {
3176   \fill-line {
3177     \column {
3178       \left-align {
3179         \line {
3180           O come let us \concat {
3181             si \combine \tick ng
3182           }
3183           | unto the | Lord : let
3184         }
3185         \line {
3186           us heartily \concat {
3187             rejo \combine \tick ice
3188           }
3189           in the | strength of | our
3190         }
3191         \line { sal- | -vation. }
3192       }
3193     }
3194   }
3196 @end lilypond
3198 The use of markup to center text, and arrange lines in columns is
3199 described in @ref{Formatting text}.
3201 Most of these elements are shown in one or other of the two verses
3202 in the template, see @qq{Psalms} in @rlearning{Vocal ensembles}.
3204 @seealso
3205 Learning Manual:
3206 @rlearning{Vocal ensembles}.
3208 Notation Reference:
3209 @ref{Fonts},
3210 @ref{Formatting text}.
3213 @node Partial measures in hymn tunes
3214 @unnumberedsubsubsec Partial measures in hymn tunes
3216 Hymn tunes frequently start and end every line of music with
3217 partial measures so that each line of music corresponds exactly
3218 with a line of text.  This requires a @code{\partial} command at
3219 the start of the music and @code{\bar "|"} or @code{\bar "||"}
3220 commands at the end of each line.
3222 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
3223 {hymn-template.ly}
3226 @node Ancient vocal music
3227 @subsection Ancient vocal music
3229 Ancient vocal music is supported, as explained in
3230 @ref{Ancient notation}.
3232 @c TODO
3234 @c Add "Printing both the ancient and the modern clef in vocal music" snippet,
3235 @c and "Transcription of Ancient music with incipit" snippet. -vv
3237 @seealso
3238 Notation Reference:
3239 @ref{Ancient notation}.