IT lexicon › Programming › Sonic Pi

Sonic Pi

Programming På svenska → Updated: 2026-10-28
More info
Creator
Sam Aaron
Released
2012
Type
Live coding environment
License
MIT
Website
sonic-pi.net

A coding environment where you write music in a Ruby-flavoured language and hear the change the moment you hit Run — built for classrooms, played in clubs.

Sam Aaron created Sonic Pi at the University of Cambridge in 2012, backed by the Raspberry Pi Foundation, as a way to teach programming through something more fun than sorting lists. The code is Ruby with a small vocabulary of its own: play 60, sample :bd_haus, sleep 0.5. The actual sound is generated by SuperCollider running in the background.

The key construct is live_loop: a named loop that gets swapped out mid-performance when you edit the code, without dropping the beat. That turned a teaching tool into an instrument, and Aaron has performed with it on real stages. Its timing model keeps multiple loops in lockstep to the sample — something plain Ruby's sleep would never manage.

← Back to the lexicon