Can't get MIDI to work

I haven’t been able to get MIDI sounds in Everquest to work. Host is Pop_OS (based on Ubuntu) 19.10. The game is the RoF client running against a private server similar to P1999. To get MIDI to work on the host I installed Jack, configured pulseaudio to run on top of it, and installed (and run) fluidsynth. With this setup I can play a MIDI file and hear non-MIDI sounds (videos on Chrome) at the same time. When I run the game from Lutris, at the character select screen where MIDI should be playing, I hear silence.

lutris -d output at https://paste.ubuntu.com/p/fzHkrXJsFG/

I configured the runner to enable Output debugging info, however after running and exiting the game and clicking Show Logs, all I get is an empty terminal window.

Has anyone faced/fixed a similar situation?

FYI, tried the “MCI Shell” referenced at https://wiki.winehq.org/MIDI, and that also produces just silence.

Have you tried the next part (regedit)?

Yes, no change, but I’m not sure I fully understand it. There is only one device shown in winecfg on the Audio tab, pulseaudio, so setting it to “#1” seems like it would be invalid. Should I expect it to list “Midi Through” and “FLUID Synth (6033)” if those are what’s listed by “aconnect -o”?

That wintest.exe mcishell program logs this:
0009:trace:msacm:DllMain 0x7f380000 0x1 0x32fd24
0009:trace:msacm:MSACM_RegisterDriver (L"msacm.imaadpcm", L"imaadp32.acm", (nil))
0009:trace:msacm:MSACM_RegisterDriver (L"msacm.msadpcm", L"msadp32.acm", (nil))
0009:trace:msacm:MSACM_RegisterDriver (L"msacm.msg711", L"msg711.acm", (nil))
0009:trace:msacm:MSACM_RegisterDriver (L"msacm.l3acm", L"l3codeca.acm", (nil))
0009:trace:msacm:MSACM_RegisterDriver (L"msacm.msgsm610", L"msgsm32.acm", (nil))
0009:trace:msacm:MSACM_ReorderDriversByPriority
0009:trace:msacm:MSACM_ReorderDriversByPriority RegOpenKeyW failed, possibly key does not exist yet
0009:trace:msacm:MSACM_RegisterDriver (L"msacm32.dll", L"msacm32.dll", (nil))

Aha. After executing the play command in that test program, log shows

mci.c:188: command: play m
002a:trace:msacm:MIDIMAP_modMessage (0, 0064, 00000000, 00000000, 00000000);
002a:trace:msacm:MIDIMAP_modMessage (0, 0001, 00000000, 00000000, 00000000);
002a:trace:msacm:MIDIMAP_modMessage (65535, 0003, 0098F9C8, 00148004, 00000000);
002a:trace:msacm:modOpen (0x98f9c8 0x148004 00000000)
002a:trace:msacm:MIDIMAP_FindPort L"Client-128 - qjackctl"
002a:trace:msacm:MIDIMAP_FindPort L"jack_midi - port"
002a:trace:msacm:MIDIMAP_FindPort L"Synth input port (6033:0)"
002a:trace:msacm:MIDIMAP_FindPort L"Midi Through Port-0"

So I set CurrentInstrument to #2 and now get sound via that program.

Still didn’t work from Everquest, but I did “Run EXE inside prefix” and edited that registry, and now it works. Small issue remaining is that the system volume control doesn’t affect volume of MIDI playing.

Well, “system volume” appears to be an internal setting of pulse (rather than actual system volume), so it’s probably not surprising sound plugged in via jack isn’t affected.

Have you tried timidity? I’ve had better luck with it than with fluidsynth… Though I haven’t used either with pulse.

No I haven’t.

Well, you can try it out :slight_smile: