MT-32 and Linux

Support and general discussion.
Post Reply
Katakis
Posts: 119
Joined: Thu 05 Mar, 2015 6:42 am

MT-32 and Linux

Post by Katakis »

I would like to point out that recently I have tried to play various Sierra games using the MT-32 (via MUNT), but I could not do this under the Linux version of PCemv17 Linux. In the Windows version, there is a "MIDI output device" in the Soundcard settings that allow you to do this, but as you see from the screenshot below, no such option exists. This means that Linux users are unable to emulate the MT-32, unless they run the Windows version through Wine or VirtualBox.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: MT-32 and Linux

Post by SarahWalker »

You haven't provided a screenshot.
Katakis
Posts: 119
Joined: Thu 05 Mar, 2015 6:42 am

Re: MT-32 and Linux

Post by Katakis »

User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: MT-32 and Linux

Post by SarahWalker »

Hmm, I would have expected the MIDI out option to show, even if the drop down menu was empty. Probably just an odd UI difference.

When you built PCem, did you pass --enable-alsa as an option to ./configure ?
Katakis
Posts: 119
Joined: Thu 05 Mar, 2015 6:42 am

Re: MT-32 and Linux

Post by Katakis »

I have compiled PCemv17 twice with the --enable-alsa option, and can confirm that the MIDI output option still does not appear.
shermanp
Posts: 175
Joined: Sat 18 Feb, 2017 2:09 am

Re: MT-32 and Linux

Post by shermanp »

Just as another datapoint, I compiled the 'master' branch of PCem yesterday on Xubuntu 20.04, with '--enable-alsa', and I too did not see any MIDI output options.

I know it used to work a year or two ago, so something must have changed since then.
flk92
Posts: 2
Joined: Mon 15 Feb, 2021 8:06 pm

Re: MT-32 and Linux

Post by flk92 »

The MIDI options under Linux only work if you have at least one ALSA RawMidi device available.
It's a bit cumbersome, plus there's a buffer overflow bug in the current v17 implementation that causes PCem to either crash or just never output MIDI since it gets stuck waiting to complete a SysEx MIDI message.
I'm currently finishing up tidying the patches that fix the RawMidi buffer overflow bug and also implement the ALSA sequencer interface so that it matches with DOSBox, Wine and other Linux programs that use MIDI.
It's easier to use and always shows at least one MIDI output to use, the default "passthrough client" that's always present at 14:0.

EDIT: I've submitted the patches here.

The current state of v17, with no RawMidi devices available:
Unpatched v17 with only RawMidi, showing no devices.
Unpatched v17 with only RawMidi, showing no devices.
no rawmidi v17.png (20.61 KiB) Viewed 3374 times
If you have at least one RawMidi device available:
Unpatched v17 with only RawMidi, showing one detected device.
Unpatched v17 with only RawMidi, showing one detected device.
one rawmidi v17.png (25.52 KiB) Viewed 3374 times
With the ALSA sequencer patch I've been working on, you get both RawMidi and ALSA sequencer devices.
Linux ALSA with both RawMidi and Sequencer implementations.
Linux ALSA with both RawMidi and Sequencer implementations.
pcem alsa rawmidi and seq.png (35.48 KiB) Viewed 3374 times
I've also made it so that the sequencer port is named after the machine, but that's just for show since PCem doesn't open more than one port at any time.
pcem aconnect.png
pcem aconnect.png (17 KiB) Viewed 3374 times
Post Reply