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