Cesare Marilungo has sent us a draft tutorial in development on using the iPhone / iPod Touch as a controller, via the open-source patching software Pure Data (Pd). He gives examples for both mrmr, the open-source project by Eric Redlinger here in NYC, and akaRemote.app from Masayuki Akamatsu (pictured). One advantage of akaRemote: you can transmit data to it for additional on-screen feedback.
This also isn’t a bad way to learn how to use OSC (OpenSoundControl) for communication. As you can see, it’s not hard at all — and this is patching OSC behaviors from scratch. Once you have X and Y coordinates, it should be easy enough to send MIDI messages to other applications that don’t support OSC, via IAC (Inter Application Communication) on Mac or a tool like MIDI-Yoke on Windows. (Linux and Windows users, note that the interface editor for mrmr is Mac-only.)