SuperCollider Short

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([t,t+4]))}!9;*,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.

140 Characters

Inspired by the article Hear Free Generative Music, in Archaic Twitter Haiku, made with SuperCollider at CDM, as well as this Csound Mailing List thread, I had to give 140 characters or less a try.

Listen: 140.mp3
Download: 140.csd

In order to make it work in 140 characters or less, I had to cheat. The minimum size for a CSD file in Csound is 109 characters long. So I only count characters that are embedded in the orchestra and the score. It also didn’t tweet very well. :)

Here’s what the code looks like, or least how it would look if the tweet didn’t chew it up:

instr 1
a2 expon 1,p3,.0001
a1 oscils 8000,88*(p4%9+5),1
out a1*a2
if p2<60 then
event_i "i",1,rnd(.6)+.1,4,p4+rnd(2)
i 1 0 1 8

To all of the artists involved with sc140, superb job!

Deep Synth — Dynamically Generated Oscillators

The situation — You want an instrument that can play any number of oscillators, determined by a p-field value in the score. The problem — Unit generators cannot be dynamically created in an instrument with a simple loop. One possible solution — Multiple events can be generated in a loop, with each event triggering an oscillator-based instrument.

Download: Deep_Synth.csd
Listen: Deep_Synth.mp3

The Csound file Deep_Synth.csd provides an example of how to dynamically generate oscillators using the compound instrument technique. A compound instrument is two or more instruments that operate as a single functioning unit. This particular compound instrument is built from two instruments: DeepSynth and SynthEngine. SynthEngine is, you guessed it, the synth engine, while DeepSynth is a player instrument that generates multiple events for SynthEngine using the opcodes loop_lt and event_i:

i_index = 0
    event_i "i", $SynthEngine, 0, idur, iamp, ipch, iattack, idecay, ipan,
            irange, icps_min, icps_max, ifn
loop_lt i_index, 1, ivoices, loop_start

If you are wondering why we can’t just place a unit generator, such as oscil, inside of a loop, read Steven Yi’s articles Control Flow Pt I and Pt II. Pay special attention to the section IV. Recursion – Tecnical Explanation near the end of Pt. II. Not only does Mr. Yi do an excellent job explaining these technical reasons, but he also provides another applicable solution for creating multiple unit generator instances utilizing recursion and user-defined opcodes.

Sound Design

The instrument SynthEngine uses a single wavetable oscillator, an amplitude envelope and the jitter opcode to randomly modulate frequency. A single instance of DeepSynth can generate multiple instances of SynthEngine. DeepSynth can generate a single instance, or 10,000+. Users have control over the depth of frequency modulation, as well as the rate in which jitter ramps from one random value to the next. Panning between instances of SynthEngine is evenly distributed.

“Turn it up!” – Abe Simpson

The name DeepSynth is a homage to Dr. James A. Moorer‘s piece Deep Note, also known as the infamous THX Logo Theme. Very early in the design, it became evident that DeepSynth is capable of making very Deep Note like drones. This is due to the fact that it does utilize some of the defining techniques used in Dr. Moorer’s piece.

I highly recommend reading Recreating the THX Deep Note by Batuhan Bozkurt at EarSlap. The author conveniently walks readers through each step of the process, providing both audio and Supercollider code examples. If you have ever yearned to create that amazing sound for yourself, here’s your opportunity.

Survey on Musical Instruments

“The Acoustic, the Digital and the Body: A Survey on Musical Instruments”

“In the autumn of 2006 we conducted a phenomenological, qualitative survey on people’s relationship with their acoustic and digitial instruments. This is part of an ongoing research.”

The survey is still open if you wish to participate.

via HectorC on the Csound Mailing list.