Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(243)

Issue 4239047: Extend Beam::shift_region_to_valid() to also take into account collisions. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 2 months ago by hanwenn
Modified:
9 years, 11 months ago
Reviewers:
mike, MikeSol
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Extend Beam::shift_region_to_valid() to also take into account collisions.

Patch Set 1 #

Patch Set 2 : fix suicided objects #

Patch Set 3 : nitpicks #

Patch Set 4 : duh #

Total comments: 2

Patch Set 5 : paranoia #

Unified diffs Side-by-side diffs Delta from patch set Stats (+246 lines, -32 lines) Patch
A input/regression/beam-collision-feasible-region.ly View 1 chunk +42 lines, -0 lines 0 comments Download
A input/regression/beam-collision-opposite-stem.ly View 1 chunk +29 lines, -0 lines 0 comments Download
M lily/beam.cc View 1 2 3 4 7 chunks +172 lines, -27 lines 0 comments Download
M lily/beam-quanting.cc View 1 2 3 4 2 chunks +3 lines, -5 lines 0 comments Download

Messages

Total messages: 9
hanwenn
this fixes the most egregious errors of the brute force quanting. There are two issues ...
13 years, 2 months ago (2011-02-28 04:06:03 UTC) #1
hanwenn
On Mon, Feb 28, 2011 at 1:06 AM, <hanwenn@gmail.com> wrote: > this fixes the most ...
13 years, 2 months ago (2011-02-28 04:09:12 UTC) #2
hanwenn
On 2011/02/28 04:06:03, hanwenn wrote: > There are two issues in the regtest: it gets ...
13 years, 2 months ago (2011-02-28 04:27:17 UTC) #3
mike_apollinemike.com
On Feb 27, 2011, at 11:27 PM, hanwenn@gmail.com wrote: > On 2011/02/28 04:06:03, hanwenn wrote: ...
13 years, 2 months ago (2011-02-28 11:21:20 UTC) #4
hanwenn
On Mon, Feb 28, 2011 at 8:21 AM, mike@apollinemike.com <mike@apollinemike.com> wrote: >> fixed. >> >> ...
13 years, 2 months ago (2011-02-28 13:08:13 UTC) #5
MikeSol
Great work! Two comments below concerning beam properties. http://codereview.appspot.com/4239047/diff/3002/lily/beam.cc File lily/beam.cc (right): http://codereview.appspot.com/4239047/diff/3002/lily/beam.cc#newcode1156 lily/beam.cc:1156: Real ...
13 years, 2 months ago (2011-02-28 14:48:24 UTC) #6
mike_apollinemike.com
Attached is the type of note-on-beam thing I was talking about in my previous comments, ...
13 years, 2 months ago (2011-02-28 14:49:49 UTC) #7
hanwenn
On Mon, Feb 28, 2011 at 11:48 AM, <mtsolo@gmail.com> wrote: > Great work! Two comments ...
13 years, 2 months ago (2011-02-28 16:49:02 UTC) #8
hanwenn
13 years, 2 months ago (2011-02-28 16:54:58 UTC) #9
On Mon, Feb 28, 2011 at 11:48 AM,  <mtsolo@gmail.com> wrote:
> Great work!  Two comments below concerning beam properties.
>
>
> http://codereview.appspot.com/4239047/diff/3002/lily/beam.cc
> File lily/beam.cc (right):
>
> http://codereview.appspot.com/4239047/diff/3002/lily/beam.cc#newcode1156
> lily/beam.cc:1156: Real min_y_size = 2.0;
> here, we should have something like
> if (to_boolean (me->get_property ("avoid-collisions"))
> so that users can opt out of the avoidance if they so choose.
> then, we would have an `else' that set the collision penalty in the
> quanting to 0 so that no collision avoidance took place.

?

Why not modify the beam-collision engraver to not add the objects as
collisions in the first place?

> I think that in a lot of real-music scenarios such as organ scores,
> people's may in fact want beams to collide, and thus, they should be
> able to opt-out of this avoidance.

Let's wait for a bit for these situations to surface.  As a first line
of defense, people can simply remove the collision engraver .

> http://codereview.appspot.com/4239047/diff/3002/lily/beam.cc#newcode1256
> lily/beam.cc:1256: beam_left_y = point_in_interval (best, 2.0);
> Here, there should be a padding property that allows users to control
> breathing room for collisions.  Otherwise, you could wind up getting a
> beam that is pushed just below a notehead in the quanting (see example
> in next email).

No, the padding is part of the scoring.  This is code is just to
provide a credible starting point for the quanting code to look.  As
noted in the comments, it assumes single beams as an approximation, so
if you start using this with 128th beams, it may fail.  Are you really
using 128ths in this way? We could add a crude offset to account for
beam multiplicity.

-- 
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b