lilypond-devel
[Top][All Lists]
Advanced

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

Re: New repeat type


From: Knut Petersen
Subject: Re: New repeat type
Date: Thu, 31 Aug 2017 11:57:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

Hi Dan!

The disease is that Lilypond needs to see lyrics for multiple stanzas encoded as simultaneous music in order to set them one below another, and the right action is to cure that, not to infect \repeat.

Well, at least it is possible to define lyrics within a stanza in a way to 
produce the correct results with bold unfold and not unfolded repeats.

\version "2.21.0"

melody = { \relative { \repeat volta 2 { c''4 4 4 4 } \alternative { { d2 2 } { 
e2 2 } } c1 } }
lyricA = \lyricmode { \repeat volta 2 { a a a a } \alternative { { b b } { c c 
} } d }
lyricB = \lyricmode { \repeat volta 2 { e e e e } \alternative { { f f } { g g 
} } h }


{
    { \melody \bar "|." }
    \addlyrics { \set stanza = #"1. " \lyricA }
    \addlyrics { \set stanza = #"2. " \lyricB }
}


\unfoldRepeats {
    { \melody \bar "|." }
    \addlyrics { \set stanza = #"1. " \lyricA }
    \addlyrics { \set stanza = #"2. " \lyricB }
}

%
% Do you look for a function named e.g \unfoldStanzas to be used like e.g.
%
%   \unfoldStanzas \unfoldRepeats {
%       { \melody \bar "|." }
%       \addlyrics { \set stanza = #"1. " \lyricA }
%       \addlyrics { \set stanza = #"2. " \lyricB }
%   }
%
% that should produce something like
%

\unfoldRepeats {
    { \melody \bar "||" \melody \bar "|." }
    \addlyrics { \lyricA \lyricB }
}

I don't think that such a function would be very useful, think about dynamics 
etc.

Knut



reply via email to

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