This was made for this thread http://forum.cockos.com/showthread.php?t=97976 to use an old MIDI controller as footswitches to toggle stompboxes on and off with 1 octave controlling 1 button.
To use, load this chain in front of the VST you want to control, then in that VST, assign the button you want to control by using its MIDI learn function (usually right-click the button will bring up the option, other VSTs have different systems, check the manual for how), and hit a key on the keyboard. (don't forget to arm the track in the normal way)
The keyboard octave C1-B1 is set to CC 100, C2-B2 to CC 101 and so on to C5-B5, but you can add octaves by making copies of the VST: midiConverter3 (ctrl-drag), and changing the values there. Or you can set all the CC values to whatever you want of course.