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