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