lilypond-devel
[Top][All Lists]
Advanced

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

Help with difficult bug


From: Carl Sorensen
Subject: Help with difficult bug
Date: Mon, 14 Dec 2009 17:25:03 -0700

So I've been trying to solve the autobeaming bug.

The bug is as follows:

In 4/4 time, you'd like to beam 8th notes as 4 4.  But if there are 16 notes
present, you don't want to cross the beat. So the proper beaming would be
something like:

c8[ c] c8[ c16 c] c8[ c c c]

The problem is that by the time you bring a 16th note into the beam, you're
past the desired break time so you can't break the beam.

I've written a new function, recheck_beam, that goes through an existing
beam and checks to see if there's a break point when the shortest duration
in the beam is reduced.

In order to do so, I needed to add a test_moment argument to the beam ending
code, instead of just using measure_position as the test moment.

Everything compiles OK.  And it runs fine until I get into recheck_beam.
Recheck_beam actually executes successfully, but an exception is thrown
later, and the exception doesn't make sense to me when I use gdb.  Values
are changed between the calling procedure and the called procedure in a way
that makes no sense to me (see
<http://lists.gnu.org/archive/html/lilypond-devel/2009-12/msg00283.html> for
more info).

After spending several unfruitful hours trying to track things down, I
decided to post a patch and see if anybody could give me ideas as to what
I'm doing wrong.

So I've uploaded a patch to Rietveld:

<http://codereview.appspot.com/179046>

Any help would most gratefully appreciated.

Thanks,

Carl





reply via email to

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