lichen-community-systems / Flocking

Flocking - Creative audio synthesis for the Web
GNU General Public License v2.0
692 stars 60 forks source link

Replace the Flocking Scheduler with Bergson #259

Open colinbdclark opened 5 years ago

colinbdclark commented 5 years ago

As described in #41, the Flocking Scheduler is not particularly well-implemented and suffers from unreliable unit tests. Many of these quality of implementation issues have been solved in Bergson. In addition, Flocking's declarative scheduling API has always been largely aspirational and thus quite awkward to use in practice. Rather than encouraging users to use an incomplete and leaky abstraction, I think it's better to expose a simpler and more reliable API built directly on top of Bergson until a much more robust approach to code-free scheduling can be implemented.

This change should also address #44, as we can probably fairly easily wire a Bergson clock into Flocking's main sample generation loop.