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