swing playback algorithm description
Hello,
I'm using Musescore as a musicXML exporter for an online player I'm developing in javascript.
Now, the swing feel is made by the player interpretation of note values...
Is there any documentation on how to interpret and modify the note duration values in the score?
I'd like to try to add the 'swing feel' to my player, but I'm not sure how, and I wouldn't reinvent the wheel (that I'm sure would be quite squared...)
How does musescore do it?
Comments
Depends on the swing settings, whether it is 8th or 16th that are swung, and the ratio that is configured.
In reply to Depends on the swing… by Jojo-Schmitz
In the musicXML file the events in a measure are paced by the 'divisons' parameter.
Another parameter describes how many divisions there are for each beat, and how many beats in the measure... and 1 division is the duration of the shortest note in the measure, and the others are sized accordingly. I can extract all these data with no problem...
But is there a description of how MS stretches the division durations to get 8th and 16th swing feel?
(probably it's a generic algorithm, that every other music program uses...)
In reply to In the musicXML file the… by [DELETED] 120107
If you know whether to swing on 8th or 16th and know the swing rate, E.g. 60%, what more do you need to know? The 1St 8tabor 17th gets longer (to e.g. 60% of the combined duration), the 2nd shorter to compensate.
In reply to If you know whether to swing… by Jojo-Schmitz
yes, I'm starting to figure it out...
I'll do some trial... just working on the 1/8th notes and leaving all the rest untouched...
thanks for answering!