Anyone know of a way to disable MIDI ports in a standalone on Windows? Specifically the "MIcrosoft Synthesizer" and "Microsoft GS Wavetble SW Synth"?
Here is what I've been struggling with -
I am building a standalone application that will use audio input from the soundcard via the ASIO4LALL driver, and send MIDI through a virtual port to other applications. Since I only need an input, I would like to leave the soundcard output available to other applications. The "Microsoft Synthesizer" and "Microsoft GS Wavetable SW Synth" ports interfere with this, causing the soundcard output to become unavailable to other applications. The problem is that if the patch contains any midi i/o objects (notein, noteout, midiout, etc), Max seems to automatically load the Microsoft Synth drivers somehwere, even if I explicitly load other virtual MIDI ports as arguments to those objects.
The solution is to open the patch, open MIDI Setup, disable the two microsoft drivers, then restart the patch - at that point, the soundcard output in ASIO4ALL becomes once again available to other applications. However, I'd like to hide this from the user as much as possible by automatically disabling these ports somehow. I also plan on removing the menubar, so MIDI Setup won't be accessible from there.
Here's what I've tried -
1) I can remove the "Microsoft Synthesizer" DM by sending ( ";#SM deleteoutport "Microsoft Synthesizer" ) on patch load. However, I can't remove "Microsoft GS Wavetable SW Synth" MME this way - Max spits out "sysmidi: deleteoutport: driver doesn't delete ports"..
2) Opening MIDI Setup in edit mode, i can see th deviceviewer containing the ui has an inlet. But no help file, documentation, or info on this form regarding how to address it via the inlet.
Anyone have any suggestions on how to skin this cat? Ideally I want to handle this automatically behind the scenes. As a last resort, I can leave the MIDI Setup in there but I'd like that to be accessible via button on the UI, instead of menubar (so that I can remove the menubar in my standalone). Many thanks!!