Ohhh I think I misunderstood how this works. You write the visualization ahead of time, and then you livecode the music only? Bauble would work well for that -- you could just grab the compiled shader source and integrate it into your livecoding environment; wouldn't even need to integrate the Bauble runtime. All you'd need to do is set a few uniforms and issue a draw call.
I was imagining something where you switch between coding audio and visuals on the fly -- which is still totally possible, but would require a bit of work to get them talking to each other.
Well sometimes you change the visual code also in real-time. The video above was just for showing the canvas works so I did not edit the visuals code there.
I post the hydra link here. There are lots of demo there:
Ohhh I totally missed that you're the author of Glicol. Okay. So you integrated Hydra as like a first-class thing -- I see I see. I thought you were plugging two 3rd party things together.
So I'm guessing that the best case scenario for you is to import Bauble as like a normal JavaScript dependency, and then use the editor built into the Glicol UI to write scripts, and then just call like Bauble.compile(canvas, script). Right?
Bauble doesn't really know how to be embedded in another page right now -- it's more like an app than a library. But it would be possible to extract the core parts. It's a little tricky because it uses WASM, so it kinda needs to load itself a little specially, but I'm sure there's some way around that.
Yeah. Glicol language and audio engine is written in Rust and compiled to WASM. I still manage to export the WASM module to an NPM package (https://glicol.js.org/). But Emscripten may be a little bit different, but there will always be some solution I guess. I've watched your repo haha.
https://youtu.be/iKj7IibG0OU
I think both Hydra and p5.js render things to a <canvas>, which is probably the same as what your demo does, right?
Then we just need to set some CSS for the Canvas to make it full screen and hide behind the code editor.