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