Doug Kerr wrote:The algorithm I suggest (it may well be that what we have no is a broken version of this) would do essentially the following:
• Imagine a "face value" cell within which each note lives (ending at its current play duration).
• Apply the basic swing definition to the boundary between the cells, giving new "face value cells"
• In each cell, make the note duration the same fraction of the cell length that the pre-swing duration was of the face length (which was the "pre-swing "cell").
So if before the swing, the duration of note 1 was 80% of its face value, and the duration of note 2 was 90% of its face value, then after the swing the duration of note 1 will be 80% the length of its "adjusted cell" and the duration of note 2 would be 90% the duration of its "adjusted cell".
In fact, the current Encore algorithm does exactly this except that, for the second notes, if the initial duration of the second note was less than 100%, the duration of the second note (as adjusted) is greater than would be called for by the red clause in my algorithm.
The "error" is systematic, and I can probably characterize the "error" in the math. It seems to be an error in the algorithm calculating the length of the second note's "cell" based on the swing point (the so-called "amout of swing" parameter) for use in determining teh adjusted note's actual duration.
My guess is that Gvox's original plan was to use exactly the algorithm I now recommend, but that (for second notes, when the original duration of the second note is less than 100% of face), the calculation was (or is now) bungled.
Doug
