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