This is the first in what I hope is a series of posts explaining some of the directions and projects that I’ve tried with Sonic Pi in the past. It’s an attempt both to share my experiences (and mistakes) and to inspire those who want to pick up the baton if any of these ideas interest them. I have quite a backlog of ideas from my three years or so working with SP (ideas are cheap!).
A while ago I went crazy and tried to get Sonic Pi working inside a Docker container. The logic was that I wanted to work toward creating an online Sonic Pi bot that could “render” any code to an audio file. Docker made sense because it allows it to be sandboxed on a server and it would also “solve” the issue of complex server setups, especially where audio configuration was concerned.
Initially I had a big hairy Dockerfile which installs all the packages, configures SSH and audio and then builds SuperCollider and Sonic Pi from source e.g. https://github.com/xavriley/sonic-pi-docker/blob/master/Dockerfile#L5-L35 I got this working in virtualbox with audio, although this will probably fail now as you’d need to compile the Sonic Pi release from the time which was around 2 years ago.
A little while later I tried using the Debian package and it was much simpler! That work is in this branch here https://github.com/xavriley/sonic-pi-docker/tree/server_rendering What this branch also allows is for Sonic Pi code to be “rendered” to a wav file.
Another development since I tried that (around 9 months ago) is that Heroku (who I work for) now support Docker containers meaning that I have a place to run this if I want to https://devcenter.heroku.com/articles/container-registry-and-runtime
All the pieces are there, I just need to do the hard work of turning this into a useful service. I’m thinking something that will look for gists https://gist.github.com tagged with #sonicpi or whatever, fetch these and render an audio file (say 1 minute by default) and then upload it to a service like https://clyp.it/ (which has gone premium since I last looked…)
Any comments or queries are welcome. Would this be a useful thing?