Leif Oddson built a MIDI controller that allows for up to 3 foot-switches and 2 expression pedals. This is a nice DIY MIDI project.
Using FlowStone, a graphical programming language based on Ruby, he created a program to control the MIDI controller.
There is a good write up of the project, including the code, here.