Algorithm for playback of feathered beams

• Jan 29, 2018 - 01:36

I noticed that feathered beams playback is not supported. Just in case it is expected in the future to allow playback (which would be very welcome), the following is a possible algorithm to correctly calculate note durations. I'm not sure whether this is the right place to post this, but as it is sort of feature request with a suggested solution, I go ahead.

I will assume that human perception of time is roughly logarithmic. For instance, the sensation of passing from quarter notes to eighth notes is the same as passing from eighth notes to sixteenth notes. And the metronome notches are spaced in an approximate exponential way, so that the speed increase sensation when moving a notch up is aproximately constant. This assumption suggests that a perceived uniform acceleration can be obtained if the ratio of the duration of consecutive notes is constant. We shall call this constant c.
Considering the accelerating feathered beam case, let's call d the total duration of the beam and dk the duration of the k-th note in the group from a total of n. Then

d = d1 + d2 + ... + dn

So

d = d1 (1 + c + c^2 + ... + c^(n - 1)) = d1 * (1 - c^n) / (1 - c)

We can introduce a parameter a, to be selected by the user, which represents the ratio of the last note duration to the first note duration. No acceleration is equivalent to a = 1, a very fast one would be a < 1/4 (for instance, starting as eigth notes and ending as 1/32th notes).
It can be easily shown that

c = a^(1/(n - 1))

and

dk = d * c^(k - 1) * (1 - c) / (1 - c^n)

Finally, the first duration should be adjusted to the closest tick in order to ensure the total duration of the group is the expected one (a small error in the longest note will be less noticeable than in the shortest one).


Comments

Thanks for posting this! I think you are correct that implementing such an algorithm would be fairly straightforward. It's more a questions of priorities. Would be nice if someone with a programming background who values these finer points of playback would volunteer to go in and address this, along with maybe some other issues with ornaments and so forth. Some good efforts were made over the past couple of years, but there is still a ways to go.

Do you still have an unanswered question? Please log in first to post your question.