“You see gentlemen, a pimp’s love is very different then a square’s.” – Idiocracy
CodeHop.com’s Spotify set list for Aug 16th, 2011.
“You see gentlemen, a pimp’s love is very different then a square’s.” – Idiocracy
CodeHop.com’s Spotify set list for Aug 16th, 2011.
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:
play{SinOsc.ar(LFNoise1.ar(300) > 0 * 200 + 1070)}
The second is an experiment short enough to tweet, which I did:
play{FreeVerb.ar(SinOsc.ar((440*LFNoise1.ar(99).ceil.clip)+300*Pulse.ar(1/4+4*SinOsc.ar(2)),0,0.5),SinOsc.kr(0.1,0,0.1,0.2),[0.3,0.2])}
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.
Get the clean block diagram.
Get faux_modem.csd.
Learning SuperCollider 20 minutes at a time in between everything else. Here’s a little synth ditty from earlier this evening.
fork{{var t=0.2,x=t.rand;play{PMOsc.ar(100+400.rand,400+400.rand,1+4.0.rand,0,0.2)*EnvGen.kr(Env.linen(0,x,0,1),1,1,0,1,2)};(t-x).wait}!200};
Thanks to everyone on the SuperCollider Mailing List who helped me with my total n00b question.
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.
(via itsthemusic.tv)
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.
Now what? That’ll have to wait for another post.
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.
The Csound Group at SoundCloud is a collection of user submitted tracks that are created with the Csound computer music language.
At the time of posting this, there are 39 tracks listed. I’d like to see this number grow. So if you have anything of interest, whether it be a composition, improvisation, or patch, do add it to the group. Providing it’s built with Csound, of course.
Though Csound is my preferred computer music language, I do love exploring the other options. The other big name in computer music languages is SuperCollider, obviously. I spent significant time with SC2 back when it was still a commercial app, and then didn’t touch SC until recently when I picked up The SuperCollider Book.
One of my self-imposed exercises to relearn the platform was to do a piece in the vein of sc140, a collection of SuperCollider compositions that fit in a tweet were curated by Dan Stowell.
fork{{play{var a,x=333;{var t=x=9.rand+1/3*x;a=a.add(SinOsc.ar([t,t+4]))}!9;Mix.new(a)*EnvGen.kr(Env.perc,2,0.1,0,1,2)};0.8.rand.wait}!9999}
This exercise proved to be quite a success. Not necessarily for the final piece, but because this process forced me to seriously dig through the language and materials in order educate myself on various tips, tricks and hacks necessary to make everything fit in 140 characters; I’m certain it could be further optimized.
Here’s a spotify playlist I created for the soft launch of the new blog. I’m also soliciting ideas for tracks for future CodeHop playlists. So if there is anything I should be listening to, please let me know!