VOGONS


MT32-Pi Wavetable Board

Topic actions

First post, by sirnephilim

User metadata
Rank Newbie
Rank
Newbie

So I came across this: https://github.com/scrapcomputing/WavetablePi and haven't really seen it around but definitely going to build one.

Basically a DIY project that turns a Pi Zero 2 into a Wavetable card running MT32-Pi.

For those who don't know, MT32-Pi turns a Pi 3A/B, 4 or Zero 2 into an MT32/SC55/GM synth with SoundFonts via MUNT and FluidSynth. It uses original ROMs for the Roland stuff and any .SF2 SoundFont that will fit in the Pi's memory (so a bit less than 500MB considering the OS overhead for MT32-Pi on a Zero 2) for GM. This board turns it into a Wavetable expansion card to connect to your old sound cards with the proper connector.

This is nice because it requires less cables than a traditional external MIDI device, outputs through the same wire as PCM audio, and is completely software controllable with the right program.

I've used the MT32-Pi with a MIDI HAT for a while now on OG hardware, as well as the MiSTer version (I have a lot of Pi 3A's around) and the results are pretty close to perfect with Roland and even better when you find a good SoundFont for a particular game.

Something to note here is the simplicity of the build. It's all off-the-shelf parts, including an optional PCM5102A based DAC and also optional 0.91" OLED screen. (It would be quite easy to use ribbon cables to break the OLED off the board and mount to a drive plate...) Some MLCC capacitors for filtering, common resistors, some pin headers plus the Pi are the only other components on the board. (If you can't locate a Pi Zero 2, another ribbon cable might be used to fit a larger model Pi to the board - the OS supports any Pi 3 or newer and the Zero 2.) Once built, load the OS, ROMs and SoundFonts onto a MicroSD card, tweak some config files, and you're done. If you can do through-hole soldering you can do this easily. The board is powered by the sound card via the ISA bus.

Issues are there are no buttons - software control only - and the OLED placement is kind of a joke. Unless you have an open case and the screen is somehow visible it's not going to be useful. (Again, screen is optional.) Pi Zero 2 availability is essentially null, or $100 if you're completely insane and feel like supporting scalpers.

I haven't built one yet but the project looks pretty solid and is considerably cheaper per-unit and far more versatile than a DreamBlaster X2 provided you bought the Pi before the current insane resale prices. Minus the Pi you're honestly looking at a sub-$15 build. I've got the PCBs on order and parts in stock, so I will update once it's complete.

https://github.com/dwhinham/mt32-pi - The MT32-Pi project on GitHub in case anyone wants MIDI goodness.
https://github.com/gmcn42/mt32-pi-control - MT32-Pi Control project - Control your MT32-Pi from DOS, Amiga, Windows and Linux

Reply 1 of 17, by stanwebber

User metadata
Rank Member
Rank
Member

the whole business (or lack of) model of the raspberry pi really nauseates me. i do own a rpi 4b 2gb and, while i don't regret buying it for the purpose it's used for, i can honestly say it will be the (first and) last product of theirs i ever care to own. i actively wish the company or foundation or whatever it is would quickly bankrupt so someone else could run an actual business in their place.

i also wanted an mt-32 emulation box, but faced with the distasteful task of buying ANY rpi board i quickly retreated. there probably are some viable single-board system competitors out there, but i settled on using softmpu's serial-out midi functionality so that any other desktop/laptop system running munt (or roland/yamaha/timidity/bassmidi/fluidsynth software synth) can be my mt-32 box using a mere null modem cable with the output being fed back into the line-in of the softmpu box. i use a portable java based serial midi bridge on the munt box so it can run on any os.

Reply 2 of 17, by igna78

User metadata
Rank Member
Rank
Member
sirnephilim wrote on 2023-01-31, 00:56:
So I came across this: https://github.com/scrapcomputing/WavetablePi and haven't really seen it around but definitely going to b […]
Show full quote

So I came across this: https://github.com/scrapcomputing/WavetablePi and haven't really seen it around but definitely going to build one.

Basically a DIY project that turns a Pi Zero 2 into a Wavetable card running MT32-Pi.

For those who don't know, MT32-Pi turns a Pi 3A/B, 4 or Zero 2 into an MT32/SC55/GM synth with SoundFonts via MUNT and FluidSynth. It uses original ROMs for the Roland stuff and any .SF2 SoundFont that will fit in the Pi's memory (so a bit less than 500MB considering the OS overhead for MT32-Pi on a Zero 2) for GM. This board turns it into a Wavetable expansion card to connect to your old sound cards with the proper connector.

