You'd need to make sure that the sound generator you want to play via MIDI accepts Program Changes MIDI messages, and at that point you can use a MIDI controller (anything from a pad controller to footswitches, as long as they send the right MIDI msg) to load the preset/sound on the fly.
In order to better understand the details, you'd need to share more info about the sound generator.