Open toddfraser88 opened 8 years ago
not that I know of. I'm not sure how to test that.
Anyone else who has a good MIDI setup is free to answer here.
Well the original DOSBox lets you just specify a port for MIDI in the config, e.g. 0:129 so I'd imagine setting this to the actual port your real MIDI device is on would work.
I'll confirm this when I can hook some real hardware back up to my Linux machine though.
It works on ALSA Linux to pass MIDI of GM-compatible games to system ports, by setting sequencer port as midiconfig
as @Enverex has hinted about.
I'm able to send MPU401 MIDI to ADLjack OPL synthesizer, which ALSA sequencer registers as 131:0 ADLrt
. It is user-unfriendly for setup as ALSA port ids are not fixed and can reallocate differently.
The MIDI is implemented in a similar model as Windows MM, so having a limited control over connections. You can work around that using the Midi Through
ports as intermediate to simulate virtual port; it's a working, semi-satisfying solution to the problem.
I proposed #828 as a fix to allow making ALSA virtual ports, which I found to be broken upon looking at ALSA implementation of Dosbox. It lets Dosbox make itself visible under ALSA sequencer instead of acting as "ghost" software client. The port makes itself available to connect as client wishes. (under software qjackctl, naconnect etc..)
I don't have hardware synthesiser, but am experiencing no midi on Linux when using software synthesiser (timidity) - I guess this does not work.
I am using my project (steam-dos) to automatically preconfigure MIDI synthesiser (detect ALSA sequencer port and inject it into dosbox configuration before start). In upstream dosbox it works fine, but not in dosbox-x (tested in SW:Dark Forces and X-COM games).
@dreamer on examination of my configuration and yours, I see mididevice=alsa
vs mididevice=default
in your case. Is it the cause of the problem?
@jpcima Unfortunately, changing mididevice
to alsa
did not resolve the problem. I am testing 0.82.19, installed using snap package. Judging by showgui
there are new options in midi section compared to upstream dosbox?
It has worked with a midi section as reduced as this. (dosbox-0.82.20.conf)
using timidity -iA
and Quest for glory 3.
mpu401=intelligent
mididevice=alsa
midiconfig=134:0
Has the option -debug
given relevant information? I was able to read:
LOG: 0 DEBUG MISC:Initializing MIDI emulation
LOG: 0 DEBUG MISC:ALSA:Client initialised [134:0]
LOG: 0 DEBUG MISC:MIDI:Opened device:alsa
Using the same settings as you - except midiconfig=128:0
. Timidity started the same way (-iA
) with /etc/timidity++.cfg
defining nothing new except soundfont.
I am testing Star Wars: Dark Forces (IMUSE.EXE to be specific). Game is configured to use MIDI port 330. This setup works with upstream dosbox, ran natively (not through snap nor flatpak).
Log is interesting (ran without -debug):
ALSA lib conf.c:3916:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ hw
ALSA lib conf.c:3916:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ hw
LOG: SDLNet_TCP_Open: Couldn't connect to remote host
LOG: TiMidity: can't open control connection (host=128, port=0)
LOG: MT32 emulation cannot work without the PCM and CONTROL ROM files.
LOG: To eliminate this error message, either change mididevice= to something else, or
LOG: place the ROM files in what will be the "current working directory" for DOSBox-X
(...)
LOG: MPU-401 Registering I/O ports as if IBM PC MPU-401 at base 330h
File /usr/share/alsa/alsa.conf
exists and is readable, but maybe snap is preventing dosbox from accessing it? I guess I need to compile dosbox-x to verify if that's the issue…
It needs an access to this configuration file so "hw" is known to alsa-lib. I have no knowledge of what snap is, it's maybe a sandbox retricting the access into this file.
Oh, this might be the same issue I described in #1353.
In short to me it looks like mpu401 = intelligent
is broken in dosbox-x but you can try mpu401 = uart
which works for me. As far as I understand, and I'm by no means an expert on MIDI or the legacy hardware, UART mode should be sufficient for MIDI pass through.
is hardware midi passthrough for dosbox supported on linux?