#100DaysOfCode with Sonic Pi
Day 1
So I decided to start my #100DaysOfCode journey. Yes, almost everyone is doing that. But what I want to do is a bit different (or, maybe not?). I haven’t been coding for about 7 years, and the best way I could have approached this is by selecting something that marries with another of my hobbies. I found out about Sonic Pi from an Algorave gig. And thus, I knew what to do.
What’s Sonic Pi?
Sonic Pi is an amazing live coding environment based on Ruby. It was developed by Sam Aaron to work as a platform for coding and music lessons. The project was developed in collaboration with Raspberry Pi, probably that’s where the “Pi” came in from.
About my challenge
I have been inclined to music since my childhood. Learnt to play the mandolin in school, and then learnt a bunch of different instruments on the way to adulthood. So choosing music as a base probably could have been the best possible way for me to get into this.
Day 1
I started day 1 with tutorials from the Sonic Pi website. And build my first live coding loop. The code is up on my Github if you want to do your version of it. Don’t forget to share them with me on Twitter or Instagram!
The code snippet is below:
My Workflow
I start off the song by commenting off two loops — The “guit” and “drum”. Letting that run for a bar, because I wanted to count the time (bad habit of using a metronome to practice). Once I got a sense of time, removed the comments and let the other loops play out. I arrived to something that sounds like this:
That’s all from Day 1. Over the next 99 days, I wish to apply more of my music theory knowledge into live coding, while I figure out how to work on the platform. Should be fun! Next update with a new song — tomorrow!