[Tutorial] Installing Munt (MT-32 emulation) on RPi 3
-
@nighthurdles Try opening another console session (e.g. another SSH session) and run
/usr/local/bin/mt32d
there.- If this command will output error message and return to console, you will have a clue what needs to be fixed.
- If this command will display some messages and continue to run. Please go back to first console session and run
aconnect -o
again.
2.1. If new MIDI port 'MT-32' will be displayed you have issue with starting Munt automatically (step 11. in OP).
2.2. If no new MIDI port will be shown, try stopping TiMidity while running Munt.
-
So, I hit a snag at the point where I have to put the MT32 roms in the mt32-rom-data directory; the directory doesn't exist, and trying to create the directory manually gives me that the permission to create the directory is denied. Similarly, I don't have permission to edit rc.local.
Any ideas?
-
@3DMaster You must create the directory /usr/share/mt32-rom-data (and place files there) and edit /etc/rc.local as root.
If you don't know how, you can try using Midnight Commander for these actions.
To install Midnight Commander run:sudo apt-get install mc
To run Midnight Commander as root run:sudo mc
-
Considering to build a Munt-Pi (3B+). But I have some questions first:
- Can I use the 3B compiler flags for the 3B+
- Can I route the audio output via a Hifiberry or USB audio device? If so, how?
- Can I input another audio source via a USB audio device (e.g. Sharp X68000 native audio), and mix it with the audio generated with Munt (from X68000 Midi) and have it both routed to the USB audio output?
Thanks in advance!
-
@seren said in [Tutorial] Installing Munt (MT-32 emulation) on RPi 3:
- Can I use the 3B compiler flags for the 3B+
Most likely they will do. - Can I route the audio output via a Hifiberry or USB audio device? If so, how?
You can either add-d name
parameter when starting mt32d (step 11. in OP) to specify ALSA PCM output device. Or you can comment outdtparam=audio=on
in /boot/config.txt to disable Raspberry Pi built-in sound card.
- Can I use the 3B compiler flags for the 3B+
-
I would like to try the Qt version on my Raspberry Pi 3B+. Can you explain how to build that (including installing Qt itself, etc.) ? I ran into issues , something with: fatal error: QtWidgets/QAction: No such file or directory
#include <QtWidgets/QAction>@David87 said in [Tutorial] Installing Munt (MT-32 emulation) on RPi 3:
- Can I route the audio output via a Hifiberry or USB audio device? If so, how?
You can either add-d name
parameter when starting mt32d (step 11. in OP) to specify ALSA PCM output device. Or you can comment outdtparam=audio=on
in /boot/config.txt to disable Raspberry Pi built-in sound card.
I have it running (mt32d) with a HifiBerry DAC+ADC. I made sure the latest kernel was installed with Hifiberry support with sudo rpi-update and indeed commented out dtparam=audio=on and put in dtoverlay=hifiberry-dacplusadc in /boot/config.txt. Use the correct name for your hifiberry device: https://www.hifiberry.com/build/documentation/configuring-linux-3-18-x/
- Can I route the audio output via a Hifiberry or USB audio device? If so, how?
-
@seren Unfortunately I cannot help with Qt things.
And the default audio output device for you is successfully set to HiFiBerry, correct? -
i am very interested to pimp up my DosBox by using this great tutorial.
Just two questions in advance:
- is this tutorial still up to date concering retropie 4.4.(.15) ?
- is munt_2_2_0 still the latest available version of this Emulator?
Thx a lot for Support!
-
Is this better than using the munt implementation already built into scummVM or does the retropie version not have munt built in?
-
@Barcrest AFAIR its meant for usage in DosBOX - not ScummVM.
-
- You can test this tutorial on RetroPie 4.4. And please post here any issues observed if you do so! Most likely everything will work.
- Latest Munt version is 2.3.0 - the 2nd step will be
wget https://github.com/munt/munt/archive/munt_2_3_0.tar.gz
and first command of 3rd step will betar -xzf munt_2_3_0.tar.gz
-
Thank you Dave!
I will make a backup of my Image in the weekend and then start to install Munt following your tutorial.
Feedback will follow ;)kind regards
-
Hello,
Thanks for writing this. I had a minor problem with CMake not finding Glib2:
CMake Error at /usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message): Could NOT find GLIB2 (missing: GLIB2_LIBRARY GLIB2_INCLUDE_DIR GLIB2_CONFIG_INCLUDE_DIR)
In case anyone else is having that particular problem, this is how I fixed it:
sudo apt-get install libglib2.0-dev
Best regards,
Andreas
Music Production, Retro computer enthusiast, App Development, Programming & Smart design
-
By the way:
Running mt32d or xmt32 as root user will allow program to use real-time scheduling which may reduce/remove drop outs as the program can use the CPU more aggressively.
(from README.txt in the "mt32emu_alsadrv" folder)
-
Has anyone tried to compile munt for the Pi4?
What would the flags be for that case?
-
@Impy I have updated OP with flags for Raspberry Pi 4.
Possibly even better performance could be achieved by using the flags below (I have done zero testing on these - they might also degrade performance or even cause compilation errors).
- Raspberry Pi 4:
export CCFLAGS="-Ofast -march=armv8-a+crc -mcpu=cortex-a72 -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations -munaligned-access"
export CXXFLAGS="-Ofast -march=armv8-a+crc -mcpu=cortex-a72 -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations -munaligned-access"
- Raspberry Pi 3:
export CCFLAGS="-Ofast -march=armv8-a+crc -mcpu=cortex-a53 -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations -munaligned-access"
export CXXFLAGS="-Ofast -march=armv8-a+crc -mcpu=cortex-a53 -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations -munaligned-access"
- Raspberry Pi 4:
-
@David87 Thank you! It worked like a charm (the safer flags). The qtmobility-dev package was not available in the repos. I replaced that one with:
qttools5-dev
-
First, thanks for this thread folks - this is amazing!
So I've followed this process and its working great on my 4GB Pi 4 (with the safe compiler flags). Although the MT-32 stuff sounds great in the games I've tried that support it, any ideas as to why with the mt32d running the SB16 stuff then doesn't seem to work in DOSBox?
IF I comment out the line in rc.local and reboot so its not autostarting, then the SB16 stuff works fine, but it seems either-or for some reason.
-
@matthewtoney Nevermind on that one - user error :)
-
@david87 necroing this to add info and also ask.
I am using "DOSBIAN", and while it has a script to install a pre-compiled version of munt, it seems the url it wants to get the package ("munt-pidos") from does not work...
So I followed this tutorial and I was able to make it work. This is on a PI400 by the way.
Only "problems" I found were:
- in rc.local, if I add the governor lines (which I assume do not work in my case due to permissions, since values do not change in the files after boot), for some reason mt32d does not start...
If I comment out those lines it does start.
Any clue why?
- The volume of MT32 sound is too low... Any way to control it?
I have to mention that this distribution comes with SVN and ECE versions of DOSBOX. For SVN, this is of course required, and I find the problems mentioned in 1 & 2
For ECE however, it seems MUNT support is builtin? Without starting mt32d, or specifying midiconfg info, but adding the path to the roms in its .conf file (which has an extensive mt32 section), MT32 emulation just works (and I "solved" the volume issue by using the mixer which seems to have added an MT32 section/separate volume)
Does this all seem correct?
- in rc.local, if I add the governor lines (which I assume do not work in my case due to permissions, since values do not change in the files after boot), for some reason mt32d does not start...
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.