bug-lilypond
[Top][All Lists]
Advanced

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

Re: Bug with alternativeRestores


From: James Lowe
Subject: Re: Bug with alternativeRestores
Date: Mon, 23 Apr 2018 22:19:05 +0100 (BST)

Hello Steven

On Mon, 23 Apr 2018 19:33:34 +0000, Steven Weber <address@hidden> wrote:

> No, that is the problem.  If you look at the file, you'll see in the first 
> example, I switch the time from 2/2 to 3/4 in the first alternative, and then 
> Lilypond automatically returns the second alternative to 2/2 time.  However, 
> when I do the metadata/notes in separate variables, the automatic switch from 
> 3/4 back to 2/2 does not occur (and hence, you get all the barcheck errors).
> 
> --Steven
> 
> On 4/23/18, 11:59 AM, "James Lowe" <address@hidden> wrote:
> 
>     Hello,
>     
>     On Thu, 29 Mar 2018 19:53:05 +0000, Steven Weber <address@hidden> wrote:
>     
>     > AlternativeRestores seem to work fine as long as your metadata & notes 
> are in the same block.  If you separate them into a metadata variable and a 
> notes variable, the second alternative is always in the same time signature 
> as the first alternative.
>     > 
>     > This is against lilypond 2.19.81 on Windows.
>     > 
>     > --Steven
>     
>     Your example is giving me barcheck errors for those entries using the 
> \skip values.
>     
>     Is this just a problem with your example?
>     
>     James
> 
> 

We also had this reported by another user last year - something was nagging me 
at the back of my brain that I'd seen this recently, and so I dug back through 
the bug list emails and found it:

https://lists.gnu.org/archive/html/bug-lilypond/2017-09/msg00022.html

(not so recent I guess)

and I didn't see any reply/confirmation of this being a bug by those that know 
about development.

The workaround from the other user is to explicitly put the time signature 
directly in the alternate's construct .

e.g

metadata =
{
        \time 2/2
        \clef bass

        \repeat volta 2 { \skip 1*2/2*1 | }
        \alternative
        {
                { \time 3/4 \skip 1*3/4*1 | }
                { \time 2/2 \skip 1*2/2*1 | } % <---- add the \time 2/2 here
        }
        \skip 1*2/2*1 |
}

notes = 
{
        \repeat volta 2 { c2 e | }
        \alternative
        {
                { f4 e d | }
                { \time 2/2 f2 d | } % <---- add the \time 2/2 here
        }
        g1 |
}

Then it compiles (without bar check warnings) OK as far as I can tell.

I think that LilyPond is just not able to cope with the ambiguity of the mix of 
time signatures in the alternate repeats when you use a << >> construct. 

So the issue is (again I think I am not qualified to say for certain) not with 
the alternate restores but the simultaneous construct but I don't think this is 
a bug but a feature.

Maybe others in the dev team can comment and perhaps we can add something to 
the doc (if it is not a bug) as a 'Known issue'.

Regards

James


reply via email to

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