This is nice because it requires less cables than a traditional external MIDI device, outputs through the same wire as PCM audio, and is completely software controllable with the right program.

I've used the MT32-Pi with a MIDI HAT for a while now on OG hardware, as well as the MiSTer version (I have a lot of Pi 3A's around) and the results are pretty close to perfect with Roland and even better when you find a good SoundFont for a particular game.

Something to note here is the simplicity of the build. It's all off-the-shelf parts, including an optional PCM5102A based DAC and also optional 0.91" OLED screen. (It would be quite easy to use ribbon cables to break the OLED off the board and mount to a drive plate...) Some MLCC capacitors for filtering, common resistors, some pin headers plus the Pi are the only other components on the board. (If you can't locate a Pi Zero 2, another ribbon cable might be used to fit a larger model Pi to the board - the OS supports any Pi 3 or newer and the Zero 2.) Once built, load the OS, ROMs and SoundFonts onto a MicroSD card, tweak some config files, and you're done. If you can do through-hole soldering you can do this easily. The board is powered by the sound card via the ISA bus.

Issues are there are no buttons - software control only - and the OLED placement is kind of a joke. Unless you have an open case and the screen is somehow visible it's not going to be useful. (Again, screen is optional.) Pi Zero 2 availability is essentially null, or $100 if you're completely insane and feel like supporting scalpers.

I haven't built one yet but the project looks pretty solid and is considerably cheaper per-unit and far more versatile than a DreamBlaster X2 provided you bought the Pi before the current insane resale prices. Minus the Pi you're honestly looking at a sub-$15 build. I've got the PCBs on order and parts in stock, so I will update once it's complete.

https://github.com/dwhinham/mt32-pi - The MT32-Pi project on GitHub in case anyone wants MIDI goodness.
https://github.com/gmcn42/mt32-pi-control - MT32-Pi Control project - Control your MT32-Pi from DOS, Amiga, Windows and Linux

I think you are a little confused about the Dreamblaster X2 which certainly doesn't want to emulate an MT-32 device; in the specific case it wants to be a good wavetable able, through special banks, to make the listening experience varied (probably it can simulate a Roland SC-55) 😄

The MT-32 emulator (and not only) is Serdaco's WP32 McCake, which basically uses a PiC4 device as a wavetable on which the MT-32 emulator runs as well as possibly the MIDI synthesizer that uses SF2 banks (Much more versatile device ) 😉

Reply 3 of 17, by Shreddoc

User metadata
Rank Oldbie
Rank
Oldbie

Nice to see this form factor adaptation of the mt32-pi and MUNT function.

Breaking out the display (and some controls, perhaps) to an accessible place could indeed be a useful extension.

Supporter of PicoGUS, PicoMEM, mt32-pi, WavetablePi, Throttle Blaster, Voltage Blaster, GBS-Control, GP2040-CE, RetroNAS.

Reply 4 of 17, by sirnephilim

User metadata
Rank Newbie
Rank
Newbie
igna78 wrote on 2023-01-31, 15:49:

I think you are a little confused about the Dreamblaster X2 which certainly doesn't want to emulate an MT-32 device; in the specific case it wants to be a good wavetable able, through special banks, to make the listening experience varied (probably it can simulate a Roland SC-55) 😄

The MT-32 emulator (and not only) is Serdaco's WP32 McCake, which basically uses a PiC4 device as a wavetable on which the MT-32 emulator runs as well as possibly the MIDI synthesizer that uses SF2 banks (Much more versatile device ) 😉

I wasn't saying it was, just that as an alternative to the DreamBlaster X2 it stacks up well. (I own an X2 already.) The McCake is pretty cool but I do prefer the DIY route. I've built an AdLib clone, modified a YMF719, made a PiStorm 600, RGB/HDMI modded pretty much every console that can be, also did my own MT32-Pi MIDI HAT and MiSTer HAT... if it's retro and involves a soldering iron I'm into it. Besides, it should be really simple to break out the GPIO - it's literally an unkeyed IDE cable - and use whatever Pi you want, CM4 included provided you use a GPIO shield. I'd say this route is at least cheaper for identical functionality provided you're willing to do a little extra work.

Ideally someone could design a 3D printed 3.5" drive bay mount for the Pi, OLED and buttons. Maybe base it off one of the Gotek mounts since those already have OLED, rotary encoder and 2 buttons. Just have to relocate the screw holes for the Pi. This old dog might someday learn some CAD and 3D printer model design but it's not gonna be this year...

