On Wednesday, December 15, 2010, Julie S wrote:
> I see you are adjust the start and end times.
Of the _selection_.
You have a bunch of concerns about changing segment length, but I'm not
changing the length of segments. This thing iterates through whatever
Segment::begin() and Segment::end() return in order to find additional note
events *inside* that space that should be swept into the selection.
Handling of tied notes has always been particularly awful in the matrix, where
you have no visual concept that they're even supposed to be connected to each
other. Musically, a string of tied notes is a single unit, so the two ways we
can approach this are to a) continue with having chains of independent events
linked through TIED_FORWARD and TIED_BACKWARD properties, or b) invent some
new kind of event that maintains itself as a single unit, yet represents
itself in different ways depending on context.
Of those two, I think b) would be the best way to go, but it's just an
immensely complicated thing to do going about it that way. I settled on a) as
the most practical way to approach the issue. Pretty much everything you can
do to manipulate a note starts with a selection in some way, so if we make
selections treat any part of a chain of tied notes as a single unit, then
everything else the user does to those notes will be performed on them as a
In practice, it was looking really promising after the first exploration of
this concept. It's all a bit more crude than b) would have been, but the end
results make it significantly, if not completely transparent what's really
happening under the hood, so I think while it's an imperfect solution, it's a
lot better than continuing to ignore the problem completely.
So far as your worthy concerns about accidentally futzing around with segment
boundaries, since this approach works entirely inside the box defined by the
segment start and end markers, without changing those markers, I don't think
there's any cause for alarm here. Making the most recent change, which forced
the _selection_ markers to expand to encompass all the extra notes that were
pulled in, was definitely necessary to get the selection behavior to work
correctly. What was happening was notes were in the EventSelection but
outside its boundaries, and this caused grave problems, like being able to
delete notes permanently, beyond the reach of undo.
That change settled all that, and it seems to be performing quite well when
adding notes to the selection. Sorting things out on the removal end is next
up. All of this combined is a much better solution than my first attempt, and
now we have this behavior everywhere, regardless of the selection mechanism in
use. It's vastly less complicated, and more maintainable, so I'm glad I
finally realized my stupidity and did this the right way.
D. Michael McIntyre