]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/notation/vocal.itely
b09a7cd1a575ee5ab0bb5f95607ed7136df3c755
[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
1076 @code{minimum-distance} 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
1693 @code{shortVocalName}.
1694
1695 @lilypond[ragged-right,quote,verbatim,relative=2]
1696 \new Voice {
1697   \time 3/4 g2 e4 a2 f4 g2.
1698 } \addlyrics {
1699   \set vocalName = #"Bert "
1700   Hi, my name is Bert.
1701 } \addlyrics {
1702   \set vocalName = #"Ernie "
1703   Oh, ché -- ri, je t'aime
1704 }
1705 @end lilypond
1706
1707 @node Stanzas with different rhythms
1708 @unnumberedsubsubsec Stanzas with different rhythms
1709
1710 Often, different stanzas of one song are put to one melody in slightly
1711 differing ways.  Such variations can still be captured with
1712 @code{\lyricsto}.
1713
1714 @subsubheading Ignoring melismata
1715
1716 One possibility is that the text has a melisma in one stanza, but
1717 multiple syllables in another.  One solution is to make the faster
1718 voice ignore the melisma.  This is done by setting
1719 @code{ignoreMelismata} in the Lyrics context.
1720
1721 @lilypond[verbatim,ragged-right,quote]
1722 <<
1723   \relative c' \new Voice = "lahlah" {
1724     \set Staff.autoBeaming = ##f
1725     c4
1726     \slurDotted
1727     f8.[( g16])
1728     a4
1729   }
1730   \new Lyrics \lyricsto "lahlah" {
1731     more slow -- ly
1732   }
1733   \new Lyrics \lyricsto "lahlah" {
1734     go
1735     \set ignoreMelismata = ##t
1736     fas -- ter
1737     \unset ignoreMelismata
1738     still
1739   }
1740 >>
1741 @end lilypond
1742
1743 @knownissues
1744 Unlike most @code{\set} commands, @code{\set ignoreMelismata} does
1745 not work if prefixed with @code{\once}.  It is necessary to use
1746 @code{\set} and @code{\unset} to bracket the lyrics where melismata
1747 are to be ignored.
1748
1749 @subsubheading Adding syllables to grace notes
1750
1751 @cindex grace notes and lyrics
1752 @cindex lyrics on grace notes
1753
1754 By default, grace notes (e.g. via @code{\grace}) do not get assigned
1755 syllables when using @code{\lyricsto}, but this behavior can be
1756 changed:
1757
1758 @lilypond[verbatim,ragged-right,quote]
1759 <<
1760   \new Voice = melody \relative c' {
1761     f4 \appoggiatura a32 b4
1762     \grace { f16[ a16] } b2
1763     \afterGrace b2 { f16[ a16] }
1764     \appoggiatura a32 b4
1765     \acciaccatura a8 b4
1766   }
1767   \new Lyrics
1768   \lyricsto melody {
1769     normal
1770     \set includeGraceNotes = ##t
1771     case,
1772     gra -- ce case,
1773     after -- grace case,
1774     \set ignoreMelismata = ##t
1775     app. case,
1776     acc. case.
1777   }
1778 >>
1779 @end lilypond
1780
1781 @knownissues
1782 Like @code{associatedVoice}, @code{includeGraceNotes} needs to be
1783 set at latest one syllable before the one which is to be put under a
1784 grace note.  For the case of a grace note at the very beginning of a
1785 piece of music, consider using a @code{\with} or @code{\context}
1786 block:
1787
1788 @lilypond[verbatim,ragged-right,quote]
1789 <<
1790   \new Voice = melody \relative c' {
1791     \grace { c16[( d e f] }
1792     g1) f
1793   }
1794   \new Lyrics \with { includeGraceNotes = ##t }
1795   \lyricsto melody {
1796     Ah __ fa
1797   }
1798 >>
1799 @end lilypond
1800
1801 @subsubheading Switching to an alternative melody
1802
1803 @cindex associatedVoice
1804 @cindex alternative melody, switching to
1805
1806 More complex variations in setting lyrics to music are possible.
1807 The melody to which the lyrics are being set can be changed from
1808 within the lyrics by setting the @code{associatedVoice} property:
1809
1810 @lilypond[verbatim,quote]
1811 <<
1812   \relative c' \new Voice = "lahlah" {
1813     \set Staff.autoBeaming = ##f
1814     c4
1815     <<
1816       \new Voice = "alternative" {
1817         \voiceOne
1818         \times 2/3 {
1819           % show associations clearly.
1820           \override NoteColumn #'force-hshift = #-3
1821           f8 f g
1822         }
1823       }
1824       {
1825         \voiceTwo
1826         f8.[ g16]
1827         \oneVoice
1828       } >>
1829     a8( b) c
1830   }
1831   \new Lyrics \lyricsto "lahlah" {
1832     Ju -- ras -- sic Park
1833   }
1834   \new Lyrics \lyricsto "lahlah" {
1835     % Tricky: need to set associatedVoice
1836     % one syllable too soon!
1837     \set associatedVoice = "alternative" % applies to "ran"
1838     Ty --
1839     ran --
1840     no --
1841     \set associatedVoice = "lahlah" % applies to "rus"
1842     sau -- rus Rex
1843   } >>
1844 @end lilypond
1845
1846 @noindent
1847 The text for the first stanza is set to the melody called
1848 @q{lahlah} in the usual way, but the second stanza is set initally
1849 to the @code{lahlah} context and is then switched to the
1850 @code{alternative} melody for the syllables @q{ran} to @q{sau} by
1851 the lines:
1852
1853 @example
1854 \set associatedVoice = "alternative" % applies to "ran"
1855 Ty --
1856 ran --
1857 no --
1858 \set associatedVoice = "lahlah" % applies to "rus"
1859 sau -- rus Rex
1860 @end example
1861
1862 @noindent
1863 Here, @code{alternative} is the name of the @code{Voice} context
1864 containing the triplet.
1865
1866 Note the placement of the @code{\set associatedVoice} command --
1867 it appears to be one syllable too early, but this is correct.
1868
1869 @warning{The @code{\set associatedVoice} command must be placed
1870 one syllable @emph{before} the one at which the switch to the new
1871 voice is to occur.  In other words, changing the associated Voice
1872 happens one syllable later than expected.  This is for technical
1873 reasons, and it is not a bug.}
1874
1875
1876 @node Printing stanzas at the end
1877 @unnumberedsubsubsec Printing stanzas at the end
1878
1879 Sometimes it is appropriate to have one stanza set
1880 to the music, and the rest added in verse form at
1881 the end of the piece.  This can be accomplished by adding
1882 the extra verses into a @code{\markup} section outside
1883 of the main score block.  Notice that there are two
1884 different ways to force linebreaks when using
1885 @code{\markup}.
1886
1887 @lilypond[ragged-right,verbatim,quote]
1888 melody = \relative c' {
1889 e d c d | e e e e |
1890 d d e d | c1 |
1891 }
1892
1893 text = \lyricmode {
1894 \set stanza = #"1." Ma- ry had a lit- tle lamb,
1895 its fleece was white as snow.
1896 }
1897
1898 \score{ <<
1899   \new Voice = "one" { \melody }
1900   \new Lyrics \lyricsto "one" \text
1901 >>
1902   \layout { }
1903 }
1904 \markup { \column{
1905   \line{ Verse 2. }
1906   \line{ All the children laughed and played }
1907   \line{ To see a lamb at school. }
1908   }
1909 }
1910 \markup{
1911   \wordwrap-string #"
1912   Verse 3.
1913
1914   Mary took it home again,
1915
1916   It was against the rule."
1917 }
1918 @end lilypond
1919
1920
1921 @node Printing stanzas at the end in multiple columns
1922 @unnumberedsubsubsec Printing stanzas at the end in multiple columns
1923
1924 When a piece of music has many verses, they are often printed in
1925 multiple columns across the page.  An outdented verse number often
1926 introduces each verse.  The following example shows how to produce such
1927 output in LilyPond.
1928
1929 @lilypond[ragged-right,quote,verbatim]
1930 melody = \relative c' {
1931   c c c c | d d d d
1932 }
1933
1934 text = \lyricmode {
1935   \set stanza = #"1." This is verse one.
1936   It has two lines.
1937 }
1938
1939 \score{ <<
1940     \new Voice = "one" { \melody }
1941     \new Lyrics \lyricsto "one" \text
1942    >>
1943   \layout { }
1944 }
1945
1946 \markup {
1947   \fill-line {
1948     \hspace #0.1 % moves the column off the left margin;
1949         % can be removed if space on the page is tight
1950      \column {
1951       \line { \bold "2."
1952         \column {
1953           "This is verse two."
1954           "It has two lines."
1955         }
1956       }
1957       \hspace #0.1 % adds vertical spacing between verses
1958       \line { \bold "3."
1959         \column {
1960           "This is verse three."
1961           "It has two lines."
1962         }
1963       }
1964     }
1965     \hspace #0.1  % adds horizontal spacing between columns;
1966         % if they are still too close, add more " " pairs
1967         % until the result looks good
1968      \column {
1969       \line { \bold "4."
1970         \column {
1971           "This is verse four."
1972           "It has two lines."
1973         }
1974       }
1975       \hspace #0.1 % adds vertical spacing between verses
1976       \line { \bold "5."
1977         \column {
1978           "This is verse five."
1979           "It has two lines."
1980         }
1981       }
1982     }
1983   \hspace #0.1 % gives some extra space on the right margin;
1984       % can be removed if page space is tight
1985   }
1986 }
1987 @end lilypond
1988
1989
1990 @seealso
1991 Internals Reference:
1992 @rinternals{LyricText},
1993 @rinternals{StanzaNumber}.
1994
1995
1996 @node Songs
1997 @subsection Songs
1998
1999 @menu
2000 * References for songs::
2001 * Lead sheets::
2002 @end menu
2003
2004 @node References for songs
2005 @unnumberedsubsubsec References for songs
2006
2007 Songs are usually written on three staves with the melody for the
2008 singer on the top staff and two staves of piano accompaniment at
2009 the bottom.  The lyrics of the first stanza are printed immediately
2010 underneath the top staff.  If there are just a small number of
2011 further stanzas these can be printed immediately under the first
2012 one, but if there are more stanzas than can be easily accommodated
2013 there the second and subsequent stanzas are printed after the music
2014 as stand-alone text.
2015
2016 All the notational elements needed to write songs are fully described
2017 elsewhere:
2018
2019 @itemize
2020
2021 @item
2022 For constructing the staff layout, see @ref{Displaying staves}.
2023
2024 @item
2025 For writing piano music, see
2026 @ref{Keyboard and other multi-staff instruments}.
2027
2028 @item
2029 For writing the lyrics to a melody line, see
2030 @ref{Common notation for vocal music}.
2031
2032 @item
2033 For placing the lyrics, see @ref{Placing lyrics vertically}.
2034
2035 @item
2036 For entering stanzas, see @ref{Stanzas}.
2037
2038 @item
2039 Songs are frequently printed with the chording indicated by chord
2040 names above the staves.  This is described in
2041 @ref{Displaying chords}.
2042
2043 @item
2044 To print fret diagrams of the chords for guitar accompaniment or
2045 accompaniment by other fretted instruments, see @qq{Fret diagram
2046 markups} in @ref{Common notation for fretted strings}.
2047
2048 @end itemize
2049
2050 @seealso
2051 Learning Manual:
2052 @rlearning{Songs}.
2053
2054 Notation Reference:
2055 @ref{Common notation for vocal music},
2056 @ref{Displaying chords},
2057 @ref{Displaying staves},
2058 @ref{Keyboard and other multi-staff instruments},
2059 @ref{Placing lyrics vertically},
2060 @ref{Stanzas}.
2061
2062 Snippets:
2063 @rlsr{Vocal music}.
2064
2065 @node Lead sheets
2066 @unnumberedsubsubsec Lead sheets
2067
2068 Lead sheets may be printed by combining vocal parts and
2069 @q{chord mode}; this syntax is explained in @ref{Chord notation}.
2070
2071 @snippets
2072 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
2073 {simple-lead-sheet.ly}
2074
2075 @seealso
2076 Notation Reference:
2077 @ref{Chord notation}.
2078
2079
2080 @node Choral
2081 @subsection Choral
2082
2083 @cindex anthems
2084 @cindex part songs
2085 @cindex oratorio
2086 @cindex SATB
2087
2088 This section discusses notation issues that relate most directly
2089 to choral music.  This includes anthems, part songs, oratorio,
2090 etc.
2091
2092 @menu
2093 * References for choral::
2094 * Score layouts for choral::
2095 * Divided voices::
2096 @end menu
2097
2098 @node References for choral
2099 @unnumberedsubsubsec References for choral
2100
2101 Choral music is usually notated on two, three or four staves within
2102 a @code{ChoirStaff} group.  Accompaniment, if required, is placed
2103 beneath in a @code{PianoStaff} group, which is usually reduced in
2104 size for @emph{a capella} choral works.  The notes for each vocal
2105 part are placed in a @code{Voice} context, with each staff
2106 being given either a single vocal part (i.e., one @code{Voice}) or
2107 a pair of vocal parts (i.e., two @code{Voice}s).
2108
2109 Words are placed in @code{Lyrics} contexts, either underneath each
2110 corresponding music staff, or one above and one below the music
2111 staff if this contains the music for two parts.
2112
2113 Several common topics in choral music are described fully elsewhere:
2114
2115 @itemize
2116
2117 @item
2118 An introduction to creating an SATB vocal score can be found in
2119 the Learning Manual, see @rlearning{Four-part SATB vocal score}.
2120
2121 @item
2122 Several templates suitable for various styles of choral music can
2123 also be found in the Learning Manual, see
2124 @rlearning{Vocal ensembles}.
2125
2126 @item
2127 For information about @code{ChoirStaff} and @code{PianoStaff} see
2128 @ref{Grouping staves}.
2129
2130 @item
2131 Shape note heads, as used in Sacred Harp and similar notation, are
2132 described in @ref{Shape note heads}.
2133
2134 @item
2135 When two vocal parts share a staff the stems, ties, slurs, etc., of
2136 the higher part will be directed up and those of the lower part
2137 down.  To do this, use @code{\voiceOne} and @code{\voiceTwo}.  See
2138 @ref{Single-staff polyphony}.
2139
2140 @end itemize
2141
2142 @predefined
2143 @code{\oneVoice},
2144 @code{\voiceOne},
2145 @code{\voiceTwo}.
2146
2147 @seealso
2148 Learning Manual:
2149 @rlearning{Four-part SATB vocal score},
2150 @rlearning{Vocal ensembles}.
2151
2152 Notation Reference:
2153 @ref{Context layout order},
2154 @ref{Grouping staves},
2155 @ref{Shape note heads},
2156 @ref{Single-staff polyphony}.
2157
2158 Snippets:
2159 @rlsr{Vocal music}.
2160
2161 Internals Reference:
2162 @rinternals{ChoirStaff},
2163 @rinternals{Lyrics},
2164 @rinternals{PianoStaff}.
2165
2166 @node Score layouts for choral
2167 @unnumberedsubsubsec Score layouts for choral
2168
2169 Choral music containing four staves, with or without piano
2170 accompaniment, is usually laid out with two systems per page.
2171 Depending on the page size, achieving this may require changes
2172 to several default settings.  The following settings should be
2173 considered:
2174
2175 @itemize
2176
2177 @item
2178 The global staff size can be modified to change the overall size
2179 of the elements of the score.  See @ref{Setting the staff size}.
2180
2181 @item
2182 The distances between the systems, the staves and the lyrics can
2183 all be adjusted independently.  See @ref{Vertical spacing}.
2184
2185 @item
2186 The dimensions of the vertical layout variables can be displayed as
2187 an aid to adjusting the vertical spacing.  This and other
2188 possibilities for fitting the music onto fewer pages are described
2189 in @ref{Fitting music onto fewer pages}.
2190
2191 @item
2192 If the number of systems per page changes from one to two it is
2193 customary to indicate this with a system separator mark between
2194 the two systems.  See @ref{Separating systems}.
2195
2196 @item
2197 For details of other page formatting properties, see
2198 @ref{Page layout}.
2199
2200 @end itemize
2201
2202
2203 Dynamic markings by default are placed below the staff, but in
2204 choral music they are usually placed above the staff in order to
2205 avoid the lyrics.  The predefined command @code{\dynamicUp} does
2206 this for the dynamic markings in a single @code{Voice} context.
2207 If there are many @code{Voice} contexts this predefined command
2208 would have to be placed in every one.  Alternatively its expanded
2209 form can be used to place all dynamic markings in the entire score
2210 above their respective staves, as shown here:
2211
2212 @lilypond[verbatim,quote]
2213 \score {
2214   \new ChoirStaff <<
2215     \new Staff {
2216       \new Voice {
2217         \relative c'' { g4\f g g g }
2218       }
2219     }
2220     \new Staff {
2221       \new Voice {
2222         \relative c' { d4 d d\p d }
2223       }
2224     }
2225   >>
2226   \layout {
2227     \context {
2228       \Score
2229       \override DynamicText #'direction = #UP
2230       \override DynamicLineSpanner #'direction = #UP
2231     }
2232   }
2233 }
2234 @end lilypond
2235
2236 @predefined
2237 @code{\dynamicUp}, @code{\dynamicDown}, @code{\dynamicNeutral}.
2238
2239 @seealso
2240 Notation Reference:
2241 @ref{Changing spacing},
2242 @ref{Displaying spacing},
2243 @ref{Fitting music onto fewer pages},
2244 @ref{Page layout},
2245 @ref{Score layout},
2246 @ref{Separating systems},
2247 @ref{Setting the staff size},
2248 @ref{Using an extra voice for breaks},
2249 @ref{Vertical spacing}.
2250
2251 Internals Reference:
2252 @rinternals{VerticalAxisGroup},
2253 @rinternals{StaffGrouper}.
2254
2255
2256 @node Divided voices
2257 @unnumberedsubsubsec Divided voices
2258
2259 @cindex voices, divided
2260
2261 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
2262 {using-arpeggiobracket-to-make-divisi-more-visible.ly}
2263
2264 @seealso
2265 Notation Reference:
2266 @ref{Expressive marks as lines}.
2267
2268
2269 @node Opera and stage musicals
2270 @subsection Opera and stage musicals
2271
2272 The music, lyrics and dialogue to opera and stage musicals are
2273 usually set out in one or more of the following forms:
2274
2275 @itemize
2276
2277 @item
2278 A @emph{Conductors' Score} containing the full orchestral and vocal
2279 parts, together with libretto cues if there are spoken passages.
2280
2281 @item
2282 @emph{Orchestral Parts} containing the music for the individual
2283 instruments of the orchestra or band.
2284
2285 @item
2286 A @emph{Vocal Score} containing all vocal parts with piano
2287 accompaniment.  The accompaniment is usually an orchestral
2288 reduction, and if so the name of the original orchestral instrument
2289 is often indicated.  Vocal scores sometimes includes stage
2290 directions and libretto cues.
2291
2292 @item
2293 A @emph{Vocal Book} containing just the vocal parts
2294 (no accompaniment), sometimes combined with the libretto.
2295
2296 @item
2297 A @emph{Libretto} containing the extended passages of spoken
2298 dialogue usually found in musicals, together with the words to the
2299 sung parts.  Stage directions are usually included.  LilyPond can
2300 be used to typeset libretti but as they contain no music
2301 alternative methods may be preferable.
2302
2303 @end itemize
2304
2305 The sections in the LilyPond documentation which cover the topics
2306 needed to create scores in the styles commonly found in opera and
2307 musicals are indicated in the References below.  This is followed
2308 by sections covering those techniques which are peculiar to
2309 typesetting opera and musical scores.
2310
2311 @menu
2312 * References for opera and stage musicals::
2313 * Character names::
2314 * Musical cues::
2315 * Spoken music::
2316 * Dialogue over music::
2317 @end menu
2318
2319 @node References for opera and stage musicals
2320 @unnumberedsubsubsec References for opera and stage musicals
2321
2322 @itemize
2323
2324 @item
2325 A conductors' score contains many grouped staves and lyrics.  Ways
2326 of grouping staves is shown in @ref{Grouping staves}.  To nest
2327 groups of staves see @ref{Nested staff groups}.
2328
2329 @item
2330 The printing of empty staves in conductors' scores and vocal scores
2331 is often suppressed.  To create such a @qq{Frenched score} see
2332 @ref{Hiding staves}.
2333
2334 @item
2335 Writing orchestral parts is covered in @ref{Writing parts}.
2336 Other sections in the Specialist notation chapter may be relevant,
2337 depending on the orchestration used.  Many instruments are
2338 transposing instruments, see @ref{Instrument transpositions}.
2339
2340 @item
2341 If the number of systems per page changes from page to page it is
2342 customary to separate the systems with a system separator mark.
2343 See @ref{Separating systems}.
2344
2345 @item
2346 For details of other page formatting properties, see
2347 @ref{Page layout}.
2348
2349 @item
2350 Dialogue cues and stage directions can be inserted with markup.
2351 See @ref{Text}.  Extensive stage directions can be inserted with
2352 a section of stand-alone markup between two @code{\score} blocks.
2353 See @ref{Separate text}.
2354
2355 @end itemize
2356
2357 @seealso
2358 Musical Glossary:
2359 @rglos{Frenched score},
2360 @rglos{Frenched staves},
2361 @rglos{transposing instrument}.
2362
2363 Notation Reference:
2364 @ref{Grouping staves},
2365 @ref{Hiding staves},
2366 @ref{Instrument transpositions},
2367 @ref{Nested staff groups},
2368 @ref{Page layout},
2369 @ref{Separating systems},
2370 @ref{Transpose},
2371 @ref{Writing parts},
2372 @ref{Writing text}.
2373
2374 Snippets:
2375 @rlsr{Vocal music}.
2376
2377
2378 @node Character names
2379 @unnumberedsubsubsec Character names
2380
2381 @cindex character names
2382 @cindex names, character
2383
2384 Character names are usually shown to the left of the staff when the
2385 staff is dedicated to that character alone:
2386
2387 @lilypond[quote,verbatim,ragged-right]
2388 \score {
2389   <<
2390     \new Staff {
2391       \set Staff.vocalName = \markup \smallCaps Kaspar
2392       \set Staff.shortVocalName = \markup \smallCaps Kas.
2393       \relative c' {
2394         \clef "G_8"
2395         c4 c c c
2396         \break
2397         c4 c c c
2398       }
2399     }
2400     \new Staff {
2401       \set Staff.vocalName = \markup \smallCaps Melchior
2402       \set Staff.shortVocalName = \markup \smallCaps Mel
2403       \clef "bass"
2404       \relative c' {
2405         a4 a a a
2406         a4 a a a
2407       }
2408     }
2409   >>
2410 }
2411 @end lilypond
2412
2413 When two or more characters share a staff the character's name is
2414 usually printed above the staff at the start of every section
2415 applying to that character.  This can be done with markup.  Often a
2416 specific font is used for this purpose.
2417
2418 @lilypond[quote,verbatim,relative=1]
2419 \clef "G_8"
2420 c4^\markup \fontsize #1 \smallCaps Kaspar
2421 c c c
2422 \clef "bass"
2423 a4^\markup \fontsize #1 \smallCaps Melchior
2424 a a a
2425 \clef "G_8"
2426 c4^\markup \fontsize #1 \smallCaps Kaspar
2427 c c c
2428 @end lilypond
2429
2430 Alternatively, if there are many character changes, it may be
2431 easier to set up @qq{instrument} definitions for each character at
2432 the top level so that @code{\instrumentSwitch} can be used to
2433 indicate each change.
2434
2435 @lilypond[quote,verbatim]
2436 \addInstrumentDefinition #"kaspar"
2437   #`((instrumentTransposition . ,(ly:make-pitch -1 0 0))
2438      (shortInstrumentName . "Kas.")
2439      (clefGlyph . "clefs.G")
2440      (clefOctavation . -7)
2441      (middleCPosition . 1)
2442      (clefPosition . -2)
2443      (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Kaspar"))
2444      (midiInstrument . "voice oohs"))
2445
2446 \addInstrumentDefinition #"melchior"
2447   #`((instrumentTransposition . ,(ly:make-pitch 0 0 0))
2448      (shortInstrumentName . "Mel.")
2449      (clefGlyph . "clefs.F")
2450      (clefOctavation . 0)
2451      (middleCPosition . 6)
2452      (clefPosition . 2)
2453      (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Melchior"))
2454      (midiInstrument . "voice aahs"))
2455
2456 \relative c' {
2457   \instrumentSwitch "kaspar"
2458   c4 c c c
2459   \instrumentSwitch "melchior"
2460   a4 a a a
2461   \instrumentSwitch "kaspar"
2462   c4 c c c
2463 }
2464 @end lilypond
2465
2466 @seealso
2467 Notation Reference:
2468 @ref{Instrument names},
2469 @ref{Scheme functions},
2470 @ref{Text},
2471 @ref{Text markup commands}.
2472
2473 Extending LilyPond:
2474 @rextend{Markup construction in Scheme}.
2475
2476 @node Musical cues
2477 @unnumberedsubsubsec Musical cues
2478
2479 @cindex musical cues
2480 @cindex cues, musical
2481
2482 Musical cues can be inserted in Vocal Scores, Vocal Books and
2483 Orchestral Parts to indicate what music in another part
2484 immediately precedes an entry.  Also, cues are often inserted in the
2485 piano reduction in Vocal Scores to indicate what each orchestral
2486 instrument is playing.  This aids the conductor when a full
2487 Conductors' Score is not available.
2488
2489 The basic mechanism for inserting cues is fully explained in the
2490 main text, see @ref{Quoting other voices} and
2491 @ref{Formatting cue notes}.  But when many cues have to be
2492 inserted, for example, as an aid to a conductor in a vocal score,
2493 the instrument name must be positioned carefully just before and
2494 close to the start of the cue notes.  The following example shows
2495 how this is done.
2496
2497 @lilypond[quote,verbatim]
2498 flute = \relative c'' {
2499   s4 s4 e g
2500 }
2501 \addQuote "flute" { \flute }
2502
2503 pianoRH = \relative c'' {
2504   c4. g8
2505   % position name of cue-ing instrument just before the cue notes,
2506   % and above the staff
2507   s1*0^\markup { \right-align { \tiny "Flute" } }
2508   \cueDuring "flute" #UP { g4 bes4 }
2509 }
2510 pianoLH = \relative c { c4 <c' e> e, <g c> }
2511
2512 \score {
2513   \new PianoStaff <<
2514     \new Staff {
2515       \pianoRH
2516     }
2517     \new Staff {
2518       \clef "bass"
2519       \pianoLH
2520     }
2521   >>
2522 }
2523 @end lilypond
2524
2525 If a transposing instrument is being quoted the instrument part should
2526 specify its key so the conversion of its cue notes will be done
2527 automatically.  The example below shows this transposition for a
2528 B-flat clarinet.  The notes in this example are low on the staff so
2529 @code{#DOWN} is specified in @code{\cueDuring} (so the stems are
2530 down) and the instrument name is positioned below the staff.  Note
2531 also that the piano right-hand voice is explicitly declared.  This
2532 is because the cue notes in this example begin at the start of the
2533 first bar and this would otherwise cause the entire piano right-hand
2534 notes to be placed in a @code{CueVoice} context.
2535
2536 @lilypond[quote,verbatim]
2537 clarinet = \relative c' {
2538   \transposition bes
2539   fis4 d d c
2540 }
2541 \addQuote "clarinet" { \clarinet }
2542
2543 pianoRH = \relative c'' {
2544   \transposition c'
2545   % position name of cue-ing instrument below the staff
2546   s1*0_\markup { \right-align { \tiny "Clar." } }
2547   \cueDuring "clarinet" #DOWN { c4. g8 }
2548   g4 bes4
2549 }
2550 pianoLH = \relative c { c4 <c' e> e, <g c> }
2551
2552 \score {
2553   <<
2554     \new PianoStaff <<
2555       \new Staff {
2556         \new Voice {
2557           \pianoRH
2558         }
2559       }
2560       \new Staff {
2561         \clef "bass"
2562         \pianoLH
2563       }
2564     >>
2565   >>
2566 }
2567 @end lilypond
2568
2569 From these two examples it is clear that inserting many cues in a
2570 Vocal Score would be tedious, and the notes of the piano part would
2571 become obscured.  However, as the following snippet shows, it is
2572 possible to define a music function to reduce the amount of typing
2573 and to make the piano notes clearer.
2574
2575 @snippets
2576 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
2577 {adding-orchestral-cues-to-a-vocal-score.ly}
2578
2579 @seealso
2580 Musical Glossary:
2581 @rglos{cue-notes}.
2582
2583 Notation Reference:
2584 @ref{Aligning objects},
2585 @ref{Direction and placement},
2586 @ref{Formatting cue notes},
2587 @ref{Quoting other voices},
2588 @ref{Using music functions}.
2589
2590 Snippets:
2591 @rlsr{Vocal music}.
2592
2593 Internals Reference:
2594 @rinternals{InstrumentSwitch},
2595 @rinternals{CueVoice}.
2596
2597 @knownissues
2598 @code{\cueDuring} automatically inserts a @code{CueVoice} context
2599 and all cue notes are placed in that context.  This means it is not
2600 possible to have two overlapping sequences of cue notes by this
2601 technique.  Overlapping sequences could be entered by explicitly
2602 declaring separate @code{CueVoice} contexts and using
2603 @code{\quoteDuring} to extract and insert the cue notes.
2604
2605
2606 @node Spoken music
2607 @unnumberedsubsubsec Spoken music
2608
2609 @cindex parlato
2610 @cindex Sprechgesang
2611 Such effects as @q{parlato} or @q{Sprechgesang} require performers to speak
2612 without pitch but still with rhythm; these are notated by cross
2613 note heads, as demonstrated in @ref{Special note heads}.
2614
2615 @c TODO add "marking-notes-on-spoken-parts" snippet -vv
2616 @c add "showing the rhythm of a melody" snip
2617 @c add "one staff-line notation"
2618 @c add "improvisation" ref
2619 @c add "lyrics independents of notes" ref
2620
2621 @node Dialogue over music
2622 @unnumberedsubsubsec Dialogue over music
2623
2624 Dialogue over music is usually printed over the staves in an italic
2625 font, with the start of each phrase keyed in to a particular music
2626 moment.
2627
2628 For short interjections a simple markup suffices.
2629
2630 @lilypond[quote,verbatim,relative=2]
2631 a4^\markup { \smallCaps { Alex - } \italic { He's gone } } a a a
2632 a4 a a^\markup { \smallCaps { Bethan - } \italic Where? } a
2633 a4 a a a
2634 @end lilypond
2635
2636 For longer phrases it may be necessary to expand the music to make
2637 the words fit neatly.  There is no provision in LilyPond to do this
2638 fully automatically, and some manual intervention to layout the
2639 page will be necessary.
2640
2641 For long phrases or for passages with a lot of closely packed
2642 dialogue, using a Lyrics context will give better results.  The
2643 Lyrics context should not be associated with a music Voice; instead
2644 each section of dialogue should be given an explicit duration.  If
2645 there is a gap in the dialogue, the final word should be separated
2646 from the rest and the duration split between them so that the
2647 underlying music spaces out smoothly.
2648
2649 If the dialogue extends for more than one line it will be necessary
2650 to manually insert @code{\break}s and adjust the placing of the
2651 dialogue to avoid running into the right margin.  The final word of
2652 the last measure on a line should also be separated out, as above.
2653
2654 Here is an example illustrating how this might be done.
2655
2656 @c This should be a snippet, but it can't be as it needs to be
2657 @c manually adjusted to suit the imposed line length.  -td
2658
2659 @lilypond[quote,verbatim,ragged-right]
2660 music = \relative c'' {
2661   \repeat unfold 3 { a4 a a a }
2662 }
2663
2664 dialogue = \lyricmode {
2665   \markup {
2666     \fontsize #1 \upright \smallCaps Abe:
2667     "Say this over measures one and"
2668   }4*7
2669   "two"4 |
2670   \break
2671   "and this over measure"4*3
2672   "three"4 |
2673 }
2674
2675 \score {
2676   <<
2677     \new Lyrics \with {
2678       \override LyricText #'font-shape = #'italic
2679       \override LyricText #'self-alignment-X = #LEFT
2680     }
2681     { \dialogue }
2682     \new Staff {
2683       \new Voice { \music }
2684     }
2685   >>
2686 }
2687 @end lilypond
2688
2689 @c TODO show use of \column to produce dialogue on two lines
2690
2691 @seealso
2692 Notation Reference:
2693 @ref{Manual syllable durations},
2694 @ref{Text}.
2695
2696 Internal Reference:
2697 @rinternals{LyricText}.
2698
2699
2700 @node Chants psalms and hymns
2701 @subsection Chants psalms and hymns
2702
2703 @cindex chants
2704 @cindex psalms
2705 @cindex hymns
2706 @cindex religious music
2707
2708 The music and words for chants, psalms and hymns usually follow a
2709 well-established format in any particular church.  Although the
2710 formats may differ from church to church the type-setting problems
2711 which arise are broadly similar, and are covered in this section.
2712
2713 @menu
2714 * References for chants and psalms::
2715 * Setting a chant::
2716 * Pointing a psalm::
2717 * Partial measures in hymn tunes::
2718 @end menu
2719
2720 @node References for chants and psalms
2721 @unnumberedsubsubsec References for chants and psalms
2722
2723 Typesetting Gregorian chant in various styles of ancient notation
2724 is described in @ref{Ancient notation}.
2725
2726 @seealso
2727 Notation reference:
2728 @ref{Ancient notation}.
2729
2730 Snippets:
2731 @rlsr{Vocal music}.
2732
2733
2734 @node Setting a chant
2735 @unnumberedsubsubsec Setting a chant
2736
2737 Modern chant settings use modern notation with varying numbers of
2738 elements taken from ancient notation.  Some of the elements and
2739 methods to consider are shown here.
2740
2741 Chants often use quarter notes without stems to indicate the pitch,
2742 with the rhythm being taken from the spoken rhythm of the words.
2743
2744 @lilypond[verbatim,quote]
2745 stemOff = { \override Staff.Stem #'transparent = ##t }
2746
2747 \relative c' {
2748   \stemOff
2749   a'4 b c2 |
2750 }
2751
2752 @end lilypond
2753
2754 Chants often omit the bar lines or use shortened or dotted bar
2755 lines to indicate pauses in the music.  To omit all bar lines from
2756 all staves remove the bar line engraver completely:
2757
2758 @lilypond[verbatim,quote]
2759 \score {
2760   \new StaffGroup <<
2761     \new Staff {
2762       \relative c'' {
2763         a4 b c2 |
2764         a4 b c2 |
2765         a4 b c2 |
2766       }
2767     }
2768     \new Staff {
2769       \relative c'' {
2770         a4 b c2 |
2771         a4 b c2 |
2772         a4 b c2 |
2773       }
2774     }
2775   >>
2776   \layout {
2777     \context {
2778       \Staff
2779       \remove Bar_engraver
2780     }
2781   }
2782 }
2783 @end lilypond
2784
2785 Bar lines can also be removed on a staff-by-staff basis:
2786
2787 @lilypond[verbatim, quote]
2788 \score {
2789   \new ChoirStaff <<
2790     \new Staff
2791     \with { \remove Bar_engraver } {
2792       \relative c'' {
2793         a4 b c2 |
2794         a4 b c2 |
2795         a4 b c2 |
2796       }
2797     }
2798     \new Staff {
2799       \relative c'' {
2800         a4 b c2 |
2801         a4 b c2 |
2802         a4 b c2 |
2803       }
2804     }
2805   >>
2806 }
2807 @end lilypond
2808
2809 To remove bar lines from just a section of music treat it as a
2810 cadenza.  If the section is long you may need to insert dummy
2811 bar lines with @code{\bar ""} to show where the line should break.
2812
2813 @lilypond[verbatim,quote,relative=2]
2814 a4 b c2 |
2815 \cadenzaOn
2816 a4 b c2
2817 a4 b c2
2818 \bar ""
2819 a4 b c2
2820 a4 b c2
2821 \cadenzaOff
2822 a4 b c2 |
2823 a4 b c2 |
2824 @end lilypond
2825
2826 Rests or pauses in chants can be indicated by modified bar lines.
2827
2828 @lilypond[verbatim, quote,relative=2]
2829 a4
2830 \cadenzaOn
2831 b c2
2832 a4 b c2
2833 \bar "'"
2834 a4 b c2
2835 a4 b c2
2836 \bar ":"
2837 a4 b c2
2838 \bar "dashed"
2839 a4 b c2
2840 \bar "||"
2841 @end lilypond
2842
2843 Alternatively, the notation used in Gregorian chant for pauses or
2844 rests is sometimes used even though the rest of the notation is
2845 modern.  This uses a modified @code{\breathe} mark:
2846
2847 @lilypond[verbatim,quote]
2848 divisioMinima = {
2849   \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-minima
2850   \once \override BreathingSign  #'Y-offset = #0
2851   \breathe
2852 }
2853 divisioMaior = {
2854   \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-maior
2855   \once \override BreathingSign  #'Y-offset = #0
2856   \breathe
2857 }
2858 divisioMaxima = {
2859   \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-maxima
2860   \once \override BreathingSign  #'Y-offset = #0
2861   \breathe
2862 }
2863 finalis = {
2864   \once \override BreathingSign  #'stencil = #ly:breathing-sign::finalis
2865   \once \override BreathingSign  #'Y-offset = #0
2866   \breathe
2867 }
2868
2869 \score {
2870   \relative c'' {
2871     g2 a4 g
2872     \divisioMinima
2873     g2 a4 g
2874     \divisioMaior
2875     g2 a4 g
2876     \divisioMaxima
2877     g2 a4 g
2878     \finalis
2879   }
2880   \layout {
2881     \context {
2882       \Staff
2883       \remove Bar_engraver
2884     }
2885   }
2886 }
2887 @end lilypond
2888
2889 Chants usually omit the time signature and often omit the clef too.
2890
2891 @lilypond[verbatim,quote]
2892 \score {
2893   \new Staff {
2894     \relative c'' {
2895       a4 b c2 |
2896       a4 b c2 |
2897       a4 b c2 |
2898     }
2899   }
2900   \layout {
2901     \context {
2902       \Staff
2903       \remove Bar_engraver
2904       \remove Time_signature_engraver
2905       \remove Clef_engraver
2906     }
2907   }
2908 }
2909 @end lilypond
2910
2911 Chants for psalms in the Anglican tradition are usually either
2912 @emph{single}, with 7 bars of music, or @emph{double}, with two lots
2913 of 7 bars.  Each group of 7 bars is divided into two halves,
2914 corresponding to the two halves of each verse, usually separated by
2915 a double bar line.  Only whole and half notes are used.  The 1st bar
2916 in each half always contains a single chord of whole notes.  This is
2917 the @qq{reciting note}.  Chants are usually centered on the page.
2918
2919 @lilypond[verbatim,quote]
2920 SopranoMusic = \relative g' {
2921   g1 | c2 b | a1 | \bar "||"
2922   a1 | d2 c | c b | c1 | \bar "||"
2923 }
2924
2925 AltoMusic = \relative c' {
2926   e1 | g2 g | f1 |
2927   f1 | f2 e | d d | e1 |
2928 }
2929
2930 TenorMusic = \relative a {
2931   c1 | c2 c | c1 |
2932   d1 | g,2 g | g g | g1 |
2933 }
2934
2935 BassMusic =  \relative c {
2936   c1 | e2 e | f1 |
2937   d1 | b2 c | g' g | c,1 |
2938 }
2939
2940 global = {
2941   \time 2/2
2942 }
2943
2944 % Use markup to center the chant on the page
2945 \markup {
2946   \fill-line {
2947     \score {  % centered
2948       <<
2949         \new ChoirStaff <<
2950           \new Staff <<
2951             \global
2952             \clef "treble"
2953             \new Voice = "Soprano" <<
2954               \voiceOne
2955               \SopranoMusic
2956             >>
2957             \new Voice = "Alto" <<
2958               \voiceTwo
2959               \AltoMusic
2960             >>
2961           >>
2962           \new Staff <<
2963             \clef "bass"
2964             \global
2965             \new Voice = "Tenor" <<
2966               \voiceOne
2967               \TenorMusic
2968             >>
2969             \new Voice = "Bass" <<
2970               \voiceTwo
2971               \BassMusic
2972             >>
2973           >>
2974         >>
2975       >>
2976       \layout {
2977         \context {
2978           \Score
2979           \override SpacingSpanner
2980           #'base-shortest-duration = #(ly:make-moment 1 2)
2981         }
2982         \context {
2983           \Staff
2984           \remove "Time_signature_engraver"
2985         }
2986       }
2987     }  % End score
2988   }
2989 }  % End markup
2990 @end lilypond
2991
2992 Some other approaches to setting such a chant are shown in the first
2993 of the following snippets.
2994
2995 @snippets
2996
2997 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
2998 {chant-or-psalms-notation.ly}
2999
3000 Canticles and other liturgical texts may be set more freely, and
3001 may use notational elements from ancient music.  Often the words
3002 are shown underneath and aligned with the notes.  If so, the notes
3003 are spaced in accordance with the syllables rather than the notes'
3004 durations.
3005
3006 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
3007 {ancient-notation-template----modern-transcription-of-gregorian-music.ly}
3008
3009 @seealso
3010 Learning Manual:
3011 @rlearning{Visibility and color of objects},
3012 @rlearning{Vocal ensembles}.
3013
3014 Notation Reference:
3015 @ref{Ancient notation},
3016 @ref{Bar lines},
3017 @ref{Modifying context plug-ins},
3018 @ref{Typesetting Gregorian chant},
3019 @ref{Unmetered music},
3020 @ref{Visibility of objects}.
3021
3022
3023 @node Pointing a psalm
3024 @unnumberedsubsubsec Pointing a psalm
3025
3026 The words to an Anglican psalm are usually printed in separate
3027 verses centered underneath the chant.
3028
3029 Single chants (with 7 bars) are repeated for every verse.  Double
3030 chants (with 14 bars) are repeated for every pair of verses.  Marks
3031 are inserted in the words to show how they should be fitted to the
3032 chant.  Each verse is divided into two halves.  A colon is usually
3033 used to indicate this division.  This corresponds to the double bar
3034 line in the music.  The words before the colon are sung to the first
3035 three bars of music; the words after the colon are sung to the last
3036 four bars.
3037
3038 Single bar lines (or in some psalters an inverted comma or similar
3039 symbol) are inserted between words to indicate where the bar lines
3040 in the music fall.  In markup mode a single bar line can be entered
3041 with the bar check symbol, @code{|}.
3042
3043 @lilypond[verbatim,quote]
3044 \markup {
3045   \fill-line {
3046     \column {
3047       \left-align {
3048         \line { O come let us sing | unto the | Lord : let }
3049         \line { us heartily rejoice in the | strength of | our }
3050         \line { sal- | -vation. }
3051       }
3052     }
3053   }
3054 }
3055 @end lilypond
3056
3057 Other symbols may require glyphs from the @code{fetaMusic} fonts.
3058 For details, see @ref{Fonts}.
3059
3060 @lilypond[verbatim,quote]
3061 tick = \markup {
3062   \raise #1 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
3063 }
3064 \markup {
3065   \fill-line {
3066     \column {
3067       \left-align {
3068         \line { O come let us sing \tick unto the \tick Lord : let }
3069         \line {
3070           us heartily rejoice in the \tick strength of \tick our
3071         }
3072         \line { sal \tick vation. }
3073       }
3074     }
3075   }
3076 }
3077 @end lilypond
3078
3079 Where there is one whole note in a bar all the words corresponding
3080 to that bar are recited on that one note in speech rhythm.  Where
3081 there are two notes in a bar there will usually be only one or two
3082 corresponding syllables.  If there are more that two syllables a
3083 dot is usually inserted to indicate where the change in note occurs.
3084
3085 @lilypond[verbatim,quote]
3086 dot = \markup {
3087   \raise #0.7 \musicglyph #"dots.dot"
3088 }
3089 tick = \markup {
3090   \raise #1 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
3091 }
3092 \markup {
3093   \fill-line {
3094     \column {
3095       \left-align {
3096         \line {
3097           O come let us sing \tick unto \dot the \tick Lord : let
3098         }
3099         \line {
3100           us heartily rejoice in the \tick strength of \tick our
3101         }
3102         \line { sal \tick vation. }
3103       }
3104     }
3105   }
3106 }
3107 @end lilypond
3108
3109 In some psalters an asterisk is used to indicate a break in a
3110 recited section instead of a comma, and stressed or slightly
3111 lengthened syllables are indicated in bold text.
3112
3113 @lilypond[verbatim,quote]
3114 dot = \markup {
3115   \raise #0.7 \musicglyph #"dots.dot"
3116 }
3117 tick = \markup {
3118   \raise #1 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
3119 }
3120 \markup {
3121   \fill-line {
3122     \column {
3123       \left-align {
3124         \line { Today if ye will hear his voice * }
3125         \line {
3126           \concat { \bold hard en }
3127           | not your | hearts : as in the pro-
3128         }
3129         \line { vocation * and as in the \bold day of tempt- | }
3130         \line { -ation | in the | wilderness. }
3131       }
3132     }
3133   }
3134 }
3135 @end lilypond
3136
3137 In other psalters an accent is placed over the syllable to indicate
3138 stress.
3139
3140 @lilypond[verbatim,quote]
3141 tick = \markup {
3142   \raise #2 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
3143 }
3144 \markup {
3145   \fill-line {
3146     \column {
3147       \left-align {
3148         \line {
3149           O come let us \concat {
3150             si \combine \tick ng
3151           }
3152           | unto the | Lord : let
3153         }
3154         \line {
3155           us heartily \concat {
3156             rejo \combine \tick ice
3157           }
3158           in the | strength of | our
3159         }
3160         \line { sal- | -vation. }
3161       }
3162     }
3163   }
3164 }
3165 @end lilypond
3166
3167 The use of markup to center text, and arrange lines in columns is
3168 described in @ref{Formatting text}.
3169
3170 Most of these elements are shown in one or other of the two verses
3171 in the template, see @qq{Psalms} in @rlearning{Vocal ensembles}.
3172
3173 @seealso
3174 Learning Manual:
3175 @rlearning{Vocal ensembles}.
3176
3177 Notation Reference:
3178 @ref{Fonts},
3179 @ref{Formatting text}.
3180
3181
3182 @node Partial measures in hymn tunes
3183 @unnumberedsubsubsec Partial measures in hymn tunes
3184
3185 Hymn tunes frequently start and end every line of music with
3186 partial measures so that each line of music corresponds exactly
3187 with a line of text.  This requires a @code{\partial} command at
3188 the start of the music and @code{\bar "|"} or @code{\bar "||"}
3189 commands at the end of each line.
3190
3191 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
3192 {hymn-template.ly}
3193
3194
3195 @node Ancient vocal music
3196 @subsection Ancient vocal music
3197
3198 Ancient vocal music is supported, as explained in
3199 @ref{Ancient notation}.
3200
3201 @c TODO
3202
3203 @c Add "Printing both the ancient and the modern clef in vocal music" snippet,
3204 @c and "Transcription of Ancient music with incipit" snippet. -vv
3205
3206 @seealso
3207 Notation Reference:
3208 @ref{Ancient notation}.
3209
3210
3211
3212