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