Re: Colored box behind a single note

2019-07-26 Thread David Kastrup
Werner LEMBERG writes: >>> If someone is going to rewrite the algorithm, the order of events >>> should be obeyed. >> >> For simultaneous events, LilyPond has no order. > > Oh. This means that > > c'\startGroup\stopGroup > > and > > c'\stopGroup\startGroup > > can't be reliably distinguishe

Re: Colored box behind a single note

2019-07-26 Thread Werner LEMBERG
>> If someone is going to rewrite the algorithm, the order of events >> should be obeyed. > > For simultaneous events, LilyPond has no order. Oh. This means that c'\startGroup\stopGroup and c'\stopGroup\startGroup can't be reliably distinguished? > That's why one needs to have one phas

Re: Colored box behind a single note

2019-07-26 Thread David Kastrup
Werner LEMBERG 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 >>

Re: Colored box behind a single note

2019-07-26 Thread Werner LEMBERG
>>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-mom

Re: Colored box behind a single note

2019-07-26 Thread David Kastrup
Werner LEMBERG writes: >>> diff --git a/lily/horizontal-bracket-engraver.cc >>> b/lily/horizontal-bracket-eng >if (d == STOP) > { >pop_count_++; > - if (pop_count_ > bracket_stack_.size ()) > + > + // Since N `L' events create N HorizontalBracket grobs we need (at > +

Re: Colored box behind a single note

2019-07-26 Thread David Kastrup
Werner LEMBERG writes: > OK, more comments added to the source code. > > I wish that other parts of lilypond are having similarly detailed > comments... Well, that's exactly the reason to be adding them according to Immanuel Kant's seminal writings on coding standards. -- David Kastrup __

Re: Colored box behind a single note

2019-07-26 Thread Werner LEMBERG
>> diff --git a/lily/horizontal-bracket-engraver.cc >> b/lily/horizontal-bracket-engraver.cc >> index 608af35965..a42268a357 100644 >> --- a/lily/horizontal-bracket-engraver.cc >> +++ b/lily/horizontal-bracket-engraver.cc >> @@ -56,10 +56,23 @@ Horizontal_bracket_engraver::listen_note_grouping >

Re: Colored box behind a single note

2019-07-26 Thread David Kastrup
Werner LEMBERG writes: > [Moving the discussion to lilypond-devel.] > >>> A loop? > > Attached a new version of the patch, now using a loop. > > > Werner > > diff --git a/lily/horizontal-bracket-engraver.cc > b/lily/horizontal-bracket-engraver.cc > index 608af35965..a42268a357 100644 > --- a

Re: Colored box behind a single note

2019-07-26 Thread Werner LEMBERG
[Moving the discussion to lilypond-devel.] >> A loop? Attached a new version of the patch, now using a loop. Werner diff --git a/lily/horizontal-bracket-engraver.cc b/lily/horizontal-bracket-engraver.cc index 608af35965..a42268a357 100644 --- a/lily/horizontal-bracket-engraver.cc +++ b/lil