[Top][All Lists]

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

Re: Fixes slope errors from incorrect X extents in Beam::print. (issue 5

From: address@hidden
Subject: Re: Fixes slope errors from incorrect X extents in Beam::print. (issue 5293060)
Date: Fri, 28 Oct 2011 11:09:44 +0200

On Oct 28, 2011, at 7:30 AM, Keith OHara wrote:

On Thu, 27 Oct 2011 01:34:00 -0700, address@hidden <address@hidden> wrote:

What about the x_span_ of the Beam_scoring_problem ?

It represents two things at two different stages of Beam_scoring_problem.

Too bad you didn't use two different variables.

I've fixed the code so that x_span_ (and all variables containing x information) only ever represent one thing: the full x span of the beam.  The distinction between normal-stem to normal-stem versus left-extremity to right-extremity no longer exists.  This reduces the complexity (and size) of the code without altering the visual result.

Starting at update_x_span_after_extremal_hangover_compensation (), the x_span_
becomes the real span of the beam, tacking on left and right overhang that may
come from stemlets or broken beams.  This is necessary for the quanting (we
always want edges quanted) but not possible for the slope calculations, which
are predicated on the idea that unquanted_y_ represents the beginning and end
of the beam (otherwise, we'd have to compensate for extremal hangover in each

You are telling me _what_ happens, which I could see from the code.  Some things
looked strange, possibly accidental, so I wanted to know _why_.

I see that the slope-determining steps are influenced by note-heads, so the
interval with normal stems is _slightly_ more convenient to use there.  I notice
that least_squares_positions() has a comment wishing it could see the note-heads
on the other portion(s) of a broken beam, for exactly your purposes.

This comment is no longer relevant (my patch fixes this issue).  I didn't see it before & I'm removing it now.

The interface through \override Beam 'positions used to control heights at the
positions of the first- and last- normal stems, but that wasn't documented --
or very convenient in case of overhangs.

I discovered this by accident.
The real kicker is that this problem did not just plague broken beams - even unbroken ones have an overhang from the center of the extremal stem by half the stem width (usually 0.065 units).  This is non-negligible.  In, for example, there were several too-low quantings that the correction of this minuscule overhang fixes.

You make a good point that quanting should work with the ends of the full beam
as printed including overhangs, but I assume that change is a separate commit.

You don't need a separate commit: one of the benefits of standardizing x extent across functions is that this is automatically fixed.
Attached are the results from current master and from my patch:

\paper { ragged-right = ##t }
  d'8[ c' b e' r r r r r r r r r]

In the patch, the functions individual-slope and peters-prolongation guarantee quanted beams on both ends.  The only one that doesn't is strict-prolongation, as it is impossible to have beams strictly link up and quant their broken ends (or rather, the chances are infinitesimally small).

I've included this snippet as a regtest.

The difference between
consistent_broken_slope_ and consistent_broken_slope is dangerous all by

I'm not sure what you mean - how is this dangerous?

Similar names (formerly also similar to the property 'consistent-broken-slope)
with different values. Only dangerous if someone changing the code later is
un-careful about distinguishing them.  The new patch is better about this.

Good to hear!  Lemme know if you have any other comments, and many thanks for those you've given so far.

New patch-set up.


reply via email to

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