Embedding SuperCollider GUI into WordPress

Is it possible to embed SuperCollider GUI into a WordPress website? Like, if I were to upload a GUI, could I have other people interact with that GUI and the sounds it produces?

I don’t believe so - there are two components missing here. First - Wordpress has its own way of generating layout, buttons, etc. SuperCollider’s sclang does this with Qt.
Second - you’d have to have a server / synthesis process that is NOT embedded into your web view or anything. So - your GUI has nothing to talk to that is making sound.

I hope that makes sense!

I guess a very determined user could come up with a way to run supercollider on a server somewhere, driven by OSC messages from a javascript/html5 UI, and then broadcast its sound over the internet back to all different user’s browsers but that woudl not be trivial to set up (at least I’d have to dig deep into the different components that are needed to pull it off). Also there could be latencies between changing parameters and hearing the effect that - depending on the use case you had in mind - might ruin the experience.

So: Possible? Yes, to some extent. Easy? Probably not.

You are better off with CSound in this (web-embedding) regard. See

https://csound.com/wasm/ or https://live.csound.com/

Of course it’s a different language to learn, but some principles carry over…

I wonder how much trouble it would be to port SuperCollider (edit: specifically scsynth) to WebAssembly…

It doesn’t look totally straightforward https://www.youtube.com/watch?v=OLTBTDOXfjA

Also, that won’t be very satisfying for SC because unlike in CSound, a lot of interesting stuff goes on in the client part of SC… Pbinds have their own clocks etc.

Check out @htor’s sc-web on github! Looks very promising and (after a little effort to make it work on my linux machine) it works! It basically enables clients to send SC code to a server and streams back the sound results.

I’ve tried it only on my local machine so far, and I managed to stream audio to my smartphone. Nice one @htor ! :slight_smile: