lilypond-devel
[Top][All Lists]
Advanced

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

Re: 4167050: Changes the beam collision engraver to check for subsequent


From: Mike Solomon
Subject: Re: 4167050: Changes the beam collision engraver to check for subsequent beams (Re: collision between beams and grace notes)
Date: Wed, 16 Feb 2011 15:15:32 -0500

On Feb 16, 2011, at 7:36 AM, Han-Wen Nienhuys wrote:

On Tue, Feb 15, 2011 at 6:58 PM, Neil Puttock <address@hidden> wrote:
On 15 February 2011 20:02, address@hidden <address@hidden> wrote:

I've uploaded a patch that takes grace notes (and other beams) into account.
Keith - I'm not sure if this is the case.  Currently, both my algorithm &
Han-Wen's get the attached result without a modification to the beam
collision engraver

Here's a little Debussy excerpt for you.  It doesn't work very well
with either patchset, though Han-Wen has the upper hand at the moment.
:)


You can augment the region-size for the Han-Wen code to work correctly.

I guess I should adapt region size more dynamically based on the
difficulty of the beam.



You're giving me a run for my money, Neil!
Modified patch-set up at http://codereview.appspot.com/4131044

Neil: for your reference, here is the syntax around that point w/ the appropriate overrides.

<snip>
r8.  \grace { f'32[( c] } \override Voice . Beam #' collision-radius = #'(1.0 . 5.0) f,16.[-.)
  \grace { \override Voice . Beam #' default-beam-avoiding = #UP \override Voice . NoteHead #' default-beam-avoiding = #UP
  es'32[( bes] } es,16.]-.) \grace { bes'32[( ges] } bes,8.[-.) \grace { as'32[( ges] } as,8.]-.) |
  \revert Voice . Beam #' default-beam-avoiding \revert Voice . NoteHead #' default-beam-avoiding \revert Voice . Beam #' collision-radius
</snip>

The change in collision radius property from a number to a pair is in the spirit of Han-Wen's suggestion.  Instead of increasing the region size & doing more quants, it sets a max on the largest collision that is considered actually to be colliding as opposed to just a different strata of musical information.  The default value is still 2.0 (which used to be called m4g1c in beam.cc), but here, I've kicked it up to 5.0 to make sure that the beam catches both the note-heads and the grace beam in its collision avoidance.

Cheers,
MS

Attachment: PastedGraphic-2.pdf
Description: Adobe PDF document



reply via email to

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