parallelStaffs = #(define-music-function (parser location firstStaff firstLyrics
secondStaff secondLyrics)
(ly:music? ly:xxx? ly:music? ly:xxx?)
#{ <<
\context Staff = "StaffOne" {
\context Voice = "VoiceOne" {
$firstStaff
}
\context Lyrics = "LyricsOne" \lyricmode {
\set associatedVoice = #"VoiceOne"
$firstLyrics
}
}
\context Staff = "StaffTwo" {
\context Voice = "VoiceTwo" {
$secondStaff
}
\context Lyrics = "LyricsTwo" \lyricmode {
\set associatedVoice = #"VoiceTwo"
$secondLyrics
}
}
>>
#})
intro = \parallelStaffs
{c''4 c''}
{ ala ala }
{c'4 c'}
{ alb alb }
verse = \parallelStaffs
{d''4 d''}
{ bla bla }
{d'4 d'}
{ blb blb }
\score {
{
\intro
\verse
}
}