Live Coding Music

Music is in general a versatile when it comes to how you make it. There are people who use literally garbage and whatever they have on hand, others pay thousands of money to get high quality equipment, some renounce the world of already existing instruments completely and only build their own, the habits and workflows are almost uncountable.

Recently I stumbled over another, very special and mostly unknown way of making music; live coding with Sonic Pi. Yes you read right, a programming language is used to write a program in realtime which then creates music based on the logic you coded. It is running on Windows, MacOS and (as the name suggests) on a Raspberry Pi. See the video below for an impressive example.

Live Coding example of Earth to Abigail

Sonic Pi offers sample based music creation as well as synthesizers and oscillators to create our own waveforms. Furthermore you can use effects and even a microphone input, one can only imagine how versatile the opportunities are when combining (musical) creativity with the possibilities of programming. The language itself is as simple as possible, in order to enable people with few or no coding experience to get started.

Sonic Pi is an Open Source Project released under the MIT Licence. It was originally created by the University of Cambridge Computer Laboratory, today it is maintained by Sam Aaron and the Sonic Pi core team.

If you are interested you should definitely check out Sam Aarons Youtube channel where he offers tutorials and examples to get started (besides other work).

Example of a sonic Pi code, taken from the official websites examples (“Tron Bikes”)