It would be really useful to be able to inject global scope functions into the audio engine, so you can maintain a lib of code (synths, utility) without having to evaluate every time. You could send these from the JS window, in the current language; they could be parsed then evaluated in the audio engine.
It would be really useful to be able to inject global scope functions into the audio engine, so you can maintain a lib of code (synths, utility) without having to evaluate every time. You could send these from the JS window, in the current language; they could be parsed then evaluated in the audio engine.
could be a useful dev feature too.
sema.inject("func:(x:@{{x:}sawb, {{x:,1.01}mul}rectb}mix);")
sema.injectJS("var mysynth = ()=>{this.x = new maxiOsc(); return ()->{return this.x.saw(200)}}")