What is Sonic Pi? and How does it work? – by Jessica Duckworth

Published: Posted on

Firstly a bit about myself. My name is Jessica and I am studying the BMus with honours music course. I am absolutely loving it!

Over the 6-week Collaborative Research Internship programme, myself and two other interns had the pleasure of assisting Professor Chen Zhu with his Music Copyright investigations in the Project “Transposing Music Copyright with Sonic Pi: An Exploratory Analysis of Litigated Music Works Using a Programmatic Approach”. We used the program Sonic Pi to turn the manuscripts into code.

Sonic Pi was essentially created to give an option for students of a different way of composing music. It is ensured to be ‘user friendly’ so school children (usually secondary school age) can use it with little trouble. The programme was developed by Dr Sam Aaron at the University of Cambridge and is described as “an open-source programming environment, designed for creating new sounds with code in a live coding environment.” (https://projects.raspberrypi.org/ en/projects/getting-started-with-sonic-pi) Sonic Pi allows its users to have freedom and explore composing in a way that they might not have even considered beforehand. This certainly was the case for me.

IMAGE 1: Sonic Pi: ‘The Air That I Breathe’ melody coded’.

So the pitch of a note was coded by the name of it and the octave that it was played in. As shown in image 1 above with ‘The Air That I Breathe’ melody.

The rhythm was deciphered by the duration of the notes and what numerical value they related to. For example, a crochet (also known as a quarter note) was equal to 1 and a quaver (also known as an eighth note) was equal to 0.5 – see image 2 below for more examples.

IMAGE 2: Sonic Pi: how to code the duration of notes.

Like above in image 3, we were given two separate weekly cases to code. This entailed a complainant song and a defendant song per case. For each piece of music to code, you had to do the melody, bass line right hand and bass line left hand, and fill in all of the correct information for the song. For example, the composer, bpm, key, year it was released etc.

IMAGE 3: Lost in Music, 1993 case: Hammond and Hazlewood VS Warner Chappell Music Ltd

I thoroughly enjoyed my internship, learning something new and composing music in a new way was super interesting. At first, I found this element difficult though as I was unfamiliar with the new method and just wanted to revert back to the way I knew how (which consisted of a pencil and manuscript paper or some music software online, Musescore). But I persevered, with the help of Prof. Zhu and I couldn’t be happier. I helped the team to compose pieces together with the coding and solve the copyright cases too. Now I can confidently compose pieces of music on Sonic Pi without feeling daunted anymore!

 Jessica Duckworth, BMus Music