0

I have an old game which plays MIDI files with the following:

IDirectMusicPerformance8* m_pDMPerformance;
IDirectMusicLoader8* m_pDMLoader;
CoCreateInstance(CLSID_DirectMusicLoader, NULL, CLSCTX_INPROC, IID_IDirectMusicLoader8, (void**)&m_pDMLoader);
CoCreateInstance(CLSID_DirectMusicPerformance, NULL, CLSCTX_INPROC, IID_IDirectMusicPerformance8, (void**)&m_pDMPerformance);
m_pDMPerformance->InitAudio(NULL, NULL, m_hWnd, DMUS_APATH_SHARED_STEREOPLUSREVERB, 128, DMUS_AUDIOF_ALL, NULL);

This results in MS GS Wavetable Synth + reverb, no matter what the user's configuration. I need to be able to output proper raw MIDI to the default MIDI device, which, in the case of some savvy users, is a softsynth like VirtualMidiSynth or FluidSynth, an MT-32 emulator, an OPL3 emulator, or even a hardware device with its own onboard samples such as a real MT-32. Choosing device within the application is not necessary--I'd rather just have it select the default/#0 MIDI device and send raw MIDI to it. The .mid files themselves are standard and play wonderfully in other media players which output raw MIDI to either the device of the user's choice, or the default/#0 device.

rufus
  • 23
  • 1
  • 5

1 Answers1

0

You have two options:

The UWP API allows to use all MIDI devices supported by the Win32 API, and also MIDI over Bluetooth LE on Windows 10.

By the way: VirtualMIDISynth creates a MIDI device, emulating a hardware MIDI device like the MS GS Wavetable Synth. But FluidSynth does not, so you will need a virtual MIDI cable driver to output MIDI to it from another application in Windows.

Former contributor
  • 2,466
  • 2
  • 10
  • 15