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