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