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