<EDIT> Also note that the McCake doesn't have a DAC. PWM from the Pi isn't the best quality and I'm not certain if cards from back in the day don't just pass the signal straight through. </EDIT>

Reply 5 of 17, by mockingbird

User metadata
Rank Oldbie
Rank
Oldbie

Does anyone know whether you need to route the audio with a cable to the soundcard if you choose to use the external DAC, or does the audio signal still get passed through the wavetable header?

EDIT: Ah, ok, I see for myself on the PCB that the DAC has output pins that are being routed to the wavetable header -- no need to connect the audio jack to anything then.

A very nice alternative to an externally connected MT32-Pi then... No need for SoftMPU -- this only requires the DOS utility to switch between MT32/General MIDI mode.

Now if only anyone had any stock of Pi 2 W Zeros.

Last edited by mockingbird on 2023-02-01, 14:37. Edited 1 time in total.

mslrlv.png
(Decommissioned:)
7ivtic.png

Reply 6 of 17, by appiah4

User metadata
Rank l33t++
Rank
l33t++

How is this different from McCake?

EDIT: Pi Zero 2 W?

Reply 7 of 17, by appiah4

User metadata
Rank l33t++
Rank
l33t++
mockingbird wrote on 2023-02-01, 13:38:

A very nice alternative to an externally connected MT32-Pi then... No need for SoftMPU -- this only requires the DOS utility to switch between MT32/General MIDI mode.

This would STILL need SoftMPU for MT-32 mode operation for any games using custom samples (ie. almost all of them)

Reply 8 of 17, by mockingbird

User metadata
Rank Oldbie
Rank
Oldbie
appiah4 wrote on 2023-02-01, 14:33:
mockingbird wrote on 2023-02-01, 13:38:

A very nice alternative to an externally connected MT32-Pi then... No need for SoftMPU -- this only requires the DOS utility to switch between MT32/General MIDI mode.

This would STILL need SoftMPU for MT-32 mode operation for any games using custom samples (ie. almost all of them)

I was so involved with using SoftMPU for serial port redirection that I completely forgot about MPU401 Intelligent Mode emulation. Thanks!

mslrlv.png
(Decommissioned:)
7ivtic.png

Reply 9 of 17, by appiah4

User metadata
Rank l33t++
Rank
l33t++
sirnephilim wrote on 2023-02-01, 13:35:

<EDIT> Also note that the McCake doesn't have a DAC. PWM from the Pi isn't the best quality and I'm not certain if cards from back in the day don't just pass the signal straight through. </EDIT>

The DAC is an extra cost at no discernable benefit. In the case of an external MT-32 device, clean analog audio out is necessary because you need to route it back to the card's Line-In. McCake uses a Pi Compute Module and synthesizes the analog audio, thenpasses the signal to the wavetable header. As such it does not need a crystal clear analog audio output.

Reply 10 of 17, by polpo

User metadata
Rank Member
Rank
Member

The WP32 McCake does has a DAC - it's a PCM510x chip on the back of the board. So the audio quality would be comparable to the WavetablePi when fitted with the PCM5102 DAC.

The analog audio coming in from the wavetable header is essentially another line-in. The quality of that audio certainly does matter... if PWM is fine enough quality for you, that's OK, but a real DAC does have a marked quality improvement. The Scrapcomputing guy has put some effort into improving the quality of PWM out, though: https://www.youtube.com/watch?v=HqzHcLejGF4

Reply 11 of 17, by appiah4

User metadata
Rank l33t++
Rank
l33t++

I stand corrected. 😅

Reply 12 of 17, by sirnephilim

User metadata
Rank Newbie
Rank
Newbie
appiah4 wrote on 2023-02-01, 14:27:

How is this different from McCake?

EDIT: Pi Zero 2 W?

Wavetable Pi has a DAC <EDIT> My bad, they both have a DAC </EDIT>, uses GPIO for accessing the Pi, meaning you're not locked to a Compute Module (or even a Pi, necessarily - if someone ports MT32-Pi to another platform with a Pi style GPIO or an adapter cable), doesn't have buttons and doesn't have a header for front panel OLED and buttons.

Last edited by sirnephilim on 2023-02-01, 19:49. Edited 2 times in total.

Reply 13 of 17, by sirnephilim

User metadata
Rank Newbie
Rank
Newbie
polpo wrote on 2023-02-01, 18:40:

The WP32 McCake does has a DAC - it's a PCM510x chip on the back of the board. So the audio quality would be comparable to the WavetablePi when fitted with the PCM5102 DAC.

