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