Hacker News new | ask | show | jobs
by cesaref 1970 days ago
Hi there, the faust binaries include a faust2soul command which from faust dsp generates a soulpatch. We include a bela build of the soul command line tool (it's basically a tech demonstrator of the JIT and a backend). So at this point, the bits are all out there to take a faust.dsp file and JIT it on Bela.
1 comments

Ah, I wasn't thinking of combining Faust and Bela like that, but that raises an interesting possibility.

So you're saying it should be technically feasible to live code/hot reload faust.dsp on Bela with no glitching?

Yes, the soul command when playing a patch watches for updates and recompiles when changes are found (then it switches across from the current DSP to the new one when compilation is complete). This isn't totally seamless, as although parameters are retained, any state held within the DSP code (say delay lines) will be reset to initial conditions, but it's pretty good.

So then, update your faust code, re-run faust2soul and the soul command will see the updated patch and recompile.

Oh boy :~)

Even though this already sounds great, hot swapping state would be the really big deal here. Do you think the Faust program itself might be able to save/load state somehow?

faust isn't in the loop at that stage. Saving/restoring state will be something the soul driver will have to do, and of course, this will then mean this ability works for all code using the driver, not just faust sourced soulpatches.

We've sketched out how this would work, and it's on the project backlog as something we want to support, so at some point we'll improve this area of the runtime.

Cool, great to see that in the pipeline.

I can vouch for that being a high priority feature for any interactive audio development, not just for live coding scenarios.