Next: , 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

[image of music]

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.


Next: , Previous: Divisi lyrics, Up: Flexibility in placement

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.