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