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