First post, by galneon
I've recently gone back to the excellent Knights of the Chalice and have found I cannot output MIDI to VirtualMidiSynth (or any other device) no matter what I do. It's always MS GS Wavetable + reverb. I found out it's because of how the game handles MIDI. The MIDI tracks are standard and playback is just fine, with the device of my choice, when I load the .mid files in a proper player--this tells me they probably weren't authored with the old DirectMusic Producer program which could (from what I can tell) generate nonstandard MIDI specifically for playback via DirectMusic's integrated solution.
This is the code KotC uses to playback MIDI:
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);
It seems like the proper solution, to output raw MIDI to the default/#0 device, would be far simpler. Does anyone have any ideas for achieving this via code?
Origin of the plight: http://www.heroicfantasygames.com/Forums/view … f=2&t=792#p5360
This is one of the best classic D&D games I've ever played (it's OGL 3.5, and the sequel is on the way), and I have a hard time playing Dark Sun with high-quality soundfonts, only to play a much newer game influenced by it which only supports MS GS Wavetable Synth via the ancient built-in player.
There are probably a handful of games from the late '90s/early '00s which have this problem. KotC is more recent, but nonetheless, we won't always have the original source code to modify (that is, if anyone knows how to convert KotC). I wonder how practical it is to intercept the raw MIDI in those situations?
(Note this isn't in any way related to the lack of a MIDI device selector from Win8 onward--I use 10 with CoolSoft's MIDIMapper and have no issues elsewhere. Damn these games stuck between modernity and DOS. 😜)