VOGONS


Emulating MT-32 on an RPi2

Topic actions

Reply 240 of 274, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++
7F20 wrote on 2020-02-17, 00:20:
i haven't pursued that for a couple of reasons: […]
Show full quote
digger wrote on 2020-02-17, 00:03:

Aren't there quite a few high quality sound cards for the Raspberry Pi out there that connect through GPIO pins as opposed to USB? Wouldn't that work even better?

i haven't pursued that for a couple of reasons:

1) I usually use the GPIO for a 24bit VGA adapter that hooks up to an old RGB monitor for arcade games

2) I'm not sure how well such a solution would work with Lakka (or if it would work at all)

3) Those solutions are a good deal more expensive than my $5 usb adapter from amazon.

4) They sound better, but the $5 one actually sounds pretty good.

however, it's an interesting idea that i may look into in the future. i have one setup that goes from the HDMI to a VGA adapter and out to a monitor, but there is a whole different set of problems with that setup. (mostly that lakka is incompatible with HDMI-VGA adapters)

1) Your VGA output will work with a DAC as long as there's no conflicting pin assignments. Lots of DACs can be fitted with a pass through I/O header.

2) DAC parameters are configured from the boot partition. Including the appropriate overlay files and adding the appropriate options to config.txt will get you up and running regardless of the distro you're on.

3) They are. I'd really like to see an inexpensive DAC that just does CD quality output.

4) I agree.

All hail the Great Capacitor Brand Finder

Reply 242 of 274, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++
squeeb wrote on 2020-02-19, 21:37:

Thoughts on using this in conjunction with the Pisound board for MIDI IN/OUT?

I haven't used the Pisound, but it does appear to require a kernel module for the MIDI interface. That module isn't included in the kernel upstream source and therefore likely not in the Debian kernel packages. You can either build the module yourself or discard ARMv8 and go with Raspbian to resolve the issue as the official Raspberry Pi tree includes some of the Pisound code and the Pisound devs provide armhf binaries in their repo.

All hail the Great Capacitor Brand Finder

Reply 243 of 274, by 7F20

User metadata
Rank Member
Rank
Member

@gdjacobs

Do I have to configure munt to run at startup on the pi? That guide on the retropie forums (that refrences your guide) says to do this:

"Configure Munt to start automatically - add line /usr/local/bin/mt32d -i 12& to file /etc/rc.local (above last line containing exit 0). The parameter -i 12 is audio output buffer size, a bigger number might be needed if audio is shuttering (output buffer underruns occur), a smaller number might be used to decrease sound output latency/lag (important for CM-32L sound effects)."

Reply 244 of 274, by MKT_Gundam

User metadata
Rank Member
Rank
Member

So the munt works on Raspbian with graphical interface?
Already did the MIDI emulation following Phils tutorial using the Roland midi cable interface.

Retro rig 1: Asus CUV4X, VIA c3 800, Voodoo Banshee (Diamond fusion) and SB32 ct3670.
Retro rig 2: Intel DX2 66, SB16 Ct1740 and Cirrus Logic VLB.

Reply 245 of 274, by 7F20

User metadata
Rank Member
Rank
Member
MKT_Gundam wrote on 2020-06-26, 17:56:

So the munt works on Raspbian with graphical interface?

I'm running things directly from the console to avoid the performance hit of running X11 and it works fine.

I assume that it works from X11 as well, but haven't ever tried it. I have done it in Ubuntu though, and that worked fine.

Reply 246 of 274, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++
7F20 wrote on 2020-06-26, 15:53:

@gdjacobs

Do I have to configure munt to run at startup on the pi? That guide on the retropie forums (that refrences your guide) says to do this:

"Configure Munt to start automatically - add line /usr/local/bin/mt32d -i 12& to file /etc/rc.local (above last line containing exit 0). The parameter -i 12 is audio output buffer size, a bigger number might be needed if audio is shuttering (output buffer underruns occur), a smaller number might be used to decrease sound output latency/lag (important for CM-32L sound effects)."

For Munt on the console only, you can add it to rc.local or create a service file (Debian style sysvinit, openrc, systemd unit file, etc). It's not split into client/server, so if you want to use the qt or X11 interface, you'll need to start it interactively. You can use tools like tmux and logger to start Munt at the console like a daemon and capture terminal output to syslog. For something semi-permanent, that's the approach I'd recommend taking.

All hail the Great Capacitor Brand Finder

Reply 247 of 274, by 7F20

User metadata
Rank Member
Rank
Member
gdjacobs wrote on 2020-06-30, 15:00:

For Munt on the console only, you can add it to rc.local or create a service file (Debian style sysvinit, openrc, systemd unit file, etc). It's not split into client/server, so if you want to use the qt or X11 interface, you'll need to start it interactively. You can use tools like tmux and logger to start Munt at the console like a daemon and capture terminal output to syslog. For something semi-permanent, that's the approach I'd recommend taking.

