Sonic Pi

When Music = Coding

What is Sonic Pi?

  Sonic Pi is a open source software program made by Sam Aaron in 2012. Where it is used as both computing and music lessons in some schools. It is a coding software where the users can produce sound and music with just a few clicks of keys. Sonic Pi uses a coding language named Ruby. 

Why Sonic Pi?

  Sonic Pi is a free software that comes with free tutorials and easy to get your hands on. It is very convenient for learners who wants to experience both music and coding at the same time. It also serves an alternative music production as it is much cheaper than buying music equipment. All it requires is download it on a compatible computer and time of experiments and practices. 

How I Found Sonic Pi

  I first heard it in a grade 10 computer science class from my teacher. The project was a research on computer topics, such as electronic music or cyber security. I was lucky enough to choose electronic music before someone picked it, and I'm happy to be the first one to stick with it.

BASICS WITH SONIC PI, Coding and Music 

  All comment lines start with '#'; It serves as a side notes for the programmers to understand codes that are done by themselves or from others. It does not affect the outputs.

  To play a sound we can use 'play' followed by a number, or a music note letter, which is 'C4' in this case (always starts with a colon ':'). 'play 60' is equal to the sound of middle C (C4) on a piano.  Notice how the colors are different? I used dark mode on this software but it's helpful to know that the number and the note works. If I get rid of the colon in front of the letter, it will just turn white.  

  Raising numbers change from one note to another. 60 - 62 changes from C4 to D4, and it's called a whole step or whole tone in music. 60 - 61 would be changing from C4 to C#4, and it's called a half-step or semi-tone in music. 

 sleep tells the computer the duration of sound. It controls the rhythm. I like to think 1 as quarter notes, 0.5 would be eighth notes, because two eighth notes equals a quarter note in music, but generally it can be any numbers you want. It doesn't have to be a note that exists in Western Music Theory. 

  Realize the three notes have no sleep between them? The three notes will be played at the same time when the code excutes, and when multiple notes are played at the same time it's called a chord. In this three-note chord it's called a triad.

VIDEOS FROM CREATOR HIMSELF

  Here's a video of Soni Pi's creator Sam Aaron's live coding, just like live music. 

  You will notice there's a lot of going in there but they are codes that can be learned later on, just like how we started from learning play to sleep, there's a lot more in there that you could use to create your own music and sound.  

  The software comes with a free tutorial as well, along as online sources and video tutorials on Youtube

SAMPLE TESTS THAT I MADE