9.3 Stanzas


9.3.1 Adding stanza numbers

Stanza numbers can be added with the setting \stanza command, e.g.,

\new Voice \relative {
  \time 3/4 g'2 e4 a2 f4 g2.
} \addlyrics {
  \stanza "1."
  Hi, my name is Bert.
} \addlyrics {
  \stanza "2."
  Oh, ché -- ri, je t'aime
}
[image of music]

These numbers are put just before the start of the first syllable. Two lines of a stanza can also be grouped together, for example in case of a repeat with different lyrics:

stanzaOneOne = \lyricmode {
  \stanza \markup {
    \column {
      \vspace #.2
      \line { "1." \left-brace #30 }
    }
  }
  Child, you’re mine and I love you.
  Lend thine ear to what I say.
}

stanzaOneThree = \lyricmode {
  Child, I have no great -- er joy
  Than to have you walk in truth.
}

\new Voice {
  \repeat volta 2 {
    c'8 c' c' c' c' c' c'4
    c'8 c' c' c' c' c' c'4
  }
}
\addlyrics { \stanzaOneOne }
\addlyrics { \stanzaOneThree }
[image of music]

9.3.2 Stanza reminders

Sometimes it is desirable to repeat the stanza numbers at the beginning of each system. This can be accomplished by setting the stanzaReminders context property:

\layout {
  \set stanzaReminders = ##t
}

\new Voice \relative {
  \key e \minor
  b'4 b a g
  fis2 e
  b'4 cis d b \break
  e2 dis
  e4 g fis fis
  e1
}
\addlyrics {
  \stanza "1."
  Je -- su, mei -- ne Freu -- de,
  mei -- nes Her -- zens Wei -- de,
  Je -- su, mei -- ne Zier.
}
\addlyrics {
  \stanza "2."
  Un -- ter dei -- nem Schir -- men
  bin ich vor den Stür -- men
  al -- ler Fein -- de frei.
}
\addlyrics {
  \stanza "3."
  Trotz dem al -- ten Dra -- chen,
  trotz des To -- des Ra -- chen,
  trotz der Furcht dar -- zu!
}
\addlyrics {
  \stanza "4."
  Weg mit al -- len Schät -- zen!
  Du bist mein Er -- göt -- zen,
  Je -- su, mei -- ne Lust!
}
\addlyrics {
  \stanza "5."
  Gu -- te Nacht, o We -- sen,
  das die Welt er -- le -- sen,
  mir ge -- fällst du nicht.
}
\addlyrics {
  \stanza "6."
  Weicht, ihr Trau -- er -- geis -- ter,
  denn mein Freu -- den -- meis -- ter,
  Je -- sus, tritt her -- ein.
}
[image of music]

By default, the stanza reminders are identical to their respective stanza numbers. By setting the stanzaReminderText property, this behavior can be changed, by either directly supplying a markup or by giving a function that accepts the original stanza number markup as an argument:

\new Voice \relative {
  \key e \minor
  b'4 b a g
  fis2 e \break
  b'4 cis d b
  e2 dis \break
  e4 g fis fis
  e1
}
\addlyrics {
  \stanza "1."
  \set stanzaReminders = ##t
  \set stanzaReminderText = #make-bracket-markup
  Je -- su, mei -- ne Freu -- de,
  mei -- nes Her -- zens Wei -- de,
  \set stanzaReminderText = "(1st)"
  Je -- su, mei -- ne Zier.
}
[image of music]

The \noStanza command resets the stanza number so that no subsequent automatic stanza reminders are printed:

\layout {
  \set stanzaReminders = ##t
}

\new Voice \relative {
  \repeat volta 2 {
    a'4 e a b
    c d b2
    a\fermata c4 b
    \break
    a b c d
    e1\fermata
  }
  e4 f g c, \break
  f e d2
  c2 \fermata
}
\addlyrics {
  \stanza "1."
  Herr, ich ha -- be miss -- ge -- han -- delt,
  ja mich drückt der Sün -- den Last;
  \noStanza
  und itzt wollt’ ich gern aus Schre -- cken
}
\addlyrics {
  \stanza "2."
  ich bin nicht den Weg ge -- wan -- delt,
  den du mir ge -- zei -- get hast;
}
[image of music]

9.3.3 Adding dynamics marks to stanzas

Stanzas differing in loudness may be indicated by putting a dynamics mark before each stanza. While there is no special support for such pre-stanza markings, they can easily be included in the stanza number itself:

<<
  \new Voice = tune {
    \time 3/4
    g'4 c'2
  }
  \new Lyrics \lyricsto tune {
    \stanza \markup { \dynamic ff 1. }
     Big bang
  }
>>
[image of music]

9.3.4 Adding singers’ names to stanzas

Names of singers can also be added. They are printed at the start of the line, just like instrument names. They are created by setting vocalName. A short version may be entered as shortVocalName.

\new Voice \relative {
  \time 3/4 g'2 e4 a2 f4 g2.
} \addlyrics {
  \set vocalName = "Bert"
  Hi, my name is Bert.
} \addlyrics {
  \set vocalName = "Ernie"
  Oh, ché -- ri, je t'aime
}
[image of music]

9.3.5 Stanzas with different rhythms

Often, different stanzas of one song are put to one melody in slightly differing ways. Such variations can still be captured with \lyricsto.

Ignoring melismata

One possibility is that the text has a melisma in one stanza, but multiple syllables in another. One solution is to make the faster voice ignore the melisma. This is done by setting ignoreMelismata in the Lyrics context.

<<
  \relative \new Voice = "lahlah" {
    \set Staff.autoBeaming = ##f
    c'4
    \slurDotted
    f8.[( g16])
    a4
  }
  \new Lyrics \lyricsto "lahlah" {
    more slow -- ly
  }
  \new Lyrics \lyricsto "lahlah" {
    go
    \set ignoreMelismata = ##t
    fas -- ter
    \unset ignoreMelismata
    still
  }
>>
[image of music]

Known issues and warnings

Unlike most \set commands, \set ignoreMelismata does not work if prefixed with \once. It is necessary to use \set and \unset to bracket the lyrics where melismata are to be ignored.

Adding syllables to grace notes

By default, grace notes (e.g., via \grace) do not get assigned syllables when using \lyricsto, but this behavior can be changed:

<<
  \new Voice = melody \relative {
    f'4 \appoggiatura a32 b4
    \grace { f16 a16 } b2
    \afterGrace b2 { f16[ a16] }
    \appoggiatura a32 b4
    \acciaccatura a8 b4
  }
  \new Lyrics
  \lyricsto melody {
    normal
    \set includeGraceNotes = ##t
    case,
    gra -- ce case,
    after -- grace case,
    \set ignoreMelismata = ##t
    app. case,
    acc. case.
  }
>>
[image of music]

Known issues and warnings

Like associatedVoice, includeGraceNotes needs to be set at latest one syllable before the one which is to be put under a grace note. In the case of a grace note at the very beginning of a piece of music, using a \with, or a \context block within \layout, is recommended:

<<
  \new Voice = melody \relative c' {
    \grace { c16( d e f }
    g1) f
  }
  \new Lyrics \with { includeGraceNotes = ##t }
  \lyricsto melody {
    Ah __ fa
  }
>>
[image of music]

Switching to an alternative melody

More complex variations in setting lyrics to music are possible. The melody to which the lyrics are being set can be changed from within the lyrics by setting the associatedVoice property:

<<
  \relative \new Voice = "lahlah" {
    \set Staff.autoBeaming = ##f
    c'4
    <<
      \new Voice = "alternative" {
        \voiceOne
        \tuplet 3/2 {
          % show associations clearly.
          \override NoteColumn.force-hshift = -3
          f8 f g
        }
      }
      {
        \voiceTwo
        f8.[ g16]
        \oneVoice
      } >>
    a8( b) c
  }
  \new Lyrics \lyricsto "lahlah" {
    Ju -- ras -- sic Park
  }
  \new Lyrics \lyricsto "lahlah" {
    % Tricky: need to set associatedVoice
    % one syllable too soon!
    \set associatedVoice = "alternative" % applies to "ran"
    Ty --
    ran --
    no --
    \set associatedVoice = "lahlah" % applies to "rus"
    sau -- rus Rex
  } >>
[image of music]

The text for the first stanza is set to the melody called ‘lahlah’ in the usual way, but the second stanza is set initially to the lahlah context and is then switched to the alternative melody for the syllables ‘ran’ to ‘sau’ by the lines:

\set associatedVoice = "alternative" % applies to "ran"
Ty --
ran --
no --
\set associatedVoice = "lahlah" % applies to "rus"
sau -- rus Rex

Here, alternative is the name of the Voice context containing the triplet.

Note the placement of the \set associatedVoice command – it appears to be one syllable too early, but this is correct.

Note: The \set associatedVoice command must be placed one syllable before the one at which the switch to the new voice is to occur. In other words, changing the associated Voice happens one syllable later than expected. This is for technical reasons, and it is not a bug.


9.3.6 Printing stanzas at the end

Sometimes it is appropriate to have one stanza set to the music, and the rest added in verse form at the end of the piece. This can be accomplished by adding the extra verses into a \markup section outside of the main score block. Notice that there are several different ways to force line breaks when using \markup. For inputting a whole string you may use \string-lines with manually inserted \n or automatic line breaks as entered or \wordwrap-string. If inner formatting code is used a combination of \line and \column is recommended.

melody = \relative {
  e' d c d | e e e e |
  d d e d | c1 | }

text = \lyricmode {
  \stanza "1."
  Ma- ry had a lit- tle lamb,
  its fleece was white as snow.
}

\score {
  <<
    \new Voice = "one" { \melody }
    \new Lyrics \lyricsto "one" \text
  >>
}

\markup \column \string-lines
  "Verse 2. \n Everywhere that Mary went \n The lamb was sure to go."

\markup \column \string-lines
  "Verse 3.
   All the children laughed and played,
   To see a lamb at school."

\markup \column {
  \line \italic { Verse 4. }
  \line { And so the teacher turned it out, }
  \line { But still it lingered near. }
}

\markup \wordwrap-string "
  Verse 5.

  Mary took it home again,

  It was against the rule."
[image of music]

9.3.7 Printing stanzas at the end in multiple columns

When a piece of music has many verses, they are often printed in multiple columns across the page. An outdented verse number often introduces each verse. The following example shows how to produce such output in LilyPond.

melody = \relative {
  c'4 c c c | d d d d
}

text = \lyricmode {
  \stanza "1." This is verse one.
  It has two lines.
}

\score {
  <<
    \new Voice = "one" { \melody }
    \new Lyrics \lyricsto "one" \text
  >>
  \layout { }
}

\markup {
  \fill-line {
    % moves the column off the left margin;
    % can be removed if space on the page is tight
    \hspace #0.1
    \column {
      \line { \bold "2."
        \column {
          "This is verse two."
          "It has two lines."
        }
      }
      % adds vertical spacing between verses
      \combine \null \vspace #0.1
      \line { \bold "3."
        \column {
          "This is verse three."
          "It has two lines."
        }
      }
    }
    % adds horizontal spacing between columns
    \hspace #0.1
    \column {
      \line { \bold "4."
        \column {
          "This is verse four."
          "It has two lines."
        }
      }
      % adds vertical spacing between verses
      \combine \null \vspace #0.1
      \line { \bold "5."
        \column {
          "This is verse five."
          "It has two lines."
        }
      }
    }
    % gives some extra space on the right margin;
    % can be removed if page space is tight
    \hspace #0.1
  }
}
[image of music]

See also

Internals Reference: LyricText, StanzaNumber.


LilyPond Notation Reference v2.27.0 (development-branch).