amidimap is a simple program that will read in MIDI events, process them, and output them again. I use it to turn my Yamaha PSR300 keyboard into something that vaguely resembles a GM-compliant one. amidimap connects to the ALSA sequencer system so you can plug other virtual devices into it for maximum flexibility.
New! After two years, I've finally been prodded into doing an update. This version has: compatiblity with actual, modern versions of ALSA (the previous version only worked on ALSA 0.5, which nobody used); bugfixes; the ability to remap controllers as well as notes and instruments; and the ability to map pitchbend as if it were a controller. Enjoy.
The program is GPL v2 licensed.