There's this kickstarted product that has a midi in (not out), but it's pretty pricey. It's open source and extremely versatile / hackable though.
Honorable mention: The Howton Owl which is cheaper and you can program it in C / C++, but it's audio only (no MIDI).
Edit: Actually it turns out the Owl can use its USB port as a MIDI port of some sort(s), and also there's a UART that can theoretically be used for MIDI but you'd have to work out how to do that yourself.
Those are some nice projects and I like that you can plug your instruments and microphone directly into the pedal. Now my requirements list for the ultimate controller pedal has grown. ;-)
Start with something like the Behringer FCB1010. Add some programmability and get rid of a few unnecessary cables similar to the mods that are available on http://www.fcb1010.eu. Switch to USB-MIDI and add two TRS combo jacks with so I can plug in my microphone and my guitar. The pedal should double as a audio interface, a MIDI controller, be powered over USB but be capable of powering my tablet over USB when hooked up to 9V.
As I write this I realize that what I'm looking for is pretty much a Guitarjack Stage https://www.sonomawireworks.com/guitarjackstage but with more footswitches, less knobs and two built-in expression pedals.
Stereo input/output, midi in/out, and it can function as a USB host to class-compliant usb/midi devices. Programmable using a puredata-esque visual programming editor, but you can also extend it with C.
There's this kickstarted product that has a midi in (not out), but it's pretty pricey. It's open source and extremely versatile / hackable though.
Honorable mention: The Howton Owl which is cheaper and you can program it in C / C++, but it's audio only (no MIDI).
Edit: Actually it turns out the Owl can use its USB port as a MIDI port of some sort(s), and also there's a UART that can theoretically be used for MIDI but you'd have to work out how to do that yourself.