Alternate lyrics context for song sheets: Difference between revisions
Appearance
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series |
m New category Tags: Mobile edit Mobile web edit |
||
| (One intermediate revision by the same user not shown) | |||
| Line 62: | Line 62: | ||
[[Category:Vocal music]] | [[Category:Vocal music]] | ||
[[Category:Contexts and engravers]] | [[Category:Contexts and engravers]] | ||
[[Category:Snippet]] | |||
Latest revision as of 23:17, 21 November 2025
When preparing song sheets, it's sometimes useful to have the lyrics of all the verses inside the score, correctly lined up to the notes. However, this makes it easy for the singer to mix up verses -- especially when changing systems. A common solution is to alternate the display properties of the lyric lines. This snippet demonstrates how to use such an approach in LilyPond.
\version "2.24"
%% http://lsr.di.unimi.it/LSR/Item?id=641
%% Implement an alternate lyric context
\layout {
\context {
\Lyrics
\name AltLyrics
\alias Lyrics
\override StanzaNumber.font-series = #'medium
\override LyricText.font-shape = #'italic
\override LyricText.color = #(x11-color 'grey20)
}
\context {
\StaffGroup
\accepts AltLyrics
}
}
%% Doesn't do a lot, apart from avoid warnings when generating midi output
\midi {
\context {
\Lyrics
\name AltLyrics
\alias Lyrics
}
\context {
\StaffGroup
\accepts AltLyrics
}
}
<<
\new Staff {
\new Voice = "notes" \relative c' {
f4 a a a
}
}
\new Lyrics \lyricsto "notes" {
\set stanza = #"1."
Hey non -- ny no
}
\new AltLyrics \lyricsto "notes" {
\set stanza = #"2."
Fa la la la
}
\new Lyrics \lyricsto "notes" {
\set stanza = #"3."
Fid -- dle di dee
}
\new AltLyrics \lyricsto "notes" {
\set stanza = #"4."
Da da da dum
}
>>