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