Tuesday, October 6, 2009

MIDI programming in Linux

For no particular reason other than curiosity, I decided to venture into MIDI programming. In Linux. There are two problems with this idea:
  1. MIDI programming...: While actual MIDI programming isn't that difficult, you are definitely not in Kansas any more. These music guys are a separate subspecies to the garden variety geek.
  2. ... In Linux: Doing this is painful. It's sort of like going to the dentist, finding out that nobody is there, and that you have to fix your teeth on your own, and while there are plenty of instructions on how to operate the equipment, they all say different things, and most of them were written on USENET or some obscure mailing list well over a decade ago, discussing deprecated versions of the dentistry instruments you have in front of you.

Anyway, after 3 or 4 kernel recompiles; installation of a virtual synthesizer (fluidsynth) that didn't compile properly out of the box, so I had make countless small alterations to it[1]; and a ton of sheer luck, I managed to get my program to send MIDI instructions to fluidsynth, that actually reacted to them and made noise.

I wrote a small program that uses my low-end Wacom tablet to create a theremin-like instrument by mapping pitch bend to one axis and volume to the other, but it really didn't turn out too impressive. The tablet doesn't have enough resolution to allow playing more than just a few octaves with any sort of precision.

It's technically doable, but the end result is somewhat of an anticlimax. It was a fun afternoon's work, but when push comes to shove, a pretty fruitless venture.

[1] I think my GCC version or libc version is buggy or something. It's ridiculously pedantic.

1 comment: