Music with code: Making a basic drum beat in Sonic Pi

Ibby EL-Serafy
10 min readJan 6, 2021
Photo by Josh Sorenson from Pexels

I’m going to walk you through the creation of a basic drum beat using Sonic Pi.

Sonic Pi is a program that lets you make music using code. It’s designed to be simple enough that it doesn’t take long to figure it out. At the same time, it’s powerful enough to make professional music.

I’ve written another tutorial that introduces the basics, but you can still follow along even if you don’t read it. Install Sonic Pi from the link I’ve put above so you can follow along.

After this tutorial, you’ll end up with something that sounds like this.

Kicking things off

We’ll start this drum beat with a bass drum sound. Open up an empty buffer in Sonic Pi and type the following. The buffers are all the pages you can access using…

--

--

No responses yet