I checked out the Supersonic demo and it looks amazing!
What I’m really looking for, though, is a place where students can compose music using commands—something like Sonic Pi. Unfortunately, we have restrictions on installing software on students’ PCs. Does anyone know of a web-based tool that could work for this?
You may find mention here of Strudel and Tidal Cycles, both web- and text-based music /sound sequencing tools. The language and syntax are a bit esoteric (but easy to learn), for me at least , so used to Sonic Pi, SC, PD etc
Thank you so much for the advice. I’ve now looked at a few tutorials for Strudel and it looks super-interesting. However I hope one day there will be a web version of Sonic Pi but Strudel is absolutely something I can use. Thanks.
I am personally considering using this in secondary school. In addition, I work at a university college where I teach other teachers. In many municipalities, they do not have the possibility to install software on the computers, so for that reason I need something that is web-based.
Definitely keep looking for ways to implement Sonic Pi. Try to access independent hardware i.e. Raspberry Pi’s or re-purposed laptops… some Linux distros can run Sonic with a bit of a tweak but a bit tricky due to the variations of Linux distros. I installed old laptops with Linux Ubuntu (totally free and after some web searches found a way to get Sonic Pi configured to run with Ubuntu).
With the RPis I used mini-screens, old keyboards (free), mouse and class sets of headphones. Worked really well. I also grabbed our old out of lease dated laptops and installed Ubuntu, tweaked to get Sonic to run properly. Then, purchased a nice pair of studio monitors for performances. I combined this with the usual mix of classroom instruments and learning outcomes match to the performing arts and STEM curriculum. It’s worth a note that the Raspian and Linux Os are free and overcome school based software limitations. Good luck Keys… students will love it . BTW… I ended up getting 30 desktop installs with Sonic Pi in my computer lab due to the success of Sonic on the old laptops and Raspberry Pis. The installs were all individually done running on a network and worked beautifully. I taught between 22-27 students at a time. Sonic Pi’s entry points makes so accessible in the context of student diversity and ability ranges. I found that i could reach almost every student and they really loved it. The classroom dynamic was never dull. Students love to create and share… very excited.
(Ah, you mention you want to communicate with it from ‘an osc software’ - presumably an external program, not a browser-based script?)
…In which case you’d need to have a separate ‘bridge script’ (eg Node.js or Python script for example) to forward the OSC messages via websockets to the browser.
yep i want to use openStageControl to send osc command to the SonicPiWeb version. I got OpenStageControl installed on my machine. On this same machine i visit SuperSonic - SuperCollider's Synthesis Engine in the Browser . How can they communicate ?
Sure. You could probably do it in one of two ways:
Use a bridge script as mentioned above, and have a separate javascript snippet that listens to the websocket and forwards OSC commands to SuperSonic, or
Use WebMIDI to receive MIDI commands, and have a javascript snippet that converts MIDI commands to OSC commands for SuperSonic.
The translation is mostly a matter of getting the OSC type tags right, since scsynth is strict about them. In a button widget, set the address to /s_new and put the fixed arguments in the widget’s preArgs list rather than in the value: the synth name is a string, the node id, add-action and target group are integers, and every control name is a string followed by its value as a float. So the ordering is “sonic-pi-prophet”, -1, 0, 0, then the pairs “note” 28.0, “release” 8.0, “cutoff” 70.0.
Two things usually bite here. First, a controller UI will happily send 28 as a float and 0 as a float too, and scsynth will reject the message if the node id / add-action / target aren’t ints, so type those entries explicitly as integers (in most controllers you do that by declaring the arg as {type: ‘i’, value: 0}). Second, -1 as the node id means “let the server pick”, which is fine for one-shot notes, but you then have no handle to free the node; if the synth has no self-terminating envelope you’ll pile up voices. For a button it’s safer to allocate your own ids from a counter and send /n_set or /n_free to that id on release.
If you want to sanity-check the message before wiring the UI, send it from a plain command-line OSC client to the server’s UDP port and watch the server’s stdout: a bad type tag prints a parse/mismatch error immediately, which tells you the shape is wrong rather than the routing. Once the raw message works, the widget config is just the same list in the controller’s syntax.
And if the browser side is involved rather than a native server, remember the page can’t speak UDP at all, so the same message has to go over a websocket to a small relay that re-emits it as UDP; the argument typing question is identical, it just happens on the relay side.
The s_new and other predefined message names are specific to SuperSonic when used separately from Sonic Pi - and when using Sonic Pi, they’re considered more of an internal API for the Spider server to talk to SuperSonic. To communicate via OSC from Open Stage Control to Sonic Pi, you’d just use your own naming, just like we’ve done in the past.
it seems there a big path before i understand all this stuff and make music. so let’s play ukulele
To be honest, supersonic must be a super software but without real examples it seems to me it is very hard to see the user cases. When i read the doc it is clearly very developpers oriented.
For the record, SuperSonic is 100% developer focussed. It’s a realtime engine for building new apps and not intended for casual use by people without significant programming experience.
Sonic Pi is the app that is intended for people who want to make music. SuperSonic is for developers who want to build music apps.