Thanks for the comments! Just a technical note - this issue was closed after the patch was pushed to current master, but I don't mind opening it again to continue a discussion about what this patch (if Colin has no objections).
The code I'm dealing with in beam-quanting and beam is difficult to decipher to begin with: it took me at least a year to get my head fully around what it's doing and to figure out where the gaps were. I know there is a lot of reorganization, but I wouldn't do it unless I felt that it was necessary to make the code perform more consistently (i.e. to standardize the measuring of X extent). Cheers, MS http://codereview.appspot.com/4961041/diff/60001/lily/beam-quanting.cc File lily/beam-quanting.cc (right): http://codereview.appspot.com/4961041/diff/60001/lily/beam-quanting.cc#newcode202 lily/beam-quanting.cc:202: for (vsize i = 0; i < beams.size (); i++) On 2011/10/26 18:57:38, Keith wrote:
When there is more than one beam in 'beams' what do you intend the
members
Beam_scoring_problem to represent ? The beam as if it were on one
line, but
allowing the extra horizontal span due to the line-break ? Should the
members
like segments_ and is_knee_ include both halves of the beam ?
All of Beam_scoring_problem happens in an artificial space as if there was no line break (which is why this function is so long - you'll see x_span_ and x_left being used quite a bit to bring elements to their positions on this imaginary line). So, Beam_scoring_problem does not know what line breaking is, and it is only at the very end that the normalized endpoints are used to take care of the breaks. One of the reasons for my most recent patch is that the normalized endpoints of the beam don't sync up with its actual extent, which is only reliably derived from the segments. http://codereview.appspot.com/4961041/diff/60001/lily/beam-quanting.cc#newcode947 lily/beam-quanting.cc:947: final_positions[RIGHT] -= (1 - normalized_endpoints[RIGHT]) * y_length; On 2011/10/26 18:57:38, Keith wrote:
At what horizontal locations are these final_positions? First and last
stems or
the end of the beam including overhang or x_span_ ?
Including overhang. This is improved in the most recent patch set. http://codereview.appspot.com/4961041/ _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel