Skip to content
Dale Whinham edited this page Feb 15, 2022 · 21 revisions

Why mt32-pi?

Q: Why would I want to use mt32-pi instead of just running Munt and/or FluidSynth on Linux?

A: With mt32-pi's baremetal implementation, you get a more "appliance-like" experience: extremely fast startup times, simple configuration, and more predictable behavior. mt32-pi tries to do one job well; a single, cohesive piece of software that is completely dedicated to the task. With a baremetal project, the software has full control over the hardware and doesn't need to compete with other tasks for resources. This gives us very low audio latency, which matters a lot if you are a musician! It is also often difficult for non-experts to persuade Linux and its various audio stacks (i.e. ALSA, PulseAudio, JACK) to work reliably together and with low latency, especially on the Raspberry Pi. mt32-pi has direct access to the audio hardware, so we don't have to worry about these issues. If none of this sounds appealing, this project may not be for you.

Q: Why would I want to use mt32-pi with a MiSTer? Can't I just run Munt and FluidSynth on the built-in ARM CPU (HPS)?

A: The Hard Processor System (HPS) in the DE-10 Nano is a dual-core ARM Cortex-A9 CPU that is clocked at 800MHz. Only one core is available to user tasks. Whilst this is more than enough power to perform MiSTer's "house-keeping" duties (bridging USB I/O to the FPGA core, running SSH/FTP/Samba services etc.), there are simply not enough clock cycles to run Munt's MT-32 emulation properly, resulting in stutters/audio distortion. No amount of compiler optimizations can replace the missing ~400MHz Munt needs to run correctly. FluidSynth can be used on the HPS fairly well, but only with basic SoundFonts. If you try to use a high-quality SoundFont that uses lots of real-time effects such as GeneralUser GS, FluidSynth will also bring the HPS to its knees very quickly. The HPS was not designed to do heavy-lifting, so there is a limit to what can be expected of it. Adding mt32-pi to your MiSTer lets you benefit from uncompromised MT-32 emulation and SoundFont-based synthesis.

Raspberry Pi compatibility

Q: Which Raspberry Pi models are recommended for mt32-pi?

A: We recommend the Pi 3 A+, 3 B+ or Pi Zero 2 W. They start more quickly than the Pi 4, they're cheaper, and have more than enough performance for the task. The 3 A+ and 3 B+ both have exactly the same CPU performance, but the 3 A+ is much smaller as it only has a single USB port, no Ethernet, and 512MB RAM (vs. 1GB). The 3 A+ is a nice compact size and an inexpensive, yet attractive aluminium case is available for it that also acts as a heatsink.

Q: I'm not convinced by the Pi 3 and I really want to use the latest model - what are the pros and cons of using a Pi 4?

A: Here are the benefits and drawbacks of using a Raspberry Pi 4 compared to a Raspberry Pi 3:

  • 👍 Faster CPU; could use higher sample rates and/or lower chunksize (for even lower latency). Higher samplerates are not usable by MiSTer users, however.
  • 👍 You could increase the note/voice polyphony (more notes/voices at once) in FluidSynth if you want to go over the default, though it won't really be noticeable for any gaming-related uses as the default polyphony of 200 voices is already superior to just about any 90s hardware MIDI sound module.
  • 👍 More RAM, could load bigger SoundFonts, but again even the Pi 3 A+ with 512MB can load the excessively large 300MB+ SoundFonts, and larger doesn't necessarily mean better. Some of the largest SoundFonts are just huge sample packs compiled together with poor overall balance for General MIDI use.
  • 👎 Slower startup time because the Pi 4's bootloader has to do more complex initialization at startup [4].
  • 👎 More expensive.
  • 👎 Not available in small form factors.

Q: Which models of Raspberry Pi are supported and if not, why not?

A: The following table is a summary of supported Pi models. Models marked with a ❓ should work in theory, but the author lacks the hardware and cannot test or document them.

