Sunday 8 May 2016

Raspberry Pi as a Musical Instrument

A lot of my computing work is taking place on Raspberry Pi at the moment. On the one hand, it allows me to write some pretty advanced routines for manipulating data and web pages (I'm doing some web automation using Selenium at work at the moment) and I know that once I have got things to work, all I have to do is plug the thing in and away it goes. I'm not messing around with cloud servers or anything that gives lots of setup headaches - what would once have seemed a bit wasteful to dedicate a whole machine to now doesn't matter - I just plug in a pi and the job's done!

But there's no question that what's REALLY cool about the Pi is Sonic Pi.

I've made a weird kind of music box. Basically, taking my cue from Nick Johnstone's blog and Robin Newman's work with Telegram (see, I've installed the Telegram CLI client, and have hacked around with the code so that I can send Sonic Pi code from my Mobile phone to the Pi. It works! Not only can I control it from my mobile, but I can make music with others, because their messages can get processed too.

At a deeper level, I'm interested in this because, apart from being a kind of collaborative live coding, it highlights the fact that every single message from Telegram to the Pi is a kind of transaction. Done collaboratively, different people's transactions are made visible to each other. Each person may repeat someone else's transaction, or change it in various ways. Thus what emerges (I haven't implemented this yet) is a kind of structure of the live coding co-creation: we should be able to see the emergence of musical ideas which are picked up by others, modified, repeated and so on. As the music progresses I find myself reviewing the transactions I have already tried, and selecting ones which I think might be interesting.

It's all quite exciting... the Pi Orchestra is next I think!

No comments: