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