]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/notation/vocal.itely
Fixes issue 2597 - removes note about melisma
[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.14.0"
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
95 @node Entering lyrics
96 @unnumberedsubsubsec Entering lyrics
97
98 @cindex lyrics, entering
99 @cindex entering lyrics
100 @cindex formatting in lyrics
101 @cindex lyrics, formatting
102 @cindex punctuation in lyrics
103 @cindex lyrics punctuation
104 @cindex spaces in lyrics
105 @cindex quotes in lyrics
106 @funindex \lyricmode
107
108 @c TODO should we explain hyphens here
109
110 Lyrics are entered in a special input mode, which can be introduced
111 by the keyword @code{\lyricmode}, or by using @code{\addlyrics} or
112 @code{\lyricsto}.  In this special input mode, the input @code{d}
113 is not parsed as the pitch @notation{D}, but rather as a one-letter
114 syllable of text.  In other words, syllables are entered like notes
115 but with pitches replaced by text.
116
117 For example:
118
119 @example
120 \lyricmode @{ Three4 blind mice,2 three4 blind mice2 @}
121 @end example
122
123 There are two main methods for specifying the horizontal placement
124 of the syllables, either by specifying the duration of each syllable
125 explicitly, as in the example above, or by leaving the lyrics to be
126 aligned automatically to a melody or other voice of music, using
127 @code{\addlyrics} or @code{\lyricsto}.  The former method is
128 described below in @ref{Manual syllable durations}.  The latter
129 method is described in @ref{Automatic syllable durations}.
130
131 A word or syllable of lyrics begins with an alphabetic character
132 (plus some other characters, see below) and is terminated by any
133 white space or a digit.  Later characters in the syllable can be any
134 character that is not a digit or white space.
135
136 Because any character that is not a digit or white space is regarded
137 as part of the syllable, a word is valid even if it ends with
138 @code{@}}, which often leads to the following mistake:
139
140 @example
141 \lyricmode @{ lah lah lah@}
142 @end example
143
144 In this example, the @code{@}} is included in the final syllable, so the
145 opening brace is not balanced and the input file will probably not
146 compile.  Instead, braces should always be surrounded with white space:
147
148 @example
149 \lyricmode @{ lah lah lah @}
150 @end example
151
152 @cindex overrides in lyric mode
153 @funindex \override in \lyricmode
154
155 Similarly, in lyric mode, a period will be included in the
156 alphabetic sequence that it follows.  As a consequence, spaces
157 must be inserted around the period in @code{\override} commands.
158 Do @emph{not} write
159
160 @example
161 \override Score.LyricText #'font-shape = #'italic
162 @end example
163
164 @noindent
165 but instead use
166
167 @example
168 \override Score . LyricText #'font-shape = #'italic
169 @end example
170
171 Punctuation, lyrics with accented characters, characters from
172 non-English languages, or special characters (such as the heart
173 symbol or slanted quotes), may simply be inserted directly
174 into the input file, providing it is saved with UTF-8 encoding.
175 For more information, see @ref{Special characters}.
176
177 @lilypond[quote,verbatim]
178 \relative c'' { d8 c16 a bes8 f e' d c4 }
179 \addlyrics { „Schad’ um das schö -- ne grü -- ne Band, }
180 @end lilypond
181
182 Normal quotes may be used in lyrics, but they have to be preceded
183 with a backslash character and the whole syllable has to be
184 enclosed between additional quotes.  For example,
185
186 @lilypond[quote,verbatim]
187 \relative c' { \time 3/4 e4 e4. e8 d4 e d c2. }
188 \addlyrics { "\"I" am so lone -- "ly,\"" said she }
189 @end lilypond
190
191 The full definition of a word start in lyrics mode is somewhat more
192 complex.  A word in lyrics mode is one that begins with an
193 alphabetic character, @code{_}, @code{?}, @code{!}, @code{:},
194 @code{'}, the control characters @code{^A} through @code{^F},
195 @code{^Q} through @code{^W}, @code{^Y}, @code{^^}, any 8-bit
196 character with an ASCII code over 127, or a two-character
197 combination of a backslash followed by one of @code{`}, @code{'},
198 @code{"}, or @code{^}.
199
200 @c " to balance double quotes for not-so-bright context-sensitive editors
201
202 Great control over the appearance of lyrics comes from using
203 @code{\markup} inside the lyrics themselves. For explanation of many
204 options, see @ref{Formatting text}.
205
206 @snippets
207
208 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
209 {formatting-lyrics-syllables.ly}
210
211
212 @seealso
213 Learning Manual:
214 @rlearning{Songs}.
215
216 Notation Reference:
217 @ref{Automatic syllable durations},
218 @ref{Fonts},
219 @ref{Formatting text},
220 @ref{Input modes},
221 @ref{Manual syllable durations},
222 @ref{Special characters}.
223
224 Internals Reference:
225 @rinternals{LyricText}.
226
227 Snippets:
228 @rlsr{Text}.
229
230
231 @node Aligning lyrics to a melody
232 @unnumberedsubsubsec Aligning lyrics to a melody
233
234 @cindex lyrics, aligning to a melody
235 @cindex @code{associatedVoice}
236 @funindex \lyricmode
237 @funindex \addlyrics
238 @funindex \lyricsto
239
240 Lyrics are printed by interpreting them in the context called
241 @code{Lyrics}, see @ref{Contexts explained}.
242
243 @example
244 \new Lyrics \lyricmode @{ @dots{} @}
245 @end example
246
247 Lyrics can be aligned with melodies in two main ways:
248
249 @itemize
250
251 @item
252 Lyrics can be aligned automatically, with the durations of the
253 syllables being taken from another voice of music or (in special
254 circumstances) an associated melody, using @code{\addlyrics},
255 @code{\lyricsto}, or by setting the @code{associatedVoice} property.
256 For more details, see @ref{Automatic syllable durations}.
257
258 @lilypond[quote,ragged-right,verbatim]
259 <<
260   \new Staff <<
261     \time 2/4
262     \new Voice = "one" \relative c'' {
263       \voiceOne
264       c4 b8. a16 g4. r8 a4 ( b ) c2
265     }
266     \new Voice = "two" \relative c' {
267       \voiceTwo
268        s2 s4. f8 e4 d c2
269     }
270   >>
271
272 % takes durations and alignment from notes in "one"
273   \new Lyrics \lyricsto "one" {
274     Life is __ _ love, live __ life.
275   }
276
277 % takes durations and alignment from notes in "one" initially
278 % then switches to "two"
279   \new Lyrics \lyricsto "one" {
280     No more let
281     \set associatedVoice = "two"  % must be set one syllable early
282     sins and sor -- rows grow.
283   }
284 >>
285 @end lilypond
286
287 The first stanza shows the normal way of entering lyrics.
288
289 The second stanza shows how the voice from which the lyric
290 durations are taken can be changed.  This is useful if the words to
291 different stanzas fit the notes in different ways and all the
292 durations are available in Voice contexts.  For more details, see
293 @ref{Stanzas}.
294
295 @item
296 Lyrics can be aligned independently of the duration of any notes
297 if the durations of the syllables are specified explicitly,
298 and entered with @code{\lyricmode}.
299
300 @lilypond[quote,ragged-right,verbatim]
301 <<
302   \new Voice = "one" \relative c'' {
303     \time 2/4
304     c4 b8. a16 g4. f8 e4 d c2
305   }
306
307 % uses previous explicit duration of 2;
308   \new Lyrics \lyricmode {
309     Joy to the earth!
310   }
311
312 % explicit durations, set to a different rhythm
313   \new Lyrics \lyricmode {
314     Life4 is love,2. live4 life.2
315   }
316 >>
317 @end lilypond
318
319 The first stanza is not aligned with the notes because the durations
320 were not specified, and the previous value of 2 is used for each
321 word.
322
323 The second stanza shows how the words can be aligned quite
324 independently from the notes.  This is useful if the words to
325 different stanzas fit the notes in different ways and the required
326 durations are not available in a music context.  For more details
327 see @ref{Manual syllable durations}.  This technique is also useful
328 when setting dialogue over music; for examples showing this, see
329 @ref{Dialogue over music}.
330
331 When entered in this way the words are left-aligned to the notes
332 by default, but may be center-aligned to the notes of a melody by
333 specifying an associated voice, if one exists.  For details, see
334 @ref{Manual syllable durations}.
335
336 @end itemize
337
338 @seealso
339 Learning Manual:
340 @rlearning{Aligning lyrics to a melody}.
341
342 Notation Reference:
343 @ref{Contexts explained},
344 @ref{Automatic syllable durations},
345 @ref{Stanzas},
346 @ref{Manual syllable durations},
347 @ref{Dialogue over music},
348 @ref{Manual syllable durations}.
349
350 Internals Reference:
351 @rinternals{Lyrics}.
352
353
354 @node Automatic syllable durations
355 @unnumberedsubsubsec Automatic syllable durations
356
357 @cindex syllable durations, automatic
358 @cindex lyrics and melodies
359 @cindex associatedVoice
360 @funindex \addlyrics
361 @funindex \lyricsto
362
363 Lyrics can be automatically aligned to the notes of a melody in
364 three ways:
365
366 @itemize
367
368 @item
369 by specifying the named Voice context containing the melody with
370 @code{\lyricsto},
371
372 @item
373 by introducing the lyrics with @code{\addlyrics} and placing them
374 immediately after the Voice context containing the melody,
375
376 @item
377 by setting the @code{associatedVoice} property, the alignment of
378 the lyrics may be switched to a different named Voice context at
379 any musical moment.
380
381 @end itemize
382
383 In all three methods hyphens can be drawn between the syllables of
384 a word and extender lines can be drawn beyond the end of a word.  For
385 details, see @ref{Extenders and hyphens}.
386
387 The @code{Voice} context containing the melody to which the lyrics
388 are being aligned must not have @qq{died}, or the lyrics after that
389 point will be lost.  This can happen if there are periods when that
390 voice has nothing to do.  For methods of keeping contexts alive, see
391 @ref{Keeping contexts alive}.
392
393 @subheading Using @code{\lyricsto}
394
395 @cindex \lyricsto
396 @funindex \lyricsto
397
398 Lyrics can be aligned under a melody automatically by specifying
399 the named Voice context containing the melody with
400 @code{\lyricsto}:
401
402 @lilypond[quote,verbatim,relative=2]
403 <<
404   \new Voice = "melody" {
405     a4 a a a
406   }
407   \new Lyrics \lyricsto "melody" {
408     These are the words
409   }
410 >>
411 @end lilypond
412
413 @noindent
414 This aligns the lyrics to the notes of the named @code{Voice}
415 context, which must already exist.  Therefore normally the
416 @code{Voice} context is specified first, followed by the
417 @code{Lyrics} context.  The lyrics themselves follow the
418 @code{\lyricsto} command.  The @code{\lyricsto} command
419 invokes lyric mode automatically, so the @code{\lyricmode} keyword
420 may be omitted.  By default, the lyrics are placed underneath the
421 notes.  For other placements, see @ref{Placing lyrics vertically}.
422
423 @subheading Using @code{\addlyrics}
424
425 @cindex \addlyrics
426 @funindex \addlyrics
427
428 The @code{\addlyrics} command is just a convenient shortcut that
429 can sometimes be used instead of having to set up the lyrics
430 through a more complicated LilyPond structure.
431
432 @example
433 @{ MUSIC @}
434 \addlyrics @{ LYRICS @}
435 @end example
436
437 @noindent
438 is the same as
439
440 @example
441 \new Voice = "blah" @{ MUSIC @}
442 \new Lyrics \lyricsto "blah" @{ LYRICS @}
443 @end example
444
445 Here is an example,
446
447 @lilypond[verbatim,quote]
448 {
449   \time 3/4
450   \relative c' { c2 e4 g2. }
451   \addlyrics { play the game }
452 }
453 @end lilypond
454
455 More stanzas can be added by adding more
456 @code{\addlyrics} sections:
457
458
459 @lilypond[ragged-right,verbatim,quote]
460 {
461   \time 3/4
462   \relative c' { c2 e4 g2. }
463   \addlyrics { play the game }
464   \addlyrics { speel het spel }
465   \addlyrics { joue le jeu }
466 }
467 @end lilypond
468
469 The command @code{\addlyrics} cannot handle polyphonic settings.
470 For these cases one should use @code{\lyricsto}.
471
472 @subheading Using associatedVoice
473
474 The melody to which the lyrics are being aligned can be changed by
475 setting the @code{associatedVoice} property,
476
477 @example
478 \set associatedVoice = #"lala"
479 @end example
480
481 @noindent
482
483 The value of the property (here: @code{"lala"}) should be the name
484 of a @code{Voice} context.  For technical reasons, the @code{\set}
485 command must be placed one syllable before the one to which the
486 change in voice is to apply.
487
488 Here is an example demonstrating its use:
489
490 @lilypond[quote,ragged-right,verbatim]
491 <<
492   \new Staff <<
493     \time 2/4
494     \new Voice = "one" \relative c'' {
495       \voiceOne
496       c4 b8. a16 g4. r8 a4 ( b ) c2
497     }
498     \new Voice = "two" \relative c' {
499       \voiceTwo
500        s2 s4. f8 e8 d4. c2
501     }
502   >>
503 % takes durations and alignment from notes in "one" initially
504 % then switches to "two"
505   \new Lyrics \lyricsto "one" {
506     No more let
507     \set associatedVoice = "two"  % must be set one syllable early
508     sins and sor -- rows grow.
509   }
510 >>
511 @end lilypond
512
513 @seealso
514 Notation Reference:
515 @ref{Extenders and hyphens},
516 @ref{Keeping contexts alive},
517 @ref{Placing lyrics vertically}.
518
519
520 @node Manual syllable durations
521 @unnumberedsubsubsec Manual syllable durations
522
523 In some complex vocal music, it may be desirable to place lyrics
524 completely independently of notes.  In this case do not use
525 @code{\lyricsto} or @code{\addlyrics} and do not set
526 @code{associatedVoice}.  Syllables are entered like notes --
527 but with pitches replaced by text -- and the duration of each
528 syllable is entered explicitly after the syllable.
529
530 By default, syllables will be left-aligned to the corresponding
531 musical moment.  Hyphenated lines may be drawn between syllables
532 as usual, but extender lines cannot be drawn when there is no
533 associated voice.
534
535 Here are two examples:
536
537 @lilypond[relative=1,verbatim,quote]
538 <<
539   \new Voice = "melody" {
540     \time 3/4
541     c2 e4 g2 f
542   }
543   \new Lyrics \lyricmode {
544     play1 the4 game4
545   }
546 >>
547 @end lilypond
548
549
550 @lilypond[quote,verbatim,ragged-right]
551 <<
552   \new Staff {
553     \relative c'' {
554       c2 c2
555       d1
556     }
557   }
558   \new Lyrics {
559     \lyricmode {
560       I2 like4. my8 cat!1
561     }
562   }
563   \new Staff {
564     \relative c' {
565       c8 c c c c c c c
566       c8 c c c c c c c
567     }
568   }
569 >>
570 @end lilypond
571
572 This technique is useful when writing dialogue over music, see
573 @ref{Dialogue over music}.
574
575 To center-align syllables on the notes at the corresponding musical
576 moments, set @code{associatedVoice} to the name of the Voice context
577 containing those notes.  When @code{associatedVoice} is set, both
578 double hyphens and double underscores can be used to draw
579 hyphenated lines and extenders under melismata correctly.
580
581 @lilypond[relative=1,verbatim,quote]
582 <<
583   \new Voice = "melody" {
584     \time 3/4
585     c2 e4 g f g
586   }
587   \new Lyrics \lyricmode {
588     \set associatedVoice = #"melody"
589     play2 the4 game2. __
590   }
591 >>
592 @end lilypond
593
594 @c TODO see also feature request 707 - show how to do this with manual durations
595
596 @seealso
597 Notation Reference:
598 @ref{Dialogue over music}.
599
600 Internals Reference:
601 @rinternals{Lyrics},
602 @rinternals{Voice}.
603
604
605 @node Multiple syllables to one note
606 @unnumberedsubsubsec Multiple syllables to one note
607
608 @funindex _
609 @cindex spaces, in lyrics
610 @cindex quotes, in lyrics
611 @cindex ties, in lyrics
612
613 In order to assign more than one syllable to a single note with
614 spaces between the syllables, you can surround the phrase with
615 quotes or use a @code{_} character.  Alternatively, you can use
616 the tilde symbol (@code{~}) to get a lyric tie.
617
618 @lilypond[quote,ragged-right,verbatim]
619 {
620   \relative c'' { \autoBeamOff
621     r8 b c fis, fis c' b e, }
622   \addlyrics { Che_in ques -- ta_e_in quel -- l'al -- tr'on -- da }
623   \addlyrics { "Che in" ques -- "ta e in" quel -- l'al -- tr'on -- da }
624   \addlyrics { Che~in ques -- ta~e~in quel -- l'al -- tr'on -- da }
625 }
626 @end lilypond
627
628 @seealso
629 Internals Reference:
630 @rinternals{LyricCombineMusic}.
631
632
633 @node Multiple notes to one syllable
634 @unnumberedsubsubsec Multiple notes to one syllable
635
636 @cindex melisma
637 @cindex melismata
638 @cindex phrasing, in lyrics
639 @funindex \melisma
640 @funindex \melismaEnd
641
642 Sometimes, particularly in Medieval music, several notes are to be
643 sung on one syllable; such vocalises are called melismata, or
644 @rglos{melisma}s.  The syllable to a melisma is usually
645 left-aligned with the first note of the melisma.
646
647 When a melisma occurs on a syllable other that the last one in a
648 word, that syllable is usually joined to the following one with a
649 hyphenated line.  This is indicated by placing a double hyphen,
650 @w{@code{--}}, immediately after the syllable.
651
652 Alternatively, when a melisma occurs on the last or only syllable in
653 a word an extender line is usually drawn from the end of the syllable
654 to the last note of the melisma.  This is indicated by placing a
655 double underscore, @code{__}, immediately after the word.
656
657 There are five ways in which melismata can be indicated:
658
659 @itemize
660
661 @item
662 Melismata are created automatically over notes which are tied
663 together:
664
665 @lilypond[quote,relative=2,verbatim]
666 <<
667   \new Voice = "melody" {
668     \time 3/4
669     f4 g2 ~ |
670     g4 e2 ~ |
671     e8
672   }
673   \new Lyrics \lyricsto "melody" {
674     Ky -- ri -- e __
675   }
676 >>
677 @end lilypond
678
679 @item
680 Melismata can be created automatically from the music by placing
681 slurs over the notes of each melisma.  This is the usual way of
682 entering lyrics:
683
684 @lilypond[quote,relative=2,verbatim]
685 <<
686   \new Voice = "melody" {
687     \time 3/4
688     f4 g8 ( f e f )
689     e8 ( d e2 )
690   }
691   \new Lyrics \lyricsto "melody" {
692     Ky -- ri -- e __
693   }
694 >>
695 @end lilypond
696
697 @item
698 Notes are considered a melisma if they are manually beamed,
699 providing automatic beaming is switched off.  See
700 @ref{Setting automatic beam behavior}.
701
702 @lilypond[quote,relative=2,verbatim]
703 <<
704   \new Voice = "melody" {
705     \time 3/4
706     \autoBeamOff
707     f4 g8[ f e f]
708     e2.
709   }
710   \new Lyrics \lyricsto "melody" {
711     Ky -- ri -- e
712   }
713 >>
714 @end lilypond
715
716 Clearly this is not suited to melismata over notes which are longer
717 than eighth notes.
718
719 @item
720 An unslurred group of notes will be treated as a melisma if they
721 are bracketed between @code{\melisma} and @code{\melismaEnd}.
722
723 @lilypond[quote,relative=2,verbatim]
724 <<
725   \new Voice = "melody" {
726     \time 3/4
727     f4 g8
728     \melisma
729     f e f
730     \melismaEnd
731     e2.
732   }
733   \new Lyrics \lyricsto "melody" {
734     Ky -- ri -- e
735   }
736 >>
737 @end lilypond
738
739 @item
740 A melisma can be defined entirely in the lyrics by entering a
741 single underscore character, @code{_}, for every extra note that has
742 to be added to the melisma.
743
744 @lilypond[verbatim, quote, relative=2]
745 <<
746   \new Voice = "melody" {
747     \time 3/4
748     f4 g8 f e f
749     e8 d e2
750   }
751   \new Lyrics \lyricsto "melody" {
752     Ky -- ri -- _ _ _ e __ _ _
753   }
754 >>
755 @end lilypond
756
757 @end itemize
758
759 It is possible to have ties, slurs and manual beams in the melody
760 without their indicating melismata.  To do this, set
761 @code{melismaBusyProperties}:
762
763 @lilypond[relative=1,verbatim,quote]
764 <<
765   \new Voice = "melody" {
766     \time 3/4
767     \set melismaBusyProperties = #'()
768     c4 d ( e )
769     g8 [ f ] f4 ~ f
770   }
771   \new Lyrics \lyricsto "melody" {
772     Ky -- ri -- e e -- le -- i -- son
773   }
774 >>
775 @end lilypond
776
777 Other settings for @code{melismaBusyProperties} can be used to
778 selectively include or exclude ties, slurs, and beams from the
779 automatic detection of melismata; see @code{melismaBusyProperties}
780 in @rinternals{Tunable context properties}.
781
782 Alternatively, if all melismata indications are to be ignored,
783 @code{ignoreMelismata} may be set true;
784 see @ref{Stanzas with different rhythms}.
785
786 If a melisma is required during a passage in which
787 @code{melismaBusyProperties} is active, it may be indicated by
788 placing a single underscore in the lyrics for each note which
789 should be included in the melisma:
790
791 @lilypond[relative=1,verbatim,quote]
792 <<
793   \new Voice = "melody" {
794     \time 3/4
795     \set melismaBusyProperties = #'()
796     c4 d ( e )
797     g8 [ f ] ~ f4 ~ f
798   }
799   \new Lyrics \lyricsto "melody" {
800     Ky -- ri -- _ e __ _ _ _
801   }
802 >>
803 @end lilypond
804
805
806 @predefined
807
808 @code{\autoBeamOff},
809 @code{\autoBeamOn},
810 @code{\melisma},
811 @code{\melismaEnd}.
812
813 @seealso
814 Musical Glossary:
815 @rglos{melisma}.
816
817 Learning Manual:
818 @rlearning{Aligning lyrics to a melody}.
819
820 Notation Reference:
821 @ref{Aligning lyrics to a melody},
822 @ref{Automatic syllable durations},
823 @ref{Setting automatic beam behavior},
824 @ref{Stanzas with different rhythms}.
825
826 Internals Reference:
827 @rinternals{Tunable context properties}.
828
829 @knownissues
830 Extender lines under melismata are not created automatically; they
831 must be inserted manually with a double underscore.
832
833
834 @node Extenders and hyphens
835 @unnumberedsubsubsec Extenders and hyphens
836
837 @cindex melisma
838 @cindex extender
839
840 @c TODO cf Multiple notes to one syllable; should this be merged in?
841
842 @c leave this as samp. -gp
843 In the last syllable of a word, melismata are sometimes indicated with
844 a long horizontal line starting in the melisma syllable, and ending in
845 the next one.  Such a line is called an extender line, and it is
846 entered as @samp{ __ } (note the spaces before and after the two
847 underscore characters).
848
849 @warning{Melismata are indicated in the score with extender lines,
850 which are entered as one double underscore; but short melismata can
851 also be entered by skipping individual notes, which are entered as
852 single underscore characters; these do not make an extender line to be
853 typeset by default.}
854
855 @cindex hyphens
856
857 @c leave this as samp. -gp
858 Centered hyphens are entered as @samp{ -- } between syllables of a
859 same word (note the spaces before and after the two hyphen
860 characters).  The hyphen will be centered between the syllables, and
861 its length will be adjusted depending on the space between the
862 syllables.
863
864 In tightly engraved music, hyphens can be removed.  Whether this
865 happens can be controlled with the @code{minimum-distance} (minimum
866 distance between two syllables) and the @code{minimum-length}
867 (threshold below which hyphens are removed) properties of
868 @code{LyricHyphen}.
869
870 @seealso
871 Internals Reference:
872 @rinternals{LyricExtender},
873 @rinternals{LyricHyphen}.
874
875
876 @node Techniques specific to lyrics
877 @subsection Techniques specific to lyrics
878
879 @c TODO this whole section is to be reorganised
880
881 @menu
882 * Working with lyrics and variables::
883 * Placing lyrics vertically::
884 * Placing syllables horizontally::
885 * Lyrics and repeats::
886 * Divisi lyrics::
887 @end menu
888
889
890
891 @node Working with lyrics and variables
892 @unnumberedsubsubsec Working with lyrics and variables
893
894 @cindex lyrics, using variables
895
896 Variables containing lyrics can be created, but the lyrics must be
897 entered in lyric mode:
898
899 @lilypond[quote,verbatim]
900 musicOne = \relative c'' {
901   c4 b8. a16 g4. f8 e4 d c2
902 }
903 verseOne = \lyricmode {
904   Joy to the world, the Lord is come.
905 }
906 \score {
907   <<
908     \new Voice = "one" {
909       \time 2/4
910       \musicOne
911     }
912     \new Lyrics \lyricsto "one" {
913       \verseOne
914     }
915   >>
916 }
917 @end lilypond
918
919 Durations do not need to be added if the variable is to be invoked
920 with @code{\addlyrics} or @code{\lyricsto}.
921
922 For different or more complex orderings, the best way is to define
923 the music and lyric variables first, then set up the hierarchy of
924 staves and lyrics, omitting the lyrics themselves, and then add the
925 lyrics using @code{\context} underneath.  This ensures that the
926 voices referenced by @code{\lyricsto} have always been defined
927 earlier.  For example:
928
929 @lilypond[quote,verbatim]
930 sopranoMusic = \relative c'' { c4 c c c }
931 contraltoMusic = \relative c'' { a4 a a a }
932 sopranoWords = \lyricmode { Sop -- ra -- no words }
933 contraltoWords = \lyricmode { Con -- tral -- to words }
934
935 \score {
936   \new ChoirStaff <<
937     \new Staff {
938       \new Voice = "sopranos" {
939         \sopranoMusic
940       }
941     }
942     \new Lyrics = "sopranos"
943     \new Lyrics = "contraltos"
944     \new Staff {
945       \new Voice = "contraltos" {
946         \contraltoMusic
947       }
948     }
949     \context Lyrics = "sopranos" {
950       \lyricsto "sopranos" {
951         \sopranoWords
952       }
953     }
954     \context Lyrics = "contraltos" {
955       \lyricsto "contraltos" {
956         \contraltoWords
957       }
958     }
959   >>
960 }
961 @end lilypond
962
963 @seealso
964 Notation Reference:
965 @ref{Placing lyrics vertically}.
966
967 Internals Reference:
968 @rinternals{LyricCombineMusic},
969 @rinternals{Lyrics}.
970
971
972 @node Placing lyrics vertically
973 @unnumberedsubsubsec Placing lyrics vertically
974
975 @cindex placement of lyrics
976 @cindex lyrics, positioning
977
978 Depending on the type of music, lyrics may be positioned
979 above the staff, below the staff, or between staves.  Placing
980 lyrics below the associated staff is the easiest, and can be
981 achieved by simply defining the Lyrics context below the Staff
982 context:
983
984 @lilypond[quote,verbatim]
985 \score {
986   <<
987     \new Staff {
988       \new Voice = "melody" {
989         \relative c'' { c4 c c c }
990       }
991     }
992     \new Lyrics {
993       \lyricsto "melody" {
994         Here are the words
995       }
996     }
997   >>
998 }
999 @end lilypond
1000
1001 Lyrics may be positioned above the staff using one of
1002 two methods.  The simplest (and preferred) method
1003 is to use the same syntax as above and explicitly
1004 specify the position of the lyrics:
1005
1006 @lilypond[quote,verbatim]
1007 \score {
1008   <<
1009     \new Staff = "staff" {
1010       \new Voice = "melody" {
1011         \relative c'' { c4 c c c }
1012       }
1013     }
1014     \new Lyrics \with { alignAboveContext = "staff" } {
1015       \lyricsto "melody" {
1016         Here are the words
1017       }
1018     }
1019   >>
1020 }
1021 @end lilypond
1022
1023 Alternatively, a two-step process may be used.  First the Lyrics
1024 context is declared (without any content) before the Staff and
1025 Voice contexts, then the @code{\lyricsto} command is placed after
1026 the Voice declaration it references by using @code{\context}, as
1027 follows:
1028
1029 @lilypond[quote,verbatim]
1030 \score {
1031   <<
1032     \new Lyrics = "lyrics" \with {
1033       % lyrics above a staff should have this override
1034       \override VerticalAxisGroup #'staff-affinity = #DOWN
1035     }
1036     \new Staff {
1037       \new Voice = "melody" {
1038         \relative c'' { c4 c c c }
1039       }
1040     }
1041     \context Lyrics = "lyrics" {
1042       \lyricsto "melody" {
1043         Here are the words
1044       }
1045     }
1046   >>
1047 }
1048 @end lilypond
1049
1050 When there are two voices on separate staves the lyrics may be
1051 placed between the staves using either of these methods.  Here
1052 is an example of the second method:
1053
1054 @lilypond[quote,verbatim]
1055 \score {
1056   \new ChoirStaff <<
1057     \new Staff {
1058       \new Voice = "sopranos" {
1059         \relative c'' { c4 c c c }
1060       }
1061     }
1062     \new Lyrics = "sopranos"
1063     \new Lyrics = "contraltos" \with {
1064       % lyrics above a staff should have this override
1065       \override VerticalAxisGroup #'staff-affinity = #DOWN
1066     }
1067     \new Staff {
1068       \new Voice = "contraltos" {
1069         \relative c'' { a4 a a a }
1070       }
1071     }
1072     \context Lyrics = "sopranos" {
1073       \lyricsto "sopranos" {
1074         Sop -- ra -- no words
1075       }
1076     }
1077     \context Lyrics = "contraltos" {
1078       \lyricsto "contraltos" {
1079         Con -- tral -- to words
1080       }
1081     }
1082   >>
1083 }
1084 @end lilypond
1085
1086 Other combinations of lyrics and staves may be generated by
1087 elaborating these examples, or by examining the
1088 @rlearning{Vocal ensembles} templates in the Learning Manual.
1089
1090 @snippets
1091 @lilypondfile[verbatim,quote,texidoc,doctitle]
1092 {obtaining-2.12-lyrics-spacing-in-newer-versions.ly}
1093
1094 @seealso
1095 Learning Manual:
1096 @rlearning{Vocal ensembles}.
1097
1098 Notation Reference:
1099 @ref{Context layout order},
1100 @ref{Creating contexts}.
1101
1102
1103 @node Placing syllables horizontally
1104 @unnumberedsubsubsec Placing syllables horizontally
1105
1106 @cindex Spacing lyrics
1107 @cindex Lyrics, increasing space between
1108
1109 To increase the spacing between lyrics, set the
1110 @code{minimum-distance} property of @code{LyricSpace}.
1111
1112 @lilypond[relative=1,verbatim,quote,ragged-right]
1113 {
1114   c c c c
1115   \override Lyrics.LyricSpace #'minimum-distance = #1.0
1116   c c c c
1117 }
1118 \addlyrics {
1119   longtext longtext longtext longtext
1120   longtext longtext longtext longtext
1121 }
1122 @end lilypond
1123
1124 @noindent
1125 To make this change for all lyrics in the score, set the property in the
1126 @code{\layout} block.
1127
1128 @lilypond[verbatim,quote,ragged-right]
1129 \score {
1130   \relative c' {
1131   c c c c
1132   c c c c
1133   }
1134   \addlyrics {
1135   longtext longtext longtext longtext
1136   longtext longtext longtext longtext
1137   }
1138   \layout {
1139     \context {
1140       \Lyrics
1141       \override LyricSpace #'minimum-distance = #1.0
1142     }
1143   }
1144 }
1145 @end lilypond
1146
1147 @snippets
1148 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
1149 {lyrics-alignment.ly}
1150
1151 @c TODO: move to LSR -vv
1152
1153 Checking to make sure that text scripts and lyrics are within the margins
1154 requires additional calculations.  To speed up processing slightly, this
1155 feature can be disabled:
1156
1157 @example
1158 \override Score.PaperColumn #'keep-inside-line = ##f
1159 @end example
1160
1161 To make lyrics avoid bar lines as well, use
1162
1163 @example
1164 \layout @{
1165   \context @{
1166     \Lyrics
1167       \consists "Bar_engraver"
1168       \consists "Separating_line_group_engraver"
1169       \override BarLine #'transparent = ##t
1170   @}
1171 @}
1172 @end example
1173
1174 @node Lyrics and repeats
1175 @unnumberedsubsubsec Lyrics and repeats
1176
1177 @cindex repeats and lyrics
1178 @cindex lyrics, repeating
1179
1180 @subheading Simple repeats
1181
1182 Repeats in @emph{music} are fully described elsewhere; see
1183 @ref{Repeats}.  This section explains how to add lyrics to repeated
1184 sections of music.
1185
1186 Lyrics to a section of music that is repeated should be surrounded
1187 by exactly the same repeat construct as the music, if the words are
1188 unchanged.
1189
1190 @lilypond[verbatim,quote]
1191 \score {
1192   <<
1193     \new Staff {
1194       \new Voice = "melody" {
1195         \relative c'' {
1196           a4 a a a
1197           \repeat volta 2 { b4 b b b }
1198         }
1199       }
1200     }
1201     \new Lyrics {
1202       \lyricsto "melody" {
1203         Not re -- peat -- ed.
1204         \repeat volta 2 { Re -- peat -- ed twice. }
1205       }
1206     }
1207   >>
1208 }
1209 @end lilypond
1210
1211 The words will then be correctly expanded if the repeats are
1212 unfolded.
1213
1214 @lilypond[verbatim,quote]
1215 \score {
1216   \unfoldRepeats {
1217     <<
1218       \new Staff {
1219         \new Voice = "melody" {
1220           \relative c'' {
1221             a4 a a a
1222             \repeat volta 2 { b4 b b b }
1223           }
1224         }
1225       }
1226       \new Lyrics {
1227         \lyricsto "melody" {
1228           Not re -- peat -- ed.
1229           \repeat volta 2 { Re -- peat -- ed twice. }
1230         }
1231       }
1232     >>
1233   }
1234 }
1235 @end lilypond
1236
1237 If the repeated section is to be unfolded and has different words,
1238 simply enter all the words:
1239
1240 @lilypond[verbatim,quote,ragged-right]
1241 \score {
1242   <<
1243     \new Staff {
1244       \new Voice = "melody" {
1245         \relative c'' {
1246           a4 a a a
1247           \repeat unfold 2 { b4 b b b }
1248         }
1249       }
1250     }
1251     \new Lyrics {
1252       \lyricsto "melody" {
1253         Not re -- peat -- ed.
1254         The first time words.
1255         Sec -- ond time words.
1256       }
1257     }
1258   >>
1259 }
1260 @end lilypond
1261
1262 When the words to a repeated volta section are different, the words
1263 to each repeat must be entered in separate @code{Lyrics} contexts,
1264 correctly nested in parallel sections:
1265
1266 @lilypond[verbatim,quote]
1267 \score {
1268   <<
1269     \new Staff {
1270       \new Voice = "melody" {
1271         \relative c'' {
1272           a4 a a a
1273           \repeat volta 2 { b4 b b b }
1274         }
1275       }
1276     }
1277     \new Lyrics \lyricsto "melody" {
1278       Not re -- peat -- ed.
1279       <<
1280         { The first time words. }
1281         \new Lyrics {
1282           \set associatedVoice = "melody"
1283           Sec -- ond time words.
1284         }
1285       >>
1286     }
1287   >>
1288 }
1289 @end lilypond
1290
1291 More verses may be added in a similar way:
1292
1293 @lilypond[verbatim,quote]
1294 \score {
1295   <<
1296     \new Staff {
1297       \new Voice = "singleVoice" {
1298         \relative c'' {
1299           a4 a a a
1300           \repeat volta 3 { b4 b b b }
1301           c4 c c c
1302         }
1303       }
1304     }
1305     \new Lyrics \lyricsto "singleVoice" {
1306       Not re -- peat -- ed.
1307       <<
1308         { The first time words. }
1309         \new Lyrics {
1310           \set associatedVoice = "singleVoice"
1311           Sec -- ond time words.
1312         }
1313         \new Lyrics {
1314           \set associatedVoice = "singleVoice"
1315           The third time words.
1316         }
1317       >>
1318       The end sec -- tion.
1319     }
1320   >>
1321 }
1322 @end lilypond
1323
1324
1325 @c TODO positioning a common line of lyrics
1326
1327 @subheading Repeats with alternative endings
1328
1329 @cindex lyrics, repeats with alternative endings
1330 @cindex repeating lyrics with alternative endings
1331 @cindex alternative endings and lyrics
1332
1333 If the words of the repeated section are the same, exactly the
1334 same structure can be used for both the lyrics and music.
1335
1336 @lilypond[quote,verbatim]
1337 \score {
1338   <<
1339     \new Staff {
1340       \time 2/4
1341       \new Voice = "melody" {
1342         \relative c'' {
1343           a4 a a a
1344           \repeat volta 2 { b4 b }
1345           \alternative { { b b } { b c } }
1346         }
1347       }
1348     }
1349     \new Lyrics {
1350       \lyricsto "melody" {
1351         Not re -- peat -- ed.
1352         \repeat volta 2 { Re -- peat -- }
1353         \alternative { { ed twice. } { ed twice. } }
1354       }
1355     }
1356   >>
1357 }
1358 @end lilypond
1359
1360 @funindex \skip
1361 @cindex skipping notes in lyrics
1362 @cindex lyrics, skipping notes
1363
1364 But when the repeated section has different words, a repeat
1365 construct cannot be used around the words and @code{\skip} commands
1366 have to be inserted manually to skip over the notes in the
1367 alternative sections which do not apply.
1368
1369 Note: do not use an underscore, @code{_}, to skip notes -- an
1370 underscore indicates a melisma, causing the preceding syllable
1371 to be left-aligned.
1372
1373 @warning{The @code{@bs{}skip} command must be followed by a number,
1374 but this number is ignored in lyrics which derive their durations
1375 from the notes in an associated melody through @code{\addlyrics} or
1376 @code{\lyricsto}.  Each @code{@bs{}skip} skips a single note of any
1377 value, irrespective of the value of the following number.}
1378
1379 @lilypond[verbatim,quote,ragged-right]
1380 \score {
1381   <<
1382     \new Staff {
1383       \time 2/4
1384       \new Voice = "melody" {
1385         \relative c'' {
1386           \repeat volta 2 { b4 b }
1387           \alternative { { b b } { b c } }
1388           c4 c
1389         }
1390       }
1391     }
1392     \new Lyrics {
1393       \lyricsto "melody" {
1394         The first time words.
1395         \repeat unfold 2 { \skip 1 }
1396         End here.
1397       }
1398     }
1399     \new Lyrics {
1400       \lyricsto "melody" {
1401         Sec -- ond
1402         \repeat unfold 2 { \skip 1 }
1403         time words.
1404       }
1405     }
1406   >>
1407 }
1408 @end lilypond
1409
1410 @cindex lyrics and tied notes
1411 @funindex \repeatTie
1412
1413 When a note is tied over into two or more alternative endings a
1414 tie is used to carry the note into the first alternative ending and
1415 a @code{\repeatTie} is used in the second and subsequent endings.
1416 This structure causes difficult alignment problems when lyrics are
1417 involved and increasing the length of the alternative sections so
1418 the tied notes are contained wholly within them may give a more
1419 acceptable result.
1420
1421 The tie creates a melisma into the first alternative, but not into
1422 the second and subsequent alternatives, so to align the lyrics
1423 correctly it is necessary to disable the automatic creation of
1424 melismata over the volta section and insert manual skips.
1425
1426 @lilypond[quote,verbatim]
1427 \score {
1428   <<
1429     \new Staff {
1430       \time 2/4
1431       \new Voice = "melody" {
1432         \relative c'' {
1433           \set melismaBusyProperties = #'()
1434           \repeat volta 2 { b4 b ~}
1435           \alternative { { b b } { b \repeatTie c } }
1436           \unset melismaBusyProperties
1437           c4 c
1438         }
1439       }
1440     }
1441     \new Lyrics {
1442       \lyricsto "melody" {
1443         \repeat volta 2 { Here's a __ }
1444         \alternative {
1445           { \skip 1 verse }
1446           { \skip 1 sec }
1447         }
1448         ond one.
1449       }
1450     }
1451   >>
1452 }
1453 @end lilypond
1454
1455 Note that if @code{\unfoldRepeats} is used around a section
1456 containing @code{\repeatTie}, the @code{\repeatTie} should be
1457 removed to avoid both types of tie being printed.
1458
1459 When the repeated section has different words a @code{\repeat}
1460 cannot be used around the lyrics and @code{\skip} commands need to
1461 be inserted manually, as before.
1462
1463 @lilypond[quote,verbatim]
1464 \score {
1465   <<
1466     \new Staff {
1467       \time 2/4
1468       \new Voice = "melody" {
1469         \relative c'' {
1470           \repeat volta 2 { b4 b ~}
1471           \alternative { { b b } { b \repeatTie c } }
1472           c4 c
1473         }
1474       }
1475     }
1476     \new Lyrics {
1477       \lyricsto "melody" {
1478         Here's a __ verse.
1479         \repeat unfold 2 { \skip 1 }
1480       }
1481     }
1482     \new Lyrics {
1483       \lyricsto "melody" {
1484         Here's one
1485         \repeat unfold 2 { \skip 1 }
1486         more to sing.
1487       }
1488     }
1489   >>
1490 }
1491 @end lilypond
1492
1493 If you wish to show extenders and hyphens into and out of
1494 alternative sections these must be inserted manually.
1495
1496 @lilypond[quote,verbatim]
1497 \score {
1498   <<
1499     \new Staff {
1500       \time 2/4
1501       \new Voice = "melody" {
1502         \relative c'' {
1503           \repeat volta 2 { b4 b ~}
1504           \alternative { { b b } { b \repeatTie c } }
1505           c4 c
1506         }
1507       }
1508     }
1509     \new Lyrics {
1510       \lyricsto "melody" {
1511         Here's a __ verse.
1512         \repeat unfold 2 { \skip 1 }
1513       }
1514     }
1515     \new Lyrics {
1516       \lyricsto "melody" {
1517         Here's "a_"
1518         \skip 1
1519         "_" sec -- ond one.
1520       }
1521     }
1522   >>
1523 }
1524 @end lilypond
1525
1526 @seealso
1527 Notation Reference:
1528 @ref{Keeping contexts alive},
1529 @ref{Repeats}.
1530
1531
1532 @node Divisi lyrics
1533 @unnumberedsubsubsec Divisi lyrics
1534
1535 @cindex divided lyrics
1536 @cindex lyrics, divided
1537
1538 When just the words and rhythms of the two parts differ with the
1539 pitches remaining the same, temporarily turning off the automatic
1540 detection of melismata and indicating the melisma in the lyrics
1541 may be the appropriate method to use:
1542
1543 @lilypond[quote,verbatim]
1544 \score {
1545   <<
1546     \new Voice = "melody" {
1547       \relative c' {
1548         \set melismaBusyProperties = #'()
1549         \slurDown
1550         \slurDashed
1551         e4 e8 ( e ) c4 c |
1552         \unset melismaBusyProperties
1553         c
1554       }
1555     }
1556     \new Lyrics \lyricsto "melody" {
1557       They shall not o -- ver -- come
1558     }
1559     \new Lyrics \lyricsto "melody" {
1560       We will _
1561     }
1562   >>
1563 }
1564 @end lilypond
1565
1566 When both music and words differ it may be better to display
1567 the differing music and lyrics by naming voice contexts and
1568 attaching lyrics to those specific contexts:
1569
1570 @lilypond[verbatim,ragged-right,quote]
1571 \score {
1572   <<
1573     \new Voice = "melody" {
1574       \relative c' {
1575         <<
1576           {
1577             \voiceOne
1578             e4 e8 e
1579           }
1580           \new Voice = "splitpart" {
1581             \voiceTwo
1582             c4 c
1583           }
1584         >>
1585         \oneVoice
1586         c4 c |
1587         c
1588       }
1589     }
1590     \new Lyrics \lyricsto "melody" {
1591       They shall not o -- ver -- come
1592     }
1593     \new Lyrics \lyricsto "splitpart" {
1594       We will
1595     }
1596   >>
1597 }
1598 @end lilypond
1599
1600
1601 @node Stanzas
1602 @subsection Stanzas
1603
1604 @menu
1605 * Adding stanza numbers::
1606 * Adding dynamics marks to stanzas::
1607 * Adding singers' names to stanzas::
1608 * Stanzas with different rhythms::
1609 * Printing stanzas at the end::
1610 * Printing stanzas at the end in multiple columns::
1611 @end menu
1612
1613
1614 @node Adding stanza numbers
1615 @unnumberedsubsubsec Adding stanza numbers
1616
1617 @cindex stanza number
1618
1619 Stanza numbers can be added by setting @code{stanza}, e.g.,
1620
1621 @lilypond[quote,ragged-right,verbatim,relative=2]
1622 \new Voice {
1623   \time 3/4 g2 e4 a2 f4 g2.
1624 } \addlyrics {
1625   \set stanza = #"1. "
1626   Hi, my name is Bert.
1627 } \addlyrics {
1628   \set stanza = #"2. "
1629   Oh, ché -- ri, je t'aime
1630 }
1631 @end lilypond
1632
1633
1634 @noindent
1635 These numbers are put just before the start of the first syllable.
1636
1637 @c TODO Create and add snippet to show how two lines of a
1638 @c stanza can be grouped together, along these lines:
1639 @c (might need improving a bit) -td
1640
1641 @ignore
1642 leftbrace = \markup { \override #'(font-encoding . fetaBraces) \lookup
1643 #"brace105" }
1644
1645 stanzaOneOne = {
1646   \set stanza = \markup { "1. " \leftbrace }
1647   \lyricmode { Child, you're mine and I love you.
1648     Lend thine ear to what I say.
1649
1650   }
1651 }
1652
1653 stanzaOneThree =  {
1654 %  \set stanza = \markup { "   "}
1655   \lyricmode { Child, I have no great -- er joy
1656     Than to have you walk in truth.
1657
1658   }
1659 }
1660
1661 \new Voice {
1662   \repeat volta 2 { c'8 c' c' c' c' c' c'4
1663                     c'8 c' c' c' c' c' c'4   }
1664 }  \addlyrics { \stanzaOneOne }
1665    \addlyrics { \stanzaOneThree }
1666
1667 @end ignore
1668
1669 @node Adding dynamics marks to stanzas
1670 @unnumberedsubsubsec Adding dynamics marks to stanzas
1671
1672 Stanzas differing in loudness may be indicated by putting a
1673 dynamics mark before each stanza.  In LilyPond, everything coming in
1674 front of a stanza goes into the @code{StanzaNumber} object; dynamics
1675 marks are no different.  For technical reasons, you have to set the
1676 stanza outside @code{\lyricmode}:
1677
1678 @lilypond[quote,ragged-right,verbatim]
1679 text = {
1680   \set stanza = \markup { \dynamic "ff" "1. " }
1681   \lyricmode {
1682     Big bang
1683   }
1684 }
1685
1686 <<
1687   \new Voice = "tune" {
1688     \time 3/4
1689     g'4 c'2
1690   }
1691 \new Lyrics \lyricsto "tune" \text
1692 >>
1693 @end lilypond
1694
1695 @node Adding singers' names to stanzas
1696 @unnumberedsubsubsec Adding singers' names to stanzas
1697
1698 @cindex singer name
1699 @cindex name of singer
1700
1701 Names of singers can also be added.  They are printed at the start of
1702 the line, just like instrument names.  They are created by setting
1703 @code{vocalName}.  A short version may be entered as
1704 @code{shortVocalName}.
1705
1706 @lilypond[ragged-right,quote,verbatim,relative=2]
1707 \new Voice {
1708   \time 3/4 g2 e4 a2 f4 g2.
1709 } \addlyrics {
1710   \set vocalName = #"Bert "
1711   Hi, my name is Bert.
1712 } \addlyrics {
1713   \set vocalName = #"Ernie "
1714   Oh, ché -- ri, je t'aime
1715 }
1716 @end lilypond
1717
1718 @node Stanzas with different rhythms
1719 @unnumberedsubsubsec Stanzas with different rhythms
1720
1721 Often, different stanzas of one song are put to one melody in slightly
1722 differing ways.  Such variations can still be captured with
1723 @code{\lyricsto}.
1724
1725 @subsubheading Ignoring melismata
1726
1727 One possibility is that the text has a melisma in one stanza, but
1728 multiple syllables in another.  One solution is to make the faster
1729 voice ignore the melisma.  This is done by setting
1730 @code{ignoreMelismata} in the Lyrics context.
1731
1732 @lilypond[verbatim,ragged-right,quote]
1733 <<
1734   \relative c' \new Voice = "lahlah" {
1735     \set Staff.autoBeaming = ##f
1736     c4
1737     \slurDotted
1738     f8.[( g16])
1739     a4
1740   }
1741   \new Lyrics \lyricsto "lahlah" {
1742     more slow -- ly
1743   }
1744   \new Lyrics \lyricsto "lahlah" {
1745     go
1746     \set ignoreMelismata = ##t
1747     fas -- ter
1748     \unset ignoreMelismata
1749     still
1750   }
1751 >>
1752 @end lilypond
1753
1754 @knownissues
1755 Unlike most @code{\set} commands, @code{\set ignoreMelismata} does
1756 not work if prefixed with @code{\once}.  It is necessary to use
1757 @code{\set} and @code{\unset} to bracket the lyrics where melismata
1758 are to be ignored.
1759
1760 @subsubheading Adding syllables to grace notes
1761
1762 @cindex grace notes and lyrics
1763 @cindex lyrics on grace notes
1764
1765 By default, grace notes (e.g. via @code{\grace}) do not get assigned
1766 syllables when using @code{\lyricsto}, but this behavior can be
1767 changed:
1768
1769 @lilypond[verbatim,ragged-right,quote]
1770 <<
1771   \new Voice = melody \relative c' {
1772     f4 \appoggiatura a32 b4
1773     \grace { f16[ a16] } b2
1774     \afterGrace b2 { f16[ a16] }
1775     \appoggiatura a32 b4
1776     \acciaccatura a8 b4
1777   }
1778   \new Lyrics
1779   \lyricsto melody {
1780     normal
1781     \set includeGraceNotes = ##t
1782     case,
1783     gra -- ce case,
1784     after -- grace case,
1785     \set ignoreMelismata = ##t
1786     app. case,
1787     acc. case.
1788   }
1789 >>
1790 @end lilypond
1791
1792 @knownissues
1793 Like @code{associatedVoice}, @code{includeGraceNotes} needs to be
1794 set at latest one syllable before the one which is to be put under a
1795 grace note.  For the case of a grace note at the very beginning of a
1796 piece of music, consider using a @code{\with} or @code{\context}
1797 block:
1798
1799 @lilypond[verbatim,ragged-right,quote]
1800 <<
1801   \new Voice = melody \relative c' {
1802     \grace { c16[( d e f] }
1803     g1) f
1804   }
1805   \new Lyrics \with { includeGraceNotes = ##t }
1806   \lyricsto melody {
1807     Ah __ fa
1808   }
1809 >>
1810 @end lilypond
1811
1812 @subsubheading Switching to an alternative melody
1813
1814 @cindex associatedVoice
1815 @cindex alternative melody, switching to
1816
1817 More complex variations in setting lyrics to music are possible.
1818 The melody to which the lyrics are being set can be changed from
1819 within the lyrics by setting the @code{associatedVoice} property:
1820
1821 @lilypond[verbatim,quote]
1822 <<
1823   \relative c' \new Voice = "lahlah" {
1824     \set Staff.autoBeaming = ##f
1825     c4
1826     <<
1827       \new Voice = "alternative" {
1828         \voiceOne
1829         \times 2/3 {
1830           % show associations clearly.
1831           \override NoteColumn #'force-hshift = #-3
1832           f8 f g
1833         }
1834       }
1835       {
1836         \voiceTwo
1837         f8.[ g16]
1838         \oneVoice
1839       } >>
1840     a8( b) c
1841   }
1842   \new Lyrics \lyricsto "lahlah" {
1843     Ju -- ras -- sic Park
1844   }
1845   \new Lyrics \lyricsto "lahlah" {
1846     % Tricky: need to set associatedVoice
1847     % one syllable too soon!
1848     \set associatedVoice = "alternative" % applies to "ran"
1849     Ty --
1850     ran --
1851     no --
1852     \set associatedVoice = "lahlah" % applies to "rus"
1853     sau -- rus Rex
1854   } >>
1855 @end lilypond
1856
1857 @noindent
1858 The text for the first stanza is set to the melody called
1859 @q{lahlah} in the usual way, but the second stanza is set initally
1860 to the @code{lahlah} context and is then switched to the
1861 @code{alternative} melody for the syllables @q{ran} to @q{sau} by
1862 the lines:
1863
1864 @example
1865 \set associatedVoice = "alternative" % applies to "ran"
1866 Ty --
1867 ran --
1868 no --
1869 \set associatedVoice = "lahlah" % applies to "rus"
1870 sau -- rus Rex
1871 @end example
1872
1873 @noindent
1874 Here, @code{alternative} is the name of the @code{Voice} context
1875 containing the triplet.
1876
1877 Note the placement of the @code{\set associatedVoice} command --
1878 it appears to be one syllable too early, but this is correct.
1879
1880 @warning{The @code{\set associatedVoice} command must be placed
1881 one syllable @emph{before} the one at which the switch to the new
1882 voice is to occur.  In other words, changing the associated Voice
1883 happens one syllable later than expected.  This is for technical
1884 reasons, and it is not a bug.}
1885
1886
1887 @node Printing stanzas at the end
1888 @unnumberedsubsubsec Printing stanzas at the end
1889
1890 Sometimes it is appropriate to have one stanza set
1891 to the music, and the rest added in verse form at
1892 the end of the piece.  This can be accomplished by adding
1893 the extra verses into a @code{\markup} section outside
1894 of the main score block.  Notice that there are two
1895 different ways to force linebreaks when using
1896 @code{\markup}.
1897
1898 @lilypond[ragged-right,verbatim,quote]
1899 melody = \relative c' {
1900 e d c d | e e e e |
1901 d d e d | c1 |
1902 }
1903
1904 text = \lyricmode {
1905 \set stanza = #"1." Ma- ry had a lit- tle lamb,
1906 its fleece was white as snow.
1907 }
1908
1909 \score{ <<
1910   \new Voice = "one" { \melody }
1911   \new Lyrics \lyricsto "one" \text
1912 >>
1913   \layout { }
1914 }
1915 \markup { \column{
1916   \line{ Verse 2. }
1917   \line{ All the children laughed and played }
1918   \line{ To see a lamb at school. }
1919   }
1920 }
1921 \markup{
1922   \wordwrap-string #"
1923   Verse 3.
1924
1925   Mary took it home again,
1926
1927   It was against the rule."
1928 }
1929 @end lilypond
1930
1931
1932 @node Printing stanzas at the end in multiple columns
1933 @unnumberedsubsubsec Printing stanzas at the end in multiple columns
1934
1935 When a piece of music has many verses, they are often printed in
1936 multiple columns across the page.  An outdented verse number often
1937 introduces each verse.  The following example shows how to produce such
1938 output in LilyPond.
1939
1940 @lilypond[ragged-right,quote,verbatim]
1941 melody = \relative c' {
1942   c4 c c c | d d d d
1943 }
1944
1945 text = \lyricmode {
1946   \set stanza = #"1." This is verse one.
1947   It has two lines.
1948 }
1949
1950 \score {
1951   <<
1952     \new Voice = "one" { \melody }
1953     \new Lyrics \lyricsto "one" \text
1954   >>
1955   \layout { }
1956 }
1957
1958 \markup {
1959   \fill-line {
1960     \hspace #0.1 % moves the column off the left margin;
1961      % can be removed if space on the page is tight
1962      \column {
1963       \line { \bold "2."
1964         \column {
1965           "This is verse two."
1966           "It has two lines."
1967         }
1968       }
1969       \vspace #0.1 % adds vertical spacing between verses
1970       \line { \bold "3."
1971         \column {
1972           "This is verse three."
1973           "It has two lines."
1974         }
1975       }
1976     }
1977     \hspace #0.1 % adds horizontal spacing between columns;
1978     \column {
1979       \line { \bold "4."
1980         \column {
1981           "This is verse four."
1982           "It has two lines."
1983         }
1984       }
1985       \vspace #0.1 % adds vertical spacing between verses
1986       \line { \bold "5."
1987         \column {
1988           "This is verse five."
1989           "It has two lines."
1990         }
1991       }
1992     }
1993   \hspace #0.1 % gives some extra space on the right margin;
1994   % can be removed if page space is tight
1995   }
1996 }
1997 @end lilypond
1998
1999
2000 @seealso
2001 Internals Reference:
2002 @rinternals{LyricText},
2003 @rinternals{StanzaNumber}.
2004
2005
2006 @node Songs
2007 @subsection Songs
2008
2009 @menu
2010 * References for songs::
2011 * Lead sheets::
2012 @end menu
2013
2014 @node References for songs
2015 @unnumberedsubsubsec References for songs
2016
2017 Songs are usually written on three staves with the melody for the
2018 singer on the top staff and two staves of piano accompaniment at
2019 the bottom.  The lyrics of the first stanza are printed immediately
2020 underneath the top staff.  If there are just a small number of
2021 further stanzas these can be printed immediately under the first
2022 one, but if there are more stanzas than can be easily accommodated
2023 there the second and subsequent stanzas are printed after the music
2024 as stand-alone text.
2025
2026 All the notational elements needed to write songs are fully described
2027 elsewhere:
2028
2029 @itemize
2030
2031 @item
2032 For constructing the staff layout, see @ref{Displaying staves}.
2033
2034 @item
2035 For writing piano music, see
2036 @ref{Keyboard and other multi-staff instruments}.
2037
2038 @item
2039 For writing the lyrics to a melody line, see
2040 @ref{Common notation for vocal music}.
2041
2042 @item
2043 For placing the lyrics, see @ref{Placing lyrics vertically}.
2044
2045 @item
2046 For entering stanzas, see @ref{Stanzas}.
2047
2048 @item
2049 Songs are frequently printed with the chording indicated by chord
2050 names above the staves.  This is described in @ref{Displaying chords}.
2051
2052 @item
2053 To print fret diagrams of the chords for guitar accompaniment or
2054 accompaniment by other fretted instruments, see @qq{Fret diagram
2055 markups} in @ref{Common notation for fretted strings}.
2056
2057 @end itemize
2058
2059 @seealso
2060 Learning Manual:
2061 @rlearning{Songs}.
2062
2063 Notation Reference:
2064 @ref{Common notation for vocal music},
2065 @ref{Displaying chords},
2066 @ref{Displaying staves},
2067 @ref{Keyboard and other multi-staff instruments},
2068 @ref{Placing lyrics vertically},
2069 @ref{Stanzas}.
2070
2071 Snippets:
2072 @rlsr{Vocal music}.
2073
2074
2075 @node Lead sheets
2076 @unnumberedsubsubsec Lead sheets
2077
2078 Lead sheets may be printed by combining vocal parts and
2079 @q{chord mode}; this syntax is explained in @ref{Chord notation}.
2080
2081 @snippets
2082 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
2083 {simple-lead-sheet.ly}
2084
2085 @seealso
2086 Notation Reference:
2087 @ref{Chord notation}.
2088
2089
2090 @node Choral
2091 @subsection Choral
2092
2093 @cindex anthems
2094 @cindex part songs
2095 @cindex oratorio
2096 @cindex SATB
2097
2098 This section discusses notation issues that relate most directly
2099 to choral music.  This includes anthems, part songs, oratorio,
2100 etc.
2101
2102 @menu
2103 * References for choral::
2104 * Score layouts for choral::
2105 * Divided voices::
2106 @end menu
2107
2108 @node References for choral
2109 @unnumberedsubsubsec References for choral
2110
2111 Choral music is usually notated on two, three or four staves within
2112 a @code{ChoirStaff} group.  Accompaniment, if required, is placed
2113 beneath in a @code{PianoStaff} group, which is usually reduced in
2114 size for @emph{a capella} choral works.  The notes for each vocal
2115 part are placed in a @code{Voice} context, with each staff
2116 being given either a single vocal part (i.e., one @code{Voice}) or
2117 a pair of vocal parts (i.e., two @code{Voice}s).
2118
2119 Words are placed in @code{Lyrics} contexts, either underneath each
2120 corresponding music staff, or one above and one below the music
2121 staff if this contains the music for two parts.
2122
2123 Several common topics in choral music are described fully elsewhere:
2124
2125 @itemize
2126
2127 @item
2128 An introduction to creating an SATB vocal score can be found in
2129 the Learning Manual, see @rlearning{Four-part SATB vocal score}.
2130
2131 @item
2132 Several templates suitable for various styles of choral music can
2133 also be found in the Learning Manual, see
2134 @rlearning{Vocal ensembles}.
2135
2136 @item
2137 For information about @code{ChoirStaff} and @code{PianoStaff} see
2138 @ref{Grouping staves}.
2139
2140 @item
2141 Shape note heads, as used in Sacred Harp and similar notation, are
2142 described in @ref{Shape note heads}.
2143
2144 @item
2145 When two vocal parts share a staff the stems, ties, slurs, etc., of
2146 the higher part will be directed up and those of the lower part
2147 down.  To do this, use @code{\voiceOne} and @code{\voiceTwo}.  See
2148 @ref{Single-staff polyphony}.
2149
2150 @end itemize
2151
2152 @predefined
2153 @code{\oneVoice},
2154 @code{\voiceOne},
2155 @code{\voiceTwo}.
2156
2157 @seealso
2158 Learning Manual:
2159 @rlearning{Four-part SATB vocal score},
2160 @rlearning{Vocal ensembles}.
2161
2162 Notation Reference:
2163 @ref{Context layout order},
2164 @ref{Grouping staves},
2165 @ref{Shape note heads},
2166 @ref{Single-staff polyphony}.
2167
2168 Snippets:
2169 @rlsr{Vocal music}.
2170
2171 Internals Reference:
2172 @rinternals{ChoirStaff},
2173 @rinternals{Lyrics},
2174 @rinternals{PianoStaff}.
2175
2176
2177 @node Score layouts for choral
2178 @unnumberedsubsubsec Score layouts for choral
2179
2180 Choral music containing four staves, with or without piano
2181 accompaniment, is usually laid out with two systems per page.
2182 Depending on the page size, achieving this may require changes
2183 to several default settings.  The following settings should be
2184 considered:
2185
2186 @itemize
2187
2188 @item
2189 The global staff size can be modified to change the overall size
2190 of the elements of the score.  See @ref{Setting the staff size}.
2191
2192 @item
2193 The distances between the systems, the staves and the lyrics can
2194 all be adjusted independently.  See @ref{Vertical spacing}.
2195
2196 @item
2197 The dimensions of the vertical layout variables can be displayed as
2198 an aid to adjusting the vertical spacing.  This and other
2199 possibilities for fitting the music onto fewer pages are described
2200 in @ref{Fitting music onto fewer pages}.
2201
2202 @item
2203 If the number of systems per page changes from one to two it is
2204 customary to indicate this with a system separator mark between
2205 the two systems.  See @ref{Separating systems}.
2206
2207 @item
2208 For details of other page formatting properties, see
2209 @ref{Page layout}.
2210
2211 @end itemize
2212
2213
2214 Dynamic markings by default are placed below the staff, but in
2215 choral music they are usually placed above the staff in order to
2216 avoid the lyrics.  The predefined command @code{\dynamicUp} does
2217 this for the dynamic markings in a single @code{Voice} context.
2218 If there are many @code{Voice} contexts this predefined command
2219 would have to be placed in every one.  Alternatively its expanded
2220 form can be used to place all dynamic markings in the entire score
2221 above their respective staves, as shown here:
2222
2223 @lilypond[verbatim,quote]
2224 \score {
2225   \new ChoirStaff <<
2226     \new Staff {
2227       \new Voice {
2228         \relative c'' { g4\f g g g }
2229       }
2230     }
2231     \new Staff {
2232       \new Voice {
2233         \relative c' { d4 d d\p d }
2234       }
2235     }
2236   >>
2237   \layout {
2238     \context {
2239       \Score
2240       \override DynamicText #'direction = #UP
2241       \override DynamicLineSpanner #'direction = #UP
2242     }
2243   }
2244 }
2245 @end lilypond
2246
2247 @predefined
2248 @code{\dynamicUp}, @code{\dynamicDown}, @code{\dynamicNeutral}.
2249
2250 @seealso
2251 Notation Reference:
2252 @ref{Changing spacing},
2253 @ref{Displaying spacing},
2254 @ref{Fitting music onto fewer pages},
2255 @ref{Page layout},
2256 @ref{Score layout},
2257 @ref{Separating systems},
2258 @ref{Setting the staff size},
2259 @ref{Using an extra voice for breaks},
2260 @ref{Vertical spacing}.
2261
2262 Internals Reference:
2263 @rinternals{VerticalAxisGroup},
2264 @rinternals{StaffGrouper}.
2265
2266
2267 @node Divided voices
2268 @unnumberedsubsubsec Divided voices
2269
2270 @cindex voices, divided
2271
2272 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
2273 {using-arpeggiobracket-to-make-divisi-more-visible.ly}
2274
2275 @seealso
2276 Notation Reference:
2277 @ref{Expressive marks as lines}.
2278
2279
2280 @node Opera and stage musicals
2281 @subsection Opera and stage musicals
2282
2283 The music, lyrics and dialogue to opera and stage musicals are
2284 usually set out in one or more of the following forms:
2285
2286 @itemize
2287
2288 @item
2289 A @emph{Conductors' Score} containing the full orchestral and vocal
2290 parts, together with libretto cues if there are spoken passages.
2291
2292 @item
2293 @emph{Orchestral Parts} containing the music for the individual
2294 instruments of the orchestra or band.
2295
2296 @item
2297 A @emph{Vocal Score} containing all vocal parts with piano
2298 accompaniment.  The accompaniment is usually an orchestral
2299 reduction, and if so the name of the original orchestral instrument
2300 is often indicated.  Vocal scores sometimes includes stage
2301 directions and libretto cues.
2302
2303 @item
2304 A @emph{Vocal Book} containing just the vocal parts
2305 (no accompaniment), sometimes combined with the libretto.
2306
2307 @item
2308 A @emph{Libretto} containing the extended passages of spoken
2309 dialogue usually found in musicals, together with the words to the
2310 sung parts.  Stage directions are usually included.  LilyPond can
2311 be used to typeset libretti but as they contain no music
2312 alternative methods may be preferable.
2313
2314 @end itemize
2315
2316 The sections in the LilyPond documentation which cover the topics
2317 needed to create scores in the styles commonly found in opera and
2318 musicals are indicated in the References below.  This is followed
2319 by sections covering those techniques which are peculiar to
2320 typesetting opera and musical scores.
2321
2322 @menu
2323 * References for opera and stage musicals::
2324 * Character names::
2325 * Musical cues::
2326 * Spoken music::
2327 * Dialogue over music::
2328 @end menu
2329
2330 @node References for opera and stage musicals
2331 @unnumberedsubsubsec References for opera and stage musicals
2332
2333 @itemize
2334
2335 @item
2336 A conductors' score contains many grouped staves and lyrics.  Ways
2337 of grouping staves is shown in @ref{Grouping staves}.  To nest
2338 groups of staves see @ref{Nested staff groups}.
2339
2340 @item
2341 The printing of empty staves in conductors' scores and vocal scores
2342 is often suppressed.  To create such a @qq{Frenched score} see
2343 @ref{Hiding staves}.
2344
2345 @item
2346 Writing orchestral parts is covered in @ref{Writing parts}.
2347 Other sections in the Specialist notation chapter may be relevant,
2348 depending on the orchestration used.  Many instruments are
2349 transposing instruments, see @ref{Instrument transpositions}.
2350
2351 @item
2352 If the number of systems per page changes from page to page it is
2353 customary to separate the systems with a system separator mark.
2354 See @ref{Separating systems}.
2355
2356 @item
2357 For details of other page formatting properties, see
2358 @ref{Page layout}.
2359
2360 @item
2361 Dialogue cues, stage directions and footnotes can be inserted, see
2362 @ref{Creating footnotes} and @ref{Text}.  Extensive stage directions
2363 can also be added with a section of stand-alone markups between two
2364 @code{\score} blocks, see @ref{Separate text}.
2365
2366 @end itemize
2367
2368 @seealso
2369 Musical Glossary:
2370 @rglos{Frenched score},
2371 @rglos{Frenched staves},
2372 @rglos{transposing instrument}.
2373
2374 Notation Reference:
2375 @ref{Creating footnotes},
2376 @ref{Grouping staves},
2377 @ref{Hiding staves},
2378 @ref{Instrument transpositions},
2379 @ref{Nested staff groups},
2380 @ref{Page layout},
2381 @ref{Separating systems},
2382 @ref{Transpose},
2383 @ref{Writing parts},
2384 @ref{Writing text}.
2385
2386 Snippets:
2387 @rlsr{Vocal music}.
2388
2389
2390 @node Character names
2391 @unnumberedsubsubsec Character names
2392
2393 @cindex character names
2394 @cindex names, character
2395
2396 Character names are usually shown to the left of the staff when the
2397 staff is dedicated to that character alone:
2398
2399 @lilypond[quote,verbatim,ragged-right]
2400 \score {
2401   <<
2402     \new Staff {
2403       \set Staff.vocalName = \markup \smallCaps Kaspar
2404       \set Staff.shortVocalName = \markup \smallCaps Kas.
2405       \relative c' {
2406         \clef "G_8"
2407         c4 c c c
2408         \break
2409         c4 c c c
2410       }
2411     }
2412     \new Staff {
2413       \set Staff.vocalName = \markup \smallCaps Melchior
2414       \set Staff.shortVocalName = \markup \smallCaps Mel
2415       \clef "bass"
2416       \relative c' {
2417         a4 a a a
2418         a4 a a a
2419       }
2420     }
2421   >>
2422 }
2423 @end lilypond
2424
2425 When two or more characters share a staff the character's name is
2426 usually printed above the staff at the start of every section
2427 applying to that character.  This can be done with markup.  Often a
2428 specific font is used for this purpose.
2429
2430 @lilypond[quote,verbatim,relative=1]
2431 \clef "G_8"
2432 c4^\markup \fontsize #1 \smallCaps Kaspar
2433 c c c
2434 \clef "bass"
2435 a4^\markup \fontsize #1 \smallCaps Melchior
2436 a a a
2437 \clef "G_8"
2438 c4^\markup \fontsize #1 \smallCaps Kaspar
2439 c c c
2440 @end lilypond
2441
2442 Alternatively, if there are many character changes, it may be
2443 easier to set up @qq{instrument} definitions for each character at
2444 the top level so that @code{\instrumentSwitch} can be used to
2445 indicate each change.
2446
2447 @lilypond[quote,verbatim]
2448 \addInstrumentDefinition #"kaspar"
2449   #`((instrumentTransposition . ,(ly:make-pitch -1 0 0))
2450      (shortInstrumentName . "Kas.")
2451      (clefGlyph . "clefs.G")
2452      (clefOctavation . -7)
2453      (middleCPosition . 1)
2454      (clefPosition . -2)
2455      (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Kaspar"))
2456      (midiInstrument . "voice oohs"))
2457
2458 \addInstrumentDefinition #"melchior"
2459   #`((instrumentTransposition . ,(ly:make-pitch 0 0 0))
2460      (shortInstrumentName . "Mel.")
2461      (clefGlyph . "clefs.F")
2462      (clefOctavation . 0)
2463      (middleCPosition . 6)
2464      (clefPosition . 2)
2465      (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Melchior"))
2466      (midiInstrument . "voice aahs"))
2467
2468 \relative c' {
2469   \instrumentSwitch "kaspar"
2470   c4 c c c
2471   \instrumentSwitch "melchior"
2472   a4 a a a
2473   \instrumentSwitch "kaspar"
2474   c4 c c c
2475 }
2476 @end lilypond
2477
2478 @seealso
2479 Notation Reference:
2480 @ref{Instrument names},
2481 @ref{Scheme functions},
2482 @ref{Text},
2483 @ref{Text markup commands}.
2484
2485 Extending LilyPond:
2486 @rextend{Markup construction in Scheme}.
2487
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,quote,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,quote,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,quote,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,quote,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