04 November 2009

ChucK


I've been using ChucK lately. The idea is to re-write the max joystick patch in a text-based language so it's more easily extendable.

The inevitable learning pains of getting started with a new environment have been very minor compared to what I'm used to. The ChucK manual is pretty good, and though the online community seems fairly small, it's populated by intelligent and helpful users. I've been using the n00b-friendly electro-music chuck forum so far. It's moderated by Kassen, who's a patient fountain of ChucK knowledge.

In just a few hours (including research time) I've gotten a simple recording step sequencer going, with a shuffle function, driving a monophonic drum synth object. I have enough encapsulation and transparency in the application to feel as though I'm 'doing it right' in broad lines, which is a rare thing for my first project in a new language.

Particularly refreshing is the way chuck deals with time. The ChucK authors refer to the chuck approach as 'strongly timed'. In chuck, you explicitly ask to 'advance time' by manipulating the 'now' object a thing called 'now'. While time is 'advancing' in the current shred (a shred is like a thread but different) the local unit generators do their thing and make sound. This scheme feels odd at first, but it quickly starts to make sense. One of the consequences of this way of working is that ChucK makes no distinction between control and audio rate data. You're free to set up loops that cycle at whatever rate you like (even sub sample rates are allowed).

If, like me you're daunted by Supercollider, but frustrated by graphic environments like Max/MSP, take a look at ChucK.

Related Posts :



3 comments:

Kassen said...

I'm patient? No I'm not! I'm actually perpetually impatient and feeling under-stimulated, impatience is supposed to be supposed a programmer's virtue though. I just happen to think that new users ask the best questions and make the best comments.

I do suppose that "now" is indeed a object but I never looked at it that way. What would this mean? "class Moment extends now {//etc.." seems to make sense at the intuitive level, if at none other.

More seriously; even a short exposure will fundamentally change your perspective on time and timing in music. Frequency, after all, is purely a function of time. For a while that was the main thing I got out of it all but that's a pritty good thing to get, I'd say, and your post made me remember those days.

Kassen said...

I looked into this.

Actually "now" is not a object. It is instead a special instance of the "time" primitive and in ChucK primitives are not objects.

Admin said...

Ah, right! I picked up the habit of assuming that everything is an object from using ruby.