lilypond-user
[Top][All Lists]
Advanced

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

Re: Using lyrics in a markup


From: jakob lund
Subject: Re: Using lyrics in a markup
Date: Sun, 23 Jan 2011 14:15:54 +0100

oops, forgot to reply to list (sorry about the extra spam Jan-Peter)

2011/1/23 jakob lund <address@hidden>:
> Hi again
>
> After fiddling some more with this, I came up with a simple solution.
> Instead of a string, a LineBreakEvent is inserted into the lyric --
> neither \lyricmode or \addlyrics complain about this, and the events
> doesn't seem to appear in the music output. This removes the need for
> the filter function.
>
> The lyrics->list function then recognizes the placeholders and
> replaces them with occurrences of the indicator string, which the
> verse command then uses to split the lines.
>
> It seems to work well, try it out.
>
> 2011/1/21 Jan-Peter Voigt <address@hidden>:
>> Hello again,
>>
>> so you would have to check (pseudo-scheme):
>> ...
>> (if (and (string? x)(string=? x 
>> "<someIndicatorStringNooneWouldEverUseInARealLyric>"))
>>        (<introduceNewLine> ...))
>
> There is no \linebreak or equivalent command in \markup, so what
> happens is that the list of syllables is cut at every occurrence of
> the indicator string, producing a list of lists. Then, a markup
> function is mapped over this list of lists, producing a list of
> markups; the resulting list of markups is then passed to
> make-column-markup, which produces the line breaks :-)
>
> :-)
>
> Jakob.
>
>> ...
>>
>> and this would probably be done in the (reduce-hyphens text)-method/function.
>>
>> If this works one could define a variable with the lyrics including the 
>> newlines. Then use it filtered with \lyricsto and markedup with \verse.
>>
>> Best regards,
>> Jan-Peter.
>>
>>
>> Am 20.01.2011 um 16:35 schrieb jakob lund:
>>
>>> 2011/1/20 Jan-Peter Voigt <address@hidden>:
>>>>> What do you think of allowing to define a additional "line break 
>>>>> character",
>>>>> for example ¶, which could be filtered out within \lyricsmode, and used 
>>>>> as a
>>>>> newline in the \verse?
>>>> Thats a good idea!
>>>>> So your input will look like
>>>>> \override Lyrics #'ignore-chars= #'(¶) % this is pseudo code!
>>>
>>> I guess this would mean that the Lyrics context would have to filter
>>> out the ¶ as it goes. A simpler version of the same idea could be
>>>
>>>  nl = \lyricmode { <someIndicatorStringNooneWouldEverUseInARealLyric> }
>>>
>>> and then use
>>>
>>>  words = \lyricmode { Toch -- ter \nl Zi -- on }
>>>
>>> then add a filter (a music function that calls music-filter) to use
>>> with addlyrics, like this
>>>
>>>  \addlyrics \removeLineBreakIndicators \words
>>>
>>> and then update the \verse macro to produce a new line for every
>>> occurence of the indicator.
>>> that should be doable...
>>>
>>> Jakob.
>>
>>
>>
>

Attachment: lyrics-to-text.ly
Description: Text Data


reply via email to

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