]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/notation/vocal.itely
Doc: fixes for previous patch.
[lilypond.git] / Documentation / notation / vocal.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @ignore
3     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
4
5     When revising a translation, copy the HEAD committish of the
6     version that you are working on.  For details, see the Contributors'
7     Guide, node Updating translation committishes..
8 @end ignore
9
10 @c \version "2.13.36"
11
12 @node Vocal music
13 @section Vocal music
14
15 @c TODO: inspirational headword
16
17 This section explains how to typeset vocal music, and make sure
18 that the lyrics will be aligned with the notes of their melody.
19
20 @menu
21 * Common notation for vocal music::
22 * Techniques specific to lyrics::
23 * Stanzas::
24 * Songs::
25 * Choral::
26 * Opera and stage musicals::
27 * Chants psalms and hymns::
28 * Ancient vocal music::
29
30 @end menu
31
32
33 @node Common notation for vocal music
34 @subsection Common notation for vocal music
35
36 This section discusses issues common to most types of vocal music.
37
38 @menu
39 * References for vocal music::
40 * Entering lyrics::
41 * Aligning lyrics to a melody::
42 * Automatic syllable durations::
43 * Manual syllable durations::
44 * Multiple syllables to one note::
45 * Multiple notes to one syllable::
46 * Skipping notes::
47 * Extenders and hyphens::
48 @end menu
49
50
51 @node References for vocal music
52 @unnumberedsubsubsec References for vocal music
53
54 This section indicates where to find details of notation issues
55 that may arise in any type of vocal music.
56
57 @itemize
58
59 @item
60 Most styles of vocal music use written text as lyrics.  An introduction
61 to this notation is to be found in @rlearning{Setting simple songs}.
62
63 @item
64 Vocal music is likely to require the use of @code{markup} mode, either
65 for lyrics of for other text elements (character's names, etc.).
66 This syntax is described in @ref{Text markup introduction}.
67
68 @item
69 @notation{Ambitus} may be added at the beginning of vocal staves, as explained
70 in @ref{Ambitus}.
71
72 @end itemize
73
74 @seealso
75 Music Glossary:
76 @rglos{ambitus}.
77
78 Snippets:
79 @rlsr{Vocal music}.
80
81 @node Entering lyrics
82 @unnumberedsubsubsec Entering lyrics
83
84 @cindex lyrics, entering
85 @cindex entering lyrics
86 @cindex punctuation in lyrics
87 @cindex lyrics punctuation
88 @cindex spaces in lyrics
89 @cindex quotes in lyrics
90 @funindex \lyricmode
91
92 @c TODO should we explain hyphens here
93
94 Lyrics are entered in a special input mode, which can be introduced
95 by the keyword @code{\lyricmode}, or by using @code{\addlyrics} or
96 @code{\lyricsto}.  In this special input mode, the input @code{d}
97 is not parsed as the pitch @notation{D}, but rather as a one-letter
98 syllable of text.  In other words, syllables are entered like notes
99 but with pitches replaced by text.
100
101 For example:
102
103 @example
104 \lyricmode @{ Three4 blind mice,2 three4 blind mice2 @}
105 @end example
106
107 There are two main methods for specifying the horizontal placement
108 of the syllables, either by specifying the duration of each syllable
109 explicitly, as in the example above, or by leaving the lyrics to be
110 aligned automatically to a melody or other voice of music, using
111 @code{\addlyrics} or @code{\lyricsto}.  The former method is
112 described below in @ref{Manual syllable durations}.  The latter
113 method is described in @ref{Automatic syllable durations}.
114
115 A word or syllable of lyrics begins with an alphabetic character
116 (plus some other characters, see below) and is terminated by any
117 white space or a digit.  Later characters in the syllable can be any
118 character that is not a digit or white space.
119
120 Because any character that is not a digit or white space is regarded
121 as part of the syllable, a word is valid even if it ends with
122 @code{@}}, which often leads to the following mistake:
123
124 @example
125 \lyricmode @{ lah lah lah@}
126 @end example
127
128 In this example, the @code{@}} is included in the final syllable, so the
129 opening brace is not balanced and the input file will probably not
130 compile.  Instead, braces should always be surrounded with white space:
131
132 @example
133 \lyricmode @{ lah lah lah @}
134 @end example
135
136 @cindex overrides in lyric mode
137 @funindex \override in \lyricmode
138
139 Similarly, in lyric mode, a period will be included in the
140 alphabetic sequence that it follows.  As a consequence, spaces
141 must be inserted around the period in @code{\override} commands.
142 Do @emph{not} write
143
144 @example
145 \override Score.LyricText #'font-shape = #'italic
146 @end example
147
148 @noindent
149 but instead use
150
151 @example
152 \override Score . LyricText #'font-shape = #'italic
153 @end example
154
155 Punctuation, lyrics with accented characters, characters from
156 non-English languages, or special characters (such as the heart
157 symbol or slanted quotes), may simply be inserted directly
158 into the input file, providing it is saved with UTF-8 encoding.
159 For more information, see @ref{Text encoding}.
160
161 @lilypond[quote,verbatim]
162 \relative c'' { d8 c16 a bes8 f e' d c4 }
163 \addlyrics { „Schad’ um das schö -- ne grü -- ne Band, }
164 @end lilypond
165
166 Normal quotes may be used in lyrics, but they have to be preceded
167 with a backslash character and the whole syllable has to be
168 enclosed between additional quotes.  For example,
169
170 @lilypond[quote,verbatim]
171 \relative c' { \time 3/4 e4 e4. e8 d4 e d c2. }
172 \addlyrics { "\"I" am so lone -- "ly,\"" said she }
173 @end lilypond
174
175 The full definition of a word start in lyrics mode is somewhat more
176 complex.  A word in lyrics mode is one that begins with an
177 alphabetic character, @code{_}, @code{?}, @code{!}, @code{:},
178 @code{'}, the control characters @code{^A} through @code{^F},
179 @code{^Q} through @code{^W}, @code{^Y}, @code{^^}, any 8-bit
180 character with an ASCII code over 127, or a two-character
181 combination of a backslash followed by one of @code{`}, @code{'},
182 @code{"}, or @code{^}.
183
184 @c " to balance double quotes for not-so-bright context-sensitive editors
185
186 @seealso
187 Learning Manual:
188 @rlearning{Songs}.
189
190 Notation Reference:
191 @ref{Automatic syllable durations},
192 @ref{Fonts},
193 @ref{Input modes},
194 @ref{Manual syllable durations}.
195
196 Internals Reference:
197 @rinternals{LyricText}.
198
199
200 @node Aligning lyrics to a melody
201 @unnumberedsubsubsec Aligning lyrics to a melody
202
203 @cindex lyrics, aligning to a melody
204 @cindex @code{associatedVoice}
205 @funindex \lyricmode
206 @funindex \addlyrics
207 @funindex \lyricsto
208
209 Lyrics are printed by interpreting them in the context called
210 @code{Lyrics}, see @ref{Contexts explained}.
211
212 @example
213 \new Lyrics \lyricmode @{ @dots{} @}
214 @end example
215
216 Lyrics can be aligned with melodies in two main ways:
217
218 @itemize
219
220 @item
221 Lyrics can be aligned automatically, with the durations of the
222 syllables being taken from another voice of music or (in special
223 circumstances) an associated melody, using @code{\addlyrics},
224 @code{\lyricsto}, or by setting the @code{associatedVoice} property.
225 For more details, see @ref{Automatic syllable durations}.
226
227 @lilypond[quote,ragged-right,verbatim]
228 <<
229   \new Staff <<
230     \time 2/4
231     \new Voice = "one" \relative c'' {
232       \voiceOne
233       c4 b8. a16 g4. r8 a4 ( b ) c2
234     }
235     \new Voice = "two" \relative c' {
236       \voiceTwo
237        s2 s4. f8 e4 d c2
238     }
239   >>
240
241 % takes durations and alignment from notes in "one"
242   \new Lyrics \lyricsto "one" {
243     Life is __ _ love, live __ life.
244   }
245
246 % takes durations and alignment from notes in "one" initially
247 % then switches to "two"
248   \new Lyrics \lyricsto "one" {
249     No more let
250     \set associatedVoice = "two"  % must be set one syllable early
251     sins and sor -- rows grow.
252   }
253 >>
254 @end lilypond
255
256 The first stanza shows the normal way of entering lyrics.
257
258 The second stanza shows how the voice from which the lyric
259 durations are taken can be changed.  This is useful if the words to
260 different stanzas fit the notes in different ways and all the
261 durations are available in Voice contexts.  For more details, see
262 @ref{Stanzas}.
263
264 @item
265 Lyrics can be aligned independently of the duration of any notes
266 if the durations of the syllables are specified explicitly,
267 and entered with @code{\lyricmode}.
268
269 @lilypond[quote,ragged-right,verbatim]
270 <<
271   \new Voice = "one" \relative c'' {
272     \time 2/4
273     c4 b8. a16 g4. f8 e4 d c2
274   }
275
276 % uses previous explicit duration of 2;
277   \new Lyrics \lyricmode {
278     Joy to the earth!
279   }
280
281 % explicit durations, set to a different rhythm
282   \new Lyrics \lyricmode {
283     Life4 is love,2. live4 life.2
284   }
285 >>
286 @end lilypond
287
288 The first stanza is not aligned with the notes because the durations
289 were not specified, and the previous value of 2 is used for each
290 word.
291
292 The second stanza shows how the words can be aligned quite
293 independently from the notes.  This is useful if the words to
294 different stanzas fit the notes in different ways and the required
295 durations are not available in a music context.  For more details
296 see @ref{Manual syllable durations}.  This technique is also useful
297 when setting dialogue over music; for examples showing this, see
298 @ref{Dialogue over music}.
299
300 When entered in this way the words are left-aligned to the notes
301 by default, but may be center-aligned to the notes of a melody by
302 specifying an associated voice, if one exists.  For details, see
303 @ref{Manual syllable durations}.
304
305 @end itemize
306
307 @seealso
308 Learning Manual:
309 @rlearning{Aligning lyrics to a melody}.
310
311 Internals Reference:
312 @rinternals{Lyrics}.
313
314 @node Automatic syllable durations
315 @unnumberedsubsubsec Automatic syllable durations
316
317 @cindex syllable durations, automatic
318 @cindex lyrics and melodies
319 @cindex associatedVoice
320 @funindex \addlyrics
321 @funindex \lyricsto
322
323 Lyrics can be automatically aligned to the notes of a melody in
324 three ways:
325
326 @itemize
327
328 @item
329 by specifying the named Voice context containing the melody with
330 @code{\lyricsto},
331
332 @item
333 by introducing the lyrics with @code{\addlyrics} and placing them
334 immediately after the Voice context containing the melody,
335
336 @item
337 by setting the @code{associatedVoice} property, the alignment of
338 the lyrics may be switched to a different named Voice context at
339 any musical moment.
340
341 @end itemize
342
343 In all three methods hyphens can be drawn between the syllables of
344 a word and extender lines can be drawn beyond the end of a word.  For
345 details, see @ref{Extenders and hyphens}.
346
347 The @code{Voice} context containing the melody to which the lyrics
348 are being aligned must not have @qq{died}, or the lyrics after that
349 point will be lost.  This can happen if there are periods when that
350 voice has nothing to do.  For methods of keeping contexts alive, see
351 @ref{Keeping contexts alive}.
352
353 @subheading Using @code{\lyricsto}
354
355 @cindex \lyricsto
356 @funindex \lyricsto
357
358 Lyrics can be aligned under a melody automatically by specifying
359 the named Voice context containing the melody with
360 @code{\lyricsto}:
361
362 @lilypond[quote,verbatim,relative=2]
363 <<
364   \new Voice = "melody" {
365     a4 a a a
366   }
367   \new Lyrics \lyricsto "melody" {
368     These are the words
369   }
370 >>
371 @end lilypond
372
373 @noindent
374 This aligns the lyrics to the notes of the named @code{Voice}
375 context, which must already exist.  Therefore normally the
376 @code{Voice} context is specified first, followed by the
377 @code{Lyrics} context.  The lyrics themselves follow the
378 @code{\lyricsto} command.  The @code{\lyricsto} command
379 invokes lyric mode automatically, so the @code{\lyricmode} keyword
380 may be omitted.  By default, the lyrics are placed underneath the
381 notes.  For other placements, see @ref{Placing lyrics vertically}.
382
383 @subheading Using @code{\addlyrics}
384
385 @cindex \addlyrics
386 @funindex \addlyrics
387
388 The @code{\addlyrics} command is just a convenient shortcut that
389 can sometimes be used instead of having to set up the lyrics
390 through a more complicated LilyPond structure.
391
392 @example
393 @{ MUSIC @}
394 \addlyrics @{ LYRICS @}
395 @end example
396
397 @noindent
398 is the same as
399
400 @example
401 \new Voice = "blah" @{ MUSIC @}
402 \new Lyrics \lyricsto "blah" @{ LYRICS @}
403 @end example
404
405 Here is an example,
406
407 @lilypond[verbatim,quote]
408 {
409   \time 3/4
410   \relative c' { c2 e4 g2. }
411   \addlyrics { play the game }
412 }
413 @end lilypond
414
415 More stanzas can be added by adding more
416 @code{\addlyrics} sections:
417
418
419 @lilypond[ragged-right,verbatim,quote]
420 {
421   \time 3/4
422   \relative c' { c2 e4 g2. }
423   \addlyrics { play the game }
424   \addlyrics { speel het spel }
425   \addlyrics { joue le jeu }
426 }
427 @end lilypond
428
429 The command @code{\addlyrics} cannot handle polyphonic settings.
430 For these cases one should use @code{\lyricsto}.
431
432 @subheading Using associatedVoice
433
434 The melody to which the lyrics are being aligned can be changed by
435 setting the @code{associatedVoice} property,
436
437 @example
438 \set associatedVoice = #"lala"
439 @end example
440
441 @noindent
442
443 The value of the property (here: @code{"lala"}) should be the name
444 of a @code{Voice} context.  For technical reasons, the @code{\set}
445 command must be placed one syllable before the one to which the
446 change in voice is to apply.
447
448 Here is an example demonstrating its use:
449
450 @lilypond[quote,ragged-right,verbatim]
451 <<
452   \new Staff <<
453     \time 2/4
454     \new Voice = "one" \relative c'' {
455       \voiceOne
456       c4 b8. a16 g4. r8 a4 ( b ) c2
457     }
458     \new Voice = "two" \relative c' {
459       \voiceTwo
460        s2 s4. f8 e8 d4. c2
461     }
462   >>
463 % takes durations and alignment from notes in "one" initially
464 % then switches to "two"
465   \new Lyrics \lyricsto "one" {
466     No more let
467     \set associatedVoice = "two"  % must be set one syllable early
468     sins and sor -- rows grow.
469   }
470 >>
471 @end lilypond
472
473 @seealso
474 Notation Reference:
475 @ref{Extenders and hyphens},
476 @ref{Keeping contexts alive}.
477
478 @node Manual syllable durations
479 @unnumberedsubsubsec Manual syllable durations
480
481 In some complex vocal music, it may be desirable to place lyrics
482 completely independently of notes.  In this case do not use
483 @code{\lyricsto} or @code{\addlyrics} and do not set
484 @code{associatedVoice}.  Syllables are entered like notes --
485 but with pitches replaced by text -- and the duration of each
486 syllable is entered explicitly after the syllable.
487
488 By default, syllables will be left-aligned to the corresponding
489 musical moment.  Hyphenated lines may be drawn between syllables
490 as usual, but extender lines cannot be drawn when there is no
491 associated voice.
492
493 Here are two examples:
494
495 @lilypond[relative=1,verbatim,quote]
496 <<
497   \new Voice = "melody" {
498     \time 3/4
499     c2 e4 g2 f
500   }
501   \new Lyrics \lyricmode {
502     play1 the4 game4
503   }
504 >>
505 @end lilypond
506
507
508 @lilypond[quote,verbatim,ragged-right]
509 <<
510   \new Staff {
511     \relative c'' {
512       c2 c2
513       d1
514     }
515   }
516   \new Lyrics {
517     \lyricmode {
518       I2 like4. my8 cat!1
519     }
520   }
521   \new Staff {
522     \relative c' {
523       c8 c c c c c c c
524       c8 c c c c c c c
525     }
526   }
527 >>
528 @end lilypond
529
530 This technique is useful when writing dialogue over music, see
531 @ref{Dialogue over music}.
532
533 To center-align syllables on the notes at the corresponding musical
534 moments, set @code{associatedVoice} to the name of the Voice context
535 containing those notes.  When @code{associatedVoice} is set, both
536 double hyphens and double underscores can be used to draw
537 hyphenated lines and extenders under melismata correctly.
538
539 @lilypond[relative=1,verbatim,quote]
540 <<
541   \new Voice = "melody" {
542     \time 3/4
543     c2 e4 g f g
544   }
545   \new Lyrics \lyricmode {
546     \set associatedVoice = #"melody"
547     play2 the4 game2. __
548   }
549 >>
550 @end lilypond
551
552 @c TODO see also feature request 707 - show how to do this with manual durations
553
554 @seealso
555 Notation Reference:
556 @ref{Dialogue over music}.
557
558 Internals Reference:
559 @rinternals{Lyrics},
560 @rinternals{Voice}.
561
562
563 @node Multiple syllables to one note
564 @unnumberedsubsubsec Multiple syllables to one note
565
566 @funindex _
567 @cindex spaces, in lyrics
568 @cindex quotes, in lyrics
569 @cindex ties, in lyrics
570
571 In order to assign more than one syllable to a single note with
572 spaces between the syllables, you can surround the phrase with
573 quotes or use a @code{_} character.  Alternatively, you can use
574 code the tilde symbol (@code{~}) to get a lyric tie.  The lyric
575 tie is implemented with the Unicode character U+203F, so be
576 sure to have a font (like DejaVuLGC) installed that includes this
577 glyph.
578
579 @lilypond[quote,ragged-right,verbatim]
580 {
581   \time 3/4
582   \relative c' { c2 e4 g2 e4 }
583   \addlyrics { gran- de_a- mi- go }
584   \addlyrics { pu- "ro y ho-" nes- to }
585   \addlyrics { pu- ro~y~ho- nes- to }
586 }
587 @end lilypond
588
589
590 @seealso
591 Internals Reference:
592 @rinternals{LyricCombineMusic}.
593
594
595 @node Multiple notes to one syllable
596 @unnumberedsubsubsec Multiple notes to one syllable
597
598 @cindex melisma
599 @cindex melismata
600 @cindex phrasing, in lyrics
601 @funindex \melisma
602 @funindex \melismaEnd
603
604 Sometimes, particularly in Medieval music, several notes are to be
605 sung on one syllable; such vocalises are called melismata, or
606 @rglos{melisma}s.  The syllable to a melisma is usually
607 left-aligned with the first note of the melisma.
608
609 When a melisma occurs on a syllable other that the last one in a
610 word, that syllable is usually joined to the following one with a
611 hyphenated line.  This is indicated by placing a double hyphen,
612 @code{--}, immediately after the syllable.
613
614 Alternatively, when a melisma occurs on the last or only syllable in
615 a word an extender line is usually drawn from the end of the syllable
616 to the last note of the melisma.  This is indicated by placing a
617 double underscore, @code{__}, immediately after the word.
618
619 There are five ways in which melismata can be indicated:
620
621 @itemize
622
623 @item
624 Melismata are created automatically over notes which are tied
625 together:
626
627 @lilypond[quote,relative=2,verbatim]
628 <<
629   \new Voice = "melody" {
630     \time 3/4
631     f4 g2 ~ |
632     g4 e2 ~ |
633     e8
634   }
635   \new Lyrics \lyricsto "melody" {
636     Ky -- ri -- e __
637   }
638 >>
639 @end lilypond
640
641 @item
642 Melismata can be created automatically from the music by placing
643 slurs over the notes of each melisma.  This is the usual way of
644 entering lyrics:
645
646 @lilypond[quote,relative=2,verbatim]
647 <<
648   \new Voice = "melody" {
649     \time 3/4
650     f4 g8 ( f e f )
651     e8 ( d e2 )
652   }
653   \new Lyrics \lyricsto "melody" {
654     Ky -- ri -- e __
655   }
656 >>
657 @end lilypond
658
659 @item
660 Notes are considered a melisma if they are manually beamed,
661 providing automatic beaming is switched off.  See
662 @ref{Setting automatic beam behavior}.
663
664 @lilypond[quote,relative=2,verbatim]
665 <<
666   \new Voice = "melody" {
667     \time 3/4
668     \autoBeamOff
669     f4 g8[ f e f]
670     e2.
671   }
672   \new Lyrics \lyricsto "melody" {
673     Ky -- ri -- e
674   }
675 >>
676 @end lilypond
677
678 Clearly this is not suited to melismata over notes which are longer
679 than eighth notes.
680
681 @item
682 An unslurred group of notes will be treated as a melisma if they
683 are bracketed between @code{\melisma} and @code{\melismaEnd}.
684
685 @lilypond[quote,relative=2,verbatim]
686 <<
687   \new Voice = "melody" {
688     \time 3/4
689     f4 g8
690     \melisma
691     f e f
692     \melismaEnd
693     e2.
694   }
695   \new Lyrics \lyricsto "melody" {
696     Ky -- ri -- e
697   }
698 >>
699 @end lilypond
700
701 Note that this method cannot be used to indicate two melismata if
702 the first one is immediately followed by another.
703
704 @item
705 A melisma can be defined entirely in the lyrics by entering a
706 single underscore character, @code{_}, for every extra note that has
707 to be added to the melisma.
708
709 @lilypond[verbatim, quote, relative=2]
710 <<
711   \new Voice = "melody" {
712     \time 3/4
713     f4 g8 f e f
714     e8 d e2
715   }
716   \new Lyrics \lyricsto "melody" {
717     Ky -- ri -- _ _ _ e __ _ _
718   }
719 >>
720 @end lilypond
721
722 @end itemize
723
724 It is possible to have ties, slurs and manual beams in the melody
725 without their indicating melismata.  To do this, set
726 @code{melismaBusyProperties} and indicate the melismata with single
727 underscores in the lyrics, one underscore for each extra note:
728
729 @lilypond[relative=1,verbatim,quote]
730 <<
731   \new Voice = "melody" {
732     \time 3/4
733     \set melismaBusyProperties = #'()
734     c4 d ( e )
735     g8 [ f ] f4( e)
736     d e ~ e
737   }
738   \new Lyrics \lyricsto "melody" {
739     Ky -- _ _ _ _ ri -- _ _ e __ _
740   }
741 >>
742 @end lilypond
743
744 Other settings for @code{melismaBusyProperties} can be used to
745 include or exclude ties, slurs, and beams from the automatic
746 detection of melismata; see @code{melismaBusyProperties} in
747 @rinternals{Tunable context properties}.
748
749 @predefined
750
751 @code{\autoBeamOff},
752 @code{\autoBeamOn},
753 @code{\melisma},
754 @code{\melismaEnd}.
755
756 @seealso
757 Musical Glossary:
758 @rglos{melisma}.
759
760 Learning Manual:
761 @rlearning{Aligning lyrics to a melody}.
762
763 Notation Reference:
764 @ref{Aligning lyrics to a melody},
765 @ref{Automatic syllable durations},
766 @ref{Setting automatic beam behavior}.
767
768 Internals Reference:
769 @rinternals{Tunable context properties}.
770
771 @knownissues
772
773 Extender lines under melismata are not created automatically; they
774 must be inserted manually with a double underscore.
775
776 @node Skipping notes
777 @unnumberedsubsubsec Skipping notes
778
779 Making a lyric line run slower than the melody can be achieved by
780 inserting @code{\skip}s into the lyrics.  For every @code{\skip},
781 the text will be delayed by another note.  The @code{\skip} command
782 must be followed by a valid duration, but this is ignored when
783 @code{\skip} is used in lyrics which derive their durations from the
784 notes in an associated melody through @code{\addlyrics} or
785 @code{\lyricsto}.
786
787 @lilypond[verbatim,ragged-right,quote]
788 \relative c' { c c g' }
789 \addlyrics {
790   twin -- \skip 4
791   kle
792 }
793 @end lilypond
794
795
796 @node Extenders and hyphens
797 @unnumberedsubsubsec Extenders and hyphens
798
799 @cindex melisma
800 @cindex extender
801
802 @c TODO cf Multiple notes to one syllable; should this be merged in?
803
804 @c leave this as samp. -gp
805 In the last syllable of a word, melismata are sometimes indicated with
806 a long horizontal line starting in the melisma syllable, and ending in
807 the next one.  Such a line is called an extender line, and it is
808 entered as @samp{ __ } (note the spaces before and after the two
809 underscore characters).
810
811 @warning{Melismata are indicated in the score with extender lines,
812 which are entered as one double underscore; but short melismata can
813 also be entered by skipping individual notes, which are entered as
814 single underscore characters; these do not make an extender line to be
815 typeset by default.}
816
817 @cindex hyphens
818
819 @c leave this as samp. -gp
820 Centered hyphens are entered as @samp{ -- } between syllables of a
821 same word (note the spaces before and after the two hyphen
822 characters).  The hyphen will be centered between the syllables, and
823 its length will be adjusted depending on the space between the
824 syllables.
825
826 In tightly engraved music, hyphens can be removed.  Whether this
827 happens can be controlled with the @code{minimum-distance} (minimum
828 distance between two syllables) and the @code{minimum-length}
829 (threshold below which hyphens are removed) properties of
830 @code{LyricHyphen}.
831
832
833 @seealso
834 Internals Reference:
835 @rinternals{LyricExtender},
836 @rinternals{LyricHyphen}.
837
838
839 @node Techniques specific to lyrics
840 @subsection Techniques specific to lyrics
841
842 @c TODO this whole section is to be reorganised
843
844 @menu
845 * Working with lyrics and variables::
846 * Placing lyrics vertically::
847 * Placing syllables horizontally::
848 * Lyrics and repeats::
849 * Divisi lyrics::
850 @end menu
851
852
853
854 @node Working with lyrics and variables
855 @unnumberedsubsubsec Working with lyrics and variables
856
857 @cindex lyrics, using variables
858
859 Variables containing lyrics can be created, but the lyrics must be
860 entered in lyric mode:
861
862 @lilypond[quote,verbatim]
863 musicOne = \relative c'' {
864   c4 b8. a16 g4. f8 e4 d c2
865 }
866 verseOne = \lyricmode {
867   Joy to the world, the Lord is come.
868 }
869 \score {
870   <<
871     \new Voice = "one" {
872       \time 2/4
873       \musicOne
874     }
875     \new Lyrics \lyricsto "one" {
876       \verseOne
877     }
878   >>
879 }
880 @end lilypond
881
882 Durations do not need to be added if the variable is to be invoked
883 with @code{\addlyrics} or @code{\lyricsto}.
884
885 For different or more complex orderings, the best way is to define
886 the music and lyric variables first, then set up the hierarchy of
887 staves and lyrics, omitting the lyrics themselves, and then add the
888 lyrics using @code{\context} underneath.  This ensures that the
889 voices referenced by @code{\lyricsto} have always been defined
890 earlier.  For example:
891
892 @lilypond[quote,verbatim]
893 sopranoMusic = \relative c'' { c4 c c c }
894 contraltoMusic = \relative c'' { a4 a a a }
895 sopranoWords = \lyricmode { Sop -- ra -- no words }
896 contraltoWords = \lyricmode { Con -- tral -- to words }
897
898 \score {
899   \new ChoirStaff <<
900     \new Staff {
901       \new Voice = "sopranos" {
902         \sopranoMusic
903       }
904     }
905     \new Lyrics = "sopranos"
906     \new Lyrics = "contraltos"
907     \new Staff {
908       \new Voice = "contraltos" {
909         \contraltoMusic
910       }
911     }
912     \context Lyrics = "sopranos" {
913       \lyricsto "sopranos" {
914         \sopranoWords
915       }
916     }
917     \context Lyrics = "contraltos" {
918       \lyricsto "contraltos" {
919         \contraltoWords
920       }
921     }
922   >>
923 }
924 @end lilypond
925
926
927 @seealso
928 Notation Reference:
929 @ref{Placing lyrics vertically}.
930
931 Internals Reference:
932 @rinternals{LyricCombineMusic},
933 @rinternals{Lyrics}.
934
935
936 @node Placing lyrics vertically
937 @unnumberedsubsubsec Placing lyrics vertically
938
939 @cindex placement of lyrics
940 @cindex lyrics, positioning
941
942 Depending on the type of music, lyrics may be positioned
943 above the staff, below the staff, or between staves.  Placing
944 lyrics below the associated staff is the easiest, and can be
945 achieved by simply defining the Lyrics context below the Staff
946 context:
947
948 @lilypond[quote,verbatim]
949 \score {
950   <<
951     \new Staff {
952       \new Voice = "melody" {
953         \relative c'' { c4 c c c }
954       }
955     }
956     \new Lyrics {
957       \lyricsto "melody" {
958         Here are the words
959       }
960     }
961   >>
962 }
963 @end lilypond
964
965 Lyrics may be positioned above the staff using one of
966 two methods.  The simplest is to use the same syntax as
967 above and explicitly specify the position of the lyrics:
968
969 @lilypond[quote,verbatim]
970 \score {
971   <<
972     \new Staff = "staff" {
973       \new Voice = "melody" {
974         \relative c'' { c4 c c c }
975       }
976     }
977     \new Lyrics \with { alignAboveContext = "staff" } {
978       \lyricsto "melody" {
979         Here are the words
980       }
981     }
982   >>
983 }
984 @end lilypond
985
986 Alternatively, a two-step process may be used.  First the Lyrics
987 context is declared (without any content) before the Staff and
988 Voice contexts, then the @code{\lyricsto} command is placed after
989 the Voice declaration it references by using @code{\context}, as
990 follows:
991
992 @lilypond[quote,verbatim]
993 \score {
994   <<
995     \new Lyrics = "lyrics"
996     \new Staff {
997       \new Voice = "melody" {
998         \relative c'' { c4 c c c }
999       }
1000     }
1001     \context Lyrics = "lyrics" {
1002       \lyricsto "melody" {
1003         Here are the words
1004       }
1005     }
1006   >>
1007 }
1008 @end lilypond
1009
1010 When there are two voices on separate staves the lyrics may be
1011 placed between the staves using either of these methods.  Here
1012 is an example of the second method:
1013
1014 @lilypond[quote,verbatim]
1015 \score {
1016   \new ChoirStaff <<
1017     \new Staff {
1018       \new Voice = "sopranos" {
1019         \relative c'' { c4 c c c }
1020       }
1021     }
1022     \new Lyrics = "sopranos"
1023     \new Lyrics = "contraltos"
1024     \new Staff {
1025       \new Voice = "contraltos" {
1026         \relative c'' { a4 a a a }
1027       }
1028     }
1029     \context Lyrics = "sopranos" {
1030       \lyricsto "sopranos" {
1031         Sop -- ra -- no words
1032       }
1033     }
1034     \context Lyrics = "contraltos" {
1035       \lyricsto "contraltos" {
1036         Con -- tral -- to words
1037       }
1038     }
1039   >>
1040 }
1041 @end lilypond
1042
1043 Other combinations of lyrics and staves may be generated by
1044 elaborating these examples, or by examining the
1045 @rlearning{Vocal ensembles} templates in the Learning Manual.
1046
1047 @seealso
1048 Learning Manual:
1049 @rlearning{Vocal ensembles}.
1050
1051 Notation Reference:
1052 @ref{Aligning contexts},
1053 @ref{Creating contexts}.
1054
1055 @node Placing syllables horizontally
1056 @unnumberedsubsubsec Placing syllables horizontally
1057
1058 @cindex Spacing lyrics
1059 @cindex Lyrics, increasing space between
1060
1061 To increase the spacing between lyrics, set the @code{minimum-distance}
1062 property of @code{LyricSpace}.
1063
1064 @lilypond[relative=1,verbatim,quote,ragged-right]
1065 {
1066   c c c c
1067   \override Lyrics.LyricSpace #'minimum-distance = #1.0
1068   c c c c
1069 }
1070 \addlyrics {
1071   longtext longtext longtext longtext
1072   longtext longtext longtext longtext
1073 }
1074 @end lilypond
1075
1076 @noindent
1077 To make this change for all lyrics in the score, set the property in the
1078 @code{\layout} block.
1079
1080 @lilypond[verbatim,quote,ragged-right]
1081 \score {
1082   \relative c' {
1083   c c c c
1084   c c c c
1085   }
1086   \addlyrics {
1087   longtext longtext longtext longtext
1088   longtext longtext longtext longtext
1089   }
1090   \layout {
1091     \context {
1092       \Lyrics
1093       \override LyricSpace #'minimum-distance = #1.0
1094     }
1095   }
1096 }
1097 @end lilypond
1098
1099 @snippets
1100 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
1101 {lyrics-alignment.ly}
1102
1103 @c TODO: move to LSR -vv
1104
1105 Checking to make sure that text scripts and lyrics are within the margins is
1106 a relatively large computational task.  To speed up processing, LilyPond does
1107 not perform such calculations by default; to enable it, use
1108
1109 @example
1110 \override Score.PaperColumn #'keep-inside-line = ##t
1111 @end example
1112
1113 To make lyrics avoid bar lines as well, use
1114
1115 @example
1116 \layout @{
1117   \context @{
1118     \Lyrics
1119       \consists "Bar_engraver"
1120       \consists "Separating_line_group_engraver"
1121       \override BarLine #'transparent = ##t
1122   @}
1123 @}
1124 @end example
1125
1126 @c TODO Create and add lsr example of lyricMelismaAlignment
1127 @c It's used like this to center-align all lyric syllables,
1128 @c even when notes are tied. -td
1129
1130 @ignore
1131 \layout
1132 {
1133      \context { \Score lyricMelismaAlignment = #0 }
1134 }
1135 @end ignore
1136
1137
1138 @node Lyrics and repeats
1139 @unnumberedsubsubsec Lyrics and repeats
1140
1141 @cindex repeats and lyrics
1142 @cindex lyrics, repeating
1143
1144 @subheading Simple repeats
1145
1146 Repeats in @emph{music} are fully described elsewhere; see
1147 @ref{Repeats}.  This section explains how to add lyrics to repeated
1148 sections of music.
1149
1150 Lyrics to a section of music that is repeated should be surrounded
1151 by exactly the same repeat construct as the music, if the words are
1152 unchanged.
1153
1154 @lilypond[verbatim,quote]
1155 \score {
1156   <<
1157     \new Staff {
1158       \new Voice = "melody" {
1159         \relative c'' {
1160           a4 a a a
1161           \repeat volta 2 { b4 b b b }
1162         }
1163       }
1164     }
1165     \new Lyrics {
1166       \lyricsto "melody" {
1167         Not re -- peat -- ed.
1168         \repeat volta 2 { Re -- peat -- ed twice. }
1169       }
1170     }
1171   >>
1172 }
1173 @end lilypond
1174
1175 The words will then be correctly expanded if the repeats are
1176 unfolded.
1177
1178 @lilypond[verbatim,quote]
1179 \score {
1180   \unfoldRepeats {
1181     <<
1182       \new Staff {
1183         \new Voice = "melody" {
1184           \relative c'' {
1185             a4 a a a
1186             \repeat volta 2 { b4 b b b }
1187           }
1188         }
1189       }
1190       \new Lyrics {
1191         \lyricsto "melody" {
1192           Not re -- peat -- ed.
1193           \repeat volta 2 { Re -- peat -- ed twice. }
1194         }
1195       }
1196     >>
1197   }
1198 }
1199 @end lilypond
1200
1201 If the repeated section is to be unfolded and has different words,
1202 simply enter all the words:
1203
1204 @lilypond[verbatim,quote,ragged-right]
1205 \score {
1206   <<
1207     \new Staff {
1208       \new Voice = "melody" {
1209         \relative c'' {
1210           a4 a a a
1211           \repeat unfold 2 { b4 b b b }
1212         }
1213       }
1214     }
1215     \new Lyrics {
1216       \lyricsto "melody" {
1217         Not re -- peat -- ed.
1218         The first time words.
1219         Sec -- ond time words.
1220       }
1221     }
1222   >>
1223 }
1224 @end lilypond
1225
1226 @cindex lyric skip
1227 @funindex \skip
1228
1229 When the words to a repeated volta section are different, the words
1230 to each repeat must be entered in separate @code{Lyrics} contexts.
1231 Earlier unrepeated sections must be skipped in the second and
1232 subsequent repeats.  The easiest way to skip several notes is to
1233 use @code{\repeat unfold} around the @code{\skip} command.
1234
1235 Note: do not use an underscore, @code{_}, to skip notes in this
1236 particular case.  As this syntax indicates a melisma, it will cause
1237 the preceding syllable to be left-aligned.
1238
1239 @warning{The @code{@bs{}skip} command must be followed by a number,
1240 but this number is ignored in lyrics which derive their durations
1241 from the notes in an associated melody through @code{\addlyrics} or
1242 @code{\lyricsto}.  Each @code{@bs{}skip} skips a single note of any
1243 value, irrespective of the value of the following number.}
1244
1245 @lilypond[verbatim,quote]
1246 \score {
1247   <<
1248     \new Staff {
1249       \new Voice = "melody" {
1250         \relative c'' {
1251           a4 a a a
1252           \repeat volta 2 { b4 b b b }
1253         }
1254       }
1255     }
1256     \new Lyrics {
1257       \lyricsto "melody" {
1258         Not re -- peat -- ed.
1259         The first time words.
1260       }
1261     }
1262     \new Lyrics {
1263       \lyricsto "melody" {
1264         % skip 4 notes of any duration
1265         \repeat unfold 4 { \skip 1 }
1266         Sec -- ond time words.
1267       }
1268     }
1269   >>
1270 }
1271 @end lilypond
1272
1273 @cindex lyrics, repeating with a temporary voice
1274
1275 An alternative way, which avoids skips and having to count notes,
1276 is to use a temporary voice for the repeated section.  This may be
1277 preferable if the earlier sections are still subject to change.  A
1278 temporary voice can be inserted anywhere in the main music stream
1279 in parallel with it, as shown below, but it may be necessary to
1280 keep the main voice alive in complex scores when using this
1281 technique; see @ref{Keeping contexts alive}.
1282
1283 @lilypond[verbatim,quote,ragged-right]
1284 \score {
1285   <<
1286     \new Staff {
1287       \new Voice = "singleVoice" {
1288         \relative c'' { a4 a a a }
1289         \new Voice = "repeatVoice" {
1290           \relative c'' \repeat volta 3 { b4 b b b }
1291         }
1292         \relative c'' { c4 c c c }
1293       }
1294     }
1295     \new Lyrics <<
1296       \lyricsto "singleVoice" {
1297         Not re -- peat -- ed.
1298         The end sec -- tion.
1299       }
1300       \lyricsto "repeatVoice" {
1301         The first time words.
1302       }
1303     >>
1304     \new Lyrics {
1305       \lyricsto "repeatVoice" {
1306         Sec -- ond time words.
1307       }
1308     }
1309     \new Lyrics {
1310       \lyricsto "repeatVoice" {
1311         The third time words.
1312       }
1313     }
1314   >>
1315 }
1316 @end lilypond
1317
1318 @c TODO lowering a common line of lyrics
1319
1320 @subheading Repeats with alternative endings
1321
1322 @cindex lyrics, repeats with alternative endings
1323 @cindex repeating lyrics with alternative endings
1324 @cindex alternative endings and lyrics
1325
1326 If the words of the repeated section are the same, exactly the
1327 same structure can be used for both the lyrics and music.
1328
1329 @lilypond[quote,verbatim]
1330 \score {
1331   <<
1332     \new Staff {
1333       \time 2/4
1334       \new Voice = "melody" {
1335         \relative c'' {
1336           a4 a a a
1337           \repeat volta 2 { b4 b }
1338           \alternative { { b b } { b c } }
1339         }
1340       }
1341     }
1342     \new Lyrics {
1343       \lyricsto "melody" {
1344         Not re -- peat -- ed.
1345         \repeat volta 2 { Re -- peat -- }
1346         \alternative { { ed twice. } { ed twice. } }
1347       }
1348     }
1349   >>
1350 }
1351 @end lilypond
1352
1353 But when the repeated section has different words, a repeat
1354 construct cannot be used around the words and @code{\skip} commands
1355 have to be inserted manually as described in the previous section to
1356 skip over the notes in the alternative sections which do not apply.
1357
1358 @lilypond[verbatim,quote,ragged-right]
1359 \score {
1360   <<
1361     \new Staff {
1362       \time 2/4
1363       \new Voice = "melody" {
1364         \relative c'' {
1365           \repeat volta 2 { b4 b }
1366           \alternative { { b b } { b c } }
1367           c4 c
1368         }
1369       }
1370     }
1371     \new Lyrics {
1372       \lyricsto "melody" {
1373         The first time words.
1374         \repeat unfold 2 { \skip 1 }
1375         End here.
1376       }
1377     }
1378     \new Lyrics {
1379       \lyricsto "melody" {
1380         Sec -- ond
1381         \repeat unfold 2 { \skip 1 }
1382         time words.
1383       }
1384     }
1385   >>
1386 }
1387 @end lilypond
1388
1389 @cindex lyrics and tied notes
1390 @funindex \repeatTie
1391
1392 When a note is tied over into two or more alternative endings a
1393 tie is used to carry the note into the first alternative ending and
1394 a @code{\repeatTie} is used in the second and subsequent endings.
1395 This structure causes difficult alignment problems when lyrics are
1396 involved and increasing the length of the alternative sections so
1397 the tied notes are contained wholly within them may give a more
1398 acceptable result.
1399
1400 The tie creates a melisma into the first alternative, but not into
1401 the second and subsequent alternatives, so to align the lyrics
1402 correctly it is necessary to disable the automatic creation of
1403 melismata over the volta section and insert manual skips.
1404
1405 @lilypond[quote,verbatim]
1406 \score {
1407   <<
1408     \new Staff {
1409       \time 2/4
1410       \new Voice = "melody" {
1411         \relative c'' {
1412           \set melismaBusyProperties = #'()
1413           \repeat volta 2 { b4 b ~}
1414           \alternative { { b b } { b \repeatTie c } }
1415           \unset melismaBusyProperties
1416           c4 c
1417         }
1418       }
1419     }
1420     \new Lyrics {
1421       \lyricsto "melody" {
1422         \repeat volta 2 { Here's a __ }
1423         \alternative {
1424           { \skip 1 verse }
1425           { \skip 1 sec }
1426         }
1427         ond one.
1428       }
1429     }
1430   >>
1431 }
1432 @end lilypond
1433
1434 Note that if @code{\unfoldRepeats} is used around a section
1435 containing @code{\repeatTie}, the @code{\repeatTie} should be
1436 removed to avoid both types of tie being printed.
1437
1438 When the repeated section has different words a @code{\repeat}
1439 cannot be used around the lyrics and @code{\skip} commands need to
1440 be inserted manually, as before.
1441
1442 @lilypond[quote,verbatim]
1443 \score {
1444   <<
1445     \new Staff {
1446       \time 2/4
1447       \new Voice = "melody" {
1448         \relative c'' {
1449           \repeat volta 2 { b4 b ~}
1450           \alternative { { b b } { b \repeatTie c } }
1451           c4 c
1452         }
1453       }
1454     }
1455     \new Lyrics {
1456       \lyricsto "melody" {
1457         Here's a __ verse.
1458         \repeat unfold 2 { \skip 1 }
1459       }
1460     }
1461     \new Lyrics {
1462       \lyricsto "melody" {
1463         Here's one
1464         \repeat unfold 2 { \skip 1 }
1465         more to sing.
1466       }
1467     }
1468   >>
1469 }
1470 @end lilypond
1471
1472 If you wish to show extenders and hyphens into and out of
1473 alternative sections these must be inserted manually.
1474
1475 @lilypond[quote,verbatim]
1476 \score {
1477   <<
1478     \new Staff {
1479       \time 2/4
1480       \new Voice = "melody" {
1481         \relative c'' {
1482           \repeat volta 2 { b4 b ~}
1483           \alternative { { b b } { b \repeatTie c } }
1484           c4 c
1485         }
1486       }
1487     }
1488     \new Lyrics {
1489       \lyricsto "melody" {
1490         Here's a __ verse.
1491         \repeat unfold 2 { \skip 1 }
1492       }
1493     }
1494     \new Lyrics {
1495       \lyricsto "melody" {
1496         Here's "a_"
1497         \skip 1
1498         "_" sec -- ond one.
1499       }
1500     }
1501   >>
1502 }
1503 @end lilypond
1504
1505
1506
1507 @node Divisi lyrics
1508 @unnumberedsubsubsec Divisi lyrics
1509
1510 @cindex divided lyrics
1511 @cindex lyrics, divided
1512
1513 When just the words and rhythms of the two parts differ with the
1514 pitches remaining the same, temporarily turning off the automatic
1515 detection of melismata and indicating the melisma in the lyrics
1516 may be the appropriate method to use:
1517
1518 @lilypond[quote,verbatim]
1519 \score {
1520   <<
1521     \new Voice = "melody" {
1522       \relative c' {
1523         \set melismaBusyProperties = #'()
1524         \slurDown
1525         \slurDashed
1526         e4 e8 ( e ) c4 c |
1527         \unset melismaBusyProperties
1528         c
1529       }
1530     }
1531     \new Lyrics \lyricsto "melody" {
1532       They shall not o -- ver -- come
1533     }
1534     \new Lyrics \lyricsto "melody" {
1535       We will _
1536     }
1537   >>
1538 }
1539 @end lilypond
1540
1541 When both music and words differ it may be better to display
1542 the differing music and lyrics by naming voice contexts and
1543 attaching lyrics to those specific contexts:
1544
1545 @lilypond[verbatim,ragged-right,quote]
1546 \score {
1547   <<
1548     \new Voice = "melody" {
1549       \relative c' {
1550         <<
1551           {
1552             \voiceOne
1553             e4 e8 e
1554           }
1555           \new Voice = "splitpart" {
1556             \voiceTwo
1557             c4 c
1558           }
1559         >>
1560         \oneVoice
1561         c4 c |
1562         c
1563       }
1564     }
1565     \new Lyrics \lyricsto "melody" {
1566       They shall not o -- ver -- come
1567     }
1568     \new Lyrics \lyricsto "splitpart" {
1569       We will
1570     }
1571   >>
1572 }
1573 @end lilypond
1574
1575
1576 @node Stanzas
1577 @subsection Stanzas
1578
1579 @menu
1580 * Adding stanza numbers::
1581 * Adding dynamics marks to stanzas::
1582 * Adding singers' names to stanzas::
1583 * Stanzas with different rhythms::
1584 * Printing stanzas at the end::
1585 * Printing stanzas at the end in multiple columns::
1586 @end menu
1587
1588
1589 @node Adding stanza numbers
1590 @unnumberedsubsubsec Adding stanza numbers
1591
1592 @cindex stanza number
1593
1594 Stanza numbers can be added by setting @code{stanza}, e.g.,
1595
1596 @lilypond[quote,ragged-right,verbatim,relative=2]
1597 \new Voice {
1598   \time 3/4 g2 e4 a2 f4 g2.
1599 } \addlyrics {
1600   \set stanza = #"1. "
1601   Hi, my name is Bert.
1602 } \addlyrics {
1603   \set stanza = #"2. "
1604   Oh, ché -- ri, je t'aime
1605 }
1606 @end lilypond
1607
1608
1609 @noindent
1610 These numbers are put just before the start of the first syllable.
1611
1612 @c TODO Create and add snippet to show how two lines of a
1613 @c stanza can be grouped together, along these lines:
1614 @c (might need improving a bit) -td
1615
1616 @ignore
1617 leftbrace = \markup { \override #'(font-encoding . fetaBraces) \lookup
1618 #"brace105" }
1619
1620 stanzaOneOne = {
1621   \set stanza = \markup { "1. " \leftbrace }
1622   \lyricmode { Child, you're mine and I love you.
1623     Lend thine ear to what I say.
1624
1625   }
1626 }
1627
1628 stanzaOneThree =  {
1629 %  \set stanza = \markup { "   "}
1630   \lyricmode { Child, I have no great -- er joy
1631     Than to have you walk in truth.
1632
1633   }
1634 }
1635
1636 \new Voice {
1637   \repeat volta 2 { c'8 c' c' c' c' c' c'4
1638                     c'8 c' c' c' c' c' c'4   }
1639 }  \addlyrics { \stanzaOneOne }
1640    \addlyrics { \stanzaOneThree }
1641
1642 @end ignore
1643
1644 @node Adding dynamics marks to stanzas
1645 @unnumberedsubsubsec Adding dynamics marks to stanzas
1646
1647 Stanzas differing in loudness may be indicated by putting a
1648 dynamics mark before each stanza.  In LilyPond, everything coming in
1649 front of a stanza goes into the @code{StanzaNumber} object; dynamics marks
1650 are no different.  For technical reasons, you have to set the stanza
1651 outside @code{\lyricmode}:
1652
1653 @lilypond[quote,ragged-right,verbatim]
1654 text = {
1655   \set stanza = \markup { \dynamic "ff" "1. " }
1656   \lyricmode {
1657     Big bang
1658   }
1659 }
1660
1661 <<
1662   \new Voice = "tune" {
1663     \time 3/4
1664     g'4 c'2
1665   }
1666 \new Lyrics \lyricsto "tune" \text
1667 >>
1668 @end lilypond
1669
1670 @node Adding singers' names to stanzas
1671 @unnumberedsubsubsec Adding singers' names to stanzas
1672
1673 @cindex singer name
1674 @cindex name of singer
1675
1676 Names of singers can also be added.  They are printed at the start of
1677 the line, just like instrument names.  They are created by setting
1678 @code{vocalName}.  A short version may be entered as @code{shortVocalName}.
1679
1680 @lilypond[ragged-right,quote,verbatim,relative=2]
1681 \new Voice {
1682   \time 3/4 g2 e4 a2 f4 g2.
1683 } \addlyrics {
1684   \set vocalName = #"Bert "
1685   Hi, my name is Bert.
1686 } \addlyrics {
1687   \set vocalName = #"Ernie "
1688   Oh, ché -- ri, je t'aime
1689 }
1690 @end lilypond
1691
1692 @node Stanzas with different rhythms
1693 @unnumberedsubsubsec Stanzas with different rhythms
1694
1695 Often, different stanzas of one song are put to one melody in slightly
1696 differing ways.  Such variations can still be captured with
1697 @code{\lyricsto}.
1698
1699 @subsubheading Ignoring melismata
1700
1701 One possibility is that the text has a melisma in one stanza, but
1702 multiple syllables in another.  One solution is to make the faster
1703 voice ignore the melisma.  This is done by setting
1704 @code{ignoreMelismata} in the Lyrics context.
1705
1706 @lilypond[verbatim,ragged-right,quote]
1707 <<
1708   \relative c' \new Voice = "lahlah" {
1709     \set Staff.autoBeaming = ##f
1710     c4
1711     \slurDotted
1712     f8.[( g16])
1713     a4
1714   }
1715   \new Lyrics \lyricsto "lahlah" {
1716     more slow -- ly
1717   }
1718   \new Lyrics \lyricsto "lahlah" {
1719     go
1720     \set ignoreMelismata = ##t
1721     fas -- ter
1722     \unset ignoreMelismata
1723     still
1724   }
1725 >>
1726 @end lilypond
1727
1728 @knownissues
1729 Unlike most @code{\set} commands, @code{\set ignoreMelismata} does
1730 not work if prefixed with @code{\once}.  It is necessary to use
1731 @code{\set} and @code{\unset} to bracket the lyrics where melismata
1732 are to be ignored.
1733
1734 @subsubheading Adding syllables to grace notes
1735
1736 By default, grace notes (e.g. via @code{\grace}) do not get assigned
1737 syllables when using @code{\lyricsto}, but this behavior can be
1738 changed:
1739
1740 @lilypond[verbatim,ragged-right,quote]
1741 \relative c' {
1742   f4 \appoggiatura a32 b4
1743   \grace { f16[ a16] } b2
1744   \afterGrace b2 { f16[ a16] }
1745   \appoggiatura a32 b4
1746   \acciaccatura a8 b4
1747 }
1748 \addlyrics {
1749   normal
1750   \set includeGraceNotes = ##t
1751   case,
1752   gra -- ce case,
1753   after -- grace case,
1754   \set ignoreMelismata = ##t
1755   app. case,
1756   acc. case.
1757 }
1758 @end lilypond
1759
1760 @knownissues
1761 Like @code{associatedVoice}, @code{includeGraceNotes} needs to be
1762 set at latest one syllable before the one which is to be put under a
1763 grace note.  For the case of a grace note at the very beginning of a
1764 piece of music, consider using a @code{\with} or @code{\context}
1765 block:
1766
1767 @lilypond[verbatim,ragged-right,quote]
1768 <<
1769   \new Voice = melody \relative c' {
1770     \grace { c16[( d e f] }
1771     g1) f
1772   }
1773   \new Lyrics \with { includeGraceNotes = ##t }
1774   \lyricsto melody {
1775     Ah __ fa
1776   }
1777 >>
1778 @end lilypond
1779
1780 @subsubheading Switching to an alternative melody
1781
1782 @cindex associatedVoice
1783 @cindex alternative melody, switching to
1784
1785 More complex variations in setting lyrics to music are possible.
1786 The melody to which the lyrics are being set can be changed from
1787 within the lyrics by setting the @code{associatedVoice} property:
1788
1789 @lilypond[verbatim,quote]
1790 <<
1791   \relative c' \new Voice = "lahlah" {
1792     \set Staff.autoBeaming = ##f
1793     c4
1794     <<
1795       \new Voice = "alternative" {
1796         \voiceOne
1797         \times 2/3 {
1798           % show associations clearly.
1799           \override NoteColumn #'force-hshift = #-3
1800           f8 f g
1801         }
1802       }
1803       {
1804         \voiceTwo
1805         f8.[ g16]
1806         \oneVoice
1807       } >>
1808     a8( b) c
1809   }
1810   \new Lyrics \lyricsto "lahlah" {
1811     Ju -- ras -- sic Park
1812   }
1813   \new Lyrics \lyricsto "lahlah" {
1814     % Tricky: need to set associatedVoice
1815     % one syllable too soon!
1816     \set associatedVoice = "alternative" % applies to "ran"
1817     Ty --
1818     ran --
1819     no --
1820     \set associatedVoice = "lahlah" % applies to "rus"
1821     sau -- rus Rex
1822   } >>
1823 @end lilypond
1824
1825 @noindent
1826 The text for the first stanza is set to the melody called @q{lahlah}
1827 in the usual way, but the second stanza is set initally to the
1828 @code{lahlah} context and is then switched to the @code{alternative}
1829 melody for the syllables @q{ran} to @q{sau} by the lines:
1830
1831 @example
1832 \set associatedVoice = "alternative" % applies to "ran"
1833 Ty --
1834 ran --
1835 no --
1836 \set associatedVoice = "lahlah" % applies to "rus"
1837 sau -- rus Rex
1838 @end example
1839
1840 @noindent
1841 Here, @code{alternative} is the name of the @code{Voice} context
1842 containing the triplet.
1843
1844 Note the placement of the @code{\set associatedVoice} command --
1845 it appears to be one syllable too early, but this is correct.
1846
1847 @warning{The @code{\set associatedVoice} command must be placed
1848 one syllable @emph{before} the one at which the switch to the new
1849 voice is to occur.  In other words, changing the associated Voice
1850 happens one syllable later than expected.  This is for technical
1851 reasons, and it is not a bug.}
1852
1853
1854 @node Printing stanzas at the end
1855 @unnumberedsubsubsec Printing stanzas at the end
1856
1857 Sometimes it is appropriate to have one stanza set
1858 to the music, and the rest added in verse form at
1859 the end of the piece.  This can be accomplished by adding
1860 the extra verses into a @code{\markup} section outside
1861 of the main score block.  Notice that there are two
1862 different ways to force linebreaks when using
1863 @code{\markup}.
1864
1865 @lilypond[ragged-right,verbatim,quote]
1866 melody = \relative c' {
1867 e d c d | e e e e |
1868 d d e d | c1 |
1869 }
1870
1871 text = \lyricmode {
1872 \set stanza = #"1." Ma- ry had a lit- tle lamb,
1873 its fleece was white as snow.
1874 }
1875
1876 \score{ <<
1877   \new Voice = "one" { \melody }
1878   \new Lyrics \lyricsto "one" \text
1879 >>
1880   \layout { }
1881 }
1882 \markup { \column{
1883   \line{ Verse 2. }
1884   \line{ All the children laughed and played }
1885   \line{ To see a lamb at school. }
1886   }
1887 }
1888 \markup{
1889   \wordwrap-string #"
1890   Verse 3.
1891
1892   Mary took it home again,
1893
1894   It was against the rule."
1895 }
1896 @end lilypond
1897
1898
1899 @node Printing stanzas at the end in multiple columns
1900 @unnumberedsubsubsec Printing stanzas at the end in multiple columns
1901
1902 When a piece of music has many verses, they are often printed in
1903 multiple columns across the page.  An outdented verse number often
1904 introduces each verse.  The following example shows how to produce such
1905 output in LilyPond.
1906
1907 @lilypond[ragged-right,quote,verbatim]
1908 melody = \relative c' {
1909   c c c c | d d d d
1910 }
1911
1912 text = \lyricmode {
1913   \set stanza = #"1." This is verse one.
1914   It has two lines.
1915 }
1916
1917 \score{ <<
1918     \new Voice = "one" { \melody }
1919     \new Lyrics \lyricsto "one" \text
1920    >>
1921   \layout { }
1922 }
1923
1924 \markup {
1925   \fill-line {
1926     \hspace #0.1 % moves the column off the left margin;
1927         % can be removed if space on the page is tight
1928      \column {
1929       \line { \bold "2."
1930         \column {
1931           "This is verse two."
1932           "It has two lines."
1933         }
1934       }
1935       \hspace #0.1 % adds vertical spacing between verses
1936       \line { \bold "3."
1937         \column {
1938           "This is verse three."
1939           "It has two lines."
1940         }
1941       }
1942     }
1943     \hspace #0.1  % adds horizontal spacing between columns;
1944         % if they are still too close, add more " " pairs
1945         % until the result looks good
1946      \column {
1947       \line { \bold "4."
1948         \column {
1949           "This is verse four."
1950           "It has two lines."
1951         }
1952       }
1953       \hspace #0.1 % adds vertical spacing between verses
1954       \line { \bold "5."
1955         \column {
1956           "This is verse five."
1957           "It has two lines."
1958         }
1959       }
1960     }
1961   \hspace #0.1 % gives some extra space on the right margin;
1962       % can be removed if page space is tight
1963   }
1964 }
1965 @end lilypond
1966
1967
1968 @seealso
1969 Internals Reference:
1970 @rinternals{LyricText},
1971 @rinternals{StanzaNumber}.
1972
1973
1974 @node Songs
1975 @subsection Songs
1976
1977 @menu
1978 * References for songs::
1979 * Lead sheets::
1980 @end menu
1981
1982 @node References for songs
1983 @unnumberedsubsubsec References for songs
1984
1985 Songs are usually written on three staves with the melody for the
1986 singer on the top staff and two staves of piano accompaniment at
1987 the bottom.  The lyrics of the first stanza are printed immediately
1988 underneath the top staff.  If there are just a small number of
1989 further stanzas these can be printed immediately under the first
1990 one, but if there are more stanzas than can be easily accommodated
1991 there the second and subsequent stanzas are printed after the music
1992 as stand-alone text.
1993
1994 All the notational elements needed to write songs are fully described
1995 elsewhere:
1996
1997 @itemize
1998
1999 @item
2000 For constructing the staff layout, see @ref{Displaying staves}.
2001
2002 @item
2003 For writing piano music, see
2004 @ref{Keyboard and other multi-staff instruments}.
2005
2006 @item
2007 For writing the lyrics to a melody line, see
2008 @ref{Common notation for vocal music}.
2009
2010 @item
2011 For placing the lyrics, see @ref{Placing lyrics vertically}.
2012
2013 @item
2014 For entering stanzas, see @ref{Stanzas}.
2015
2016 @item
2017 Songs are frequently printed with the chording indicated by chord
2018 names above the staves.  This is described in
2019 @ref{Displaying chords}.
2020
2021 @item
2022 To print fret diagrams of the chords for guitar accompaniment or
2023 accompaniment by other fretted instruments, see @qq{Fret diagram
2024 markups} in @ref{Common notation for fretted strings}.
2025
2026 @end itemize
2027
2028 @seealso
2029 Learning Manual:
2030 @rlearning{Songs}.
2031
2032 Notation Reference:
2033 @ref{Common notation for vocal music},
2034 @ref{Displaying chords},
2035 @ref{Displaying staves},
2036 @ref{Keyboard and other multi-staff instruments},
2037 @ref{Placing lyrics vertically},
2038 @ref{Stanzas}.
2039
2040 Snippets:
2041 @rlsr{Vocal music}.
2042
2043 @node Lead sheets
2044 @unnumberedsubsubsec Lead sheets
2045
2046 Lead sheets may be printed by combining vocal parts and @q{chord mode};
2047 this syntax is explained in @ref{Chord notation}.
2048
2049 @snippets
2050 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
2051 {simple-lead-sheet.ly}
2052
2053 @seealso
2054 Notation Reference:
2055 @ref{Chord notation}.
2056
2057
2058 @node Choral
2059 @subsection Choral
2060
2061 @cindex anthems
2062 @cindex part songs
2063 @cindex oratorio
2064 @cindex SATB
2065
2066 This section discusses notation issues that relate most directly
2067 to choral music.  This includes anthems, part songs, oratorio,
2068 etc.
2069
2070 @menu
2071 * References for choral::
2072 * Score layouts for choral::
2073 * Divided voices::
2074 @end menu
2075
2076 @node References for choral
2077 @unnumberedsubsubsec References for choral
2078
2079 Choral music is usually notated on two, three or four staves within
2080 a @code{ChoirStaff} group.  Accompaniment, if required, is placed
2081 beneath in a @code{PianoStaff} group, which is usually reduced in
2082 size for @emph{a capella} choral works.  The notes for each vocal
2083 part are placed in a @code{Voice} context, with each staff
2084 being given either a single vocal part (i.e., one @code{Voice}) or
2085 a pair of vocal parts (i.e., two @code{Voice}s).
2086
2087 Words are placed in @code{Lyrics} contexts, either underneath each
2088 corresponding music staff, or one above and one below the music
2089 staff if this contains the music for two parts.
2090
2091 Several common topics in choral music are described fully elsewhere:
2092
2093 @itemize
2094
2095 @item
2096 An introduction to creating an SATB vocal score can be found in
2097 the Learning Manual, see @rlearning{Four-part SATB vocal score}.
2098
2099 @item
2100 Several templates suitable for various styles of choral music can
2101 also be found in the Learning Manual, see
2102 @rlearning{Vocal ensembles}.
2103
2104 @item
2105 For information about @code{ChoirStaff} and @code{PianoStaff} see
2106 @ref{Grouping staves}.
2107
2108 @item
2109 Shape noteheads, as used in Sacred Harp and similar notation, are
2110 described in @ref{Shape note heads}.
2111
2112 @item
2113 When two vocal parts share a staff the stems, ties, slurs, etc., of
2114 the higher part will be directed up and those of the lower part
2115 down.  To do this, use @code{\voiceOne} and @code{\voiceTwo}.  See
2116 @ref{Single-staff polyphony}.
2117
2118 @end itemize
2119
2120 @predefined
2121 @code{\oneVoice},
2122 @code{\voiceOne},
2123 @code{\voiceTwo}.
2124
2125 @seealso
2126 Learning Manual:
2127 @rlearning{Four-part SATB vocal score},
2128 @rlearning{Vocal ensembles}.
2129
2130 Notation Reference:
2131 @ref{Context layout order},
2132 @ref{Grouping staves},
2133 @ref{Shape note heads},
2134 @ref{Single-staff polyphony}.
2135
2136 Snippets:
2137 @rlsr{Vocal music}.
2138
2139 Internals Reference:
2140 @rinternals{ChoirStaff},
2141 @rinternals{Lyrics},
2142 @rinternals{PianoStaff}.
2143
2144 @node Score layouts for choral
2145 @unnumberedsubsubsec Score layouts for choral
2146
2147 Choral music containing four staves, with or without piano
2148 accompaniment, is usually laid out with two systems per page.
2149 Depending on the page size, achieving this may require changes
2150 to several default settings.  The following settings should be
2151 considered:
2152
2153 @itemize
2154
2155 @item
2156 The global staff size can be modified to change the overall size
2157 of the elements of the score.  See @ref{Setting the staff size}.
2158
2159 @item
2160 The distances between the systems, the staves and the lyrics can
2161 all be adjusted independently.  See @ref{Vertical spacing}.
2162
2163 @item
2164 The dimensions of the vertical layout variables can be displayed as
2165 an aid to adjusting the vertical spacing.  This and other
2166 possibilities for fitting the music onto fewer pages are described
2167 in @ref{Fitting music onto fewer pages}.
2168
2169 @item
2170 If the number of systems per page changes from one to two it is
2171 customary to indicate this with a system separator mark between
2172 the two systems.  See @ref{Separating systems}.
2173
2174 @item
2175 For details of other page formatting properties, see
2176 @ref{Page formatting}.
2177
2178 @end itemize
2179
2180
2181 Dynamic markings by default are placed below the staff, but in
2182 choral music they are usually placed above the staff in order to
2183 avoid the lyrics.  The predefined command @code{\dynamicUp} does
2184 this for the dynamic markings in a single @code{Voice} context.
2185 If there are many @code{Voice} contexts this predefined command
2186 would have to be placed in every one.  Alternatively its expanded
2187 form can be used to place all dynamic markings in the entire score
2188 above their respective staves, as shown here:
2189
2190 @lilypond[verbatim,quote]
2191 \score {
2192   \new ChoirStaff <<
2193     \new Staff {
2194       \new Voice {
2195         \relative c'' { g4\f g g g }
2196       }
2197     }
2198     \new Staff {
2199       \new Voice {
2200         \relative c' { d4 d d\p d }
2201       }
2202     }
2203   >>
2204   \layout {
2205     \context {
2206       \Score
2207       \override DynamicText #'direction = #UP
2208       \override DynamicLineSpanner #'direction = #UP
2209     }
2210   }
2211 }
2212 @end lilypond
2213
2214 @predefined
2215 @code{\dynamicUp}, @code{\dynamicDown}, @code{\dynamicNeutral}.
2216
2217 @seealso
2218 Notation Reference:
2219 @ref{Changing spacing},
2220 @ref{Displaying spacing},
2221 @ref{Fitting music onto fewer pages},
2222 @ref{Page formatting},
2223 @ref{Score layout},
2224 @ref{Separating systems},
2225 @ref{Setting the staff size},
2226 @ref{Using an extra voice for breaks},
2227 @ref{Vertical spacing}.
2228
2229 Internals Reference:
2230 @rinternals{VerticalAxisGroup},
2231 @rinternals{StaffGrouper}.
2232
2233
2234 @node Divided voices
2235 @unnumberedsubsubsec Divided voices
2236
2237 @cindex voices, divided
2238
2239 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
2240 {using-arpeggiobracket-to-make-divisi-more-visible.ly}
2241
2242 @seealso
2243 Notation Reference:
2244 @ref{Expressive marks as lines}.
2245
2246
2247 @node Opera and stage musicals
2248 @subsection Opera and stage musicals
2249
2250 The music, lyrics and dialogue to opera and stage musicals are
2251 usually set out in one or more of the following forms:
2252
2253 @itemize
2254
2255 @item
2256 A @emph{Conductors' Score} containing the full orchestral and vocal
2257 parts, together with libretto cues if there are spoken passages.
2258
2259 @item
2260 @emph{Orchestral Parts} containing the music for the individual
2261 instruments of the orchestra or band.
2262
2263 @item
2264 A @emph{Vocal Score} containing all vocal parts with piano
2265 accompaniment.  The accompaniment is usually an orchestral
2266 reduction, and if so the name of the original orchestral instrument
2267 is often indicated.  Vocal scores sometimes includes stage
2268 directions and libretto cues.
2269
2270 @item
2271 A @emph{Vocal Book} containing just the vocal parts
2272 (no accompaniment), sometimes combined with the libretto.
2273
2274 @item
2275 A @emph{Libretto} containing the extended passages of spoken
2276 dialogue usually found in musicals, together with the words to the
2277 sung parts.  Stage directions are usually included.  LilyPond can
2278 be used to typeset libretti but as they contain no music
2279 alternative methods may be preferable.
2280
2281 @end itemize
2282
2283 The sections in the LilyPond documentation which cover the topics
2284 needed to create scores in the styles commonly found in opera and
2285 musicals are indicated in the References below.  This is followed
2286 by sections covering those techniques which are peculiar to
2287 typesetting opera and musical scores.
2288
2289 @menu
2290 * References for opera and stage musicals::
2291 * Character names::
2292 * Musical cues::
2293 * Spoken music::
2294 * Dialogue over music::
2295 @end menu
2296
2297 @node References for opera and stage musicals
2298 @unnumberedsubsubsec References for opera and stage musicals
2299
2300 @itemize
2301
2302 @item
2303 A conductors' score contains many grouped staves and lyrics.  Ways
2304 of grouping staves is shown in @ref{Grouping staves}.  To nest
2305 groups of staves see @ref{Nested staff groups}.
2306
2307 @item
2308 The printing of empty staves in conductors' scores and vocal scores
2309 is often suppressed.  To create such a @qq{Frenched score} see
2310 @ref{Hiding staves}.
2311
2312 @item
2313 Writing orchestral parts is covered in @ref{Writing parts}.
2314 Other sections in the Specialist notation chapter may be relevant,
2315 depending on the orchestration used.  Many instruments are
2316 transposing instruments, see @ref{Instrument transpositions}.
2317
2318 @item
2319 If the number of systems per page changes from page to page it is
2320 customary to separate the systems with a system separator mark.
2321 See @ref{Separating systems}.
2322
2323 @item
2324 For details of other page formatting properties, see
2325 @ref{Page formatting}.
2326
2327 @item
2328 Dialogue cues and stage directions can be inserted with markup.
2329 See @ref{Text}.  Extensive stage directions can be inserted with
2330 a section of stand-alone markup between two @code{\score} blocks.
2331 See @ref{Separate text}.
2332
2333 @end itemize
2334
2335 @seealso
2336 Musical Glossary:
2337 @rglos{Frenched score},
2338 @rglos{Frenched staves},
2339 @rglos{transposing instrument}.
2340
2341 Notation Reference:
2342 @ref{Grouping staves},
2343 @ref{Hiding staves},
2344 @ref{Instrument transpositions},
2345 @ref{Nested staff groups},
2346 @ref{Page formatting},
2347 @ref{Separating systems},
2348 @ref{Transpose},
2349 @ref{Writing parts},
2350 @ref{Writing text}.
2351
2352 Snippets:
2353 @rlsr{Vocal music}.
2354
2355
2356 @node Character names
2357 @unnumberedsubsubsec Character names
2358
2359 @cindex character names
2360 @cindex names, character
2361
2362 Character names are usually shown to the left of the staff when the
2363 staff is dedicated to that character alone:
2364
2365 @lilypond[quote,verbatim,ragged-right]
2366 \score {
2367   <<
2368     \new Staff {
2369       \set Staff.vocalName = \markup \smallCaps Kaspar
2370       \set Staff.shortVocalName = \markup \smallCaps Kas.
2371       \relative c' {
2372         \clef "G_8"
2373         c4 c c c
2374         \break
2375         c4 c c c
2376       }
2377     }
2378     \new Staff {
2379       \set Staff.vocalName = \markup \smallCaps Melchior
2380       \set Staff.shortVocalName = \markup \smallCaps Mel
2381       \clef "bass"
2382       \relative c' {
2383         a4 a a a
2384         a4 a a a
2385       }
2386     }
2387   >>
2388 }
2389 @end lilypond
2390
2391 When two or more characters share a staff the character's name is
2392 usually printed above the staff at the start of every section
2393 applying to that character.  This can be done with markup.  Often a
2394 specific font is used for this purpose.
2395
2396 @lilypond[quote,verbatim,relative=1]
2397 \clef "G_8"
2398 c4^\markup \fontsize #1 \smallCaps Kaspar
2399 c c c
2400 \clef "bass"
2401 a4^\markup \fontsize #1 \smallCaps Melchior
2402 a a a
2403 \clef "G_8"
2404 c4^\markup \fontsize #1 \smallCaps Kaspar
2405 c c c
2406 @end lilypond
2407
2408 Alternatively, if there are many character changes, it may be
2409 easier to set up @qq{instrument} definitions for each character at
2410 the top level so that @code{\instrumentSwitch} can be used to
2411 indicate each change.
2412
2413 @lilypond[quote,verbatim]
2414 \addInstrumentDefinition #"kaspar"
2415   #`((instrumentTransposition . ,(ly:make-pitch -1 0 0))
2416      (shortInstrumentName . "Kas.")
2417      (clefGlyph . "clefs.G")
2418      (clefOctavation . -7)
2419      (middleCPosition . 1)
2420      (clefPosition . -2)
2421      (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Kaspar"))
2422      (midiInstrument . "voice oohs"))
2423
2424 \addInstrumentDefinition #"melchior"
2425   #`((instrumentTransposition . ,(ly:make-pitch 0 0 0))
2426      (shortInstrumentName . "Mel.")
2427      (clefGlyph . "clefs.F")
2428      (clefOctavation . 0)
2429      (middleCPosition . 6)
2430      (clefPosition . 2)
2431      (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Melchior"))
2432      (midiInstrument . "voice aahs"))
2433
2434 \relative c' {
2435   \instrumentSwitch "kaspar"
2436   c4 c c c
2437   \instrumentSwitch "melchior"
2438   a4 a a a
2439   \instrumentSwitch "kaspar"
2440   c4 c c c
2441 }
2442 @end lilypond
2443
2444 @seealso
2445 Notation Reference:
2446 @ref{Instrument names},
2447 @ref{Scheme functions},
2448 @ref{Text},
2449 @ref{Text markup commands}.
2450
2451 Extending LilyPond:
2452 @rextend{Markup construction in Scheme}.
2453
2454 @node Musical cues
2455 @unnumberedsubsubsec Musical cues
2456
2457 @cindex musical cues
2458 @cindex cues, musical
2459
2460 Musical cues can be inserted in Vocal Scores, Vocal Books and
2461 Orchestral Parts to indicate what music in another part
2462 immediately precedes an entry.  Also, cues are often inserted in the
2463 piano reduction in Vocal Scores to indicate what each orchestral
2464 instrument is playing.  This aids the conductor when a full
2465 Conductors' Score is not available.
2466
2467 The basic mechanism for inserting cues is fully explained in the
2468 main text, see @ref{Quoting other voices} and
2469 @ref{Formatting cue notes}.  But when many cues have to be
2470 inserted, for example, as an aid to a conductor in a vocal score,
2471 the instrument name must be positioned carefully just before and
2472 close to the start of the cue notes.  The following example shows
2473 how this is done.
2474
2475 @lilypond[quote,verbatim]
2476 flute = \relative c'' {
2477   s4 s4 e g
2478 }
2479 \addQuote "flute" { \flute }
2480
2481 pianoRH = \relative c'' {
2482   c4. g8
2483   % position name of cue-ing instrument just before the cue notes,
2484   % and above the staff
2485   s1*0^\markup { \right-align { \tiny "Flute" } }
2486   \cueDuring "flute" #UP { g4 bes4 }
2487 }
2488 pianoLH = \relative c { c4 <c' e> e, <g c> }
2489
2490 \score {
2491   \new PianoStaff <<
2492     \new Staff {
2493       \pianoRH
2494     }
2495     \new Staff {
2496       \clef "bass"
2497       \pianoLH
2498     }
2499   >>
2500 }
2501 @end lilypond
2502
2503 If a transposing instrument is being quoted the instrument part should
2504 specify its key so the conversion of its cue notes will be done
2505 automatically.  The example below shows this transposition for a
2506 B-flat clarinet.  The notes in this example are low on the staff so
2507 @code{#DOWN} is specified in @code{\cueDuring} (so the stems are
2508 down) and the instrument name is positioned below the staff.  Note
2509 also that the piano right-hand voice is explicitly declared.  This
2510 is because the cue notes in this example begin at the start of the
2511 first bar and this would otherwise cause the entire piano right-hand
2512 notes to be placed in a @code{CueVoice} context.
2513
2514 @lilypond[quote,verbatim]
2515 clarinet = \relative c' {
2516   \transposition bes
2517   fis4 d d c
2518 }
2519 \addQuote "clarinet" { \clarinet }
2520
2521 pianoRH = \relative c'' {
2522   \transposition c'
2523   % position name of cue-ing instrument below the staff
2524   s1*0_\markup { \right-align { \tiny "Clar." } }
2525   \cueDuring "clarinet" #DOWN { c4. g8 }
2526   g4 bes4
2527 }
2528 pianoLH = \relative c { c4 <c' e> e, <g c> }
2529
2530 \score {
2531   <<
2532     \new PianoStaff <<
2533       \new Staff {
2534         \new Voice {
2535           \pianoRH
2536         }
2537       }
2538       \new Staff {
2539         \clef "bass"
2540         \pianoLH
2541       }
2542     >>
2543   >>
2544 }
2545 @end lilypond
2546
2547 From these two examples it is clear that inserting many cues in a
2548 Vocal Score would be tedious, and the notes of the piano part would
2549 become obscured.  However, as the following snippet shows, it is
2550 possible to define a music function to reduce the amount of typing
2551 and to make the piano notes clearer.
2552
2553 @snippets
2554 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
2555 {adding-orchestral-cues-to-a-vocal-score.ly}
2556
2557 @seealso
2558 Musical Glossary:
2559 @rglos{cue-notes}.
2560
2561 Notation Reference:
2562 @ref{Aligning objects},
2563 @ref{Direction and placement},
2564 @ref{Formatting cue notes},
2565 @ref{Quoting other voices},
2566 @ref{Using music functions}.
2567
2568 Snippets:
2569 @rlsr{Vocal music}.
2570
2571 Internals Reference:
2572 @rinternals{InstrumentSwitch},
2573 @rinternals{CueVoice}.
2574
2575 @knownissues
2576 @code{\cueDuring} automatically inserts a @code{CueVoice} context
2577 and all cue notes are placed in that context.  This means it is not
2578 possible to have two overlapping sequences of cue notes by this
2579 technique.  Overlapping sequences could be entered by explicitly
2580 declaring separate @code{CueVoice} contexts and using
2581 @code{\quoteDuring} to extract and insert the cue notes.
2582
2583
2584 @node Spoken music
2585 @unnumberedsubsubsec Spoken music
2586
2587 @cindex parlato
2588 @cindex Sprechgesang
2589 Such effects as @q{parlato} or @q{Sprechgesang} require performers to speak
2590 without pitch but still with rhythm; these are notated by cross
2591 note heads, as demonstrated in @ref{Special note heads}.
2592
2593 @c TODO add "marking-notes-on-spoken-parts" snippet -vv
2594 @c add "showing the rhythm of a melody" snip
2595 @c add "one staff-line notation"
2596 @c add "improvisation" ref
2597 @c add "lyrics independents of notes" ref
2598
2599 @node Dialogue over music
2600 @unnumberedsubsubsec Dialogue over music
2601
2602 Dialogue over music is usually printed over the staves in an italic
2603 font, with the start of each phrase keyed in to a particular music
2604 moment.
2605
2606 For short interjections a simple markup suffices.
2607
2608 @lilypond[quote,verbatim,relative=2]
2609 a4^\markup { \smallCaps { Alex - } \italic { He's gone } } a a a
2610 a4 a a^\markup { \smallCaps { Bethan - } \italic Where? } a
2611 a4 a a a
2612 @end lilypond
2613
2614 For longer phrases it may be necessary to expand the music to make
2615 the words fit neatly.  There is no provision in LilyPond to do this
2616 fully automatically, and some manual intervention to layout the
2617 page will be necessary.
2618
2619 For long phrases or for passages with a lot of closely packed
2620 dialogue, using a Lyrics context will give better results.  The
2621 Lyrics context should not be associated with a music Voice; instead
2622 each section of dialogue should be given an explicit duration.  If
2623 there is a gap in the dialogue, the final word should be separated
2624 from the rest and the duration split between them so that the
2625 underlying music spaces out smoothly.
2626
2627 If the dialogue extends for more than one line it will be necessary
2628 to manually insert @code{\break}s and adjust the placing of the
2629 dialogue to avoid running into the right margin.  The final word of
2630 the last measure on a line should also be separated out, as above.
2631
2632 Here is an example illustating how this might be done.
2633
2634 @c This should be a snippet, but it can't be as it needs to be
2635 @c manually adjusted to suit the imposed line length.  -td
2636
2637 @lilypond[quote,verbatim,ragged-right]
2638 music = \relative c'' {
2639   \repeat unfold 3 { a4 a a a }
2640 }
2641
2642 dialogue = \lyricmode {
2643   \markup {
2644     \fontsize #1 \upright \smallCaps Abe:
2645     "Say this over measures one and"
2646   }4*7
2647   "two"4 |
2648   \break
2649   "and this over measure"4*3
2650   "three"4 |
2651 }
2652
2653 \score {
2654   <<
2655     \new Lyrics \with {
2656       \override LyricText #'font-shape = #'italic
2657       \override LyricText #'self-alignment-X = #LEFT
2658     }
2659     { \dialogue }
2660     \new Staff {
2661       \new Voice { \music }
2662     }
2663   >>
2664 }
2665 @end lilypond
2666
2667 @c TODO show use of \column to produce dialogue on two lines
2668
2669 @seealso
2670 Notation Reference:
2671 @ref{Manual syllable durations},
2672 @ref{Text}.
2673
2674 Internal Reference:
2675 @rinternals{LyricText}.
2676
2677
2678 @node Chants psalms and hymns
2679 @subsection Chants psalms and hymns
2680
2681 @cindex chants
2682 @cindex psalms
2683 @cindex hymns
2684 @cindex religious music
2685
2686 The music and words for chants, psalms and hymns usually follow a
2687 well-established format in any particular church.  Although the
2688 formats may differ from church to church the type-setting problems
2689 which arise are broadly similar, and are covered in this section.
2690
2691 @menu
2692 * References for chants and psalms::
2693 * Setting a chant::
2694 * Pointing a psalm::
2695 * Partial measures in hymn tunes::
2696 @end menu
2697
2698 @node References for chants and psalms
2699 @unnumberedsubsubsec References for chants and psalms
2700
2701 Typesetting Gregorian chant in various styles of ancient notation
2702 is described in @ref{Ancient notation}.
2703
2704 @seealso
2705 Notation reference:
2706 @ref{Ancient notation}.
2707
2708 Snippets:
2709 @rlsr{Vocal music}.
2710
2711
2712 @node Setting a chant
2713 @unnumberedsubsubsec Setting a chant
2714
2715 Modern chant settings use modern notation with varying numbers of
2716 elements taken from ancient notation.  Some of the elements and
2717 methods to consider are shown here.
2718
2719 Chants often use quarter notes without stems to indicate the pitch,
2720 with the rhythm being taken from the spoken rhythm of the words.
2721
2722 @lilypond[verbatim,quote]
2723 stemOff = { \override Staff.Stem #'transparent = ##t }
2724
2725 \relative c' {
2726   \stemOff
2727   a'4 b c2 |
2728 }
2729
2730 @end lilypond
2731
2732 Chants often omit the bar lines or use shortened or dotted bar
2733 lines to indicate pauses in the music.  To omit all bar lines from
2734 all staves remove the bar line engraver completely:
2735
2736 @lilypond[verbatim,quote]
2737 \score {
2738   \new StaffGroup <<
2739     \new Staff {
2740       \relative c'' {
2741         a4 b c2 |
2742         a4 b c2 |
2743         a4 b c2 |
2744       }
2745     }
2746     \new Staff {
2747       \relative c'' {
2748         a4 b c2 |
2749         a4 b c2 |
2750         a4 b c2 |
2751       }
2752     }
2753   >>
2754   \layout {
2755     \context {
2756       \Staff
2757       \remove Bar_engraver
2758     }
2759   }
2760 }
2761 @end lilypond
2762
2763 Bar lines can also be removed on a staff-by-staff basis:
2764
2765 @lilypond[verbatim, quote]
2766 \score {
2767   \new ChoirStaff <<
2768     \new Staff
2769     \with { \remove Bar_engraver } {
2770       \relative c'' {
2771         a4 b c2 |
2772         a4 b c2 |
2773         a4 b c2 |
2774       }
2775     }
2776     \new Staff {
2777       \relative c'' {
2778         a4 b c2 |
2779         a4 b c2 |
2780         a4 b c2 |
2781       }
2782     }
2783   >>
2784 }
2785 @end lilypond
2786
2787 To remove bar lines from just a section of music treat it as a
2788 cadenza.  If the section is long you may need to insert dummy
2789 barlines with @code{\bar ""} to show where the line should break.
2790
2791 @lilypond[verbatim,quote,relative=2]
2792 a4 b c2 |
2793 \cadenzaOn
2794 a4 b c2
2795 a4 b c2
2796 \bar ""
2797 a4 b c2
2798 a4 b c2
2799 \cadenzaOff
2800 a4 b c2 |
2801 a4 b c2 |
2802 @end lilypond
2803
2804 Rests or pauses in chants can be indicated by modified bar lines.
2805
2806 @lilypond[verbatim, quote,relative=2]
2807 a4
2808 \cadenzaOn
2809 b c2
2810 a4 b c2
2811 \bar "'"
2812 a4 b c2
2813 a4 b c2
2814 \bar ":"
2815 a4 b c2
2816 \bar "dashed"
2817 a4 b c2
2818 \bar "||"
2819 @end lilypond
2820
2821 Alternatively, the notation used in Gregorian chant for pauses or
2822 rests is sometimes used even though the rest of the notation is
2823 modern.  This uses a modified @code{\breathe} mark:
2824
2825 @lilypond[verbatim,quote]
2826 divisioMinima = {
2827   \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-minima
2828   \once \override BreathingSign  #'Y-offset = #0
2829   \breathe
2830 }
2831 divisioMaior = {
2832   \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-maior
2833   \once \override BreathingSign  #'Y-offset = #0
2834   \breathe
2835 }
2836 divisioMaxima = {
2837   \once \override BreathingSign  #'stencil = #ly:breathing-sign::divisio-maxima
2838   \once \override BreathingSign  #'Y-offset = #0
2839   \breathe
2840 }
2841 finalis = {
2842   \once \override BreathingSign  #'stencil = #ly:breathing-sign::finalis
2843   \once \override BreathingSign  #'Y-offset = #0
2844   \breathe
2845 }
2846
2847 \score {
2848   \relative c'' {
2849     g2 a4 g
2850     \divisioMinima
2851     g2 a4 g
2852     \divisioMaior
2853     g2 a4 g
2854     \divisioMaxima
2855     g2 a4 g
2856     \finalis
2857   }
2858   \layout {
2859     \context {
2860       \Staff
2861       \remove Bar_engraver
2862     }
2863   }
2864 }
2865 @end lilypond
2866
2867 Chants usually omit the time signature and often omit the clef too.
2868
2869 @lilypond[verbatim,quote]
2870 \score {
2871   \new Staff {
2872     \relative c'' {
2873       a4 b c2 |
2874       a4 b c2 |
2875       a4 b c2 |
2876     }
2877   }
2878   \layout {
2879     \context {
2880       \Staff
2881       \remove Bar_engraver
2882       \remove Time_signature_engraver
2883       \remove Clef_engraver
2884     }
2885   }
2886 }
2887 @end lilypond
2888
2889 Chants for psalms in the Anglican tradition are usually either
2890 @emph{single}, with 7 bars of music, or @emph{double}, with two lots
2891 of 7 bars.  Each group of 7 bars is divided into two halves,
2892 corresponding to the two halves of each verse, usually separated by
2893 a double bar line.  Only whole and half notes are used.  The 1st bar
2894 in each half always contains a single chord of whole notes.  This is
2895 the @qq{reciting note}.  Chants are usually centered on the page.
2896
2897 @lilypond[verbatim,quote]
2898 SopranoMusic = \relative g' {
2899   g1 | c2 b | a1 | \bar "||"
2900   a1 | d2 c | c b | c1 | \bar "||"
2901 }
2902
2903 AltoMusic = \relative c' {
2904   e1 | g2 g | f1 |
2905   f1 | f2 e | d d | e1 |
2906 }
2907
2908 TenorMusic = \relative a {
2909   c1 | c2 c | c1 |
2910   d1 | g,2 g | g g | g1 |
2911 }
2912
2913 BassMusic =  \relative c {
2914   c1 | e2 e | f1 |
2915   d1 | b2 c | g' g | c,1 |
2916 }
2917
2918 global = {
2919   \time 2/2
2920 }
2921
2922 % Use markup to center the chant on the page
2923 \markup {
2924   \fill-line {
2925     \score {  % centered
2926       <<
2927         \new ChoirStaff <<
2928           \new Staff <<
2929             \global
2930             \clef "treble"
2931             \new Voice = "Soprano" <<
2932               \voiceOne
2933               \SopranoMusic
2934             >>
2935             \new Voice = "Alto" <<
2936               \voiceTwo
2937               \AltoMusic
2938             >>
2939           >>
2940           \new Staff <<
2941             \clef "bass"
2942             \global
2943             \new Voice = "Tenor" <<
2944               \voiceOne
2945               \TenorMusic
2946             >>
2947             \new Voice = "Bass" <<
2948               \voiceTwo
2949               \BassMusic
2950             >>
2951           >>
2952         >>
2953       >>
2954       \layout {
2955         \context {
2956           \Score
2957           \override SpacingSpanner
2958           #'base-shortest-duration = #(ly:make-moment 1 2)
2959         }
2960         \context {
2961           \Staff
2962           \remove "Time_signature_engraver"
2963         }
2964       }
2965     }  % End score
2966   }
2967 }  % End markup
2968 @end lilypond
2969
2970 Some other approaches to setting such a chant are shown in the first
2971 of the following snippets.
2972
2973 @snippets
2974
2975 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
2976 {chant-or-psalms-notation.ly}
2977
2978 Canticles and other liturgical texts may be set more freely, and
2979 may use notational elements from ancient music.  Often the words
2980 are shown underneath and aligned with the notes.  If so, the notes
2981 are spaced in accordance with the syllables rather than the notes'
2982 durations.
2983
2984 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
2985 {ancient-notation-template----modern-transcription-of-gregorian-music.ly}
2986
2987 @seealso
2988 Learning Manual:
2989 @rlearning{Visibility and color of objects},
2990 @rlearning{Vocal ensembles}.
2991
2992 Notation Reference:
2993 @ref{Ancient notation},
2994 @ref{Bar lines},
2995 @ref{Modifying context plug-ins},
2996 @ref{Typesetting Gregorian chant},
2997 @ref{Unmetered music},
2998 @ref{Visibility of objects}.
2999
3000
3001 @node Pointing a psalm
3002 @unnumberedsubsubsec Pointing a psalm
3003
3004 The words to an Anglican psalm are usually printed in separate
3005 verses centered underneath the chant.
3006
3007 Single chants (with 7 bars) are repeated for every verse.  Double
3008 chants (with 14 bars) are repeated for every pair of verses.  Marks
3009 are inserted in the words to show how they should be fitted to the
3010 chant.  Each verse is divided into two halves.  A colon is usually
3011 used to indicate this division.  This corresponds to the double bar
3012 line in the music.  The words before the colon are sung to the first
3013 three bars of music; the words after the colon are sung to the last
3014 four bars.
3015
3016 Single bar lines (or in some psalters an inverted comma or similar
3017 symbol) are inserted between words to indicate where the bar lines
3018 in the music fall.  In markup mode a single bar line can be entered
3019 with the bar check symbol, @code{|}.
3020
3021 @lilypond[verbatim,quote]
3022 \markup {
3023   \fill-line {
3024     \column {
3025       \left-align {
3026         \line { O come let us sing | unto the | Lord : let }
3027         \line { us heartily rejoice in the | strength of | our }
3028         \line { sal- | -vation. }
3029       }
3030     }
3031   }
3032 }
3033 @end lilypond
3034
3035 Other symbols may require glyphs from the @code{fetaMusic} fonts.
3036 For details, see @ref{Fonts}.
3037
3038 @lilypond[verbatim,quote]
3039 tick = \markup {
3040   \raise #1 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
3041 }
3042 \markup {
3043   \fill-line {
3044     \column {
3045       \left-align {
3046         \line { O come let us sing \tick unto the \tick Lord : let }
3047         \line {
3048           us heartily rejoice in the \tick strength of \tick our
3049         }
3050         \line { sal \tick vation. }
3051       }
3052     }
3053   }
3054 }
3055 @end lilypond
3056
3057 Where there is one whole note in a bar all the words corresponding
3058 to that bar are recited on that one note in speech rhythm.  Where
3059 there are two notes in a bar there will usually be only one or two
3060 corresponding syllables.  If there are more that two syllables a
3061 dot is usually inserted to indicate where the change in note occurs.
3062
3063 @lilypond[verbatim,quote]
3064 dot = \markup {
3065   \raise #0.7 \musicglyph #"dots.dot"
3066 }
3067 tick = \markup {
3068   \raise #1 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
3069 }
3070 \markup {
3071   \fill-line {
3072     \column {
3073       \left-align {
3074         \line {
3075           O come let us sing \tick unto \dot the \tick Lord : let
3076         }
3077         \line {
3078           us heartily rejoice in the \tick strength of \tick our
3079         }
3080         \line { sal \tick vation. }
3081       }
3082     }
3083   }
3084 }
3085 @end lilypond
3086
3087 In some psalters an asterisk is used to indicate a break in a
3088 recited section instead of a comma, and stressed or slightly
3089 lengthened syllables are indicated in bold text.
3090
3091 @lilypond[verbatim,quote]
3092 dot = \markup {
3093   \raise #0.7 \musicglyph #"dots.dot"
3094 }
3095 tick = \markup {
3096   \raise #1 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
3097 }
3098 \markup {
3099   \fill-line {
3100     \column {
3101       \left-align {
3102         \line { Today if ye will hear his voice * }
3103         \line {
3104           \concat { \bold hard en }
3105           | not your | hearts : as in the pro-
3106         }
3107         \line { vocation * and as in the \bold day of tempt- | }
3108         \line { -ation | in the | wilderness. }
3109       }
3110     }
3111   }
3112 }
3113 @end lilypond
3114
3115 In other psalters an accent is placed over the syllable to indicate
3116 stress.
3117
3118 @lilypond[verbatim,quote]
3119 tick = \markup {
3120   \raise #2 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
3121 }
3122 \markup {
3123   \fill-line {
3124     \column {
3125       \left-align {
3126         \line {
3127           O come let us \concat {
3128             si \combine \tick ng
3129           }
3130           | unto the | Lord : let
3131         }
3132         \line {
3133           us heartily \concat {
3134             rejo \combine \tick ice
3135           }
3136           in the | strength of | our
3137         }
3138         \line { sal- | -vation. }
3139       }
3140     }
3141   }
3142 }
3143 @end lilypond
3144
3145 The use of markup to center text, and arrange lines in columns is
3146 described in @ref{Formatting text}.
3147
3148 Most of these elements are shown in one or other of the two verses
3149 in the template, see @qq{Psalms} in @rlearning{Vocal ensembles}.
3150
3151 @seealso
3152 Learning Manual:
3153 @rlearning{Vocal ensembles}.
3154
3155 Notation Reference:
3156 @ref{Fonts},
3157 @ref{Formatting text}.
3158
3159
3160 @node Partial measures in hymn tunes
3161 @unnumberedsubsubsec Partial measures in hymn tunes
3162
3163 Hymn tunes frequently start and end every line of music with
3164 partial measures so that each line of music corresponds exactly
3165 with a line of text.  This requires a @code{\partial} command at
3166 the start of the music and @code{\bar "|"} or @code{\bar "||"}
3167 commands at the end of each line.
3168
3169 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
3170 {hymn-template.ly}
3171
3172
3173 @node Ancient vocal music
3174 @subsection Ancient vocal music
3175
3176 Ancient vocal music is supported, as explained in @ref{Ancient notation}.
3177
3178 @c TODO
3179
3180 @c Add "Printing both the ancient and the modern clef in vocal music" snippet,
3181 @c and "Transcription of Ancient music with incipit" snippet. -vv
3182
3183 @seealso
3184 Notation Reference:
3185 @ref{Ancient notation}.
3186
3187
3188
3189