Blog Post Image
5 October, 2020

Sonic PI, Start Coding Music!

Icon

Luigi Laezza

Sam Aaron and the Sonic Pi Core Team created at the University of Cambridge Computer Laboratory Sonic Pi a free software that will allow you to code music. Ah did I forget to mention that is free?

Composing music has never been so geeky, download Sonic Pi,  and you are ready to unleash your creativity.

Starting it’s easy and the key to coding with Sonic Pi is understanding and mastering the live_loop

The key to living to code with Sonic Pi is mastering the live_loop.

Here an example:

loop :bells do
  sample :perc_bell
  sleep 0.5
end              

There are four core concepts to a live_loop.

The first is its name.  In the live_loop above the name is called: bells.

The second concept is the action, which in our example is the doing word, that has the function to start the live_loop.

The third is the end word, which tells the software that the live_loop is finished.

Last but not least  the body of the live_loop, which is the set of commands that the loop will repeat.

In our example, Sonic Pi will be playing a bell sample and wait for half a beat.

This is just a quick intro to Sonic Pi, to learn more about live_loops, how to modify them on the fly, and how to add various effects, have a look at the examples or download Sam’s guide.