lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Would you donate for structured Lilypond variables? (was: Conditionally


From: David Kastrup
Subject: Would you donate for structured Lilypond variables? (was: Conditionally including lyrics)
Date: Tue, 06 Dec 2011 12:33:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

Marc Hohl <address@hidden> writes:

> Am 02.12.2011 17:44, schrieb David Kastrup:
>> Marc Hohl<address@hidden>  writes:
>>
>>> Am 02.12.2011 12:02, schrieb David Kastrup:
>>>> Marc Hohl<address@hidden>   writes:
>>>>
>>>>> Hello list,
>>>>>
>>>>> I have a lot of small music pieces with several stanzas which I store
>>>>> like this
>>>>>
>>>>> textA = \lyricmode {
>>>>>     \set stanza = "1. "
>>>>>     this is the first stan -- za.
>>>>> }
>>>>>
>>>>> textB = \lyricmode {
>>>>>     \set stanza = "2. "
>>>>>     and this one is the se -- cond.
>>>>> }
>>>>>
>>>>> textC = ...
>>>> Why?  If you want them processed automatically, why do you put them into
>>>> dissociated macros and expect Lilypond to go hunting for them?
>>> How would you store several stanzas? It seemed very straightforward to use
>>> one variable (or macro) for one stanza.
>>>> It is reasonably easy to generate symbol names, check whether there is
>>>> anything bound to them, and collect them into some music, but it is also
>>>> arbitrary and error-prone.
>>>>
>>>> Is there a particular reason you want your stanzas to be stored in a
>>>> manner not useful for the processing you plan to do with them?
>>> Well, this was the easiest way that came into my mind, but it may be
>>> complete nonsens
>>> to do so - any more powerful ideas are highly appreciated.
>> Why not just one
>> \addlyrics { ... }
>>
>> after the other?  That's how you would put them into your document,
>> wouldn't it?
> Well, yes and no. I want to have the ability to
> a) use every stanza with \addlyrics
> b) use only the first stanza with \addlyrics and print additional
> stanzas as a text markup below the score.
>
> So ideally, I have one template for each output format, and squeeze
> my pile of songs through the appropriate template.

You can already do something like

$(module-ref (current-module) (string->symbol (format #f "text~a" letter)))

to call a symbol by name (ugh, by the way).

Going through the symbol name is what TeX freaks will do at the drop of
a head ("Off with his \csname!").  I'd prefer a somewhat more structured
approach.  But it would be work.

Check out <URL:http://code.google.com/p/lilypond/issues/detail?id=2072>.
If enough people consider this worthwhile to contribute an appropriate
donation towards its implementation, I'll be doing the infrastructure
and docs for vectors in a manner that makes this extensible to other
tasks.

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]