Audio MIDI Setup has no Automator actions written for it (that I'm aware of) and is unlikely to get them soon as it lacks an AppleScript API. An automated solution is going to be reduced to mimicking user input (pushing buttons and sliding controls) with System Events. For an explanation and example see
this recent thread.
I can help you work out the specific syntax for the script, but first I'll need to see the two configurations you're switching between. Open Audi MIDI Setup, hit Command-Shift-4 on your keyboard, then hit the space bar, then click the shaded setup window with the camera-icon cursor. Locate "Picture 1" on your desktop and rename it "MIDI Setup 1." Reconfigure your settings and repeat these steps, renaming the file "MIDI Setup 2." If you have a hosted website or storage space where you can upload the files, go ahead and link to them in your reply. If not, you may
e-mail them to me and I'll post them.