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