Awesome
PatchMaster
PatchMaster is a MIDI processing and patching system. It allows a musician to reconfigure a MIDI setup instantaneously and modify the MIDI data in real time.
With PatchMaster a performer can split controlling keyboards, layer MIDI channels, transpose them, send program changes and System Exclusive messages, limit controller and velocity values, and much more. At the stomp of a foot switch (or any other MIDI event), an entire MIDI system can be totally reconfigured.
PatchMaster is totall programmable using Ruby. See the examples for a few ideas.
For more information please see the documentation.