gitmyhub

sonic-pi

C++ ★ 12k updated 21h ago

Code. Music. Live.

Sonic Pi is a live-coding music instrument where you write short programs to produce beats and melodies in real time, originally built to teach programming to school children but also used by professional performers on stage.

C++Rubysetup: easycomplexity 2/5

Sonic Pi is a music instrument that you play by writing code. Instead of pressing keys on a keyboard or plucking strings, you type short programs that produce sound: beats, melodies, basslines, and more. You can change the code while the music is playing and hear the result immediately, which is a style of performance called live coding.

The project was originally built to teach programming to children in schools. The idea was that making music is more motivating than writing programs that just print text, so students would engage more readily with coding concepts when the output is something they can hear and enjoy. That educational origin still shapes the design: the tool is meant to be approachable for beginners, including young students, while also being capable enough for skilled performers.

Over time it has grown beyond the classroom and is also used by professional musicians and DJs who perform with it on stage. The README describes it as sitting at the intersection of art, technology, and education: it gives artists a way to express musical ideas in code, gives researchers a context for exploring questions about live performance and timing in programming languages, and gives educators a tool that encourages open play rather than rigid instruction.

Sonic Pi runs on Linux, Mac, and Windows. It is open source and the application and its built-in tutorial have been translated into many languages, including French, German, Spanish, Japanese, Chinese, Russian, and others. The repository contains build instructions for each platform and welcomes contributions, including translation contributions.

If you have never seen live coding before, the project website includes videos and examples that show what it looks and sounds like in practice.

Where it fits