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