ultraabox / ultrabox_typescript

ultrabox source code
MIT License
26 stars 18 forks source link

Make a plugin/addon API #196

Open MainCharacteroftheProblem opened 3 months ago

MainCharacteroftheProblem commented 3 months ago

This is a bit of a pipe dream and would require a lot of effort on our part (effort that would be better spent elsewhere). However, I think that if anyone could add this to Beepbox, it would be us.

AstroScraps commented 2 months ago

what is meant by plugin/addon api? like what would fall under a plugin? first thought that comes to mind is a vst, but iirc u guys said that's not really gonna be happening any time soon

leovoel commented 2 weeks ago

Needs a lot of design work!

There's a bunch of stuff that could be called a plugin. The things I'm aware of that could be dealt with are:

Performance is an important constraint here, and is the main complicating factor here I feel. Not only the plugin can be its own perf can-of-worms but we also have extra data copies and such to worry about on our end. Probably we'd also want to figure out the threading story first before doing anything here. Performance issues also interact badly with my next point...

Security is another important constraint, perhaps more so in our case. Ideally we'd be able to "sandbox" plugins well, but it's difficult to do that while keeping things very fast, which we need for audio.

As for the implementation language we'd open up for plugin authors, it could be JavaScript as the rest of the editor uses, but maybe WebAssembly would be the better option here. We can't load shared libraries (.dll or .so or whatever) in browsers, only in offline versions where we control the executable, so "VST" support can only happen there.

The first actual step here would probably be to look at plugin formats out there and see what we could borrow good ideas from.