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