« WARBL Configuration Tool by Michael Eskin | App News | Blocs Wave / Patterning 2 / Turnado / Aparillo / DRC »

SonicPi LiveCoding TouchOSC example

YouTuber dcts coding shows off a performance in SonicPi with touchOSC. SonicPi is a simple programming language for procedural music making, which can be run on desktops or inexpensive Raspberry Pis.

Video Description:

Short composition made in SonicPi () and controlled with TouchOSC via iPhone 6. Full sourcecode can be found here: https://github.com/dcts/sonicPi-compo...

If you have trouble setting up TouchOSC let me know in the comments, maybe I can help.

Reader Comments 1

Yay! Sonic Pi!

Didn’t expect SPi to make its way into Discchord. Glad TouchOSC made it happen.

I’ve had a really good experience with Sonic Pi in the past, even before it added MIDI I/O. Used it to learn a whole lot about electronic musicking and did a few workshops about music and coding, thanks to Sam Aaron’s platform.
Now, with full support for MIDI and OSC, Sonic Pi can make for less procedural usage. For instance, I’ve used a few lines of SPi code on a RasPi to add Minecraft blocks using MIDI controllers (thanks to the Pi version of Minecraft, with its API). That worked quite well for demos in a museum and at a mini-MakerFaire.

Something I’ve been saying a lot about Sonic Pi, over the past few years, is that the tutorial uses a really appropriate way to help people learn. Instead of giving you full recipes and expecting you to figure out what’s going on, it encourages you to think about what a certain command or parameter will do, before you try it out. When your expectations aren’t met (“I thought both loops would play at the same time!”), you get through a very useful learning experience.
In fact, Sonic Pi is quite unique in that it can easily be taught to a 10 year-old child as well as to a middle-aged adult (I’ve tried both). Sam has a very strong stance that something will only be added into Core if it can be taught to a 10 year-old. He even claims: “if you don’t understand something in Sonic Pi, it’s my fault, not yours”. Quite a large difference with the typical attitude in the development world!
Probably because of this attention to learning, however, the platform hasn’t received that much love from the “Algorave” scene. It sounds like people think that SPi is somehow less powerful than, say, TidalCycles, Haskell, or SuperCollider. Yet Sonic Pi uses SC internally so the full SuperCollider is available within it.

Having said all of this… There hasn’t been any plan to port Sonic Pi to iOS. To the best of my knowledge, none of the other LiveCoding languages support iOS either. After all, Apple prevents most coding to happen on iOS, probably for security reasons. So, we can use Puredata in PdParty or MobMuPlat, Python in Pythonista, or Swift in Playgrounds. But we can’t livecode from an iPad or iPhone despite the fact that current iOS devices are probably more powerful than a Raspberry Pi 3B+ board in most respects.

Some people love to complain about Apple, fairly or not. My guess is that no amount of complaining (or begging) would make any difference. What might get Apple devs to change their minds could be to provide more examples of what’s possible when restrictions are lifted.
Using an iPhone to control a RasPi device is quite fun (in fact, you can use the accelerometer in TouchOSC to control something in 3D on the Pi). But think about the way you could use an iOS device if you could easily livecode your own musical instruments, on it.

  Post a New Comment

Anonymous comments are closed for old articles. If you'd like to comment please Register.


Do not use HTML in your comments. Tags: [b] Bold Text [/b] [i] Italic Text [/i]
Links will be generated if you include http:// or https:// at the beginning of a URL.