Exploring Sonic Pi: A Software For Live Coding Music
By Leela Li
Self-proclaimed “future of music”, Sonic Pi is an open source software aimed towards aiding musical instructors in engaging students in a different way: coding to make music. This software is pre-installed on Raspbian Jessie, but can also be run on other operating systems.
Having taken a few introductory computer science classes in the past, this concept of programming music – as opposed to the traditional sense of picking up a real instrument – is what pushed me to pick this up as my first Raspberry Pi project.
Raspberry Pi is a small single-board computer that comes with all of the essential functionalities to be a computer. One only needs to insert an SD card, plug in a monitor, mouse, keyboard, and power supply to get it up and running. One of its main purposes is so that the “average Joe” can have something small, powerful and flexible enough to allow for tinkering around, gaining knowledge in our increasingly digital world, and to hopefully contribute to it as well. My goal for its use today was to write a program on Sonic Pi that played “Canon in D”.
Getting started was simple enough. Once the Raspberry Pi was booted up, I opened up Sonic Pi and followed the instructions listed on the Raspberry Pi site. This provided me with the basic knowledge of things such as making sounds with MIDI note numbers and manipulating basic parameters of notes to change the way it sounds.
Now, came the hard part. My prior knowledge in programming did not help replace my lack of knowledge in music.
In Sonic Pi, there is a total of 128 (0 to 127) MIDI note numbers that get divided up by 11 (0 to 10) octaves. Having only taken three months of piano lessons back in the fifth grade, the word, “octaves” is nothing but foreign to me.
Staring at the online sheet music of the most basic version of “Canon”, I worked hard to translate each note to its corresponding MIDI note number. After about an hour or two, the conclusion was too obvious: this was well beyond the capacity of my now, musically untalented, 22-year-old self.
Overall, Sonic Pi is an amazing platform for those interested in creating music through a different medium. Just make sure you don’t make my mistake and remember to brush up on the musical aspect prior to diving in.
If you’re still not convinced, just look below to see what you could do with Sonic Pi!
Example of what one can do with Sonic Pi:
“Aerodynamic” by Daft Punk
https://www.youtube.com/watch?v=cydH_JAgSfg
Resources:
- http://sonic-pi.net/
- https://www.raspberrypi.org/learning/getting-started-with-sonic-pi/worksheet/
- http://www.electronics.dit.ie/staff/tscarff/Music_technology/midi/midi_note_numbers_for_octaves.htm
- https://www.youtube.com/watch?v=cydH_JAgSfg
- https://en.wikipedia.org/wiki/Raspberry_Pi
- https://www.raspberrypi.org/about/