From both ends to the middle

pemungkah on 2005-02-25T00:03:42

I've taken a typical Perl programmer approach to the OS X Long Now Chimes program I'm working on: do all the easy stuff first and then do the hard part.

Deep in the gut the application of course has to make noises. Turns out that the synthesis stuff is actually pretty simple: I can use Apple's provided-with-the-OS sample-playing MIDI synthesis AudioUnit to make noises (and since it's a sample player, making up a new soundbank lets me get away from just plain old General MIDI). I got the sample code working with a (fixed) arbitrary permutation of the chimes with no troble at all. Okay, I had a devil of a time trying to spot why my initializer was bad (one missing comma), but otherwise very easy.

Switching over to the other end, the user interface, Xcode makes the interface coding and design remarkably simple. I've gotten a nice interface that's almost complete in just a couple of hours of point-and-click.

Now all I need to do is shake out the interface a bit, hook up a stubbed-out permutation generator to the application, then drive the synthesis with that; we're coming right along.

When it gets to the permutation generator, I think I'm going to package it up as a C library; that way I can build TAP tests to see if it works (and recycle the ones that Sean has for his LongNowChimes CGI).

OS X coding is so much simpler than OS 9 and earlier that it isn't funny. It's actually enjoyable.