ChucK things.

ChucK is an open source realtime language and system designed for audio and music creation and processing. It's developed over at Princeton. Chuck Home Page

I've been looking through ChucK for a while and have noticed a few things missing that I think would be handy. I'm a heavy user of MIDI, so I contributed some MIDI scanning code to give proper access to the names of plugged in devices (under MacOS X). To me, being able to refer to a plugged in device as "JD990" regardless of which order the MIDI interfaces came up in is incredibly useful. Kudos to Pete Yandall whose fantastic MIDI Patchbay software showed me what could be done, and by not including source forced me to go out and figure out how to do it.

Those changes are in the current miniAudicle and should be in released ChucK shortly, if not already.

MIDI wrappers

The MIDI support in ChucK is functional but primitive. In assuming that most users of ChucK won't want to keep the MIDI spec on hand (as I don't), I wrote this wrapper as a public class for sending MIDI messages. The code is still in testing, needs to be cleaned up and might end up in the base ChucK distribution at some stage, but appears here for now.

midisender.ck

  1. Code (updated 31 July 2006)
  2. Examples
  3. Documentation (updated 31 July 2006)

MIDI functions

ChucK, as nifty as it is, lacks certain primtives, particularly for string handling. Some of the things I want to do with MIDI require such things, so they're better of being tossed into one of the libraries.

std.stom
This is a function to convert a text representation of notes such a C4, D#5 or Ab2 into MIDI note numbers. It's written to fail as gracefully as possible so you'll always get something safe to feed into a function expecting a MIDI note.

  1. Standalone code
  2. Documentation