Getting Started

Download

Sonic Pi - The Live Coding Music Synth for Everyone

Language

To start, I learnt that Sonic Pi uses Ruby’s syntax. It is my first time hearing about this programming language, and to me, it is similar to pseudo code, which makes the syntax easy to understand and start off, and friendly to beginner who are not familiar with coding.

Layout

image.png

Tutorial

Sonic Pi - Tutorial

Although there is a tutorial section on the interface, it is not quite readable. Above is the web version for the tutorial, with examples and communities to explore on its main page.

Hello World

To make the first sound, we can simply put:

play 60

And if we repeat this line:

play 60
play 65
play 70
play 60

We realize that these notes will play at the same time. So we can add sleep to add breaks between each notes, the parameter after sleep refers to the number of beats in between each note:

play 60
sleep 0.5
play 65
sleep 0.5
play 70
play 75

In this piece of code, the play 70 and play 75 is played at the same time because there is no sleep in between. A reminder that Sonic Pi does not support “.5” syntax, so we have to type “0.5” instead.

There are also options for different synths.

# From the tutorial
use_synth :saw
play 38
sleep 0.25
play 50
sleep 0.25
use_synth :prophet
play 57