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