Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code library injection from JS window #400

Open
chriskiefer opened this issue Feb 18, 2022 · 0 comments
Open

code library injection from JS window #400

chriskiefer opened this issue Feb 18, 2022 · 0 comments

Comments

@chriskiefer
Copy link
Contributor

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)}}")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant