I’m getting my feet wet in Tamarin, the open-source ActionScript 3 runtime from Adobe – same code that’s in Flash 9. It’s cool tech, and I’m ecstatic that they had the cajones to bring it out into the world – where it’ll definitely make the world a better place.
This gets kind of technical so I’ve hidden most of it behind the jump.
So I own this Griffin PowerMate, which is essentially a USB knob with a light under it. It’s pretty cool – solid construction, simple operation. But the software it comes with is a little limited, and it’s not been updated in a while. All I want, says I to myself, is to make iTunes pause when I push the knob.
Their software can’t do that, so I set out to fix the problem. It turns out that the PowerMate is a standard USB HID device, which are ridiculously easy to interface with (<15kb of C++ code for a nice self-contained class with comments). After maybe seven or eight hours of hacking, I now have a small tray app that I call “SuperMate.”
PowerMate light functions as a disk activity light.
Left/right turn advances to previous/next track in iTunes.
Pushing the PowerMate pauses/unpauses iTunes.
Takes up minimal system resources – around 5mb of RAM and almost zero CPU.
Minimizes to system tray.
Deals cleanly with plugging/unplugging the PowerMate, as well as failing gracefully if iTunes isn’t loaded.
This program is public domain, and source is included.