Build your own MIDI controller. Add your own switches, knobs, or sensors. The MIDI CPU generates any kind of MIDI output.
Universal MIDI Retrofit. Add MIDI I/O to non-velocity-sensitive matrixed-switch keyboards.