bug-lilypond
[Top][All Lists]
Advanced

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

Re: Percents repeats confused by polyphony


From: Neil Puttock
Subject: Re: Percents repeats confused by polyphony
Date: Fri, 16 Apr 2010 00:38:17 +0100

On 13 April 2010 02:51, Mark Polesky <address@hidden> wrote:

> Neil, sometimes your lateral thinking is just too much for
> me!  I'd be curious to understand this connection if it
> doesn't require too much explanation.  Or is this documented
> somewhere?

When you have implicit contexts, they don't get created until
absolutely necessary.  So in your snippet, until a Voice-level
property set arrives, the only context is the toplevel one: Global.
It doesn't matter what the property setting is; as I pointed out, even
a bogus property works, since LilyPond will still do the setting even
if it complains that it can't find a property check.

I don't know why the late Voice arrival (once the noteheads are parsed
inside the \repeat block) should affect the paper column retrieval for
the first percent repeat; it's slightly mysterious as to what happens
to the column between being cached in
Percent_repeat_engraver::start_translation_timestep () (it exists at
this point) and being set as the left bound in
Percent_repeat_engraver::process_music () (it's disappeared into the
ether).

>
>> Adding an initialize () method to ensure the paper column
>> for the spanner bound exists would work, though I'm not
>> sure whether it's the right fix.
>
> Is this something you plan to figure out, or should we add
> it to the tracker?

There's not much to figure out: just add an initialize () method which
does the following:

void
Percent_repeat_engraver::initialize ()
{
  first_command_column_ = unsmob_grob (get_property ("currentCommandColumn"));
}

This will be called whenever a new Voice context is created.

OTOH, we could just chalk it up as another quirk of the way implicit
voices are created and leave it as it is. :)

Cheers,
Neil




reply via email to

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