]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/notation/vocal.itely
Doc: NR 2.1 Vocal: expunge DevNull
[lilypond.git] / Documentation / notation / vocal.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @ignore
3     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
4
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
9
10 @c \version "2.12.0"
11
12 @node Vocal music
13 @section Vocal music
14
15 @c TODO: inspirational headword
16
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.
19
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::
29
30 @end menu
31
32
33 @node Common notation for vocal music
34 @subsection Common notation for vocal music
35
36 This section discusses issues common to most types of vocal music.
37
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 * Skipping notes::
47 * Extenders and hyphens::
48 @end menu
49
50
51 @node References for vocal music
52 @unnumberedsubsubsec References for vocal music
53
54 This section indicates where to find details of notation issues
55 that may arise in any type of vocal music.
56
57 @itemize
58
59 @item
60 Most styles of vocal music use written text as lyrics.  An introduction
61 to this notation is to be found in @rlearning{Setting simple songs}.
62
63 @item
64 Vocal music is likely to require the use of @code{markup} mode, either
65 for lyrics of for other text elements (character's names, etc.).
66 This syntax is described in @ref{Text markup introduction}.
67
68 @item
69 @notation{Ambitus} may be added at the beginning of vocal staves, as explained
70 in @ref{Ambitus}.
71
72 @end itemize
73
74 @seealso
75 Music Glossary:
76 @rglos{ambitus}.
77
78 @node Entering lyrics
79 @unnumberedsubsubsec Entering lyrics
80
81 @cindex lyrics, entering
82 @cindex entering lyrics
83 @cindex punctuation in lyrics
84 @cindex lyrics punctuation
85 @cindex spaces in lyrics
86 @cindex quotes in lyrics
87 @funindex \lyricmode
88
89 @c TODO should we explain hyphens here
90
91 Lyrics are entered in a special input mode, which can be introduced
92 by the keyword @code{\lyricmode}, or by using @code{\addlyrics} or
93 @code{\lyricsto}.  In this mode the input @code{d} is not parsed as
94 the pitch @notation{D}, but rather as a one-letter syllable of text.
95 In other words, syllables are entered like notes but with pitches
96 replaced by text.
97
98 For example:
99
100 @example
101 \lyricmode @{ Three4 blind mice,2 three4 blind mice2 @}
102 @end example
103
104 There are two main methods for specifying the horizontal placement
105 of the syllables, either by specifying the duration of each syllable
106 explicitly, as in the example above, or by leaving the lyrics to be
107 aligned automatically to a melody or other voice of music, using
108 @code{\addlyrics} or @code{\lyricsto}.  The former method is
109 described below in @ref{Manual syllable durations}.  The latter
110 method is described in @ref{Automatic syllable durations}.
111
112 A word or syllable of lyrics begins with an alphabetic character
113 (plus some other characters, see below) and is terminated by any
114 white space or a digit.  Later characters in the syllable can be any
115 character that is not a digit or white space.
116
117 Because any character that is not a digit or white space is regarded
118 as part of the syllable, a word is valid even if it ends with
119 @code{@}}, which often leads to the following mistake:
120
121 @example
122 \lyricmode @{ lah lah lah@}
123 @end example
124
125 In this example, the @code{@}} is included in the final syllable, so the
126 opening brace is not balanced and the input file will probably not
127 compile.  Instead, braces should always be surrounded with white space:
128
129 @example
130 \lyricmode @{ lah lah lah @}
131 @end example
132
133 @cindex overrides in lyric mode
134 @funindex \override in \lyricmode
135
136 Similarly, in lyric mode, a period will be included in the
137 alphabetic sequence that it follows.  As a consequence, spaces
138 must be inserted around the period in @code{\override} commands.
139 Do @emph{not} write
140
141 @example
142 \override Score.LyricText #'font-shape = #'italic
143 @end example
144
145 @noindent
146 but instead use
147
148 @example
149 \override Score . LyricText #'font-shape = #'italic
150 @end example
151
152 Punctuation, lyrics with accented characters, characters from
153 non-English languages, or special characters (such as the heart
154 symbol or slanted quotes), may simply be inserted directly
155 into the input file, providing it is saved with UTF-8 encoding.
156 For more information, see @ref{Text encoding}.
157
158 @lilypond[quote,verbatim]
159 \relative c' { e4 f e d e f e2 }
160 \addlyrics { He said: “Let my peo -- ple go.” }
161 @end lilypond
162
163 Normal quotes may be used in lyrics, but they have to be preceded
164 with a backslash character and the whole syllable has to be
165 enclosed between additional quotes.  For example,
166
167 @lilypond[quote,verbatim]
168 \relative c' { \time 3/4 e4 e4. e8 d4 e d c2. }
169 \addlyrics { "\"I" am so lone -- "ly,\"" said she }
170 @end lilypond
171
172 The full definition of a word start in lyrics mode is somewhat more
173 complex.  A word in lyrics mode is one that begins with an
174 alphabetic character, @code{_}, @code{?}, @code{!}, @code{:},
175 @code{'}, the control characters @code{^A} through @code{^F},
176 @code{^Q} through @code{^W}, @code{^Y}, @code{^^}, any 8-bit
177 character with an ASCII code over 127, or a two-character
178 combination of a backslash followed by one of @code{`}, @code{'},
179 @code{"}, or @code{^}.
180
181 @c " to balance double quotes for not-so-bright context-sensitive editors
182
183 @seealso
184 Learning Manual:
185 @rlearning{Songs}.
186
187 Notation Reference:
188 @ref{Automatic syllable durations},
189 @ref{Fonts},
190 @ref{Input modes},
191 @ref{Manual syllable durations}.
192
193 Internals Reference:
194 @rinternals{LyricText}.
195
196
197 @node Aligning lyrics to a melody
198 @unnumberedsubsubsec Aligning lyrics to a melody
199
200 @cindex lyrics, aligning to a melody
201 @funindex \lyricmode
202 @funindex \addlyrics
203 @funindex \lyricsto
204
205 Lyrics are printed by interpreting them in the context called
206 @code{Lyrics}, see @ref{Contexts explained}.
207
208 @example
209 \new Lyrics \lyricmode @{ @dots{} @}
210 @end example
211
212 Lyrics can be aligned with melodies in two main ways:
213
214 @itemize
215
216 @item
217 They can be aligned automatically, with the durations of the
218 syllables being taken from an associated melody or other voice
219 of music, using @code{\addlyrics} or @code{\lyricsto}.  See
220 @ref{Automatic syllable durations}.
221
222 @item
223 They can be aligned independently of the duration of any notes
224 if the durations of the syllables are specified explicitly,
225 and entered with @code{\lyricmode}.  See
226 @ref{Manual syllable durations}.
227
228 @end itemize
229
230 The following example compares different ways to align lyrics.
231
232 @lilypond[quote,ragged-right,verbatim]
233 <<
234   \new Voice = "one" \relative c'' {
235     \autoBeamOff
236     \time 2/4
237     c4 b8. a16 g4. f8 e4 d c2
238   }
239
240 % uses default durations of 2;
241   \new Lyrics \lyricmode {
242     Joy to the earth!
243   }
244
245 % explicit durations; left-aligned by default
246   \new Lyrics \lyricmode {
247     Joy4 to8. the16 world!4. the8 Lord4 is come.2
248   }
249
250 % takes durations and alignment from notes in "one"
251   \new Lyrics \lyricsto "one" {
252     No more let sins and sor -- rows grow.
253   }
254 >>
255 @end lilypond
256
257 The first stanza is not aligned with the notes because the durations
258 were not specified, and the default value of 2 is used for each
259 word.  This can be useful for dialogue over music; for more, see
260 @ref{Dialogue over music}.
261
262 The second stanza with explicitly specified durations is
263 aligned to the notes because the durations are the same as the
264 corresponding notes.  The words are left-aligned to the notes by
265 default.  Useful if the words to different stanzas fit the notes in
266 different ways.
267
268 The third stanza shows the normal way of entering lyrics.
269
270 @seealso
271 Learning Manual:
272 @rlearning{Aligning lyrics to a melody}.
273
274 Internals Reference:
275 @rinternals{Lyrics}.
276
277 @node Automatic syllable durations
278 @unnumberedsubsubsec Automatic syllable durations
279
280 @cindex syllable durations, automatic
281 @cindex lyrics and melodies
282
283 Lyrics are aligned and typeset with the help of skips, hyphens and
284 extender lines.
285
286 The @code{Voice} context containing the melody to which the lyrics
287 are being aligned must not have @qq{died}, or the lyrics after that
288 point will be lost.  This can happen if there are periods when that
289 voice has nothing to do.  For methods of keeping contexts alive, see
290 @ref{Keeping contexts alive}.
291
292 The lyrics can be aligned under a given melody
293 automatically.  This is achieved by combining the
294 melody and the lyrics with the @code{\lyricsto} expression
295
296 @example
297 \new Lyrics \lyricsto @var{name} @{ @dots{} @}
298 @end example
299
300 @noindent
301 This aligns the lyrics to the
302 notes of the @code{Voice} context called @var{name}, which must
303 already exist.  Therefore normally the @code{Voice} is specified first, and
304 then the lyrics are specified with @code{\lyricsto}.  The command
305 @code{\lyricsto} switches to @code{\lyricmode} mode automatically, so the
306 @code{\lyricmode} keyword may be omitted.
307
308
309 @cindex \addlyrics
310
311 The @code{\addlyrics} command is actually just a convenient shortcut
312 that can sometimes be used instead of having to set up the lyrics
313 through a more complicated LilyPond structure.
314
315 @example
316 @{ MUSIC @}
317 \addlyrics @{ LYRICS @}
318 @end example
319
320 @noindent
321 is the same as
322
323 @example
324 \new Voice = "blah" @{ music @}
325 \new Lyrics \lyricsto "blah" @{ LYRICS @}
326 @end example
327
328 Here is an example,
329
330 @lilypond[ragged-right,verbatim,fragment,quote]
331 \time 3/4
332 \relative c' { c2 e4 g2. }
333 \addlyrics { play the game }
334 @end lilypond
335
336 More stanzas can be added by adding more
337 @code{\addlyrics} sections:
338
339 @lilypond[ragged-right,verbatim,fragment,quote]
340 \time 3/4
341 \relative c' { c2 e4 g2. }
342 \addlyrics { play the game }
343 \addlyrics { speel het spel }
344 \addlyrics { joue le jeu }
345 @end lilypond
346
347 The command @code{\addlyrics} cannot handle polyphony settings.
348 For these cases one should use @code{\lyricsto} and
349 @code{\lyricmode}, for details see @ref{Entering lyrics}.
350
351 @node Manual syllable durations
352 @unnumberedsubsubsec Manual syllable durations
353
354 Lyrics can also be entered without @code{\addlyrics} or
355 @code{\lyricsto}.  In this case, syllables are entered like
356 notes -- but with pitches replaced by text -- and the duration
357 of each syllable must be entered explicitly.  For example:
358
359 @example
360 play2 the4 game2.
361 sink2 or4 swim2.
362 @end example
363
364 The alignment to a melody can be specified with the
365 @code{associatedVoice} property,
366
367 @example
368 \set associatedVoice = #"lala"
369 @end example
370
371 @noindent
372
373 @c TODO setting associated voice does more than format extender
374 @c lines.  Document it properly.  Does it have anything to do
375 @c with manual durations in lyrics?
376
377 The value of the property (here: @code{"lala"}) should be the name of
378 a @code{Voice} context.  Without this setting, extender lines
379 will not be formatted properly.
380
381 Here is an example demonstrating manual lyric durations,
382
383 @lilypond[relative=1,verbatim,quote]
384 <<
385   \new Voice = "melody" {
386     \time 3/4
387     c2 e4 g2.
388   }
389   \new Lyrics \lyricmode {
390     \set associatedVoice = #"melody"
391     play2 the4 game2.
392   }
393 >>
394 @end lilypond
395
396 In some complex vocal music, it may be desirable to place lyrics
397 completely independently of notes.  In this case do not use
398 @code{\lyricsto} or @code{\addlyrics} and do not set
399 @code{associatedVoice}:
400
401 @lilypond[quote,verbatim,ragged-right]
402 <<
403   \new Staff {
404     \relative c'' {
405       c2 c2
406       d1
407     }
408   }
409   \new Lyrics {
410     \lyricmode {
411       I2 like4. my8 cat!1
412     }
413   }
414   \new Staff {
415     \relative c' {
416       c8 c c c c c c c
417       c8 c c c c c c c
418     }
419   }
420 >>
421 @end lilypond
422
423 @c TODO see also feature request 707 - show how to do this with manual durations
424
425 @seealso
426 Notation Reference:
427 @ref{Keeping contexts alive}.
428
429 Internals Reference:
430 @rinternals{Lyrics},
431 @rinternals{Voice}.
432
433
434 @node Multiple syllables to one note
435 @unnumberedsubsubsec Multiple syllables to one note
436
437 @funindex _
438 @cindex spaces, in lyrics
439 @cindex quotes, in lyrics
440 @cindex ties, in lyrics
441
442 In order to assign more than one syllable to a single note with
443 spaces between the syllables, you can surround the phrase with
444 quotes or use a @code{_} character.  Alternatively, you can use
445 code the tilde symbol (@code{~}) to get a lyric tie.  The lyric
446 tie is implemented with the Unicode character U+203F, so be
447 sure to have a font (like DejaVuLGC) installed that includes this
448 glyph.
449
450 @lilypond[quote,ragged-right,fragment,verbatim]
451 \time 3/4
452 \relative c' { c2 e4 g2 e4 }
453 \addlyrics { gran- de_a- mi- go }
454 \addlyrics { pu- "ro y ho-" nes- to }
455 \addlyrics { pu- ro~y~ho- nes- to }
456 @end lilypond
457
458
459 @seealso
460 Internals Reference:
461 @rinternals{LyricCombineMusic}.
462
463
464 @node Multiple notes to one syllable
465 @unnumberedsubsubsec Multiple notes to one syllable
466
467 @cindex melisma
468 @cindex melismata
469 @cindex phrasing, in lyrics
470 @funindex \melisma
471 @funindex \melismaEnd
472
473 Sometimes, particularly in Medieval music, several notes are to be
474 sung on one syllable; such vocalises are called melismata, or
475 @rglos{melisma}s.  The syllable to a melisma is usually
476 left-aligned with the first note of the melisma.
477
478 When a melisma occurs on a syllable other that the last one in a
479 word, that syllable is usually joined to the following one with a
480 hyphenated line.  This is indicated by placing a double hyphen,
481 @code{--}, immediately after the syllable.
482
483 Alternatively, when a melisma occurs on the last or only syllable in
484 a word an extender line is usually drawn from the end of the syllable
485 to the last note of the melisma.  This is indicated by placing a
486 double underscore, @code{__}, immediately after the word.
487
488 There are five ways in which melismata can be indicated:
489
490 @itemize
491
492 @item
493 Melismata are created automatically over notes which are tied
494 together:
495
496 @lilypond[quote,relative=2,verbatim]
497 <<
498   \new Voice = "melody" {
499     \time 3/4
500     f4 g2 ~ |
501     g4 e2 ~ |
502     e8
503   }
504   \new Lyrics \lyricsto "melody" {
505     Ki -- ri -- e __
506   }
507 >>
508 @end lilypond
509
510 @item
511 Melismata can be created automatically from the music by placing
512 slurs over the notes of each melisma.  This is the usual way of
513 entering lyrics:
514
515 @lilypond[quote,relative=2,verbatim]
516 <<
517   \new Voice = "melody" {
518     \time 3/4
519     f4 g8 ( f e f )
520     e8 ( d e2 )
521   }
522   \new Lyrics \lyricsto "melody" {
523     Ki -- ri -- e __
524   }
525 >>
526 @end lilypond
527
528 @item
529 Notes are considered a melisma if they are manually beamed,
530 providing automatic beaming is switched off.  See
531 @ref{Setting automatic beam behavior}.
532
533 @lilypond[quote,relative=2,verbatim]
534 <<
535   \new Voice = "melody" {
536     \time 3/4
537     \autoBeamOff
538     f4 g8[ f e f]
539     e2.
540   }
541   \new Lyrics \lyricsto "melody" {
542     Ki -- ri -- e
543   }
544 >>
545 @end lilypond
546
547 Clearly this is not suited to melisma over notes which are longer
548 than eighth notes.
549
550 @item
551 An unslurred group of notes will be treated as a melisma if they
552 are bracketed between @code{\melisma} and @code{\melismaEnd}.
553
554 @lilypond[quote,relative=2,verbatim]
555 <<
556   \new Voice = "melody" {
557     \time 3/4
558     f4 g8
559     \melisma
560     f e f
561     \melismaEnd
562     e2.
563   }
564   \new Lyrics \lyricsto "melody" {
565     Ki -- ri -- e
566   }
567 >>
568 @end lilypond
569
570 Note that this method cannot be used to indicate two melismata if
571 the first one is immediately followed by another.
572
573 @item
574 A melisma can be defined entirely in the lyrics by entering a
575 single underscore character, @code{_}, for every extra note that has
576 to be added to the melisma.
577
578 @lilypond[verbatim, quote, relative=2]
579 <<
580   \new Voice = "melody" {
581     \time 3/4
582     f4 g8 f e f
583     e8 d e2
584   }
585   \new Lyrics \lyricsto "melody" {
586     Ki -- ri -- _ _ _ e __ _ _
587   }
588 >>
589 @end lilypond
590
591 @end itemize
592
593 It is possible to have ties, slurs and manual beams in the melody
594 without their indicating melismata.  To do this, set
595 @code{melismaBusyProperties} and indicate the melismata with single
596 underscores in the lyrics, one underscore for each extra note:
597
598 @lilypond[relative=1,verbatim,quote]
599 <<
600   \new Voice = "melody" {
601     \time 3/4
602     \set melismaBusyProperties = #'()
603     c4 d ( e )
604     g8 [ f ] f4( e)
605     d e ~ e
606   }
607   \new Lyrics \lyricsto "melody" {
608     Ky -- _ _ _ _ ri -- _ _ e __ _
609   }
610 >>
611 @end lilypond
612
613 Other settings for @code{melismaBusyProperties} can be used to
614 include or exclude ties, slurs, and beams from the automatic
615 detection of melismata; see @code{melismaBusyProperties} in
616 @rinternals{Tunable context properties}.
617
618 @predefined
619
620 @code{\autoBeamOff},
621 @code{\autoBeamOn},
622 @code{\melisma},
623 @code{\melismaEnd}.
624
625 @seealso
626 Musical Glossary:
627 @rglos{melisma}.
628
629 Learning Manual:
630 @rlearning{Aligning lyrics to a melody}.
631
632 Notation Reference:
633 @ref{Aligning lyrics to a melody},
634 @ref{Automatic syllable durations},
635 @ref{Setting automatic beam behavior}.
636
637 Internals Reference:
638 @rinternals{Tunable context properties}.
639
640 @knownissues
641
642 Extender lines under melismata are not created automatically; they
643 must be inserted manually with a double underscore.
644
645 @node Skipping notes
646 @unnumberedsubsubsec Skipping notes
647
648 Making a lyric line run slower than the melody can be achieved by
649 inserting @code{\skip}s into the lyrics.  For every @code{\skip},
650 the text will be delayed by another note.  The @code{\skip} command
651 must be followed by a valid duration, but this is ignored when
652 @code{\skip} is used in lyrics which derive their durations from the
653 notes in an associated melody through @code{\addlyrics} or
654 @code{\lyricsto}.
655
656 @lilypond[verbatim,ragged-right,quote]
657 \relative c' { c c g' }
658 \addlyrics {
659   twin -- \skip 4
660   kle
661 }
662 @end lilypond
663
664
665 @node Extenders and hyphens
666 @unnumberedsubsubsec Extenders and hyphens
667
668 @cindex melisma
669 @cindex extender
670
671 @c leave this as samp. -gp
672 In the last syllable of a word, melismata are sometimes indicated with
673 a long horizontal line starting in the melisma syllable, and ending in
674 the next one.  Such a line is called an extender line, and it is
675 entered as @samp{ __ } (note the spaces before and after the two
676 underscore characters).
677
678 @warning{Melismata are indicated in the score with extender lines,
679 which are entered as one double underscore; but short melismata can
680 also be entered by skipping individual notes, which are entered as
681 single underscore characters; these do not make an extender line to be
682 typeset by default.}
683
684 @cindex hyphens
685
686 @c leave this as samp. -gp
687 Centered hyphens are entered as @samp{ -- } between syllables of a same word
688 (note the spaces before and after the two hyphen characters).  The hyphen
689 will be centered between the syllables, and its length will be adjusted
690 depending on the space between the syllables.
691
692 In tightly engraved music, hyphens can be removed.  Whether this
693 happens can be controlled with the @code{minimum-distance} (minimum
694 distance between two syllables) and the @code{minimum-length}
695 (threshold below which hyphens are removed).
696
697
698 @seealso
699 Internals Reference:
700 @rinternals{LyricExtender},
701 @rinternals{LyricHyphen}.
702
703
704 @node Techniques specific to lyrics
705 @subsection Techniques specific to lyrics
706
707 @c TODO this whole section is to be reorganised
708
709 @menu
710 * Working with lyrics and variables::
711 * Placement of lyrics::
712 * Lyrics and repeats::
713 * Divisi lyrics::
714 * Spacing out syllables::
715 @end menu
716
717
718
719 @node Working with lyrics and variables
720 @unnumberedsubsubsec Working with lyrics and variables
721
722 @c TODO rewrite this section
723
724 @cindex lyrics, variables
725
726 To define variables containing lyrics, the function @code{\lyricmode}
727 must be used.  Durations do not need to be added if the variable is
728 to be invoked with @code{\addlyrics} or @code{\lyricsto}.
729
730 @lilypond[quote,verbatim]
731 verseOne = \lyricmode { Joy to the world, the Lord is come. }
732 \score {
733   <<
734     \new Voice = "one" \relative c'' {
735       \autoBeamOff
736       \time 2/4
737       c4 b8. a16 g4. f8 e4 d c2
738     }
739     \addlyrics { \verseOne }
740   >>
741 }
742 @end lilypond
743
744 For different or more complex orderings, the best way is to set up the
745 hierarchy of staves and lyrics first, e.g.,
746 @example
747 \new ChoirStaff <<
748   \new Voice = "soprano" @{ @emph{music} @}
749   \new Lyrics = "sopranoLyrics" @{ s1 @}
750   \new Lyrics = "tenorLyrics" @{ s1 @}
751   \new Voice = "tenor" @{ @emph{music} @}
752 >>
753 @end example
754
755 @noindent
756 and then combine the appropriate melodies and lyric lines:
757
758 @example
759 \context Lyrics = sopranoLyrics \lyricsto "soprano"
760 @emph{the lyrics}
761 @end example
762
763 @noindent
764 The final input would resemble
765
766 @example
767 <<\new ChoirStaff << @emph{setup the music} >>
768  \lyricsto "soprano" @emph{etc}
769  \lyricsto "alto" @emph{etc}
770 @emph{etc}
771 >>
772 @end example
773
774 @seealso
775 @c TODO: document \new Staff << Voice \lyricsto >> bug
776 Internals Reference:
777 @rinternals{LyricCombineMusic},
778 @rinternals{Lyrics}.
779
780
781 @node Placement of lyrics
782 @unnumberedsubsubsec Placement of lyrics
783
784 @cindex placement of lyrics
785 @cindex lyrics, positioning
786
787 Lyrics are positioned above the staff, below the staff, or between
788 staves, depending on the type of music.  To place lyrics below the
789 associated staff simply define the Lyrics context below the Staff
790 context:
791
792 @lilypond[quote,verbatim]
793 \score {
794   <<
795     \new Staff {
796       \new Voice = "melody" {
797         \relative c'' { c4 c c c }
798       }
799     }
800     \new Lyrics {
801       \lyricsto "melody" {
802         Here are the words
803       }
804     }
805   >>
806 }
807 @end lilypond
808
809 To position lyrics above the staff, place the declaration of the
810 Lyrics context before the Staff and Voice contexts, but the
811 @code{\lyricsto} command must come after the Voice declaration it
812 references, like this:
813
814 @lilypond[quote,verbatim]
815 \score {
816   <<
817     \new Lyrics = "lyrics"
818     \new Staff {
819       \new Voice = "melody" {
820         \relative c'' { c4 c c c }
821       }
822     }
823     \context Lyrics = "lyrics" {
824       \lyricsto "melody" {
825         Here are the words
826       }
827     }
828   >>
829 }
830 @end lilypond
831
832 Alternatively, the position of the lyrics may be specified
833 explicitly:
834
835 @lilypond[quote,verbatim]
836 \score {
837   <<
838     \new Staff = "staff" {
839       \new Voice = "melody" {
840         \relative c'' { c4 c c c }
841       }
842     }
843     \new Lyrics \with { alignAboveContext = "staff" } {
844       \lyricsto "melody" {
845         Here are the words
846       }
847     }
848   >>
849 }
850 @end lilypond
851
852 When there are two voices on separate staves the lyrics may be
853 placed between the staves using either of these methods.  Here
854 is an example of the first method:
855
856 @lilypond[quote,verbatim]
857 \score {
858   \new ChoirStaff <<
859     \new Staff {
860       \new Voice = "sopranos" {
861         \relative c'' { c4 c c c }
862       }
863     }
864     \new Lyrics = "sopranos"
865     \new Lyrics = "contraltos"
866     \new Staff {
867       \new Voice = "contraltos" {
868         \relative c'' { a4 a a a }
869       }
870     }
871     \context Lyrics = "sopranos" {
872       \lyricsto "sopranos" {
873         Sop -- ra -- no words
874       }
875     }
876     \context Lyrics = "contraltos" {
877       \lyricsto "contraltos" {
878         Con -- tral -- to words
879       }
880     }
881   >>
882 }
883 @end lilypond
884
885 Other combinations of lyrics and staves may be generated by
886 elaborating these examples, or by examining the SATB templates in
887 the Learning Manual.
888
889 @seealso
890 Learning Manual:
891 @rlearning{Vocal ensembles}.
892
893 Notation Reference:
894 @ref{Aligning contexts},
895 @ref{Creating contexts}.
896
897 @node Lyrics and repeats
898 @unnumberedsubsubsec Lyrics and repeats
899
900 @cindex repeats and lyrics
901 @cindex lyrics, repeating
902
903 @subheading Simple repeats
904
905 Repeats in @emph{music} are fully described elsewhere; see
906 @ref{Repeats}.  This section explains how to add lyrics to repeated
907 sections of music.
908
909 Lyrics to a section of music that is repeated should be surrounded
910 by exactly the same repeat construct as the music, if the words are
911 unchanged.
912
913 @lilypond[verbatim,quote]
914 \score {
915   <<
916     \new Staff {
917       \new Voice = "melody" {
918         \relative c'' {
919           a4 a a a
920           \repeat volta 2 { b4 b b b }
921         }
922       }
923     }
924     \new Lyrics {
925       \lyricsto "melody" {
926         Not re -- peat -- ed.
927         \repeat volta 2 { Re -- peat -- ed twice. }
928       }
929     }
930   >>
931 }
932 @end lilypond
933
934 The words will then be correctly expanded if the repeats are
935 unfolded.
936
937 @lilypond[verbatim,quote]
938 \score {
939   \unfoldRepeats {
940     <<
941       \new Staff {
942         \new Voice = "melody" {
943           \relative c'' {
944             a4 a a a
945             \repeat volta 2 { b4 b b b }
946           }
947         }
948       }
949       \new Lyrics {
950         \lyricsto "melody" {
951           Not re -- peat -- ed.
952           \repeat volta 2 { Re -- peat -- ed twice. }
953         }
954       }
955     >>
956   }
957 }
958 @end lilypond
959
960 If the repeated section is to be unfolded and has different words,
961 simply enter all the words:
962
963 @lilypond[verbatim,quote,ragged-right]
964 \score {
965   <<
966     \new Staff {
967       \new Voice = "melody" {
968         \relative c'' {
969           a4 a a a
970           \repeat unfold 2 { b4 b b b }
971         }
972       }
973     }
974     \new Lyrics {
975       \lyricsto "melody" {
976         Not re -- peat -- ed.
977         The first time words.
978         Sec -- ond time words.
979       }
980     }
981   >>
982 }
983 @end lilypond
984
985 @cindex lyric skip
986 @funindex \skip
987
988 When the words to a repeated volta section are different, the words
989 to each repeat must be entered in separate @code{Lyrics} contexts.
990 Earlier unrepeated sections must be skipped in the second and
991 subsequent repeats.  The easiest way to skip several notes is to
992 use @code{\repeat unfold} around the @code{\skip} command.
993
994 Note: do not use an underscore, @code{_}, to skip notes in this
995 particular case.  As this syntax indicates a melisma, it will cause
996 the preceding syllable to be left-aligned.
997
998 @warning{The @code{@bs{}skip} command must be followed by a number,
999 but this number is ignored in lyrics which derive their durations
1000 from the notes in an associated melody through @code{\addlyrics} or
1001 @code{\lyricsto}.  Each @code{@bs{}skip} skips a single note of any
1002 value, irrespective of the value of the following number.}
1003
1004 @lilypond[verbatim,quote]
1005 \score {
1006   <<
1007     \new Staff {
1008       \new Voice = "melody" {
1009         \relative c'' {
1010           a4 a a a
1011           \repeat volta 2 { b4 b b b }
1012         }
1013       }
1014     }
1015     \new Lyrics {
1016       \lyricsto "melody" {
1017         Not re -- peat -- ed.
1018         The first time words.
1019       }
1020     }
1021     \new Lyrics {
1022       \lyricsto "melody" {
1023         % skip 4 notes of any duration
1024         \repeat unfold 4 { \skip 1 }
1025         Sec -- ond time words.
1026       }
1027     }
1028   >>
1029 }
1030 @end lilypond
1031
1032 @cindex lyrics, repeating with a temporary voice
1033
1034 An alternative way, which avoids skips and having to count notes,
1035 is to use a temporary voice for the repeated section.  This may be
1036 preferable if the earlier sections are still subject to change.  A
1037 temporary voice can be inserted anywhere in the main music stream
1038 in parallel with it, as shown below, but it may be necessary to
1039 keep the main voice alive in complex scores when using this
1040 technique; see @ref{Keeping contexts alive}.
1041
1042 @lilypond[verbatim,quote,ragged-right]
1043 \score {
1044   <<
1045     \new Staff {
1046       \new Voice = "singleVoice" {
1047         \relative c'' { a4 a a a }
1048         \new Voice = "repeatVoice" {
1049           \relative c'' \repeat volta 3 { b4 b b b }
1050         }
1051         \relative c'' { c4 c c c }
1052       }
1053     }
1054     \new Lyrics <<
1055       \lyricsto "singleVoice" {
1056         Not re -- peat -- ed.
1057         The end sec -- tion.
1058       }
1059       \lyricsto "repeatVoice" {
1060         The first time words.
1061       }
1062     >>
1063     \new Lyrics {
1064       \lyricsto "repeatVoice" {
1065         Sec -- ond time words.
1066       }
1067     }
1068     \new Lyrics {
1069       \lyricsto "repeatVoice" {
1070         The third time words.
1071       }
1072     }
1073   >>
1074 }
1075 @end lilypond
1076
1077 @c TODO lowering a common line of lyrics
1078
1079 @subheading Repeats with alternative endings
1080
1081 @cindex lyrics, repeats with alternative endings
1082 @cindex repeating lyrics with alternative endings
1083 @cindex alternative endings and lyrics
1084
1085 If the words of the repeated section are the same, exactly the
1086 same structure can be used for both the lyrics and music.
1087
1088 @lilypond[quote,verbatim]
1089 \score {
1090   <<
1091     \new Staff {
1092       \time 2/4
1093       \new Voice = "melody" {
1094         \relative c'' {
1095           a4 a a a
1096           \repeat volta 2 { b4 b }
1097           \alternative { { b b } { b c } }
1098         }
1099       }
1100     }
1101     \new Lyrics {
1102       \lyricsto "melody" {
1103         Not re -- peat -- ed.
1104         \repeat volta 2 { Re -- peat -- }
1105         \alternative { { ed twice. } { ed twice. } }
1106       }
1107     }
1108   >>
1109 }
1110 @end lilypond
1111
1112 But when the repeated section has different words, a repeat
1113 construct cannot be used around the words and @code{\skip} commands
1114 have to be inserted manually as described in the previous section to
1115 skip over the notes in the alternative sections which do not apply.
1116
1117 @lilypond[verbatim,quote,ragged-right]
1118 \score {
1119   <<
1120     \new Staff {
1121       \time 2/4
1122       \new Voice = "melody" {
1123         \relative c'' {
1124           \repeat volta 2 { b4 b }
1125           \alternative { { b b } { b c } }
1126           c4 c
1127         }
1128       }
1129     }
1130     \new Lyrics {
1131       \lyricsto "melody" {
1132         The first time words.
1133         \repeat unfold 2 { \skip 1 }
1134         End here.
1135       }
1136     }
1137     \new Lyrics {
1138       \lyricsto "melody" {
1139         Sec -- ond
1140         \repeat unfold 2 { \skip 1 }
1141         time words.
1142       }
1143     }
1144   >>
1145 }
1146 @end lilypond
1147
1148 @cindex lyrics and tied notes
1149 @funindex \repeatTie
1150
1151 When a note is tied over into two or more alternative endings a
1152 tie is used to carry the note into the first alternative ending and
1153 a @code{\repeatTie} is used in the second and subsequent endings.
1154 This structure causes difficult alignment problems when lyrics are
1155 involved and increasing the length of the alternative sections so
1156 the tied notes are contained wholly within them may give a more
1157 acceptable result.
1158
1159 The tie creates a melisma into the first alternative, but not into
1160 the second and subsequent alternatives, so to align the lyrics
1161 correctly it is necessary to disable the automatic creation of
1162 melismata over the volta section and insert manual skips.
1163
1164 @lilypond[quote,verbatim]
1165 \score {
1166   <<
1167     \new Staff {
1168       \time 2/4
1169       \new Voice = "melody" {
1170         \relative c'' {
1171           \set melismaBusyProperties = #'()
1172           \repeat volta 2 { b4 b ~}
1173           \alternative { { b b } { b \repeatTie c } }
1174           \unset melismaBusyProperties
1175           c4 c
1176         }
1177       }
1178     }
1179     \new Lyrics {
1180       \lyricsto "melody" {
1181         \repeat volta 2 { Here's a __ }
1182         \alternative {
1183           { \skip 1 verse }
1184           { \skip 1 sec }
1185         }
1186         ond one.
1187       }
1188     }
1189   >>
1190 }
1191 @end lilypond
1192
1193 Note that if @code{\unfoldRepeats} is used around a section
1194 containing @code{\repeatTie}, the @code{\repeatTie} should be
1195 removed to avoid both types of tie being printed.
1196
1197 When the repeated section has different words a @code{\repeat}
1198 cannot be used around the lyrics and @code{\skip} commands need to
1199 be inserted manually, as before.
1200
1201 @lilypond[quote,verbatim]
1202 \score {
1203   <<
1204     \new Staff {
1205       \time 2/4
1206       \new Voice = "melody" {
1207         \relative c'' {
1208           \repeat volta 2 { b4 b ~}
1209           \alternative { { b b } { b \repeatTie c } }
1210           c4 c
1211         }
1212       }
1213     }
1214     \new Lyrics {
1215       \lyricsto "melody" {
1216         Here's a __ verse.
1217         \repeat unfold 2 { \skip 1 }
1218       }
1219     }
1220     \new Lyrics {
1221       \lyricsto "melody" {
1222         Here's one
1223         \repeat unfold 2 { \skip 1 }
1224         more to sing.
1225       }
1226     }
1227   >>
1228 }
1229 @end lilypond
1230
1231 If you wish to show extenders and hyphens into and out of
1232 alternative sections these must be inserted manually.
1233
1234 @lilypond[quote,verbatim]
1235 \score {
1236   <<
1237     \new Staff {
1238       \time 2/4
1239       \new Voice = "melody" {
1240         \relative c'' {
1241           \repeat volta 2 { b4 b ~}
1242           \alternative { { b b } { b \repeatTie c } }
1243           c4 c
1244         }
1245       }
1246     }
1247     \new Lyrics {
1248       \lyricsto "melody" {
1249         Here's a __ verse.
1250         \repeat unfold 2 { \skip 1 }
1251       }
1252     }
1253     \new Lyrics {
1254       \lyricsto "melody" {
1255         Here's "a_"
1256         \skip 1
1257         "_" sec -- ond one.
1258       }
1259     }
1260   >>
1261 }
1262 @end lilypond
1263
1264
1265
1266 @node Divisi lyrics
1267 @unnumberedsubsubsec Divisi lyrics
1268
1269 @cindex divided lyrics
1270 @cindex lyrics, divided
1271
1272 When just the words and rhythms of the two parts differ with the
1273 pitches remaining the same, temporarily turning off the automatic
1274 detection of melismata and indicating the melisma in the lyrics
1275 may be the appropriate method to use:
1276
1277 @lilypond[quote,verbatim]
1278 \score {
1279   <<
1280     \new Voice = "melody" {
1281       \relative c' {
1282         \set melismaBusyProperties = #'()
1283         \slurDown
1284         \slurDashed
1285         e4 e8 ( e ) c4 c |
1286         \unset melismaBusyProperties
1287         c
1288       }
1289     }
1290     \new Lyrics \lyricsto "melody" {
1291       They shall not o -- ver -- come
1292     }
1293     \new Lyrics \lyricsto "melody" {
1294       We will _
1295     }
1296   >>
1297 }
1298 @end lilypond
1299
1300 When both music and words differ it may be better to display
1301 the differing music and lyrics by naming voice contexts and
1302 attaching lyrics to those specific contexts:
1303
1304 @lilypond[verbatim,ragged-right,quote]
1305 \score {
1306   <<
1307     \new Voice = "melody" {
1308       \relative c' {
1309         <<
1310           {
1311             \voiceOne
1312             e4 e8 e
1313           }
1314           \new Voice = "splitpart" {
1315             \voiceTwo
1316             c4 c
1317           }
1318         >>
1319         \oneVoice
1320         c4 c |
1321         c
1322       }
1323     }
1324     \new Lyrics \lyricsto "melody" {
1325       They shall not o -- ver -- come
1326     }
1327     \new Lyrics \lyricsto "splitpart" {
1328       We will
1329     }
1330   >>
1331 }
1332 @end lilypond
1333
1334
1335 @node Spacing out syllables
1336 @unnumberedsubsubsec Spacing out syllables
1337
1338 @cindex Spacing lyrics
1339 @cindex Lyrics, increasing space between
1340
1341 To increase the spacing between lyrics, set the @code{minimum-distance}
1342 property of @code{LyricSpace}.
1343
1344 @lilypond[relative,verbatim,fragment,quote,ragged-right]
1345 {
1346   c c c c
1347   \override Lyrics.LyricSpace #'minimum-distance = #1.0
1348   c c c c
1349 }
1350 \addlyrics {
1351   longtext longtext longtext longtext
1352   longtext longtext longtext longtext
1353 }
1354 @end lilypond
1355
1356 @noindent
1357 To make this change for all lyrics in the score, set the property in the
1358 layout.
1359
1360 @lilypond[verbatim,quote,ragged-right]
1361 \score {
1362   \relative c' {
1363   c c c c
1364   c c c c
1365   }
1366   \addlyrics {
1367   longtext longtext longtext longtext
1368   longtext longtext longtext longtext
1369   }
1370   \layout {
1371     \context {
1372       \Lyrics
1373       \override LyricSpace #'minimum-distance = #1.0
1374     }
1375   }
1376 }
1377 @end lilypond
1378
1379 @c @snippets
1380 @c This snippet has been renamed to "lyrics-alignment.ly"
1381 @c update as soon as lsr/is updated -vv
1382 @c @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
1383 @c {lyrics-alignment.ly}
1384
1385 @c TODO: move to LSR -vv
1386 @snippets
1387
1388 Checking to make sure that text scripts and lyrics are within the margins is
1389 a relatively large computational task.  To speed up processing, LilyPond does
1390 not perform such calculations by default; to enable it, use
1391
1392 @example
1393 \override Score.PaperColumn #'keep-inside-line = ##t
1394 @end example
1395
1396 To make lyrics avoid bar lines as well, use
1397
1398 @example
1399 \layout @{
1400   \context @{
1401     \Lyrics
1402       \consists "Bar_engraver"
1403       \consists "Separating_line_group_engraver"
1404       \override BarLine #'transparent = ##t
1405   @}
1406 @}
1407 @end example
1408
1409 @c TODO Create and add lsr example of lyricMelismaAlignment
1410 @c It's used like this to center-align all lyric syllables,
1411 @c even when notes are tied. -td
1412
1413 @ignore
1414 \layout
1415 {
1416      \context { \Score lyricMelismaAlignment = #0 }
1417 }
1418 @end ignore
1419
1420
1421 @node Stanzas
1422 @subsection Stanzas
1423
1424 @menu
1425 * Adding stanza numbers::
1426 * Adding dynamics marks to stanzas::
1427 * Adding singers' names to stanzas::
1428 * Stanzas with different rhythms::
1429 * Printing stanzas at the end::
1430 * Printing stanzas at the end in multiple columns::
1431 @end menu
1432
1433
1434 @node Adding stanza numbers
1435 @unnumberedsubsubsec Adding stanza numbers
1436
1437 @cindex stanza number
1438
1439 Stanza numbers can be added by setting @code{stanza}, e.g.,
1440
1441 @lilypond[quote,ragged-right,verbatim,relative=2,fragment]
1442 \new Voice {
1443   \time 3/4 g2 e4 a2 f4 g2.
1444 } \addlyrics {
1445   \set stanza = #"1. "
1446   Hi, my name is Bert.
1447 } \addlyrics {
1448   \set stanza = #"2. "
1449   Oh, ché -- ri, je t'aime
1450 }
1451 @end lilypond
1452
1453
1454 @noindent
1455 These numbers are put just before the start of the first syllable.
1456
1457 @c TODO Create and add snippet to show how two lines of a
1458 @c stanza can be grouped together, along these lines:
1459 @c (might need improving a bit) -td
1460
1461 @ignore
1462 leftbrace = \markup { \override #'(font-encoding . fetaBraces) \lookup
1463 #"brace105" }
1464
1465 stanzaOneOne = {
1466   \set stanza = \markup { "1. " \leftbrace }
1467   \lyricmode { Child, you're mine and I love you.
1468     Lend thine ear to what I say.
1469
1470   }
1471 }
1472
1473 stanzaOneThree =  {
1474 %  \set stanza = \markup { "   "}
1475   \lyricmode { Child, I have no great -- er joy
1476     Than to have you walk in truth.
1477
1478   }
1479 }
1480
1481 \new Voice {
1482   \repeat volta 2 { c'8 c' c' c' c' c' c'4
1483                     c'8 c' c' c' c' c' c'4   }
1484 }  \addlyrics { \stanzaOneOne }
1485    \addlyrics { \stanzaOneThree }
1486
1487 @end ignore
1488
1489 @node Adding dynamics marks to stanzas
1490 @unnumberedsubsubsec Adding dynamics marks to stanzas
1491
1492 Stanzas differing in loudness may be indicated by putting a
1493 dynamics mark before each stanza.  In LilyPond, everything coming in
1494 front of a stanza goes into the @code{StanzaNumber} object; dynamics marks
1495 are no different.  For technical reasons, you have to set the stanza
1496 outside @code{\lyricmode}:
1497
1498 @lilypond[quote,ragged-right,verbatim]
1499 text = {
1500   \set stanza = \markup { \dynamic "ff" "1. " }
1501   \lyricmode {
1502     Big bang
1503   }
1504 }
1505
1506 <<
1507   \new Voice = "tune" {
1508     \time 3/4
1509     g'4 c'2
1510   }
1511 \new Lyrics \lyricsto "tune" \text
1512 >>
1513 @end lilypond
1514
1515 @node Adding singers' names to stanzas
1516 @unnumberedsubsubsec Adding singers' names to stanzas
1517
1518 @cindex singer name
1519 @cindex name of singer
1520
1521 Names of singers can also be added.  They are printed at the start of
1522 the line, just like instrument names.  They are created by setting
1523 @code{vocalName}.  A short version may be entered as @code{shortVocalName}.
1524
1525 @lilypond[fragment,ragged-right,quote,verbatim,relative=2]
1526 \new Voice {
1527   \time 3/4 g2 e4 a2 f4 g2.
1528 } \addlyrics {
1529   \set vocalName = #"Bert "
1530   Hi, my name is Bert.
1531 } \addlyrics {
1532   \set vocalName = #"Ernie "
1533   Oh, ché -- ri, je t'aime
1534 }
1535 @end lilypond
1536
1537 @node Stanzas with different rhythms
1538 @unnumberedsubsubsec Stanzas with different rhythms
1539
1540 Often, different stanzas of one song are put to one melody in slightly
1541 differing ways.  Such variations can still be captured with
1542 @code{\lyricsto}.
1543
1544 @subsubheading Ignoring melismata
1545
1546 One possibility is that the text has a melisma in one stanza, but
1547 multiple syllables in another one.  One solution is to make the faster
1548 voice ignore the melisma.  This is done by setting
1549 @code{ignoreMelismata} in the Lyrics context.
1550
1551 @lilypond[verbatim,ragged-right,quote]
1552 <<
1553   \relative c' \new Voice = "lahlah" {
1554     \set Staff.autoBeaming = ##f
1555     c4
1556     \slurDotted
1557     f8.[( g16])
1558     a4
1559   }
1560   \new Lyrics \lyricsto "lahlah" {
1561     more slow -- ly
1562   }
1563   \new Lyrics \lyricsto "lahlah" {
1564     go
1565     \set ignoreMelismata = ##t
1566     fas -- ter
1567     \unset ignoreMelismata
1568     still
1569   }
1570 >>
1571 @end lilypond
1572
1573 @knownissues
1574 Unlike most @code{\set} commands, @code{\set ignoreMelismata} does
1575 not work if prefixed with @code{\once}.  It is necessary to use
1576 @code{\set} and @code{\unset} to bracket the lyrics where melismata
1577 are to be ignored.
1578
1579 @subsubheading Adding syllables to grace notes
1580
1581 By default, grace notes (e.g. via @code{\grace}) do not get assigned
1582 syllables when using @code{\lyricsto}, but this behavior can be
1583 changed:
1584
1585 @lilypond[verbatim,ragged-right,quote]
1586 \relative c' {
1587   f4 \appoggiatura a32 b4
1588   \grace { f16[ a16] } b2
1589   \afterGrace b2 { f16[ a16] }
1590   \appoggiatura a32 b4
1591   \acciaccatura a8 b4
1592 }
1593 \addlyrics {
1594   normal
1595   \set includeGraceNotes = ##t
1596   case,
1597   gra -- ce case,
1598   after -- grace case,
1599   \set ignoreMelismata = ##t
1600   app. case,
1601   acc. case.
1602 }
1603 @end lilypond
1604
1605 @knownissues
1606 Like for @code{associatedVoice}, @code{includeGraceNotes} needs to be
1607 set at latest one syllable before the one which is to be put under a
1608 grace note.  For the case of a grace note at the very beginning of a
1609 piece of music, consider using a @code{\with} or @code{\context}
1610 block:
1611
1612 @lilypond[verbatim,ragged-right,quote]
1613 <<
1614   \new Voice = melody \relative c' {
1615     \grace { c16[( d e f] }
1616     g1) f
1617   }
1618   \new Lyrics \with { includeGraceNotes = ##t }
1619   \lyricsto melody {
1620     Ah __ fa
1621   }
1622 >>
1623 @end lilypond
1624
1625 @subsubheading Switching to an alternative melody
1626
1627 More complex variations in text underlay are possible.  It is possible
1628 to switch the melody for a line of lyrics during the text.  This is
1629 done by setting the @code{associatedVoice} property.  In the example
1630
1631 @lilypond[ragged-right,quote]
1632 <<
1633   \relative c' \new Voice = "lahlah" {
1634     \set Staff.autoBeaming = ##f
1635     c4
1636     <<
1637       \new Voice = "alternative" {
1638         \voiceOne
1639         \times 2/3 {
1640           % show associations clearly.
1641           \override NoteColumn #'force-hshift = #-3
1642           f8 f g
1643         }
1644       }
1645       {
1646         \voiceTwo
1647         f8.[ g16]
1648         \oneVoice
1649       } >>
1650     a8( b) c
1651   }
1652   \new Lyrics \lyricsto "lahlah" {
1653     Ju -- ras -- sic Park
1654   }
1655   \new Lyrics \lyricsto "lahlah" {
1656     % Tricky: need to set associatedVoice
1657     % one syllable too soon!
1658     \set associatedVoice = alternative % applies to "ran"
1659     Ty --
1660     ran --
1661     no --
1662     \set associatedVoice = lahlah % applies to "rus"
1663     sau -- rus Rex
1664   } >>
1665 @end lilypond
1666
1667 @noindent
1668 the text for the first stanza is set to a melody called @q{lahlah},
1669
1670 @example
1671 \new Lyrics \lyricsto "lahlah" @{
1672   Ju -- ras -- sic Park
1673 @}
1674 @end example
1675
1676
1677 The second stanza initially is set to the @code{lahlah} context, but
1678 for the syllable @q{ran}, it switches to a different melody.
1679 This is achieved with
1680 @example
1681 \set associatedVoice = alternative
1682 @end example
1683
1684 @noindent
1685 Here, @code{alternative} is the name of the @code{Voice} context
1686 containing the triplet.
1687
1688 @c TODO: make this easier to understand -vv
1689 This command must be one syllable too early, before @q{Ty} in this
1690 case.  In other words, changing the associatedVoice happens one step
1691 later than expected.  This is for technical reasons, and it is not a
1692 bug.
1693
1694 @example
1695 \new Lyrics \lyricsto "lahlah" @{
1696   \set associatedVoice = alternative % applies to "ran"
1697   Ty --
1698   ran --
1699   no --
1700   \set associatedVoice = lahlah % applies to "rus"
1701   sau -- rus Rex
1702 @}
1703 @end example
1704
1705 @noindent
1706 The underlay is switched back to the starting situation by assigning
1707 @code{lahlah} to @code{associatedVoice}.
1708
1709
1710 @node Printing stanzas at the end
1711 @unnumberedsubsubsec Printing stanzas at the end
1712
1713 Sometimes it is appropriate to have one stanza set
1714 to the music, and the rest added in verse form at
1715 the end of the piece.  This can be accomplished by adding
1716 the extra verses into a @code{\markup} section outside
1717 of the main score block.  Notice that there are two
1718 different ways to force linebreaks when using
1719 @code{\markup}.
1720
1721 @lilypond[ragged-right,verbatim,quote]
1722 melody = \relative c' {
1723 e d c d | e e e e |
1724 d d e d | c1 |
1725 }
1726
1727 text = \lyricmode {
1728 \set stanza = #"1." Ma- ry had a lit- tle lamb,
1729 its fleece was white as snow.
1730 }
1731
1732 \score{ <<
1733   \new Voice = "one" { \melody }
1734   \new Lyrics \lyricsto "one" \text
1735 >>
1736   \layout { }
1737 }
1738 \markup { \column{
1739   \line{ Verse 2. }
1740   \line{ All the children laughed and played }
1741   \line{ To see a lamb at school. }
1742   }
1743 }
1744 \markup{
1745   \wordwrap-string #"
1746   Verse 3.
1747
1748   Mary took it home again,
1749
1750   It was against the rule."
1751 }
1752 @end lilypond
1753
1754
1755 @node Printing stanzas at the end in multiple columns
1756 @unnumberedsubsubsec Printing stanzas at the end in multiple columns
1757
1758 When a piece of music has many verses, they are often printed in
1759 multiple columns across the page.  An outdented verse number often
1760 introduces each verse.  The following example shows how to produce such
1761 output in LilyPond.
1762
1763 @lilypond[ragged-right,quote,verbatim]
1764 melody = \relative c' {
1765   c c c c | d d d d
1766 }
1767
1768 text = \lyricmode {
1769   \set stanza = #"1." This is verse one.
1770   It has two lines.
1771 }
1772
1773 \score{ <<
1774     \new Voice = "one" { \melody }
1775     \new Lyrics \lyricsto "one" \text
1776    >>
1777   \layout { }
1778 }
1779
1780 \markup {
1781   \fill-line {
1782     \hspace #0.1 % moves the column off the left margin;
1783         % can be removed if space on the page is tight
1784      \column {
1785       \line { \bold "2."
1786         \column {
1787           "This is verse two."
1788           "It has two lines."
1789         }
1790       }
1791       \hspace #0.1 % adds vertical spacing between verses
1792       \line { \bold "3."
1793         \column {
1794           "This is verse three."
1795           "It has two lines."
1796         }
1797       }
1798     }
1799     \hspace #0.1  % adds horizontal spacing between columns;
1800         % if they are still too close, add more " " pairs
1801         % until the result looks good
1802      \column {
1803       \line { \bold "4."
1804         \column {
1805           "This is verse four."
1806           "It has two lines."
1807         }
1808       }
1809       \hspace #0.1 % adds vertical spacing between verses
1810       \line { \bold "5."
1811         \column {
1812           "This is verse five."
1813           "It has two lines."
1814         }
1815       }
1816     }
1817   \hspace #0.1 % gives some extra space on the right margin;
1818       % can be removed if page space is tight
1819   }
1820 }
1821 @end lilypond
1822
1823
1824 @seealso
1825 Internals Reference:
1826 @rinternals{LyricText},
1827 @rinternals{StanzaNumber}.
1828
1829
1830 @node Songs
1831 @subsection Songs
1832
1833 @menu
1834 * References for songs::
1835 * Lead sheets::
1836 @end menu
1837
1838 @node References for songs
1839 @unnumberedsubsubsec References for songs
1840
1841 Songs are usually written on three staves with the melody for the
1842 singer on the top staff and two staves of piano accompaniment at
1843 the bottom.  The lyrics of the first stanza are printed immediately
1844 underneath the top staff.  If there are just a small number of
1845 further stanzas these can be printed immediately under the first
1846 one, but if there are more stanzas than can be easily accommodated
1847 there the second and subsequent stanzas are printed after the music
1848 as stand-alone text.
1849
1850 All the notational elements needed to write songs are fully described
1851 elsewhere:
1852
1853 @itemize
1854
1855 @item
1856 For constructing the staff layout, see @ref{Displaying staves}.
1857
1858 @item
1859 For writing piano music, see
1860 @ref{Keyboard and other multi-staff instruments}.
1861
1862 @item
1863 For writing the lyrics to a melody line, see
1864 @ref{Common notation for vocal music}.
1865
1866 @item
1867 For placing the lyrics, see @ref{Placement of lyrics}.
1868
1869 @item
1870 For entering stanzas, see @ref{Stanzas}.
1871
1872 @item
1873 Songs are frequently printed with the chording indicated by chord
1874 names above the staves.  This is described in
1875 @ref{Displaying chords}.
1876
1877 @item
1878 To print fret diagrams of the chords for guitar accompaniment or
1879 accompaniment by other fretted instruments, see @qq{Fret diagram
1880 markups} in @ref{Common notation for fretted strings}.
1881
1882 @end itemize
1883
1884 @seealso
1885 Learning Manual:
1886 @rlearning{Songs}.
1887
1888 Notation Reference:
1889 @ref{Common notation for vocal music},
1890 @ref{Displaying chords},
1891 @ref{Displaying staves},
1892 @ref{Keyboard and other multi-staff instruments},
1893 @ref{Placement of lyrics},
1894 @ref{Stanzas}.
1895
1896 @node Lead sheets
1897 @unnumberedsubsubsec Lead sheets
1898
1899 Lead sheets may be printed by combining vocal parts and @q{chord mode};
1900 this syntax is explained in @ref{Chord notation}.
1901
1902 @snippets
1903 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
1904 {simple-lead-sheet.ly}
1905
1906 @seealso
1907 Notation Reference:
1908 @ref{Chord notation}.
1909
1910
1911 @node Choral
1912 @subsection Choral
1913
1914 @cindex anthems
1915 @cindex part songs
1916 @cindex oratorio
1917 @cindex SATB
1918
1919 This section discusses notation issues that relate most directly
1920 to choral music.  This includes anthems, part songs, oratorio,
1921 etc.
1922
1923 @menu
1924 * References for choral::
1925 * Score layouts for choral::
1926 * Divided voices::
1927 @end menu
1928
1929 @node References for choral
1930 @unnumberedsubsubsec References for choral
1931
1932 Choral music is usually notated on two, three or four staves within
1933 a @code{ChoirStaff} group.  Accompaniment, if required, is placed
1934 beneath in a @code{PianoStaff} group, which is usually reduced in
1935 size for @emph{a capella} choral works.  The notes for each vocal
1936 part are placed in a @code{Voice} context, with each staff
1937 being given either a single vocal part (i.e., one @code{Voice}) or
1938 a pair of vocal parts (i.e., two @code{Voice}s).
1939
1940 Words are placed in @code{Lyrics} contexts, either underneath each
1941 corresponding music staff, or one above and one below the music
1942 staff if this contains the music for two parts.
1943
1944 Several common topics in choral music are described fully elsewhere:
1945
1946 @itemize
1947
1948 @item
1949 An introduction to creating an SATB vocal score can be found in
1950 the Learning Manual, see @rlearning{Four-part SATB vocal score}.
1951
1952 @item
1953 Several templates suitable for various styles of choral music can
1954 also be found in the Learning Manual, see
1955 @rlearning{Vocal ensembles}.
1956
1957 @item
1958 For information about @code{ChoirStaff} and @code{PianoStaff} see
1959 @ref{Grouping staves}.
1960
1961 @item
1962 Shape noteheads, as used in Sacred Harp and similar notation, are
1963 described in @ref{Shape note heads}.
1964
1965 @item
1966 When two vocal parts share a staff the stems, ties, slurs, etc., of
1967 the higher part will be directed up and those of the lower part
1968 down.  To do this, use @code{\voiceOne} and @code{\voiceTwo}.  See
1969 @ref{Single-staff polyphony}.
1970
1971 @end itemize
1972
1973 @predefined
1974 @code{\oneVoice},
1975 @code{\voiceOne},
1976 @code{\voiceTwo}.
1977
1978 @seealso
1979 Learning Manual:
1980 @rlearning{Four-part SATB vocal score},
1981 @rlearning{Vocal ensembles}.
1982
1983 Notation Reference:
1984 @ref{Context layout order},
1985 @ref{Grouping staves},
1986 @ref{Shape note heads},
1987 @ref{Single-staff polyphony}.
1988
1989 Internals Reference:
1990 @rinternals{ChoirStaff},
1991 @rinternals{Lyrics},
1992 @rinternals{PianoStaff}.
1993
1994 @node Score layouts for choral
1995 @unnumberedsubsubsec Score layouts for choral
1996
1997 Choral music containing four staves, with or without piano
1998 accompaniment, is usually laid out with two systems per page.
1999 Depending on the page size, achieving this may require changes
2000 to several default settings.  The following settings should be
2001 considered:
2002
2003 @itemize
2004
2005 @item
2006 The global staff size can be modified to change the overall size
2007 of the elements of the score.  See @ref{Setting the staff size}.
2008
2009 @item
2010 The distances between the systems, the staves and the lyrics can
2011 all be adjusted independently.  See @ref{Vertical spacing}.
2012
2013 @item
2014 The dimensions of the vertical layout variables can be displayed as
2015 an aid to adjusting the vertical spacing.  This and other
2016 possibilities for fitting the music onto fewer pages are described
2017 in @ref{Fitting music onto fewer pages}.
2018
2019 @item
2020 If the number of systems per page changes from one to two it is
2021 customary to indicate this with a system separator mark between
2022 the two systems.  See @ref{Separating systems}.
2023
2024 @item
2025 For details of other page formatting properties, see
2026 @ref{Page formatting}.
2027
2028 @end itemize
2029
2030
2031 Dynamic markings by default are placed below the staff, but in
2032 choral music they are usually placed above the staff in order to
2033 avoid the lyrics.  The predefined command @code{\dynamicUp} does
2034 this for the dynamic markings in a single @code{Voice} context.
2035 If there are many @code{Voice} contexts this predefined command
2036 would have to be placed in every one.  Alternatively its expanded
2037 form can be used to place all dynamic markings in the entire score
2038 above their respective staves, as shown here:
2039
2040 @lilypond[verbatim,quote]
2041 \score {
2042   \new ChoirStaff <<
2043     \new Staff {
2044       \new Voice {
2045         \relative c'' { g4\f g g g }
2046       }
2047     }
2048     \new Staff {
2049       \new Voice {
2050         \relative c' { d4 d d\p d }
2051       }
2052     }
2053   >>
2054   \layout {
2055     \context {
2056       \Score
2057       \override DynamicText #'direction = #UP
2058       \override DynamicLineSpanner #'direction = #UP
2059     }
2060   }
2061 }
2062 @end lilypond
2063
2064 @predefined
2065 @code{\dynamicUp}, @code{\dynamicDown}, @code{\dynamicNeutral}.
2066
2067 @seealso
2068 Notation Reference:
2069 @ref{Changing spacing},
2070 @ref{Displaying spacing},
2071 @ref{Fitting music onto fewer pages},
2072 @ref{Page formatting},
2073 @ref{Score layout},
2074 @ref{Separating systems},
2075 @ref{Setting the staff size},
2076 @ref{Using an extra voice for breaks},
2077 @ref{Vertical spacing}.
2078
2079 Internals Reference:
2080 @rinternals{VerticalAxisGroup},
2081 @rinternals{StaffGrouper}.
2082
2083
2084 @node Divided voices
2085 @unnumberedsubsubsec Divided voices
2086
2087 @cindex voices, divided
2088
2089 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
2090 {using-arpeggiobracket-to-make-divisi-more-visible.ly}
2091
2092 @seealso
2093 Notation Reference:
2094 @ref{Expressive marks as lines}.
2095
2096
2097 @node Opera and stage musicals
2098 @subsection Opera and stage musicals
2099
2100 The music, lyrics and dialogue to opera and stage musicals are
2101 usually set out in one or more of the following forms:
2102
2103 @itemize
2104
2105 @item
2106 A @emph{Conductors' Score} containing the full orchestral and vocal
2107 parts, together with libretto cues if there are spoken passages.
2108
2109 @item
2110 @emph{Orchestral Parts} containing the music for the individual
2111 instruments of the orchestra or band.
2112
2113 @item
2114 A @emph{Vocal Score} containing all vocal parts with piano
2115 accompaniment.  The accompaniment is usually an orchestral
2116 reduction, and if so the name of the original orchestral instrument
2117 is often indicated.  Vocal scores sometimes includes stage
2118 directions and libretto cues.
2119
2120 @item
2121 A @emph{Vocal Book} containing just the vocal parts
2122 (no accompaniment), sometimes combined with the libretto.
2123
2124 @item
2125 A @emph{Libretto} containing the extended passages of spoken
2126 dialogue usually found in musicals, together with the words to the
2127 sung parts.  Stage directions are usually included.  LilyPond can
2128 be used to typeset libretti but as they contain no music
2129 alternative methods may be preferable.
2130
2131 @end itemize
2132
2133 The sections in the LilyPond documentation which cover the topics
2134 needed to create scores in the styles commonly found in opera and
2135 musicals are indicated in the References below.  This is followed
2136 by sections covering those techniques which are peculiar to
2137 typesetting opera and musical scores.
2138
2139 @menu
2140 * References for opera and stage musicals::
2141 * Character names::
2142 * Musical cues::
2143 * Spoken music::
2144 * Dialogue over music::
2145 @end menu
2146
2147 @node References for opera and stage musicals
2148 @unnumberedsubsubsec References for opera and stage musicals
2149
2150 @itemize
2151
2152 @item
2153 A conductors' score contains many grouped staves and lyrics.  Ways
2154 of grouping staves is shown in @ref{Grouping staves}.  To nest
2155 groups of staves see @ref{Nested staff groups}.
2156
2157 @item
2158 The printing of empty staves in conductors' scores and vocal scores
2159 is often suppressed.  To create such a @qq{Frenched score} see
2160 @ref{Hiding staves}.
2161
2162 @item
2163 Writing orchestral parts is covered in @ref{Writing parts}.
2164 Other sections in the Specialist notation chapter may be relevant,
2165 depending on the orchestration used.  Many instruments are
2166 transposing instruments, see @ref{Instrument transpositions}.
2167
2168 @item
2169 If the number of systems per page changes from page to page it is
2170 customary to separate the systems with a system separator mark.
2171 See @ref{Separating systems}.
2172
2173 @item
2174 For details of other page formatting properties, see
2175 @ref{Page formatting}.
2176
2177 @item
2178 Dialogue cues and stage directions can be inserted with markup.
2179 See @ref{Text}.  Extensive stage directions can be inserted with
2180 a section of stand-alone markup between two @code{\score} blocks.
2181 See @ref{Separate text}.
2182
2183 @end itemize
2184
2185 @seealso
2186 Musical Glossary:
2187 @rglos{Frenched score},
2188 @rglos{Frenched staves},
2189 @rglos{transposing instrument}.
2190
2191 Notation Reference:
2192 @ref{Grouping staves},
2193 @ref{Hiding staves},
2194 @ref{Instrument transpositions},
2195 @ref{Nested staff groups},
2196 @ref{Page formatting},
2197 @ref{Separating systems},
2198 @ref{Transpose},
2199 @ref{Writing parts},
2200 @ref{Writing text}.
2201
2202
2203 @node Character names
2204 @unnumberedsubsubsec Character names
2205
2206 @cindex character names
2207 @cindex names, character
2208
2209 Character names are usually shown to the left of the staff when the
2210 staff is dedicated to that character alone.  The instrument name can
2211 be used for this purpose.
2212
2213 @lilypond[quote,verbatim,ragged-right]
2214 \score {
2215   <<
2216     \new Staff {
2217       \set Staff.instrumentName = #"Kaspar"
2218       \set Staff.shortInstrumentName = #"Kas"
2219       \relative c' {
2220         \clef "G_8"
2221         c4 c c c
2222         \break
2223         c4 c c c
2224       }
2225     }
2226     \new Staff {
2227       \set Staff.instrumentName = #"Melchior"
2228       \set Staff.shortInstrumentName = #"Mel"
2229       \clef "bass"
2230       \relative c' {
2231         a4 a a a
2232         a4 a a a
2233       }
2234     }
2235   >>
2236 }
2237 @end lilypond
2238
2239 When two or more characters share a staff the character's name is
2240 usually printed above the staff at the start of every section
2241 applying to that character.  This can be done with markup.  Often a
2242 specific font is used for this purpose.
2243
2244 @lilypond[quote,verbatim,relative=1]
2245 \clef "G_8"
2246 c4^\markup \fontsize #1 \smallCaps Kaspar
2247 c c c
2248 \clef "bass"
2249 a4^\markup \fontsize #1 \smallCaps Melchior
2250 a a a
2251 \clef "G_8"
2252 c4^\markup \fontsize #1 \smallCaps Kaspar
2253 c c c
2254 @end lilypond
2255
2256 Alternatively, if there are many character changes, it may be
2257 easier to set up @qq{instrument} definitions for each character at
2258 the top level so that @code{\instrumentSwitch} can be used to
2259 indicate each change.
2260
2261 @lilypond[quote,verbatim]
2262 \addInstrumentDefinition #"kaspar"
2263   #`((instrumentTransposition . ,(ly:make-pitch -1 0 0))
2264      (shortInstrumentName . "Kas.")
2265      (clefGlyph . "clefs.G")
2266      (clefOctavation . -7)
2267      (middleCPosition . 1)
2268      (clefPosition . -2)
2269      (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Kaspar"))
2270      (midiInstrument . "voice oohs"))
2271
2272 \addInstrumentDefinition #"melchior"
2273   #`((instrumentTransposition . ,(ly:make-pitch 0 0 0))
2274      (shortInstrumentName . "Mel.")
2275      (clefGlyph . "clefs.F")
2276      (clefOctavation . 0)
2277      (middleCPosition . 6)
2278      (clefPosition . 2)
2279      (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Melchior"))
2280      (midiInstrument . "voice aahs"))
2281
2282 \relative c' {
2283   \instrumentSwitch "kaspar"
2284   c4 c c c
2285   \instrumentSwitch "melchior"
2286   a4 a a a
2287   \instrumentSwitch "kaspar"
2288   c4 c c c
2289 }
2290 @end lilypond
2291
2292 @seealso
2293 Notation Reference:
2294 @ref{Instrument names},
2295 @ref{Scheme functions},
2296 @ref{Text},
2297 @ref{Text markup commands}.
2298
2299 Extending LilyPond:
2300 @rextend{Markup construction in Scheme}.
2301
2302 @node Musical cues
2303 @unnumberedsubsubsec Musical cues
2304
2305 @cindex musical cues
2306 @cindex cues, musical
2307
2308 Musical cues can be inserted in Vocal Scores, Vocal Books and
2309 Orchestral Parts to indicate what music in another part
2310 immediately precedes an entry.  Also, cues are often inserted in the
2311 piano reduction in Vocal Scores to indicate what each orchestral
2312 instrument is playing.  This aids the conductor when a full
2313 Conductors' Score is not available.
2314
2315 The basic mechanism for inserting cues is fully explained in the
2316 main text, see @ref{Quoting other voices} and
2317 @ref{Formatting cue notes}.  But when many cues have to be
2318 inserted, for example, as an aid to a conductor in a vocal score,
2319 the instrument name must be positioned carefully just before and
2320 close to the start of the cued notes.  The following example shows
2321 how this is done.  Note that the name of the grob for overriding
2322 the cued instrument name is @code{InstrumentSwitch}.
2323
2324 @lilypond[quote,verbatim]
2325 flute = \relative c'' {
2326   s4 s4 e g
2327 }
2328 \addQuote "flute" { \flute }
2329
2330 pianoRH = \relative c'' {
2331   c4. g8
2332   % position name of cued instrument just before the cued notes
2333   \once \override CueVoice.InstrumentSwitch
2334     #'self-alignment-X = #RIGHT
2335   % position name of cued instrument above the staff
2336   \once \override CueVoice.InstrumentSwitch #'direction = #UP
2337   \set CueVoice.instrumentCueName = "Flute"
2338   \cueDuring "flute" #UP { g4 bes4 }
2339 }
2340 pianoLH = \relative c { c4 <c' e> e, <g c> }
2341
2342 \score {
2343   \new PianoStaff <<
2344     \new Staff {
2345       \pianoRH
2346     }
2347     \new Staff {
2348       \clef "bass"
2349       \pianoLH
2350     }
2351   >>
2352 }
2353 @end lilypond
2354
2355 If a transposing instrument is being cued the instrument part should
2356 specify its key so the conversion of its cued notes will be done
2357 automatically.  The example below shows this transposition for a
2358 B-flat clarinet.  The notes in this example are low on the staff so
2359 @code{#DOWN} is specified in @code{\cueDuring} (so the stems are
2360 down) and the instrument name is positioned below the staff.  Note
2361 also that the piano right-hand voice is explicitly declared.  This
2362 is because the cued notes in this example begin at the start of the
2363 first bar and this would otherwise cause the entire piano right-hand
2364 notes to be placed in a @code{CueVoice} context.
2365
2366 @lilypond[quote,verbatim]
2367 clarinet = \relative c' {
2368   \transposition bes
2369   fis4 d d c
2370 }
2371 \addQuote "clarinet" { \clarinet }
2372
2373 pianoRH = \relative c'' {
2374   \transposition c'
2375   % position name of cued instrument just before the cued notes
2376   \once \override CueVoice.InstrumentSwitch
2377     #'self-alignment-X = #RIGHT
2378   % position name of cued instrument below the staff
2379   \once \override CueVoice.InstrumentSwitch #'direction = #DOWN
2380   \set CueVoice.instrumentCueName = "Clar."
2381   \cueDuring "clarinet" #DOWN { c4. g8 }
2382   g4 bes4
2383 }
2384 pianoLH = \relative c { c4 <c' e> e, <g c> }
2385
2386 \score {
2387   <<
2388     \new PianoStaff <<
2389       \new Staff {
2390         \new Voice {
2391           \pianoRH
2392         }
2393       }
2394       \new Staff {
2395         \clef "bass"
2396         \pianoLH
2397       }
2398     >>
2399   >>
2400 }
2401 @end lilypond
2402
2403 From these two examples it is clear that inserting many cues in a
2404 Vocal Score would be extremely tedious, and the notes of the piano
2405 part would be obscured by the many overrides.  However, as the
2406 following snippet shows, it is possible to define a music function
2407 to reduce the amount of typing and to make the piano notes clearer.
2408
2409 @snippets
2410 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
2411 {adding-orchestral-cues-to-a-vocal-score.ly}
2412
2413 @seealso
2414 Musical Glossary:
2415 @rglos{cue-notes}.
2416
2417 Notation Reference:
2418 @ref{Aligning objects},
2419 @ref{Direction and placement},
2420 @ref{Formatting cue notes},
2421 @ref{Quoting other voices},
2422 @ref{Using music functions}.
2423
2424 Snippets:
2425 @rlsr{vocal-music}.
2426
2427 Internals Reference:
2428 @rinternals{InstrumentSwitch},
2429 @rinternals{CueVoice}.
2430
2431 @knownissues
2432 @code{\cueDuring} automatically inserts a @code{CueVoice} context
2433 and all cue notes are placed in that context.  This means it is not
2434 possible to have two overlapping sequences of cued notes by this
2435 technique.  Overlapping sequences could be entered by explicitly
2436 declaring separate @code{CueVoice} contexts and using
2437 @code{\quoteDuring} to extract and insert the cued notes.
2438
2439
2440 @node Spoken music
2441 @unnumberedsubsubsec Spoken music
2442
2443 @cindex parlato
2444 @cindex Sprechgesang
2445 Such effects as @q{parlato} or @q{Sprechgesang} require performers to speak
2446 without pitch but still with rhythm; these are notated by cross
2447 note heads, as demonstrated in @ref{Special note heads}.
2448
2449 @c TODO add "marking-notes-on-spoken-parts" snippet -vv
2450 @c add "showing the rhythm of a melody" snip
2451 @c add "one staff-line notation"
2452 @c add "improvisation" ref
2453 @c add "lyrics independents of notes" ref
2454
2455 @node Dialogue over music
2456 @unnumberedsubsubsec Dialogue over music
2457
2458 Dialogue over music is usually printed over the staves in an italic
2459 font, with the start of each phrase keyed in to a particular music
2460 moment.
2461
2462 For short interjections a simple markup suffices.
2463
2464 @lilypond[quote,verbatim,relative=2]
2465 a4^\markup { \smallCaps { Alex - } \italic { He's gone } } a a a
2466 a4 a a^\markup { \smallCaps { Bethan - } \italic Where? } a
2467 a4 a a a
2468 @end lilypond
2469
2470 For longer phrases it may be necessary to expand the music to make
2471 the words fit neatly.  There is no provision in LilyPond to do this
2472 fully automatically, and some manual intervention to layout the
2473 page will be necessary.
2474
2475 For long phrases or for passages with a lot of closely packed
2476 dialogue, using a Lyrics context will give better results.  The
2477 Lyrics context should not be associated with a music Voice; instead
2478 each section of dialogue should be given an explicit duration.  If
2479 there is a gap in the dialogue, the final word should be separated
2480 from the rest and the duration split between them so that the
2481 underlying music spaces out smoothly.
2482
2483 If the dialogue extends for more than one line it will be necessary
2484 to manually insert @code{\break}s and adjust the placing of the
2485 dialogue to avoid running into the right margin.  The final word of
2486 the last measure on a line should also be separated out, as above.
2487
2488 Here is an example illustating how this might be done.
2489
2490 @c This should be a snippet, but it can't be as it needs to be
2491 @c manually adjusted to suit the imposed line length.  -td
2492
2493 @lilypond[quote,verbatim,ragged-right]
2494 music = \relative c'' {
2495   \repeat unfold 3 { a4 a a a }
2496 }
2497
2498 dialogue = \lyricmode {
2499   \markup {
2500     \fontsize #1 \upright \smallCaps Abe:
2501     "Say this over measures one and"
2502   }4*7
2503   "two"4 |
2504   \break
2505   "and this over measure"4*3
2506   "three"4 |
2507 }
2508
2509 \score {
2510   <<
2511     \new Lyrics \with {
2512       \override LyricText #'font-shape = #'italic
2513       \override LyricText #'self-alignment-X = #LEFT
2514     }
2515     { \dialogue }
2516     \new Staff {
2517       \new Voice { \music }
2518     }
2519   >>
2520 }
2521 @end lilypond
2522
2523 @c TODO show use of \column to produce dialogue on two lines
2524
2525 @seealso
2526 Notation Reference:
2527 @ref{Manual syllable durations},
2528 @ref{Text}.
2529
2530 Internal Reference:
2531 @rinternals{LyricText}.
2532
2533
2534 @node Chants psalms and hymns
2535 @subsection Chants psalms and hymns
2536
2537 @cindex chants
2538 @cindex psalms
2539 @cindex hymns
2540 @cindex religious music
2541
2542 The music and words for chants, psalms and hymns usually follow a
2543 well-established format in any particular church.  Although the
2544 formats may differ from church to church the type-setting problems
2545 which arise are broadly similar, and are covered in this section.
2546
2547 @menu
2548 * References for chants and psalms::
2549 * Setting a chant::
2550 * Pointing a psalm::
2551 * Partial measures in hymn tunes::
2552 @end menu
2553
2554 @node References for chants and psalms
2555 @unnumberedsubsubsec References for chants and psalms
2556
2557 Typesetting Gregorian chant in various styles of ancient notation
2558 is described in @ref{Ancient notation}.
2559
2560 @seealso
2561 Notation reference:
2562 @ref{Ancient notation}.
2563
2564
2565 @node Setting a chant
2566 @unnumberedsubsubsec Setting a chant
2567
2568 Modern chant settings use modern notation with varying numbers of
2569 elements taken from ancient notation.  Some of the elements and
2570 methods to consider are shown here.
2571
2572 Chants often use quarter notes without stems to indicate the pitch,
2573 with the rhythm being taken from the spoken rhythm of the words.
2574
2575 @lilypond[verbatim,quote]
2576 stemOff = { \override Staff.Stem #'transparent = ##t }
2577
2578 \relative c' {
2579   \stemOff
2580   a'4 b c2 |
2581 }
2582
2583 @end lilypond
2584
2585 Chants often omit the bar lines or use shortened or dotted bar
2586 lines to indicate pauses in the music.  To omit all bar lines from
2587 all staves remove the bar line engraver completely:
2588
2589 @lilypond[verbatim,quote]
2590 \score {
2591   \new StaffGroup <<
2592     \new Staff {
2593       \relative c'' {
2594         a4 b c2 |
2595         a4 b c2 |
2596         a4 b c2 |
2597       }
2598     }
2599     \new Staff {
2600       \relative c'' {
2601         a4 b c2 |
2602         a4 b c2 |
2603         a4 b c2 |
2604       }
2605     }
2606   >>
2607   \layout {
2608     \context {
2609       \Staff
2610       \remove Bar_engraver
2611     }
2612   }
2613 }
2614 @end lilypond
2615
2616 Bar lines can also be removed on a staff-by-staff basis:
2617
2618 @lilypond[verbatim, quote]
2619 \score {
2620   \new ChoirStaff <<
2621     \new Staff
2622     \with { \remove Bar_engraver } {
2623       \relative c'' {
2624         a4 b c2 |
2625         a4 b c2 |
2626         a4 b c2 |
2627       }
2628     }
2629     \new Staff {
2630       \relative c'' {
2631         a4 b c2 |
2632         a4 b c2 |
2633         a4 b c2 |
2634       }
2635     }
2636   >>
2637 }
2638 @end lilypond
2639
2640 To remove bar lines from just a section of music treat it as a
2641 cadenza.  If the section is long you may need to insert dummy
2642 barlines with @code{\bar ""} to show where the line should break.
2643
2644 @lilypond[verbatim,quote,relative=2]
2645 a4 b c2 |
2646 \cadenzaOn
2647 a4 b c2
2648 a4 b c2
2649 \bar ""
2650 a4 b c2
2651 a4 b c2
2652 \cadenzaOff
2653 a4 b c2 |
2654 a4 b c2 |
2655 @end lilypond
2656
2657 Rests or pauses in chants can be indicated by modified bar lines.
2658
2659 @lilypond[verbatim, quote,relative=2]
2660 a4
2661 \cadenzaOn
2662 b c2
2663 a4 b c2
2664 \bar "'"
2665 a4 b c2
2666 a4 b c2
2667 \bar ":"
2668 a4 b c2
2669 \bar "dashed"
2670 a4 b c2
2671 \bar "||"
2672 @end lilypond
2673
2674 Alternatively, the notation used in Gregorian chant for pauses or
2675 rests is sometimes used even though the rest of the notation is
2676 modern.  This uses a modified @code{\breathe} mark:
2677
2678 @lilypond[verbatim,quote]
2679 divisioMinima = {
2680   \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-minima
2681   \once \override BreathingSign  #'Y-offset = #0
2682   \breathe
2683 }
2684 divisioMaior = {
2685   \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-maior
2686   \once \override BreathingSign  #'Y-offset = #0
2687   \breathe
2688 }
2689 divisioMaxima = {
2690   \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-maxima
2691   \once \override BreathingSign  #'Y-offset = #0
2692   \breathe
2693 }
2694 finalis = {
2695   \once \override BreathingSign  #'stencil = #ly:breathing-sign::finalis
2696   \once \override BreathingSign  #'Y-offset = #0
2697   \breathe
2698 }
2699
2700 \score {
2701   \relative c'' {
2702     g2 a4 g
2703     \divisioMinima
2704     g2 a4 g
2705     \divisioMaior
2706     g2 a4 g
2707     \divisioMaxima
2708     g2 a4 g
2709     \finalis
2710   }
2711   \layout {
2712     \context {
2713       \Staff
2714       \remove Bar_engraver
2715     }
2716   }
2717 }
2718 @end lilypond
2719
2720 Chants usually omit the time signature and often omit the clef too.
2721
2722 @lilypond[verbatim,quote]
2723 \score {
2724   \new Staff {
2725     \relative c'' {
2726       a4 b c2 |
2727       a4 b c2 |
2728       a4 b c2 |
2729     }
2730   }
2731   \layout {
2732     \context {
2733       \Staff
2734       \remove Bar_engraver
2735       \remove Time_signature_engraver
2736       \remove Clef_engraver
2737     }
2738   }
2739 }
2740 @end lilypond
2741
2742 Chants for psalms in the Anglican tradition are usually either
2743 @emph{single}, with 7 bars of music, or @emph{double}, with two lots
2744 of 7 bars.  Each group of 7 bars is divided into two halves,
2745 corresponding to the two halves of each verse, usually separated by
2746 a double bar line.  Only whole and half notes are used.  The 1st bar
2747 in each half always contains a single chord of whole notes.  This is
2748 the @qq{reciting note}.  Chants are usually centered on the page.
2749
2750 @lilypond[verbatim,quote]
2751 SopranoMusic = \relative g' {
2752   g1 | c2 b | a1 | \bar "||"
2753   a1 | d2 c | c b | c1 | \bar "||"
2754 }
2755
2756 AltoMusic = \relative c' {
2757   e1 | g2 g | f1 |
2758   f1 | f2 e | d d | e1 |
2759 }
2760
2761 TenorMusic = \relative a {
2762   c1 | c2 c | c1 |
2763   d1 | g,2 g | g g | g1 |
2764 }
2765
2766 BassMusic =  \relative c {
2767   c1 | e2 e | f1 |
2768   d1 | b2 c | g' g | c,1 |
2769 }
2770
2771 global = {
2772   \time 2/2
2773 }
2774
2775 % Use markup to center the chant on the page
2776 \markup {
2777   \fill-line {
2778     \score {  % centered
2779       <<
2780         \new ChoirStaff <<
2781           \new Staff <<
2782             \global
2783             \clef "treble"
2784             \new Voice = "Soprano" <<
2785               \voiceOne
2786               \SopranoMusic
2787             >>
2788             \new Voice = "Alto" <<
2789               \voiceTwo
2790               \AltoMusic
2791             >>
2792           >>
2793           \new Staff <<
2794             \clef "bass"
2795             \global
2796             \new Voice = "Tenor" <<
2797               \voiceOne
2798               \TenorMusic
2799             >>
2800             \new Voice = "Bass" <<
2801               \voiceTwo
2802               \BassMusic
2803             >>
2804           >>
2805         >>
2806       >>
2807       \layout {
2808         \context {
2809           \Score
2810           \override SpacingSpanner
2811           #'base-shortest-duration = #(ly:make-moment 1 2)
2812         }
2813         \context {
2814           \Staff
2815           \remove "Time_signature_engraver"
2816         }
2817       }
2818     }  % End score
2819   }
2820 }  % End markup
2821 @end lilypond
2822
2823 Some other approaches to setting such a chant are shown in the first
2824 of the following snippets.
2825
2826 @snippets
2827
2828 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
2829 {chant-or-psalms-notation.ly}
2830
2831 Canticles and other liturgical texts may be set more freely, and
2832 may use notational elements from ancient music.  Often the words
2833 are shown underneath and aligned with the notes.  If so, the notes
2834 are spaced in accordance with the syllables rather than the notes'
2835 durations.
2836
2837 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
2838 {ancient-notation-template----modern-transcription-of-gregorian-music.ly}
2839
2840 @seealso
2841 Learning Manual:
2842 @rlearning{Visibility and color of objects},
2843 @rlearning{Vocal ensembles}.
2844
2845 Notation Reference:
2846 @ref{Ancient notation},
2847 @ref{Bar lines},
2848 @ref{Modifying context plug-ins},
2849 @ref{Typesetting Gregorian chant},
2850 @ref{Unmetered music},
2851 @ref{Visibility of objects}.
2852
2853
2854 @node Pointing a psalm
2855 @unnumberedsubsubsec Pointing a psalm
2856
2857 The words to an Anglican psalm are usually printed in separate
2858 verses centered underneath the chant.
2859
2860 Single chants (with 7 bars) are repeated for every verse.  Double
2861 chants (with 14 bars) are repeated for every pair of verses.  Marks
2862 are inserted in the words to show how they should be fitted to the
2863 chant.  Each verse is divided into two halves.  A colon is usually
2864 used to indicate this division.  This corresponds to the double bar
2865 line in the music.  The words before the colon are sung to the first
2866 three bars of music; the words after the colon are sung to the last
2867 four bars.
2868
2869 Single bar lines (or in some psalters an inverted comma or similar
2870 symbol) are inserted between words to indicate where the bar lines
2871 in the music fall.  In markup mode a single bar line can be entered
2872 with the bar check symbol, @code{|}.
2873
2874 @lilypond[verbatim,quote]
2875 \markup {
2876   \fill-line {
2877     \column {
2878       \left-align {
2879         \line { O come let us sing | unto the | Lord : let }
2880         \line { us heartily rejoice in the | strength of | our }
2881         \line { sal- | -vation. }
2882       }
2883     }
2884   }
2885 }
2886 @end lilypond
2887
2888 Other symbols may require glyphs from the @code{fetaMusic} fonts.
2889 For details, see @ref{Fonts}.
2890
2891 @lilypond[verbatim,quote]
2892 tick = \markup {
2893   \raise #1 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
2894 }
2895 \markup {
2896   \fill-line {
2897     \column {
2898       \left-align {
2899         \line { O come let us sing \tick unto the \tick Lord : let }
2900         \line {
2901           us heartily rejoice in the \tick strength of \tick our
2902         }
2903         \line { sal \tick vation. }
2904       }
2905     }
2906   }
2907 }
2908 @end lilypond
2909
2910 Where there is one whole note in a bar all the words corresponding
2911 to that bar are recited on that one note in speech rhythm.  Where
2912 there are two notes in a bar there will usually be only one or two
2913 corresponding syllables.  If there are more that two syllables a
2914 dot is usually inserted to indicate where the change in note occurs.
2915
2916 @lilypond[verbatim,quote]
2917 dot = \markup {
2918   \raise #0.7 \musicglyph #"dots.dot"
2919 }
2920 tick = \markup {
2921   \raise #1 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
2922 }
2923 \markup {
2924   \fill-line {
2925     \column {
2926       \left-align {
2927         \line {
2928           O come let us sing \tick unto \dot the \tick Lord : let
2929         }
2930         \line {
2931           us heartily rejoice in the \tick strength of \tick our
2932         }
2933         \line { sal \tick vation. }
2934       }
2935     }
2936   }
2937 }
2938 @end lilypond
2939
2940 In some psalters an asterisk is used to indicate a break in a
2941 recited section instead of a comma, and stressed or slightly
2942 lengthened syllables are indicated in bold text.
2943
2944 @lilypond[verbatim,quote]
2945 dot = \markup {
2946   \raise #0.7 \musicglyph #"dots.dot"
2947 }
2948 tick = \markup {
2949   \raise #1 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
2950 }
2951 \markup {
2952   \fill-line {
2953     \column {
2954       \left-align {
2955         \line { Today if ye will hear his voice * }
2956         \line {
2957           \concat { \bold hard en }
2958           | not your | hearts : as in the pro-
2959         }
2960         \line { vocation * and as in the \bold day of tempt- | }
2961         \line { -ation | in the | wilderness. }
2962       }
2963     }
2964   }
2965 }
2966 @end lilypond
2967
2968 In other psalters an accent is placed over the syllable to indicate
2969 stress.
2970
2971 @lilypond[verbatim,quote]
2972 tick = \markup {
2973   \raise #2 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
2974 }
2975 \markup {
2976   \fill-line {
2977     \column {
2978       \left-align {
2979         \line {
2980           O come let us \concat {
2981             si \combine \tick ng
2982           }
2983           | unto the | Lord : let
2984         }
2985         \line {
2986           us heartily \concat {
2987             rejo \combine \tick ice
2988           }
2989           in the | strength of | our
2990         }
2991         \line { sal- | -vation. }
2992       }
2993     }
2994   }
2995 }
2996 @end lilypond
2997
2998 The use of markup to center text, and arrange lines in columns is
2999 described in @ref{Formatting text}.
3000
3001 Most of these elements are shown in one or other of the two verses
3002 in the template, see @qq{Psalms} in @rlearning{Vocal ensembles}.
3003
3004 @seealso
3005 Learning Manual:
3006 @rlearning{Vocal ensembles}.
3007
3008 Notation Reference:
3009 @ref{Fonts},
3010 @ref{Formatting text}.
3011
3012
3013 @node Partial measures in hymn tunes
3014 @unnumberedsubsubsec Partial measures in hymn tunes
3015
3016 Hymn tunes frequently start and end every line of music with
3017 partial measures so that each line of music corresponds exactly
3018 with a line of text.  This requires a @code{\partial} command at
3019 the start of the music and @code{\bar "|"} or @code{\bar "||"}
3020 commands at the end of each line.
3021
3022 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
3023 {hymn-template.ly}
3024
3025
3026 @node Ancient vocal music
3027 @subsection Ancient vocal music
3028
3029 Ancient vocal music is supported, as explained in @ref{Ancient notation}.
3030
3031 @c TODO
3032
3033 @c Add "Printing both the ancient and the modern clef in vocal music" snippet,
3034 @c and "Transcription of Ancient music with incipit" snippet. -vv
3035
3036 @seealso
3037 Notation Reference:
3038 @ref{Ancient notation}.
3039
3040
3041
3042