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