Teaching programming: Sonic Pi for the win!

favorite music sonicpi teaching

Youngsters who might be interested in doing an apprenticeship with us were in the office this week, and I spent an afternoon teaching them the basics of programming.

I decided to try using Sonic Pi for this session, and I'm super happy with the results.

Sonic Pi

The youngsters were already programming music about 10 minutes after starting the program, having lots of fun while learning important programming concepts "in passing".

Loops, simple data structures, conditionals, functions, basic parallel programming, it's all in there, with the instant gratification of playing music and flawless live coding functionality.

The language is super simple to get started with, but allows for creating some serious music, as demonstrated by Sonic Pi's author Sam Aaron in his DJ sets:

All in all, a great tool for both learning programming and playing live programmed music. I suspect I'll use it more in the future. Maybe even search for excuses to do that as it's a lot of fun!

I've put my examples on GitHub in case you're interested, but the Sonic Pi examples and docs are great.