The fix is to add a couple of entitlements:
This one allows your application to access the microphone.
This allows talking to the MIDI Server which coordinates all the Midi functionality across applications.
This allows talking to audio components which are not itself sandboxed.
For more details, please check developer.apple.com/library/mac/qa/qa1483/.