lilypond-user
[Top][All Lists]
Advanced

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

Re: Problem with repeat alternative endings that contain lyricsandleadin


From: Trevor Daniels
Subject: Re: Problem with repeat alternative endings that contain lyricsandleading rests
Date: Sun, 7 Jun 2015 21:50:10 +0100

Trevor Daniels wrote Wednesday, March 25, 2015 9:44 PM

> Nathan Ho wrote Wednesday, March 25, 2015 9:01 AM
> 
>> On Tue, Mar 24, 2015 at 7:42 PM, Peter Heisen
>> <address@hidden> wrote:
>>>
>>> The LilyPond notation reference, section 2.1.2,
>>> (http://www.lilypond.org/doc/v2.18/Documentation/notation/techniques-specific-to-lyrics)
>>> contains the following example of how to use lyrics in concert with repeat
>>> alternative endings.  It compiles fine in version 2.18.2, showing both the
>>> first and second endings complete with lyrics:
>>>
>>> [...]
>>>
>>> In the following modified example, the first beat of each ending has been
>>> changed to a rest, and a syllable removed from the lyrics to match.  Now
>>> when compiled, it shows two first endings and two second endings.?
>> 
>> It displays properly if you remove the \repeat ... \alternative
>> structure from the lyrics:
> ...
>> The reason is that the lyric code creates first and second endings
>> that line themselves up with the first lyric event they see, and it's
>> not aware of the rests going on in the Staff. So you get two
>> misaligned volta repeat systems, causing the funky output.
>> 
>> I'm not entirely sure how to enter the structure into the lyrics in a
>> way that lines up with the staff. Either way, I feel that the code in
>> the documentation is misleading.
> 
> Unfortunately there is no clear recipe for entering lyrics and 
> repeats which will work in all circumstances, as all the suggestions
> are work-arounds due to there being no well-defined interface in
> LilyPond for handling repeats in lyrics.  The presence of rests is
> a particular problem which does not figure in the examples in the
> Notation Reference.  Maybe it should, but the doc writers are
> always wary of increasing the length of these already very large
> manuals.

I hesitate to suggest this as it is such a hack, but if you need
to use \unfoldRepeats with lyrics and have \alternative blocks
which begin with rests, here is one way to achieve it: overlay the
rest with a hidden note and insert a skip in the lyrics using \null,
like this:

lyrest = << { \once \hideNotes b }
            { \new Voice { b\rest } } 
         >> 

\score { 
  <<
    \new Staff {
      \time 2/4
      \new Voice = "melody" {
        \relative c'' {
          a4 a a a
          \repeat volta 2 { b4 b }
          \alternative {
            { \lyrest b } 
            { \lyrest b } 
          }
        }
      }
    }
    \new Lyrics {
      \lyricsto "melody" {
        Not re -- peat -- ed.
        \repeat volta 2 { Re -- peat }
        \alternative { { 
          \markup \null twice. } { 
          \markup \null twice. } }
      }
    }
  >>
}

But there's no way I'm going to put this in the manual!

What I shall do, however, is add a warning about using 
repeat structures in lyrics when the \alternatives start
with a rest.

Trevor

reply via email to

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