Next: , Previous: Hyphens and extenders, Up: Vocal music


7.3.4 The Lyrics context

Lyrics are printed by interpreting them in the context called Lyrics.

\new Lyrics \lyricmode ...

This will place the lyrics according to the durations that were entered. The lyrics can also be aligned under a given melody automatically. In this case, it is no longer necessary to enter the correct duration for each syllable. This is achieved by combining the melody and the lyrics with the \lyricsto expression

\new Lyrics \lyricsto name ...

This aligns the lyrics to the notes of the Voice context called name, which must already exist. Therefore normally the Voice is specified first, and then the lyrics are specified with \lyricsto. The command \lyricsto switches to \lyricmode mode automatically, so the \lyricmode keyword may be omitted.

The following example uses different commands for entering lyrics.

     
     <<
       \new Voice = "one" \relative c'' {
         \autoBeamOff
         \time 2/4
         c4 b8. a16 g4. f8 e4 d c2
       }
       \new Lyrics \lyricmode { Joy4 to8. the16 world!4. the8 Lord4 is come.2 }
       \new Lyrics \lyricmode { Joy to the earth! the Sa -- viour reigns. }
       \new Lyrics \lyricsto "one" { No more let sins and sor -- rows grow. }
     >>

[image of music]

The second stanza is not properly aligned because the durations were not specified. A solution for that would be to use \lyricsto.

The \addlyrics command is actually just a convenient way to write a more complicated LilyPond structure that sets up the lyrics.

{ MUSIC }
\addlyrics { LYRICS }

is the same as

\new Voice = "blah" { music }
\new Lyrics \lyricsto "blah" { LYRICS }

For different or more complex orderings, the best way is to setup the hierarchy of staves and lyrics first, e.g.,

\new ChoirStaff <<
  \new Voice = "soprano" { music }
  \new Lyrics = "sopranoLyrics" { s1 }
  \new Lyrics = "tenorLyrics" { s1 }
  \new Voice = "tenor" { music }
>>

and then combine the appropriate melodies and lyric lines

\context Lyrics = sopranoLyrics \lyricsto "soprano"
  the lyrics

The final input would resemble

<<\new ChoirStaff << setup the music >>
  \lyricsto "soprano" etc
  \lyricsto "alto" etc
  etc
>>

See also

Program reference: LyricCombineMusic, Lyrics.


Next: , Previous: Hyphens and extenders, Up: Vocal music

This page is for LilyPond-2.10.33 (stable-branch).

Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.