You can use a Behringer FCB1010 Ultra-Flexible MIDI Foot Controller for about $149 - but you need a MIDI IN/OUT on your computer
If you want to build your own - by far the easiest route is to use one of these and add some switches
Livid Brain Jr. ($49) - USB interface
http://shop.lividinstruments.com/brain-jr/