[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Conditionally including lyrics
From: |
Johan Vromans |
Subject: |
Re: Conditionally including lyrics |
Date: |
Fri, 02 Dec 2011 12:36:57 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Marc Hohl <address@hidden> writes:
> Has someone an idea
> how to create a loop which scans for textA, textB, textC etc. and puts
> a command that acts like
> \addlyrics for each hit?
This is exactly what I do in my LP templates :)
I just define
highMusic
leadMusic
highWords
highAWords
highBWords
and so on, and the templates will process exactly what has been defined,
leaving out the undefined parts.
I found \ifDefined and friends (attached) helpful to write the templates.
So it boils down to something like:
% Add lyrics if requestes.
\ifDefinedThen \leadWords \new Lyrics \lyricsto \voiceName \ifDefined
\leadWords
\ifDefinedThen \leadAWords \new Lyrics \lyricsto \voiceName \ifDefined
\leadAWords
\ifDefinedThen \leadBWords \new Lyrics \lyricsto \voiceName \ifDefined
\leadBWords
\ifDefinedThen \leadCWords \new Lyrics \lyricsto \voiceName \ifDefined
\leadCWords
So it is not exactly scanning, but there's no problem in adding as many
cases as necessary.
The real templates are more generic than the above example.
BTW: I'd be happy to share these templates to LSR but the snippet repo
(still) cannot handle template collections.
-- Johan
ifdefined.ly
Description: Binary data
- Re: Conditionally including lyrics, (continued)
- Re: Conditionally including lyrics, David Kastrup, 2011/12/02
- Re: Conditionally including lyrics, Marc Hohl, 2011/12/02
- Would you donate for structured Lilypond variables? (was: Conditionally including lyrics), David Kastrup, 2011/12/06
- Re: Would you donate for structured Lilypond variables?, Marc Hohl, 2011/12/06
- Re: Would you donate for structured Lilypond variables?, David Kastrup, 2011/12/06
Re: Conditionally including lyrics, Matthew Collett, 2011/12/02
Re: Conditionally including lyrics, Jan-Peter Voigt, 2011/12/02
Re: Conditionally including lyrics,
Johan Vromans <=
Re: Conditionally including lyrics, Jay Anderson, 2011/12/03