Switching the melody associated with a lyrics line - GNU LilyPond
Description: GNU LilyPond

Next: Specifying melismata within the lyrics, Previous: Divisi lyrics, Up: Flexibility in placement

##### 7.3.7.3 Switching the melody associated with a lyrics line

More complex variations in text underlay are possible. It is possible to switch the melody for a line of lyrics during the text. This is done by setting the `associatedVoice` property. In the example

the text for the first stanza is set to a melody called “lahlah”,

    \new Lyrics \lyricsto "lahlah" {
      Ju -- ras -- sic Park
    }

The second stanza initially is set to the `lahlah` context, but for the syllable “ran”, it switches to a different melody. This is achieved with

    \set associatedVoice = alternative

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

Again, the command must be one syllable too early, before “Ty” in this case.

    \new Lyrics \lyricsto "lahlah" {
      \set associatedVoice = alternative % applies to "ran"
      Ty --
      ran --
      no --
      \set associatedVoice = lahlah % applies to "rus"
      sau -- rus Rex
    }

The underlay is switched back to the starting situation by assigning `lahlah` to `associatedVoice`.

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

Other languages: English.
Using automatic language selection.