Thiago's Space Blog

Just another blog, this one about my learnings as I join the Space Industry as a software engineer.

View on GitHub
1 February 2022

Sonic Pi

Creating music with code

Sonic Pi is a code-based music creation and performance tool. I discovered it randomly, while browsing music-related apps available in Ubuntu Software. It was immediately appealing to me, since it gave me an outlet to be musically creative using skills I’m comfortable with. I probably won’t be ditching my software job to become a musician any time soon, but it’s really fun to spend time coding a song.

I feel shy about publishing any of the music I created with Sonic Pi. I wouldn’t call any of it completed, or good. But here it goes nonetheless. First, there’s “Guitar ‘n’ Scratch”, an eerie guitar and vinyl scratch composition.

There’s also “Jammin’ with Bob”, which I’ve been working on since yesterday. Starting from a FLAC of Bob Marley’s song Jammin, I created a few samples that are overlaid to create the composition. It’s an example of music indeterminacy, a type of process music where aspects of the composition are left to chance. If you look at the code for the composition, you’ll see why: several aspects of the song kick in randomly, and use random amplitude and rate.