MidiPlayerJS icon indicating copy to clipboard operation
MidiPlayerJS copied to clipboard

Fix lag on large midis

Open LapisHusky opened this issue 3 years ago • 0 comments

This provides a fix for https://github.com/grimmdude/MidiPlayerJS/issues/25 where only one event per track could play each playLoop interval. This means that if there are multiple simultaneous events, they won't play all at the same time, which can be seen when playing black midis. This fix works by doing playLoops until there are no more events to play. This might not be the most efficient way to solve the issue, because it now needs to do a playLoop twice every time there's an event, but it's better than setting sampleRate to 0 which just makes the issue require more events to see.

LapisHusky avatar Mar 31 '21 04:03 LapisHusky