Usually, you can disable MIDI from the application that is installed with your soundcard but in case it's not working this way, please go to Start > Control Panel and use the search field to look to for Device Manager. Expand Sound and audio devices and disable MIDI from that location or use Properties on the audio device then choose Properties and disable MIDI from the Properties tab.
Another solution is to use the setup program for your application/game to disable MIDI input/output and use other audio methods available.