During my aggressive push to learn as much as possible about SuperCollider over the weekend, I’ve translated an earlier Csound etude of mine into SC code that generates a sequence in real-time using a Markov chain. I’ve come away with a few thoughts.
While I believe Csound definitely has an sharp edge in the DSP department, SuperCollider excels in allowing users to compose their own algorithmic sequencers. Even though the syntax of this Smalltalk-based language looks and feels very slippery to me, the SC code comes off as being much more concise and expressive than the Csound counterpart.
As for the work itself, I consider this to be very much a technical exercise; There is still so much about SuperCollider I’m completely ignorant of, including basic patterns and Pbinds, etc, and grinding against a problem like this is a big help in leveling up. Though it appears I’ll be able to build a generic Markov chain engine, separating the the SynthDefs from the nodes in a reusable function of some sort, which is the long term goal. This earliest of prototypes already goes pretty far in this direction, but there is plenty room for improvement.
I personally love this book. I spent a lot of time with it when I first received my copy. Within that timeframe, many concepts of what is actually happening behind the scenes of digital audio and synthesis started to become clear to me.
Unfortunately, I got crazy busy, and had to shelf-it. Though I have plans to revisit it this upcoming October.
I did post some of the exercises I was working over at GitHub. If you’re interested:
Finished two tiny SuperCollider projects. The first is a reimplementation of the Csound modem instrument from this morning. The conversion to SuperCollider was straight forward; I basically swapped out randh for LFNoise1, limit and ceil for > (greater than), and oscil with sine table for SinOsc:
I’ve designed a series of audio samples based on classic modem technology and I’ve released them on SoundCloud under the Creative Commons attribution license.
Now for the extremely geeky party, how these samples are made. The sounds are generated with Csound using a form of frequency modulation called frequency-shift keying, a technique used by modems to transmit data to one another. Here’s a brief, and for this reason a not-to-entirely accurate, explanation of how a modem works. Modems communicate with each other by sending and receiving binary data between one another. The binary data is embedded into an audible signal by modulating a sine between two discreet frequencies at a specific time interval known as the baud rate.
To accomplish this modem-like sound, the randh opcode generates random noise at a user-specified frequency. The signal continues into the signal-to-binary converter, covered last week in Positive or Negative, creating a series of pulses consisting of 0s and 1s. These 0s and 1s are then mapped to the two desired frequency values by scaling then biasing them with the multiplication and addition opcodes. Finally, this signal is inserted into the frequency parameter of a sine wave oscillator, resulting in a sine wave whose frequency changes back and forth between two values at a timed interval determined by the randh at the top of the synthesizer graph.
Whether or not the results are authentic is kinda in the air, but isn’t necessarily the point. I’ve even played with parameters that have no basis in reality. The truth is, after the audible handshake a modem makes when connecting to another computer, I have no idea what the actual transmission sounds like and couldn’t find a reliable recording online. Based on what I’ve read, my design isn’t accurate, but close enough for sound design purposes. However, I’m thinking that designing a virtual modem simulator could be fun. Might have to pencil this project in for October.
Since forming in 1999 and releasing their first record in 2006, Metronomy have steadily risen to become one of the UK’s most exciting bands. Their third album, the English Riviera, was released earlier this year and uses their trademark electro fused indie-rock. Here, the band invite Crane.tv into their studio to chat about Englishness and why they gravitate towards socially inadequate people. [Crane.tv]
Discovered Metronomy yesterday and can’t get enough.
I recently ran into a situation in Csound in which I needed to know if a signal was positive or negative, and it had to work at the audio rate. I could have used if-else conditional statements, though these only work at k-rate, and would have required implementing a User-Defined Opcode utilizing the setksmps opcode. Perhaps I was lazy at the time, or in the mood for some simple hacking fun, but I decided to forgo this obvious solution for something else. And I wanted to do it without using conditionals.
The first thing I tried was using the > (greater than) opcode. In some other languages, an expression such as (0.8 > 0) will return a value of 1, while a (-0.8 > 0) will yield a 0. Unfortunately, this opcode is not designed this way in Csound. So I kept looking.
I eventually came up with a two opcode solution utilizing limit and ceil(). First, the signal passes through the limiter, clipping the waveform between the value range of 0.0 and 1.0. As the signal continues through the ceil opcode, any non-zero value becomes a 1.0, while a zero value remains 0.0.
For example, processing a sine wave through this configuration creates a unipolar square wave.
So I’m more or less in love with Spotify, and even pay the monthly subscription. And I’m really trying hard not to spam you with this ringing endorsement, but if you look at the math, $10 for a new CD or $10 a month with crazy awesome library that consists of everything from Stockhausen to Lords of Acid, then it’s pretty clear why I have the feelings that I do. Even without the subscription, the free version of the service is magnitudes greater than radio.
If you have spotify and want to follow me, here is my public profile. Also, if there is something that I should be listening to, please let me know.