Gotcha. Yea, I'm trying to keep things all on the command line. I have the pi isolated in 15kHz CRT land, so no graphic user interfaces for me!
I use midnight commander a lot.
I suppose it would be interesting if I could find a gui that worked in 320x240, but it doesn't seem to be around.

Reply 248 of 274, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

No need for an HDMI output. You can tunnel X11 through SSH or use a protocol like VNC or NX to run graphical software to a remote station. Not saying it's the most practical approach, but it does give you extra options and more flexibility you can experiment with.

All hail the Great Capacitor Brand Finder

Reply 251 of 274, by keenerb

User metadata
Rank Oldbie
Rank
Oldbie

https://streamable.com/cnzpbh

Playing a few sample MT32 midi files on my RPI4 2gb.

If I understand htop's output it seems like it's using maybe 50% of one core for these particular midi files. I think that's plenty of leftover CPU for DOSBOX and whatever else you'd need.

That's with Process all MIDI events immediately, high quality, default reverb, accurate analogue path emulation, float 32-bit, which seem like they'd be the slower and more accurate options?

Reply 253 of 274, by 7F20

User metadata
Rank Member
Rank
Member
keenerb wrote on 2020-07-06, 15:14:
https://streamable.com/cnzpbh […]
Show full quote

https://streamable.com/cnzpbh

Playing a few sample MT32 midi files on my RPI4 2gb.

If I understand htop's output it seems like it's using maybe 50% of one core for these particular midi files. I think that's plenty of leftover CPU for DOSBOX and whatever else you'd need.

That's with Process all MIDI events immediately, high quality, default reverb, accurate analogue path emulation, float 32-bit, which seem like they'd be the slower and more accurate options?

Very cool. I wish there was some text-mode GUI I could use from the command line. Something like the alsamixer but with all the Munt goodies.

As far as performance goes, you may notice it in some of the games that came out late in the DOS game lifecycle that also support MT32, like Dark Forces.

Also, I'm using RetroArch from within Raspberry Pi OS to achieve super resolutions so that I can get unnaturally sharp images on a CRT. I'm currently playing Dark Forces at 3840x200@60Hz on a 15kHz studio monitor. This is currently only possible using DOSBox-core in libretro. Luckily, core has built in MT32d support which seems to also be less cpu intensive.

For these reasons, and also just because I like it, I'm sticking to command-line only.

Reply 255 of 274, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++
lion2 wrote on 2020-10-15, 20:38:

Hi, is it possible to play notes from a USB Midi Keyboard controller like a "Akai MPK Mini" or an "MAudio Axiom Air Mini 32" straight to a Pi with MT32-Pi installed?

It'll work using a DIN interface, but I'm not sure if USB will. The Circle documentation hints that this should work as long as the keyboard shows up as a MIDI input in Linux. Having said that, the Circle kernel isn't Linux, so I wouldn't be able to say without testing. I'm also not sure how the keyboard will work as far as generating program change messages.

All hail the Great Capacitor Brand Finder

Reply 256 of 274, by lion2

User metadata
Rank Newbie
Rank
Newbie
gdjacobs wrote on 2020-10-15, 21:49:
lion2 wrote on 2020-10-15, 20:38:

Hi, is it possible to play notes from a USB Midi Keyboard controller like a "Akai MPK Mini" or an "MAudio Axiom Air Mini 32" straight to a Pi with MT32-Pi installed?

It'll work using a DIN interface, but I'm not sure if USB will. The Circle documentation hints that this should work as long as the keyboard shows up as a MIDI input in Linux. Having said that, the Circle kernel isn't Linux, so I wouldn't be able to say without testing. I'm also not sure how the keyboard will work as far as generating program change messages.

Thanks for the response. I can get the keyboard working music apps in Windows, including Munt32. I can also get it to work with music apps in Linux. I haven't tried the Linux version of Munt32, but I'm currently compiling it on Pi and will test.

I'm assuming Windows and Linux has drivers to convert USB keyboard controller messages to MIDI so Circle kernel might need something similar. I'll try to contact the Circle kernel devs to see if this is possible.

Reply 258 of 274, by appiah4

User metadata
Rank l33t++
Rank
l33t++

I believe the Linux kernel comes with all necessery modules for a USB MIDI input?

Retronautics: A digital gallery of my retro computers, hardware and projects.

Reply 259 of 274, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++
appiah4 wrote on 2020-10-16, 08:09:

I believe the Linux kernel comes with all necessery modules for a USB MIDI input?

For any devices that are class compliant, yes.

All hail the Great Capacitor Brand Finder