The analog audio coming in from the wavetable header is essentially another line-in. The quality of that audio certainly does matter... if PWM is fine enough quality for you, that's OK, but a real DAC does have a marked quality improvement. The Scrapcomputing guy has put some effort into improving the quality of PWM out, though: https://www.youtube.com/watch?v=HqzHcLejGF4

My bad, was only looking at the pictures... and yeah, I've seen the bit where they do some repurposing to improve PWM but those DAC boards are cheaper than dirt and less finicky.

Reply 15 of 17, by sirnephilim

User metadata
Rank Newbie
Rank
Newbie
appiah4 wrote on 2023-02-01, 18:53:

I stand corrected. 😅

To elaborate a wee bit, the sound coming from MUNT and FluidSynth is pristine (provided the CPU can keep up with it) but the PWM audio is not great, the DAC uses a completely different path and the chip is basically acting like a sound card - the OS even uses drivers to redirect audio over I2S. The DAC isn't cleaning the source it's preserving it at much higher quality. I've built a Pi Zero W Bluetooth speaker using the same DAC and with good drivers, amp and enclosure it's a really nice setup.

Currently I'm using an external MT32-Pi setup which also uses the same 5102A DAC, which sounds amazing even routed back through Line-In. That one's probably going to end up on my little MicroATX Geode board which has a really good SB16 compatible on-chip but pretty lousy FM synth, but it does have a game port.

Reply 16 of 17, by sirnephilim

User metadata
Rank Newbie
Rank
Newbie
Roman555 wrote on 2023-02-01, 20:25:

Not super familiar with that... seems like a more platform agnostic implementation of MUNT and FluidSynth, and the wavetable adapter talks with the host via serial? Basically rather than a bare metal implementation like MT32-Pi this is meant to just run on a generic Linux host and talk to the wavetable/MIDI/serial port via a serial cable or adapter. Certainly more flexible but a lot more wonky in how it's put together. Rather than an I2S DAC on the Pi it's using a USB serial DAC to accomplish the same thing, and it's powered via a buck converter rather than off the wavetable header. (That actually reminds me, if you're using a 3/4 or anything but a Zero on the wavetable header, you probably want to cut power from the header and power the Pi independently. Pi 4 pulls 5V ~4A which I'm guessing is more than the header is meant to handle.)

Reply 17 of 17, by sirnephilim

User metadata
Rank Newbie
Rank
Newbie

Okay, build complete and here's the report:

Upon doing a test fit the Pi board conflicted with components below the Wavetable header on my non-PnP SB16 and looked to have the same problem with my YMF-719. To fix this I relocated all components except for the passives (caps and resistors) to the other side of the board. Basically I mounted the Pi and DAC/PWM select header on the wrong side to make room. It completely obstructs the adjacent card slot (the DAC and OLED already partially obstructed it) but allows the board to mount flush with no chance of a short. To make room for the Pi I also had to mount the OLED and DAC on male and female pin headers to space them away from the Pi. It's an ugly little pig, none of the board colors match and I had to fab the female pin headers from a single-rank 40-pin female header. (9 pin female headers aren't exactly common anyway...) But it's meant to live inside a case and be unseen, so who cares? To mitigate some heat I used the lowest profile heatsinks I had - copper wafers with thermal adhesive on one side. Couldn't use bigger because there's very little clearance between the Pi and the Wavetable board after moving it to the other side.

The attachment PXL_20230215_154013957.jpg is no longer available

You can see the spacers here, which makes the DAC and OLED removable.

The attachment PXL_20230215_154029615.jpg is no longer available

And imagine the Pi and a 6 pin jumper on this side - not many sound cards are empty underneath the wavetable header.

Assembly was pretty moderate in terms of difficulty. All soldering is through-hole, no major gotchas other than make sure you mount it correctly to the wavetable header. I don't know what happens if you put 5V to the wrong pin and don't want to find out. For the configuration it's pretty simple but make sure to enable WiFi and FTP so you don't have to go removing this thing from your rig every time you want to upload a soundfont. I'm still getting used to the MT32-Pi Control software but it works well - if you have a certain game with certain settings just make a .bat file to configure MT32-Pi and start the game, then go back to normal settings. There's also a setting for the Zero 2 that overclocks it to the same frequency as the Pi 3A. I've never had any issues at stock speeds, though I assume the option is there for a reason.

As to quality it's identical to the same Zero 2 used with a MIDI HAT and DAC. Screen works fine when you can see it, and it feels like MT-32 samples load faster than they did on the external version. Since there's this lovely pin header connecting the OLED I'm looking to fab some kind of drive plate or other means of adding buttons/knob and a screen.