lilypond-devel
[Top][All Lists]
Advanced

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

Re: Colored box behind a single note


From: David Kastrup
Subject: Re: Colored box behind a single note
Date: Fri, 26 Jul 2019 20:42:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Werner LEMBERG <address@hidden> writes:

>>>    if (d == STOP)
>>>      {
>>>        pop_count_++;
>>> -      if (pop_count_ > bracket_stack_.size ())
>>> +
>>> +      // Since N `L' events create N HorizontalBracket grobs we need (at
>>> +      // most) N `R' events to finish them.  However, at this particular
>>> +      // moment, a single-moment horizontal bracket might be created also;
>>> +      // this takes another `L' event (which might not have caused a new
>>> +      // element on `bracket_stack' yet) and its corresponding `R' event.
>>> +      if (pop_count_ > bracket_stack_.size () + 1)
>>>          ev->origin ()->warning (_ ("do not have that many brackets"));
>>>      }
>> 
>> "which might not have caused a new element"?  That sounds like this
>> may or may not suppress an actually warranted warning.
>> 
>> Correct?
>
> Right, thanks for noticing.  I've fixed this – to a certain extent,
> see comments in the attached new version of the patch.
>
> If someone is going to rewrite the algorithm, the order of events
> should be obeyed.

For simultaneous events, LilyPond has no order.  That's why one needs to
have one phase for recording events and another for doing something
based on them.

There is a very tricky exception in order to distinguish

[Some override] \grace { ...

from

\grace { [Some override] ...

since \grace itself overrides a number of properties (mostly sizes) and
the order needs to be heeded.  The grace iterator creates special events
for that purpose.

Maybe the infamous issue 34 could be tackled as part of that mechanism?
Not sure about that.

-- 
David Kastrup



reply via email to

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