mmckegg/loop-drop-app

new scheduling strategy to avoid GC glitches

Closed this issue · 1 comments

Currently Loop Drop relies on a short look ahead window (0.1s) for "realtime" scheduling. This is susceptible to interruptions from GC and UI rendering, causing missing beats.

I propose we increase the scheduling window (3s), and then implement a diffing system that detects changes in loops and then invalidates future events that are no longer relevant.

This is still subject to jitter, but will avoid all of the scheduling glitches currently plaguing the looper.

This should make solving #173 less important

This isn't quite as simple as I'd hoped. In fact, it's really complicated 😞

I got about 80% of the way there, but then I discovered that "Choke All" ruins everything, because it requires the rescheduler to be aware of side effects. It's just too much complexity that is likely to bite me later.

Will have to keep thinking about this. Closing for now.