lilypond-devel
[Top][All Lists]
Advanced

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

Re: Adds beam collision avoidance to auto beaming (issue4290069)


From: Han-Wen Nienhuys
Subject: Re: Adds beam collision avoidance to auto beaming (issue4290069)
Date: Mon, 28 Mar 2011 08:19:26 -0300

On Mon, Mar 28, 2011 at 8:13 AM,  <address@hidden> wrote:
>
> http://codereview.appspot.com/4290069/diff/5001/lily/beam-collision-engraver.cc
> File lily/beam-collision-engraver.cc (right):
>
> http://codereview.appspot.com/4290069/diff/5001/lily/beam-collision-engraver.cc#newcode55
> lily/beam-collision-engraver.cc:55: if (covered_grobs_.size ())
> to drop 1 indent level, do
>
>  if (covered.empty())
>   return;
>
> http://codereview.appspot.com/4290069/diff/5001/lily/beam-collision-engraver.cc#newcode81
> lily/beam-collision-engraver.cc:81: start = 0;
> what graham said.
>
> Maybe you can add a comment about how you're going about it?
>
> In particular, the logic around start looks odd.
>
> i'd write something like this:
>
> for (i over beams) {
>  while (covered[start].rank[left] < beam[i].right)

make that

  while (covered[start].rank[right]  < beam[i].rank[left]
    start++

>    start++
>
>  for (j = start; covered[j] < beam.right; j++) {
>    ..maybe add covered[j] to beam[i]..
>  }
> }
>
> http://codereview.appspot.com/4290069/
>



-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen



reply via email to

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