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.
The README file from the distribution, should you require more information.
The source code for amidimap. You will, of course, need Linux to compile this.
The source code for the previous version, for archival purposes only.
Here's the map file for my PSR300, so you can see the --- rather ugly --- syntax. This has to do a number of complicated things like remapping all the instruments, swapping channels 9 and 15, remapping the notes in the drum track, etc., so it makes a good example of what amidimap can do.