Adding dynamics marks to stanzas

Stanzas differing in loudness may be indicated by putting a dynamics mark before each stanza. In LilyPond, everything coming in front of a stanza goes into the StanzaNumber object; dynamics marks are no different. For technical reasons, you have to set the stanza outside \lyricmode:

text = {
  \set stanza = \markup { \dynamic "ff" "1. " }
  \lyricmode {
    Big bang

  \new Voice = "tune" {
    \time 3/4
    g'4 c'2
\new Lyrics \lyricsto "tune" \text

[image of music]

LilyPond — Notation Reference v2.25.8 (development-branch).