]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/notation/vocal.itely
Doc-es: update Unfretted.
[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 * Entering lyrics::
23 * Aligning lyrics to a melody::
24 * Specific uses of lyrics::
25 * Stanzas::
26 @end menu
27
28
29 @node Common notation for vocal music
30 @subsection Common notation for vocal music
31
32 This section discusses issues related to vocal music in general, and
33 to some particular styles of vocal music.
34
35 @menu
36 * References for vocal music and lyrics::
37 * Opera::
38 * Song books::
39 * Spoken music::
40 * Chants::
41 * Ancient vocal music::
42 @end menu
43
44
45 @node References for vocal music and lyrics
46 @unnumberedsubsubsec References for vocal music and lyrics
47
48 @c TODO: split this section in two parts? -vv
49
50 Various issues may arise when engraving vocal music.  Some of these
51 are discussed in this section, while others are explained elsewhere:
52
53 @itemize
54 @item
55 Most styles of vocal music use written text as lyrics.  An introduction
56 to this notation is to be found in @rlearning{Setting simple songs}.
57
58 @item
59 Vocal music is likely to require the use of @code{markup} mode, either
60 for lyrics of for other text elements (character's names, etc.).
61 This syntax is described in @ref{Text markup introduction}.
62
63 @item
64 Lead sheets may be printed by combining vocal parts and @q{chord mode};
65 this syntax is explained in @ref{Chord notation}.
66
67 @item
68 @q{Ambitus} may be added at the beginning of vocal staves, as explained
69 in @ref{Ambitus}.
70
71 @item
72 Vocal parts may be printed using traditional clefs, as shown in @ref{Clef}.
73
74 @item
75 Ancient vocal music is supported, as explained in @ref{Ancient notation}.
76 @end itemize
77
78
79 @node Opera
80 @unnumberedsubsubsec Opera
81
82 @c TODO
83 TBC
84
85 @c add characters names snippet -vv
86
87 @node Song books
88 @unnumberedsubsubsec Song books
89
90 @c TODO
91 TBC
92
93 @snippets
94 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
95 {simple-lead-sheet.ly}
96
97
98 @seealso
99 Notation Reference:
100 @ref{Chord notation}.
101
102
103 @node Spoken music
104 @unnumberedsubsubsec Spoken music
105 @cindex parlato
106 @cindex Sprechgesang
107 Such effects as @q{parlato} or @q{Sprechgesang} require perfomers to speak
108 without pitch but still with rhythm; these are notated by cross
109 note heads, as demonstrated in @ref{Special note heads}.
110
111 @c TODO add "marking-notes-on-spoken-parts" snippet -vv
112 @c add "showing the rhythm of a melody" snip
113 @c add "one staff-line notation"
114 @c add "improvisation" ref
115 @c add "lyrics independents of notes" ref
116
117 @node Chants
118 @unnumberedsubsubsec Chants
119
120 @c TODO Add text from lsr and -user
121 TBC
122
123 @node Ancient vocal music
124 @unnumberedsubsubsec Ancient vocal music
125
126 @c TODO
127 TBC
128
129 @c Add "Printing both the ancient and the modern clef in vocal music" snippet,
130 @c and "Transcription of Ancient music with incipit" snippet. -vv
131
132
133 @seealso
134 Notation Reference:
135 @ref{Ancient notation}.
136
137
138 @node Entering lyrics
139 @subsection Entering lyrics
140
141 @c TODO add one sentence here. -vv
142
143 @menu
144 * Lyrics explained::
145 * Setting simple songs::
146 * Working with lyrics and variables::
147 @end menu
148
149
150 @node Lyrics explained
151 @unnumberedsubsubsec Lyrics explained
152
153 @cindex lyrics
154 @funindex \lyricmode
155 @cindex punctuation
156 @cindex spaces, in lyrics
157 @cindex quotes, in lyrics
158
159 @c FIXME: this section is to be rewritten.
160 Since LilyPond input files are text, there is at least one
161 issue to consider when working with vocal music:
162 song texts must be interpreted as text, not notes.  For example, the
163 input@tie{}@code{d} should be interpreted as a one letter syllable,
164 not the note@tie{}D.
165 Therefore, a special lyric mode has to be used, either explicitly
166 or using some abbreviated methods.
167
168 Lyrics are entered in a special input mode, which can be introduced
169 by the keyword @code{\lyricmode}, or by using @code{\addlyrics} or
170 @code{\lyricsto}.  In this mode you can enter lyrics,
171 with punctuation and accents, and the input @code{d} is not parsed as
172 a pitch, but rather as a one letter syllable.  Syllables are entered
173 like notes, but with pitches replaced by text.  For example,
174
175 @example
176 \lyricmode @{ Twin-4 kle4 twin- kle litt- le star2 @}
177 @end example
178
179 There are two main methods to specify the horizontal placement
180 of the syllables, either by specifying the duration of each syllable
181 explicitly, like in the example above, or by automatically aligning
182 the lyrics to a melody or other voice of music, using @code{\addlyrics}
183 or @code{\lyricsto}.
184 @c  TODO: broken
185 @c For more details see @ref{The Lyrics context}.
186
187 A word or syllable of lyrics begins with an alphabetic character, and ends
188 with
189 any space or digit.  The following characters can be any character
190 that is not a digit or white space.
191
192 Any character that is not a digit or white space will be regarded as
193 part of the syllable; one important consequence of this is that a word
194 can end with @code{@}}, which often leads to the following mistake:
195
196 @example
197 \lyricmode @{ lah- lah@}
198 @end example
199
200 In this example, the @code{@}} is included in the final syllable, so the
201 opening brace is not balanced and the input file will probably not
202 compile.
203
204
205 @funindex \property in \lyricmode
206
207 @noindent
208 Similarly, a period which follows an alphabetic sequence is included in
209 the resulting string.  As a consequence, spaces must be inserted around
210 property commands: do @emph{not} write
211
212 @example
213 \override Score.LyricText #'font-shape = #'italic
214 @end example
215
216 @noindent
217 but instead use
218
219 @example
220 \override Score . LyricText #'font-shape = #'italic
221 @end example
222
223 @funindex _
224 @cindex spaces, in lyrics
225 @cindex quotes, in lyrics
226 @cindex ties, in lyrics
227
228 In order to assign more than one syllable to a single note, you can
229 surround them with quotes or use a @code{_} character, to get spaces
230 between syllables, or use tilde  symbol (@code{~}) to get a lyric tie.
231
232 @lilypond[quote,ragged-right,fragment,verbatim]
233 \time 3/4
234 \relative c' { c2 e4 g2 e4 }
235 \addlyrics { gran- de_a- mi- go }
236 \addlyrics { pu- "ro y ho-" nes- to }
237 \addlyrics { pu- ro~y~ho- nes- to }
238 @end lilypond
239
240 @noindent
241 The lyric tie is implemented with the Unicode character
242 @code{U+203F}; therefore a font that includes this glyph
243 (such as DejaVuLGC) has to be used.  More explanations about
244 text and non-text fonts can be found in @ref{Fonts}.
245
246
247 To enter lyrics with characters from non-English languages, or with
248 accented and special characters (such as the heart symbol or slanted quotes),
249 simply insert the characters directly into the input file and save
250 it with UTF-8 encoding.  See @ref{Text encoding}, for more info.
251
252 @lilypond[quote,ragged-right,fragment,verbatim]
253 \relative c' { e4 f e d e f e2 }
254 \addlyrics { He said: “Let my peo ple go”. }
255 @end lilypond
256
257 To use normal quotes in lyrics, add a backslash before the
258 quotes.  For example,
259
260 @lilypond[quote,ragged-right,fragment,verbatim]
261 \relative c' { \time 3/4 e4 e4. e8 d4 e d c2. }
262 \addlyrics { "\"I" am so lone- "ly\"" said she }
263 @end lilypond
264
265 The full definition of a word start in Lyrics mode is somewhat more
266 complex.
267
268 A word in Lyrics mode begins with: an alphabetic character, @code{_},
269 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
270 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
271 any 8-bit character with ASCII code over 127, or a two-character
272 combination of a backslash followed by one of @code{`}, @code{'},
273 @code{"}, or @code{^}.
274
275 @c " to balance double quotes for not-so-bright context-sensitive editors
276
277 To define variables containing lyrics, the function @code{lyricmode}
278 must be used.
279
280 @example
281 verseOne = \lyricmode @{ Joy to the world the Lord is come @}
282 \score @{
283   <<
284     \new Voice = "one" \relative c'' @{
285       \autoBeamOff
286       \time 2/4
287       c4 b8. a16 g4. f8 e4 d c2
288     @}
289     \addlyrics @{ \verseOne @}
290   >>
291 @}
292 @end example
293
294
295 @seealso
296 Notation Reference:
297 @ref{Fonts}.
298
299 Internals Reference:
300 @rinternals{LyricText},
301 @rinternals{LyricSpace}.
302
303
304 @c FIXME: this title has to be changed (possible confusion with LM) -vv
305 @node Setting simple songs
306 @unnumberedsubsubsec Setting simple songs
307
308 @cindex \addlyrics
309
310 The easiest way to add lyrics to a melody is to append
311
312 @example
313 \addlyrics @{ @var{the lyrics} @}
314 @end example
315
316 @noindent
317 to a melody.  Here is an example,
318
319 @lilypond[ragged-right,verbatim,fragment,quote]
320 \time 3/4
321 \relative c' { c2 e4 g2. }
322 \addlyrics { play the game }
323 @end lilypond
324
325 More stanzas can be added by adding more
326 @code{\addlyrics} sections
327
328 @lilypond[ragged-right,verbatim,fragment,quote]
329 \time 3/4
330 \relative c' { c2 e4 g2. }
331 \addlyrics { play the game }
332 \addlyrics { speel het spel }
333 \addlyrics { joue le jeu }
334 @end lilypond
335
336 The command @code{\addlyrics} cannot handle polyphony settings.  For these
337 cases you should use @code{\lyricsto} and @code{\lyricmode}, as will be
338 introduced in @ref{Lyrics explained}.
339
340 @c TODO: one additional section may be needed here,
341 @c such as "advanced lyric syntax" or whatever -vv
342
343 @node Working with lyrics and variables
344 @unnumberedsubsubsec Working with lyrics and variables
345
346 @cindex lyrics, variables
347
348 To define variables containing lyrics, the function @code{\lyricmode}
349 must be used.  You do not have to enter durations though, if you add
350 @code{\addlyrics} or @code{\lyricsto}
351 when invoking your variable.
352
353 @example
354 verseOne = \lyricmode @{ Joy to the world the Lord is come @}
355 \score @{
356  <<
357    \new Voice = "one" \relative c'' @{
358      \autoBeamOff
359      \time 2/4
360      c4 b8. a16 g4. f8 e4 d c2
361    @}
362    \addlyrics @{ \verseOne @}
363  >>
364 @}
365 @end example
366
367 For different or more complex orderings, the best way is to set up the
368 hierarchy of staves and lyrics first, e.g.,
369 @example
370 \new ChoirStaff <<
371   \new Voice = "soprano" @{ @emph{music} @}
372   \new Lyrics = "sopranoLyrics" @{ s1 @}
373   \new Lyrics = "tenorLyrics" @{ s1 @}
374   \new Voice = "tenor" @{ @emph{music} @}
375 >>
376 @end example
377
378 @noindent
379 and then combine the appropriate melodies and lyric lines
380
381 @example
382 \context Lyrics = sopranoLyrics \lyricsto "soprano"
383 @emph{the lyrics}
384 @end example
385
386 @noindent
387 The final input would resemble
388
389 @example
390 <<\new ChoirStaff << @emph{setup the music} >>
391  \lyricsto "soprano" @emph{etc}
392  \lyricsto "alto" @emph{etc}
393 @emph{etc}
394 >>
395 @end example
396
397 @ignore
398 @c FIXME
399 http://code.google.com/p/lilypond/issues/detail?id=329
400 The problem cannot be reproduced.
401 The following has no sense, because the issue seems to be fixed.
402 A comment is in tracker waiting for response ---FV
403
404
405 Be careful when defining a variable with lyrics that creates a new
406 context, for example, using the deprecated @code{\lyrics} command. See
407 the next erroneous example:
408
409 @example
410 words = \lyrics{ %warning: this creates a new context
411  one two
412 }
413 <<
414   \new Voice = "sop" { c1 }
415   \new Lyrics \lyricsto "sop" { \words }
416   \new Voice = "alt" { c2 c }
417   \new Lyrics \lyricsto "alt" { \words }
418 >>
419 @end example
420
421 the problem is that \lyricsto will try to connect the "sop" melody with the context
422 created by "\new Lyrics".
423
424 Then \lyrics in \words creates another context, and the original "\new Lyrics" one
425 remains empty.
426
427 @end ignore
428
429
430 @seealso
431 @c TODO: document \new Staff << Voice \lyricsto >> bug
432 Internals Reference:
433 @rinternals{LyricCombineMusic},
434 @rinternals{Lyrics}.
435
436
437 @node Aligning lyrics to a melody
438 @subsection Aligning lyrics to a melody
439
440 @funindex \lyricmode
441 @funindex \addlyrics
442 @funindex \lyricsto
443
444 @c FIXME: this stuff is to be rewritten. -vv
445
446 Aligning of text with melodies can be made automatically, but if you
447 specify the durations of the syllables it can also be made manually.
448 Lyrics aligning and typesetting are prepared with the help of skips,
449 hyphens and extender lines.
450
451 Lyrics are printed by interpreting them in the context called
452 @code{Lyrics}; see @rinternals{Lyrics}, for more.
453
454 @example
455 \new Lyrics \lyricmode @dots{}
456 @end example
457
458 There are two main methods to specify the horizontal placement
459 of the syllables:
460
461 @itemize
462 @item
463 by automatically aligning
464 the lyrics to a melody or other voice of music, using @code{\addlyrics}
465 or @code{\lyricsto}
466
467 @item
468 or by specifying the duration of each syllable
469 explicitly, using @code{\lyricmode}
470 @end itemize
471
472 The @code{Voice} context containing the melody to which the lyrics
473 are being aligned must not have @qq{died}, or the lyrics after that
474 point will be lost.  This can happen if there are periods when that
475 voice has nothing to do.  For methods of keeping contexts alive, see
476 @ref{Keeping contexts alive}.
477
478
479 @menu
480 * Automatic syllable durations::
481 * Manual syllable durations::
482 * Multiple syllables to one note::
483 * Multiple notes to one syllable::
484 * Skipping notes::
485 * Extenders and hyphens::
486 * Lyrics and repeats::
487 @end menu
488
489 @node Automatic syllable durations
490 @unnumberedsubsubsec Automatic syllable durations
491
492 @cindex automatic syllable durations
493 @cindex lyrics and melodies
494
495 The lyrics can be aligned under a given melody
496 automatically.  This is achieved by combining the
497 melody and the lyrics with the @code{\lyricsto} expression
498
499 @example
500 \new Lyrics \lyricsto @var{name} @dots{}
501 @end example
502
503 @noindent
504 This aligns the lyrics to the
505 notes of the @code{Voice} context called @var{name}, which must
506 already exist.  Therefore normally the @code{Voice} is specified first, and
507 then the lyrics are specified with @code{\lyricsto}.  The command
508 @code{\lyricsto} switches to @code{\lyricmode} mode automatically, so the
509 @code{\lyricmode} keyword may be omitted.
510
511 The following example uses different commands for entering lyrics.
512
513 @lilypond[quote,fragment,ragged-right,verbatim]
514 <<
515   \new Voice = "one" \relative c'' {
516     \autoBeamOff
517     \time 2/4
518     c4 b8. a16 g4. f8 e4 d c2
519   }
520
521 % not recommended: left-aligned syllables
522   \new Lyrics \lyricmode { Joy4 to8. the16 world!4. the8 Lord4 is come.2 }
523
524 % wrong: durations needed
525   \new Lyrics \lyricmode { Joy to the earth! the Sa -- viour reigns. }
526
527 %correct
528   \new Lyrics \lyricsto "one" { No more let sins and sor -- rows grow. }
529 >>
530 @end lilypond
531
532 The second stanza is not properly aligned because the durations
533 were not specified.  A solution for that would be to use @code{\lyricsto}.
534
535 The @code{\addlyrics} command is actually just a convenient way
536 to write a more complicated LilyPond structure that sets up the
537 lyrics.
538
539 @example
540 @{ MUSIC @}
541 \addlyrics @{ LYRICS @}
542 @end example
543
544 @noindent
545 is the same as
546
547 @example
548 \new Voice = "blah" @{ music @}
549 \new Lyrics \lyricsto "blah" @{ LYRICS @}
550 @end example
551
552 @node Manual syllable durations
553 @unnumberedsubsubsec Manual syllable durations
554
555 Lyrics can also be entered without @code{\addlyrics} or
556 @code{\lyricsto}.  In this case,
557 syllables are entered like notes -- but with pitches replaced by text -- and the
558 duration of each syllable must be entered explicitly.  For example:
559
560 @example
561 play2 the4 game2.
562 sink2 or4 swim2.
563 @end example
564
565 The alignment to a melody can be specified with the
566 @code{associatedVoice} property,
567
568 @example
569 \set associatedVoice = #"lala"
570 @end example
571
572 @noindent
573 The value of the property (here: @code{"lala"}) should be the name of
574 a @code{Voice} context.  Without this setting, extender lines
575 will not be formatted properly.
576
577 Here is an example demonstrating manual lyric durations,
578
579 @lilypond[relative=1,ragged-right,verbatim,fragment,quote]
580 << \new Voice = "melody" {
581     \time 3/4
582     c2 e4 g2.
583  }
584  \new Lyrics \lyricmode {
585    \set associatedVoice = #"melody"
586    play2 the4 game2.
587  } >>
588 @end lilypond
589
590
591 @seealso
592 Notation Reference:
593 @ref{Keeping contexts alive}.
594
595 Internals Reference:
596 @rinternals{Lyrics},
597 @rinternals{Voice}.
598
599
600 @node Multiple syllables to one note
601 @unnumberedsubsubsec Multiple syllables to one note
602
603
604 @funindex _
605 @cindex ties, in lyrics
606
607 In order to assign more than one syllable to a single note, you can
608 surround them with quotes or use a @code{_} character, to get spaces
609 between syllables, or use tilde  symbol (@code{~}) to get a lyric
610 tie.@footnote{The lyric ties is implemented with the Unicode character
611 U+203F, so be
612 sure to have a font (like DejaVuLGC) installed that includes this
613 glyph.}
614
615 @lilypond[quote,ragged-right,fragment,verbatim]
616 \time 3/4
617 \relative c' { c2 e4 g2 e4 }
618 \addlyrics { gran- de_a- mi- go }
619 \addlyrics { pu- "ro y ho-" nes- to }
620 \addlyrics { pu- ro~y~ho- nes- to }
621 @end lilypond
622
623
624 @seealso
625 Internals Reference:
626 @rinternals{LyricCombineMusic}.
627
628
629 @c Here come the section which used to be "Melismata"
630 @c the new title might be more self-explanatory
631
632
633 @node Multiple notes to one syllable
634 @unnumberedsubsubsec Multiple notes to one syllable
635
636 @cindex melisma
637 @cindex melismata
638 @cindex phrasing, in lyrics
639
640 Sometimes, particularly in Medieval music, several notes are to be sung on one
641 single syllable; such vocalises are called melismas, or melismata.
642
643 @c this method seems to be the simplest; therefore
644 @c it might be better to present it first - vv
645
646 You can define melismata entirely in the lyrics, by entering @code{_}
647 for every extra note that has to be added to the melisma.
648
649 @c FIXME: clarify: __ is used to crate a lyric extender,
650 @c _ is used to add a note to a melisma, so both __ and _ are needed.
651
652 @c verbose! --FV
653 @c duplicated: TODO fix
654 Additionaly, you can make an extender line to be typeset to indicate
655 the melisma in the score, writing a double underscore next to the
656 first syllable of the melisma. This example shows the three elements
657 that are used for this purpose (all of them surrounded by spaces):
658 double hyphens to separate syllables in a word, underscores to add
659 notes to a melisma, and a double underscore to put an extender line.
660
661 @c wrong: extender line only on last syllable of a word. Change example
662 @lilypond[relative=1,verbatim,fragment,quote]
663 { \set melismaBusyProperties = #'()
664  c d( e) f f( e) e e  }
665 \addlyrics
666  { Ky -- _ _ ri __ _ _ _  e }
667 @end lilypond
668
669 In this case, you can also have ties and slurs in the melody if you
670 set @code{melismaBusyProperties}, as is done in the example above.
671
672 However, the @code{\lyricsto} command can also
673 detect melismata automatically: it only puts one
674 syllable under a tied or slurred group of notes.  If you want to force
675 an unslurred group of notes to be a melisma, insert @code{\melisma}
676 after the first note of the group, and @code{\melismaEnd} after the
677 last one, e.g.,
678
679 @lilypond[quote,relative=2,ragged-right,fragment,verbatim]
680 <<
681   \new Voice = "lala" {
682     \time 3/4
683     f4 g8
684     \melisma
685     f e f
686     \melismaEnd
687     e2
688   }
689   \new Lyrics \lyricsto "lala" {
690     la di __ daah
691   }
692 >>
693 @end lilypond
694
695 In addition, notes are considered a melisma if they are manually
696 beamed, and automatic beaming (see @ref{Setting automatic beam
697 behavior}) is switched off.
698
699 @lilypond[quote,relative=2,ragged-right,fragment,verbatim]
700 <<
701   \new Voice = "lala" {
702     \time 3/4
703     \autoBeamOff
704     f4 g8[ f e f]
705     e2
706   }
707   \new Lyrics \lyricsto "lala" {
708     la di __ daah
709   }
710 >>
711 @end lilypond
712
713 @c FIXME: this now links to LM -vv
714
715 @cindex SATB
716 @cindex choral score
717
718 A complete example of a SATB score setup is in
719 @rlearning{Vocal ensembles}.
720
721
722 @predefined
723 @funindex \melisma
724 @code{\melisma},
725 @funindex \melismaEnd
726 @code{\melismaEnd}.
727 @endpredefined
728
729
730 @c @seealso
731 @c @lsr{vocal,lyric@/-combine.ly}.
732
733
734 @knownissues
735
736 Melismata are not detected automatically, and extender lines must be
737 inserted by hand.
738
739 @node Skipping notes
740 @unnumberedsubsubsec Skipping notes
741
742 Making a lyric line run slower than the melody can be achieved by
743 inserting @code{\skip}s into the lyrics.  For every @code{\skip},
744 the text will be delayed another note.  The @code{\skip} command
745 must be followed by a valid duration, but this is ignored when
746 @code{\skip} is used in lyrics.
747
748 @lilypond[verbatim,ragged-right,quote]
749 \relative c' { c c g' }
750 \addlyrics {
751   twin -- \skip 4
752   kle
753 }
754 @end lilypond
755
756
757 @node Extenders and hyphens
758 @unnumberedsubsubsec Extenders and hyphens
759
760 @cindex melisma
761 @cindex extender
762
763 @c leave this as samp. -gp
764 In the last syllable of a word, melismata are sometimes indicated with
765 a long horizontal line starting in the melisma syllable, and ending in
766 the next one.  Such a line is called an extender line, and it is
767 entered as @samp{ __ } (note the spaces before and after the two
768 underscore characters).
769
770 @warning{Melismata are indicated in the score with extender lines,
771 which are entered as one double underscore; but short melismata can
772 also be entered by skipping individual notes, which are entered as
773 single underscore characters; these do not make an extender line to be
774 typeset by default.}
775
776 @cindex hyphens
777
778 @c leave this as samp. -gp
779 Centered hyphens are entered as @samp{ -- } between syllables of a same word
780 (note the spaces before and after the two hyphen characters).  The hyphen
781 will be centered between the syllables, and its length will be adjusted
782 depending on the space between the syllables.
783
784 In tightly engraved music, hyphens can be removed.  Whether this
785 happens can be controlled with the @code{minimum-distance} (minimum
786 distance between two syllables) and the @code{minimum-length}
787 (threshold below which hyphens are removed).
788
789
790 @seealso
791 Internals Reference:
792 @rinternals{LyricExtender},
793 @rinternals{LyricHyphen}.
794
795
796 @node Lyrics and repeats
797 @unnumberedsubsubsec Lyrics and repeats
798
799 @c TODO New section.  Add text
800 TBC
801
802
803 @node Specific uses of lyrics
804 @subsection Specific uses of lyrics
805
806 @c FIXME This whole section is to be reorganized. -vv
807
808 Often, different stanzas of one song are put to one melody in slightly
809 differing ways.  Such variations can still be captured with
810 @code{\lyricsto}.
811
812 @menu
813 * Divisi lyrics::
814 * Lyrics independent of notes::
815 * Spacing out syllables::
816 * Centering lyrics between staves::
817 @end menu
818
819
820
821 @node Divisi lyrics
822 @unnumberedsubsubsec Divisi lyrics
823
824 You can display alternate (or divisi) lyrics by naming voice
825 contexts and attaching lyrics to those specific contexts.
826
827 @lilypond[verbatim,ragged-right,quote]
828 \score{ <<
829   \new Voice = "melody" {
830     \relative c' {
831       c4
832       <<
833         { \voiceOne c8 e }
834         \new Voice = "splitpart" { \voiceTwo c4 }
835       >>
836       \oneVoice c4 c | c
837     }
838   }
839   \new Lyrics \lyricsto "melody" { we shall not o- ver- come }
840   \new Lyrics \lyricsto "splitpart" { will }
841 >> }
842 @end lilypond
843
844
845 You can use this trick to display different lyrics for a repeated
846 section.
847
848 @lilypond[verbatim,ragged-right,quote]
849 \score{ <<
850   \new Voice = "melody" \relative c' {
851     c2 e | g e | c1 |
852     \new Voice = "verse" \repeat volta 2 {c4 d e f | g1 | }
853     a2 b | c1}
854   \new Lyrics = "mainlyrics" \lyricsto melody \lyricmode {
855     do mi sol mi do
856     la si do }
857   \context Lyrics = "mainlyrics" \lyricsto verse \lyricmode {
858    do re mi fa sol }
859   \new Lyrics = "repeatlyrics" \lyricsto verse \lyricmode {
860    dodo rere mimi fafa solsol }
861 >>
862 }
863 @end lilypond
864
865
866
867 @node Lyrics independent of notes
868 @unnumberedsubsubsec Lyrics independent of notes
869
870 @cindex Devnull context
871
872 In some complex vocal music, it may be desirable to place
873 lyrics completely independently of notes.  Music defined
874 inside @code{lyricrhythm} disappears into the
875 @code{Devnull} context, but the rhythms can still be used
876 to place the lyrics.
877
878 @lilypond[quote,verbatim,ragged-right]
879 voice = {
880   c''2
881   \tag #'music { c''2 }
882   \tag #'lyricrhythm { c''4. c''8 }
883   d''1
884 }
885
886 lyr = \lyricmode { I like my cat! }
887
888 <<
889   \new Staff \keepWithTag #'music \voice
890   \new Devnull="nowhere" \keepWithTag #'lyricrhythm \voice
891   \new Lyrics \lyricsto "nowhere" \lyr
892   \new Staff { c'8 c' c' c' c' c' c' c'
893   c' c' c' c' c' c' c' c' }
894 >>
895 @end lilypond
896
897 This method is recommended only if the music in the @code{Devnull}
898 context does not contain melismata.  Melismata are defined by the
899 @code{Voice} context. Connecting lyrics to a @code{Devnull} context
900 makes the voice/lyrics links to get lost, and so does the info on
901 melismata.  Therefore, if you link lyrics to a @code{Devnull} context,
902 the implicit melismata get ignored.
903
904 @c Conclusion: do not use devnull for lyrics -FV
905
906 @c this clarifies http://code.google.com/p/lilypond/issues/detail?id=248
907
908 @node Spacing out syllables
909 @unnumberedsubsubsec Spacing out syllables
910
911 @cindex Spacing lyrics
912 @cindex Lyrics, increasing space between
913
914 To increase the spacing between lyrics, set the @code{minimum-distance}
915 property of @code{LyricSpace}.
916
917 @lilypond[relative,verbatim,fragment,quote,ragged-right]
918 {
919   c c c c
920   \override Lyrics.LyricSpace #'minimum-distance = #1.0
921   c c c c
922 }
923 \addlyrics {
924   longtext longtext longtext longtext
925   longtext longtext longtext longtext
926 }
927 @end lilypond
928
929 @noindent
930 To make this change for all lyrics in the score, set the property in the
931 layout.
932
933 @lilypond[verbatim,quote,ragged-right]
934 \score {
935   \relative c' {
936   c c c c
937   c c c c
938   }
939   \addlyrics {
940   longtext longtext longtext longtext
941   longtext longtext longtext longtext
942   }
943   \layout {
944     \context {
945       \Lyrics
946       \override LyricSpace #'minimum-distance = #1.0
947     }
948   }
949 }
950 @end lilypond
951
952 @c @snippets
953 @c This snippet has been renamed to "lyrics-alignment.ly"
954 @c update as soon as lsr/is updated -vv
955 @c @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
956 @c {lyrics-alignment.ly}
957
958 @c TODO: move to LSR -vv
959 @snippets
960
961 Checking to make sure that text scripts and lyrics are within the margins is
962 a relatively large computational task.  To speed up processing, LilyPond does
963 not perform such calculations by default; to enable it, use
964
965 @example
966 \override Score.PaperColumn #'keep-inside-line = ##t
967 @end example
968
969 To make lyrics avoid bar lines as well, use
970
971 @example
972 \layout @{
973   \context @{
974     \Lyrics
975       \consists "Bar_engraver"
976       \consists "Separating_line_group_engraver"
977       \override BarLine #'transparent = ##t
978   @}
979 @}
980 @end example
981
982 @c TODO Create and add lsr example of lyricMelismaAlignment
983 @c It's used like this to center-align all lyric syllables,
984 @c even when notes are tied. -td
985
986 @ignore
987 \layout
988 {
989      \context { \Score lyricMelismaAlignment = #0 }
990 }
991 @end ignore
992
993
994 @node Centering lyrics between staves
995 @unnumberedsubsubsec Centering lyrics between staves
996
997 @c TODO Add text from -user
998 TBC
999
1000 @node Stanzas
1001 @subsection Stanzas
1002
1003 @menu
1004 * Adding stanza numbers::
1005 * Adding dynamics marks to stanzas::
1006 * Adding singers' names to stanzas::
1007 * Stanzas with different rhythms::
1008 * Printing stanzas at the end::
1009 * Printing stanzas at the end in multiple columns::
1010 @end menu
1011
1012
1013 @node Adding stanza numbers
1014 @unnumberedsubsubsec Adding stanza numbers
1015
1016 @cindex stanza number
1017
1018 Stanza numbers can be added by setting @code{stanza}, e.g.,
1019
1020 @lilypond[quote,ragged-right,verbatim,relative=2,fragment]
1021 \new Voice {
1022   \time 3/4 g2 e4 a2 f4 g2.
1023 } \addlyrics {
1024   \set stanza = #"1. "
1025   Hi, my name is Bert.
1026 } \addlyrics {
1027   \set stanza = #"2. "
1028   Oh, ché -- ri, je t'aime
1029 }
1030 @end lilypond
1031
1032
1033 @noindent
1034 These numbers are put just before the start of the first syllable.
1035
1036 @c TODO Create and add snippet to show how two lines of a
1037 @c stanza can be grouped together, along these lines:
1038 @c (might need improving a bit) -td
1039
1040 @ignore
1041 leftbrace = \markup { \override #'(font-encoding . fetaBraces) \lookup
1042 #"brace105" }
1043
1044 stanzaOneOne = {
1045   \set stanza = \markup { "1. " \leftbrace }
1046   \lyricmode { Child, you're mine and I love you.
1047     Lend thine ear to what I say.
1048
1049   }
1050 }
1051
1052 stanzaOneThree =  {
1053 %  \set stanza = \markup { "   "}
1054   \lyricmode { Child, I have no great -- er joy
1055     Than to have you walk in truth.
1056
1057   }
1058 }
1059
1060 \new Voice {
1061   \repeat volta 2 { c'8 c' c' c' c' c' c'4
1062                     c'8 c' c' c' c' c' c'4   }
1063 }  \addlyrics { \stanzaOneOne }
1064    \addlyrics { \stanzaOneThree }
1065
1066 @end ignore
1067
1068 @node Adding dynamics marks to stanzas
1069 @unnumberedsubsubsec Adding dynamics marks to stanzas
1070
1071 Stanzas differing in loudness may be indicated by putting a
1072 dynamics mark before each stanza.  In LilyPond, everything coming in
1073 front of a stanza goes into the @code{StanzaNumber} object; dynamics marks
1074 are no different.  For technical reasons, you have to set the stanza
1075 outside @code{\lyricmode}:
1076
1077 @lilypond[quote,ragged-right,verbatim]
1078 text = {
1079   \set stanza = \markup { \dynamic "ff" "1. " }
1080   \lyricmode {
1081     Big bang
1082   }
1083 }
1084
1085 <<
1086   \new Voice = "tune" {
1087     \time 3/4
1088     g'4 c'2
1089   }
1090 \new Lyrics \lyricsto "tune" \text
1091 >>
1092 @end lilypond
1093
1094 @node Adding singers' names to stanzas
1095 @unnumberedsubsubsec Adding singers' names to stanzas
1096
1097 @cindex singer name
1098 @cindex name of singer
1099
1100 Names of singers can also be added.  They are printed at the start of
1101 the line, just like instrument names.  They are created by setting
1102 @code{vocalName}.  A short version may be entered as @code{shortVocalName}.
1103
1104 @lilypond[fragment,ragged-right,quote,verbatim,relative=2]
1105 \new Voice {
1106   \time 3/4 g2 e4 a2 f4 g2.
1107 } \addlyrics {
1108   \set vocalName = #"Bert "
1109   Hi, my name is Bert.
1110 } \addlyrics {
1111   \set vocalName = #"Ernie "
1112   Oh, ché -- ri, je t'aime
1113 }
1114 @end lilypond
1115
1116 @node Stanzas with different rhythms
1117 @unnumberedsubsubsec Stanzas with different rhythms
1118
1119 @subsubheading Ignoring melismata
1120
1121 One possibility is that the text has a melisma in one stanza, but
1122 multiple syllables in another one.  One solution is to make the faster
1123 voice ignore the melisma.  This is done by setting
1124 @code{ignoreMelismata} in the Lyrics context.
1125
1126 @lilypond[verbatim,ragged-right,quote]
1127 <<
1128   \relative c' \new Voice = "lahlah" {
1129     \set Staff.autoBeaming = ##f
1130     c4
1131     \slurDotted
1132     f8.[( g16])
1133     a4
1134   }
1135   \new Lyrics \lyricsto "lahlah" {
1136     more slow -- ly
1137   }
1138   \new Lyrics \lyricsto "lahlah" {
1139     go
1140     \set ignoreMelismata = ##t
1141     fas -- ter
1142     \unset ignoreMelismata
1143     still
1144   }
1145 >>
1146 @end lilypond
1147
1148 @knownissues
1149 Unlike most @code{\set} commands, @code{\set ignoreMelismata} does
1150 not work if prefixed with @code{\once}.  It is necessary to use
1151 @code{\set} and @code{\unset} to bracket the lyrics where melismata
1152 are to be ignored.
1153
1154 @subsubheading Switching to an alternative melody
1155
1156 More complex variations in text underlay are possible.  It is possible
1157 to switch the melody for a line of lyrics during the text.  This is
1158 done by setting the @code{associatedVoice} property.  In the example
1159
1160 @lilypond[ragged-right,quote]
1161 <<
1162   \relative c' \new Voice = "lahlah" {
1163     \set Staff.autoBeaming = ##f
1164     c4
1165     <<
1166       \new Voice = "alternative" {
1167         \voiceOne
1168         \times 2/3 {
1169           % show associations clearly.
1170           \override NoteColumn #'force-hshift = #-3
1171           f8 f g
1172         }
1173       }
1174       {
1175         \voiceTwo
1176         f8.[ g16]
1177         \oneVoice
1178       } >>
1179     a8( b) c
1180   }
1181   \new Lyrics \lyricsto "lahlah" {
1182     Ju -- ras -- sic Park
1183   }
1184   \new Lyrics \lyricsto "lahlah" {
1185     % Tricky: need to set associatedVoice
1186     % one syllable too soon!
1187     \set associatedVoice = alternative % applies to "ran"
1188     Ty --
1189     ran --
1190     no --
1191     \set associatedVoice = lahlah % applies to "rus"
1192     sau -- rus Rex
1193   } >>
1194 @end lilypond
1195
1196 @noindent
1197 the text for the first stanza is set to a melody called @q{lahlah},
1198
1199 @example
1200 \new Lyrics \lyricsto "lahlah" @{
1201   Ju -- ras -- sic Park
1202 @}
1203 @end example
1204
1205
1206 The second stanza initially is set to the @code{lahlah} context, but
1207 for the syllable @q{ran}, it switches to a different melody.
1208 This is achieved with
1209 @example
1210 \set associatedVoice = alternative
1211 @end example
1212
1213 @noindent
1214 Here, @code{alternative} is the name of the @code{Voice} context
1215 containing the triplet.
1216
1217 @c FIXME: make this easier to understand -vv
1218 This command must be one syllable too early, before @q{Ty} in this
1219 case.  In other words, changing the associatedVoice happens one step
1220 later than expected.  This is for technical reasons, and it is not a
1221 bug.
1222
1223 @example
1224 \new Lyrics \lyricsto "lahlah" @{
1225   \set associatedVoice = alternative % applies to "ran"
1226   Ty --
1227   ran --
1228   no --
1229   \set associatedVoice = lahlah % applies to "rus"
1230   sau -- rus Rex
1231 @}
1232 @end example
1233
1234 @noindent
1235 The underlay is switched back to the starting situation by assigning
1236 @code{lahlah} to @code{associatedVoice}.
1237
1238
1239 @node Printing stanzas at the end
1240 @unnumberedsubsubsec Printing stanzas at the end
1241
1242 Sometimes it is appropriate to have one stanza set
1243 to the music, and the rest added in verse form at
1244 the end of the piece.  This can be accomplished by adding
1245 the extra verses into a @code{\markup} section outside
1246 of the main score block.  Notice that there are two
1247 different ways to force linebreaks when using
1248 @code{\markup}.
1249
1250 @lilypond[ragged-right,verbatim,quote]
1251 melody = \relative c' {
1252 e d c d | e e e e |
1253 d d e d | c1 |
1254 }
1255
1256 text = \lyricmode {
1257 \set stanza = #"1." Ma- ry had a lit- tle lamb,
1258 its fleece was white as snow.
1259 }
1260
1261 \score{ <<
1262   \new Voice = "one" { \melody }
1263   \new Lyrics \lyricsto "one" \text
1264 >>
1265   \layout { }
1266 }
1267 \markup { \column{
1268   \line{ Verse 2. }
1269   \line{ All the children laughed and played }
1270   \line{ To see a lamb at school. }
1271   }
1272 }
1273 \markup{
1274   \wordwrap-string #"
1275   Verse 3.
1276
1277   Mary took it home again,
1278
1279   It was against the rule."
1280 }
1281 @end lilypond
1282
1283
1284 @node Printing stanzas at the end in multiple columns
1285 @unnumberedsubsubsec Printing stanzas at the end in multiple columns
1286
1287 When a piece of music has many verses, they are often printed in
1288 multiple columns across the page.  An outdented verse number often
1289 introduces each verse.  The following example shows how to produce such
1290 output in LilyPond.
1291
1292 @lilypond[ragged-right,quote,verbatim]
1293 melody = \relative c' {
1294   c c c c | d d d d
1295 }
1296
1297 text = \lyricmode {
1298   \set stanza = #"1." This is verse one.
1299   It has two lines.
1300 }
1301
1302 \score{ <<
1303     \new Voice = "one" { \melody }
1304     \new Lyrics \lyricsto "one" \text
1305    >>
1306   \layout { }
1307 }
1308
1309 \markup {
1310   \fill-line {
1311     \hspace #0.1 % moves the column off the left margin;
1312         % can be removed if space on the page is tight
1313      \column {
1314       \line { \bold "2."
1315         \column {
1316           "This is verse two."
1317           "It has two lines."
1318         }
1319       }
1320       \hspace #0.1 % adds vertical spacing between verses
1321       \line { \bold "3."
1322         \column {
1323           "This is verse three."
1324           "It has two lines."
1325         }
1326       }
1327     }
1328     \hspace #0.1  % adds horizontal spacing between columns;
1329         % if they are still too close, add more " " pairs
1330         % until the result looks good
1331      \column {
1332       \line { \bold "4."
1333         \column {
1334           "This is verse four."
1335           "It has two lines."
1336         }
1337       }
1338       \hspace #0.1 % adds vertical spacing between verses
1339       \line { \bold "5."
1340         \column {
1341           "This is verse five."
1342           "It has two lines."
1343         }
1344       }
1345     }
1346   \hspace #0.1 % gives some extra space on the right margin;
1347       % can be removed if page space is tight
1348   }
1349 }
1350 @end lilypond
1351
1352
1353 @seealso
1354 Internals Reference:
1355 @rinternals{LyricText},
1356 @rinternals{StanzaNumber}.
1357
1358
1359
1360