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