WebRTCGUI: Publish and sync your GUI with the internet

WebRTCGUI

Screen recording

I started looking into WebRTC lately and wanted to build something for SuperCollider.
WebRTC allows you to implement real time communication with multiple clients in an easy way while it also takes care of some obstacles like peering.
Combined with a JavaScript frontend framework which builds the DOM dynamically based on modifiable data we can simply connect all parts and keep them in sync via WebRTC and also send messages from and to SuperCollider which allows us to build and control the GUI from within SuperColllider.
While SuperCollider does not support natively support WebRTC we can build a bridge between WebRTC and OSC.

You can run this setup on your own machine for your local network or can put the webserver on a remote machine so the GUI is accessible from the internet.
I wrote a setup guide for both setups which can be found in the README.md of the repository.

I would be glad to hear what you think about it, what could be improved (its currently 0.1.0) and also happy about contributions (e.g. additional sliders like a 2D slider or a button?) and usecases you have in mind.
Currently the controls get synced for every user, so n users will all access the same GUI element which is synced for all. But it would also possible to provide for each user its own independent, unsynced GUI where each of the clients send their value to SuperCollider instead of a single, synced value.

Link

7 Likes

Super cool! A reminder also that you can open arbitrary webpages in BOTH the sclang web view and the IDE help browser.

WebView(bounds:600@1200).url_("https://google.com").front;
ScIDE.openHelpUrl("http://google.com")
1 Like