Model Supported? Notes
Raspberry Pi 1 Model A, B, A+, B+ Too slow, and only single-core (mt32-pi requires multi-core).
Raspberry Pi 2 Model B Runs, although it's mostly untested and undocumented. You can help. Expect problems without an overclock. Hardware wanted.
Raspberry Pi 3 Model A+, B, B+ Fully supported.
Raspberry Pi 4 Model B Fully supported.
Raspberry Pi 400 Fully supported.
Raspberry Pi Compute Module 1 Too slow, and only single-core (mt32-pi requires multi-core).
Raspberry Pi Compute Module 3, 3+ Should be working, but untested. Hardware wanted.
Raspberry Pi Compute Module 4 The "lite" version with no on-board eMMC is fully supported.
Raspberry Pi Pico This is a microcontroller; it has nowhere near the CPU performance or RAM capacity required for this project.
Raspberry Pi Zero, Zero W Too slow, and only single-core (mt32-pi requires multi-core).
Raspberry Pi Zero 2 W Fully supported.

Common problems and solutions

Q: I'm trying to play sounds on mt32-pi in MT-32 mode using my MIDI keyboard controller but I'm not hearing anything - what's wrong?

A: Your keyboard is probably sending note data on channel 1, but by default, on power-up the MT-32 is set to receive on MIDI channels 2-10. Check your keyboard's documentation to see if you can change the transmit channel. If this isn't possible, see this wiki page for more information on how to reassign the emulated MT-32's channels.

Q: I'm getting sound distortion and/or the power LED on my Raspberry Pi is blinking - why?

A: It's possible that the Pi is not receiving enough power. When an undervoltage situation is detected, the Pi's firmware can throttle the CPU, causing sound distortion (buffer underruns). Try swapping the USB cable being used to power the Pi, or try another power supply. Check the Raspberry Pi power supply page for recommended power supply specifications.

Q: I'm using a MiSTer interface PCB with a USB A-A cable and the OLED display is scrambled/the OSD controls don't work/audio is distorted or missing - what's wrong?

A: Your cable is probably too long and the I²C and/or I²S signals are being degraded. Please try a short cable as explained on this wiki page.

Another possibility is that your I/O board has some pins missing or there are solder bridges/shorts. Check that all of the P7 header's pins are present and that there is good continuity between them and the USB 3.0 port (refer to the I/O board schematic). Also check for bridges/shorts on resistor networks RN12, RN13, RN14, and RN15.

Q: I'm using a MiSTer interface PCB with a USB A-A cable and the Pi seems to hang with "Init USB" or similar on the OLED display - what's wrong?

A: Your Raspberry Pi likely isn't hanging, but stuck in a boot loop because of insufficient power. In other words, your MiSTer's PSU is too weak to power the Raspberry Pi as well as the MiSTer. Upgrade your PSU to one that can deliver at least 3 amps, or power the Pi via its microUSB port with a separate PSU, and switch off the HAT to avoid "back-powering" the MiSTer.

Miscellaneous questions

Q: What is that cool black case I keep seeing people using with the Raspberry Pi 3 A+?

A: That's the Geekworm or Ugeek aluminium case. It is sold under both names, but the cases themselves are identical. It is very good quality, includes standoffs and rubber feet, and also acts as a heatsink for the Pi's CPU. It can usually be found on AliExpress and Amazon [1, 2, 3].

Q: Why don't I see any video output on my HDMI-connected monitor or television? Has the Pi has failed to boot?

A: This is completely normal - mt32-pi is designed to run headless and therefore there is no video output. For troubleshooting purposes, it's possible to compile mt32-pi with HDMI debug logs enabled, but these builds will hang on a Raspberry Pi 4 if no HDMI display is attached due to a quirk of the Pi 4 and Circle. Hence, for regular use, video output is disabled.

Q: What is the correct way to refer to the project?

A: The project's name is mt32-pi. That is, all in lower-case, with a single hyphen before "pi". "MT32π", "MT32-pi", "MT32PI", "MT-32-pi", "mt-32-pi", "mt32pi", etc. are all incorrect. Yes, we know very well that the original hardware by Roland was named and hyphenated as the "MT-32", but that is irrelevant. Naming projects is hard, and no-one was able to come up with a better one (issue 4), so mt32-pi it is!

Q: What does the Japanese writing say in the logo?

A: It says 「ベアメタルシンセサイザーシステム」, which reads as "beametaru shinsesaizā shisutemu", or "baremetal synthesizer system" in English.

Q: What happened to the old mt32-pi project that was based on a minimal Linux distro built with Buildroot?

A: That's been archived in the old-buildroot branch.

Clone this wiki locally