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