Skip to content

Sonic Pi

Make music with code: beats, melodies and live-coding.

Ages 10–18 No experience needed

About this pathway

Sonic Pi turns code into music. A few lines play a beat, a loop keeps it going, and changing a number while it plays changes the song right away: that's called live-coding, and DJs do it on stage. Along the way ninjas learn loops, variables and randomness, and they end the session with a track of their own.

What you'll build

A few of the projects kids on this pathway have walked out with.

A drum beat

Build a beat from samples and play with the tempo until it grooves.

Your own melody

Write a tune note by note, then let the code pick random notes from a scale.

A live-coding set

Combine loops and effects and change them live, like a DJ.

How a session works

Every dojo runs this a little differently, but it usually looks like this.

1

Play your first sound

One line of code plays a note, a second one plays a drum sample.

2

Loop a beat

A live loop keeps the beat going while you add melodies and effects.

3

Perform it live

Change the code while the music plays and show your track to the group.

Skills you'll pick up

The building blocks every later pathway builds on.

Live-coding Loops Randomness Timing & rhythm Variables

Questions

Ready to try it in person?

Other pathways

Not sure this is the right one? Kids move between pathways freely.

Scratch

Drag-and-drop blocks and real games from your very first Saturday — no experience needed.

Explore Scratch →

Python

Trade the blocks for real code and build your first text-based games and programs.

Explore Python →

BBC micro:bit

Code a tiny physical computer — lights, buttons and sensors you can hold in your hand.

Explore BBC micro:bit →

mBot

Build and program a small robot that drives, follows lines and avoids obstacles.

Explore mBot →