Index
Projects
Notes
Contact

How to set Wine default MIDI output port

Suppose that you are running a program under Wine (say, an RPG Maker game) that uses MIDI output, but the program does not let you choose the MIDI output device and defaults to the MIDI mapper.

Fortunately the Wine MIDI mapper can be easily configured in the registry. Open regedit:

open key HKEY_CURRENT_USER
navigate down to Software\Microsoft\Windows\CurrentVersion\Multimedia\MIDIMap
set string value szPname to "xxxxx"

Replace "xxxxx" with the ALSA MIDI port name (look at aplaymidi -l, the column named "Port name")

If the MIDIMap key or its ancestors don't exist, create them (and the string value).
If the MIDIMap key contains other values, delete them.

Discovered by looking in the Wine source code: wine-9.19/dlls/midimap/midimap.c.

You might want to combine this note with the ALSA virmidi driver and my miditcp program in order to listen to MIDI in both Linux and Wine with a VST softsynth.