> Tom Breton is trying to work through various complicated issues related
> to tuplets, I think.  I haven't heard much out of him in a long time.

This is probably as good a time as any to update you on my work.

Yes, I'm working on tuplets.  Right now, what I have is both better and
worse.  It does some of the tricky tuplet stuff without batting an eye. 
No more grabbing 3 notes of any duration.  No more funny rests appearing. 
Tuplets chord like other notes.  I can even input 5-against-3 and it makes
sense of it (groups it into 15-lets)

On the other hand, it is not mature.  Right now, 17-lets can crash it or
surprise it so much that it makes normal-looking untupleted 16ths with
17:16 durations.  It doesn't obey existing beaming; I am working on that
today.

It is unstable enough that I haven't dared even put it on a branch yet,
but probably soon.

I can sketch out the basic design for you, though.  I've largely used
SegmentNotationHelper as an entry point.

I have to commend everyone who wrestled with that jungle before me.  There
were some very good ideas under the overgrowth, which I was able to keep,
though in a very mutated way:

 * insertNote fits into the existing note/rest splitting if it can,
instead of rebuilding.

 * There is a separate process of making viable.

 * That collects a list of durations - but now they store more information.

Instead of all the special cases and callers having to use
makeThisNoteViable, now when insertNote fails to find a good fit, I
rewrite the bar.

The major new classes:

 * PerformRatio, which encapsulates tupling.  Akin to a Notation Type, but
lesser; it doesn't have the I'm-an-event stuff like getAsEvent.  It just
deals with event properties.  I kept getting confused which of
"tupledCount" or "untupledCount" referred to the "3" in triplets and
which meant the "2", I named the class PerformRatio, and outside the
class the code refers to the "numerator" or "denominator" of the
performance ratio.  I find that less ambiguous.

 * RenotateableRegion.  This is the fallback when insertNote doesn't find
an existing place for a note.  It basically rewrites an interval.

 * MeterPiece, MeterPieceList: What the "int" that DurationList used to
store turned into.  Knows the duration, a tupling, how it fits into the
meter and how it wants to group with other notes.

 * MetricTreeNode.  We figure out MeterPieceList by splitting a bar
treewise; MetricTreeNode is a node in that tree.

 * EventJuggler.  Previously we were doing some amazing and complex things
so that NoteInsertionCommand could manage the selection without really
knowing what SegmentNotationHelper had done.  Now insertNote and
insertRest take a selection and manage it.  RenotateableRegion would lose
that information, but EventJuggler lets it hold on to it.

 * SegmentMutator: Basically contains old SegmentNotationHelper methods
that now want to manage an event selection.

 * GroupingData: Another lesser Notation Type. It knows how to beam events.

 * GroupingState: Basically GroupingData plus some info to help map old
beaming to new.  That's what I'm working on today.

 * RgMath: A namespace containing some integer math routines I needed. 
Mostly power-of-2 bithacks.

 * Various helper classes for them.

        Tom Breton (Tehom)



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user

Reply via email to