ltgcgo / octavia

🎻 Event-driven multi-standard MIDI state-tracking library.
https://gh.ltgc.cc/octavia/
GNU Lesser General Public License v3.0
40 stars 6 forks source link

Support for random seeking #52

Open PoneyClairDeLune opened 1 month ago

PoneyClairDeLune commented 1 month ago

Currently, seeking randomly will cause all sorts of desync problems for all visualizers based on RootDisplay (basic.mjs). Skipping backwards will freeze the event feed, until the player head reaches wherever it was before. Skipping forwards mid-play will cause hanging notes at best, total state desync at worst. No matter which direction a skip occurs, it will also induce problems with current position in bars.

Proper support for random seeking should solve this long-standing pain nicely. For a proper implementation, some ideas are drawn below.

PoneyClairDeLune commented 1 month ago

The simpler approach shall land in 0.5.x, along with the time offset graph. The simple seeking support should not be brought to 0.6.x where middleware is planned to receive an overhaul, as it could be disastrous for synths on the receiving end.