Sonic Pi and Play
Bottom-line: You aren't restricted to whole numbers when it comes to the play command; the microtones possible can yield some really fun results.
---------------------------------------
Hello hello!
The first thing you learn when starting Sonic Pi is the play command.
I won't rehash the tutorial, if you aren't familiar with play check it out - it's solid. What I wanted to write about today was something I noticed when writing a post about chords.
When playing notes, you can provide the name of the note or the number that corresponds to that key on the keyboard. 60 is C, for example. What's 61? D? Nah, C#/D♭.
62 is D.
And that makes sense cause you're just moving up the keys on the keyboard.
But then it got me thinkin'....what about 60.5? Boom. It works.
And this makes total sense too. After all, Sonic Pi is a programming language and why wouldn't it allow you to use all sorts of numbers for inputs? We can use 0.25 as a valid sleep value, right?
-------------------------------------
So what can we do with this?
You can generate some fun effects like:
This will start off at C and then added a 0.1 to the pitch for each iteration of the loop. I added the attack modifier to smooth the sound a little. Maybe you could use that for something of a drone:
note = 40
This sliding effect can be also be accomplished with the control but, to do that you have to assign a synth sound to a variable. You don't have to assign the synth to a variable in the case above. Although, in this example, you're assigning the note to a variable so, ultimately, you aren't really saving anything. It could look something like this:
The major sound difference between the two, to me, is that the first example sounds harsher and more aggressive. I suspect because you have notes overlapping whereas, in the second example, it's a single note.
Music Theory wise, I'm not totally sure. I know that there are microtonal systems of music like Indian Classical Music which could be helpful. But, man, I'm not well versed with European music theory, let alone Indian.
Either way though, it's a fun reminder of the power of Sonic Pi and the flexibility one has available to them.
What do you think? Can you think of a particularly useful application of the microtones? Let me know in the comments!
Thanks for reading!
Comments
Post a Comment