Hello,

I have alternative versions of lyrics text, which I would like to export in different files (or \book blocks). The music, order of staves, etc. is identical.

Ideally, I would want to do this as cleanly and with as little code duplication as possible.

%%%

music = { c'4 d' e' }
lyricsOne = \lyricmode { do re mi }
lyricsTwo = \lyricmode { a b c }

%% Somehow, store the structure of the score in a variable and substitute lyrics later? %% This is not so bad, but the actual use case has more staves, properties in \with, etc. %% and the file has managed to get than 1,000 lines long (with the actual notes and
%% lyrics being in different files; just the \books).

\book {
    \new Staff << \music \addlyrics \lyricsOne \addlyrics \lyricsTwo >>
}

\book {
    \new Staff << \music \addlyrics \lyricsOne >>
}

\book {
    \new Staff << \music \addlyrics \lyricsTwo >>
}

%%%

Thank you.


Reply via email to