dwhinham / mt32-pi

🎹🎶 A baremetal kernel that turns your Raspberry Pi 3 or later into a Roland MT-32 emulator and SoundFont synthesizer based on Circle, Munt, and FluidSynth.
https://twitter.com/d0pefish
GNU General Public License v3.0
1.28k stars 81 forks source link

Pi 3 B 1.2 (+) issues #107

Closed ppuskari closed 3 years ago

ppuskari commented 3 years ago

Was really excited to try this project out. So far I've tried with a M-Audio Uno and a generic. The Generic adaptor actually works better when it works.

I have basically given up on this for a while I think. I normally run FluidSynth on Linux and Windows and the same HT-700 keyboard and both adaptors work great with that.

On this project even with a 5 second delay, most of the time the adaptors are not found, or when they do and I see the activity lights, there is no sound off the pwm headphone jack.

Sometimes I can get the system to start and produce sound by moving the usb port, When I do get that working then the audio quality is horrible, and on instrument changes it hangs the sound and eventually the system locks up it seems and I have to reboot.

Been using the Raspi since 2012 with midi devices and timidity, fluidsynth etc and those work well. I have all the verfied sha-1 roms and pcm instrument data files except the NEW mode one 2.04 Can't find that one at all on the web.

I have found that only really small soundfonts work too. The included one and the 8meg soundblaster one mainly, but they suffer form the hanging sound and crashing too.

Not sure if I'm expecting too much from this project. Am considering building munt on the pi ontop of normal raspbian and see if that works

Have also tried with 2 different 3 b pis with the same results. Tried the 3B 1.2 first then tried a 3B+ Same results on both.

Any way to get at some logging to see what the system is even struggling with?

dwhinham commented 3 years ago

First let's start with the basics - what kind of power supply are you using?

If the PSU is weak, the Pi will be throttled and you will get severe audio problems. Make sure your PSU can deliver at least 2 amps.

If your Pi shows a lightning bolt on screen (HDMI) when you boot Linux on it, the PSU is not suitable.

Regarding USB MIDI adaptors, in general they aren't as compatible as they are under Linux, mainly because the Pi's USB controller lacks public documentation, so it has been difficult for the Circle author to get every device working. TL;DR, USB is hard.

That said, the two adaptors you've mentioned have been the most problematic for mt32-pi users so far - I have an old M-Audio Uno that usually works fine, others have used more recent revisions and they have been unreliable. The best results have been with Roland adaptors or using a GPIO MIDI interface.

You aren't expecting too much from the project - most users enjoy a very good experience and I personally use it every day. It wouldn't be published here at all if it was completely unusable 🙂

If you want to see the logs, you can try the kernels-hdmi download from this build, which is from a recent commit: https://github.com/dwhinham/mt32-pi/actions/runs/727192835

Just replace the kernels and attach an HDMI display, you should see the logs.

My guess is that you may see Low voltage warnings and/or USB errors. Let me know how you get on.

andrewwong2000 commented 3 years ago

I've been doing some bench testing using a good digital lab power supply.. using a basic Aliexpress 6" USB3.0 cable

3A+ without disable warnings: I don't see more than about 1.4A or 7.2W total draw. So I'm not sure 2.4A is the problem. But Pi throttled and audio glitchy, MIDI errors.

3A+ With disable warnings: The current with a 3A+ goes up to 1.8A peak or about 8W. MT32pi works properly with no MIDI errors.

With a 3B+ same behaviour.. it works fine with disable warnings and peak current is almost 2A or 10W but nowhere near the 2.4A limit of USB.

However, plugging the same 3A+ system into an Anker 9 port USB3.0 hub 2.4A USB port (with ext. PS).. it doesn't work But an Anker 5 port USB dedicated charger it works fine.

So yes its the quality of the power supply.

In terms of temps using a FLIR E4, with ambient 30C, I see the Pi 3A+ CPU at about 58C while my DE10 is at 64C (both no fan, no heatsinks). With a fan only, DE10 drops to 50C and Pi3A+ to 42C.

So the temps look OK.

ppuskari commented 3 years ago

Hello! Thanks for looking into this. Yes this is a stock 3b and 3b+. The first was a canakit 2.5amp PS then also tested with another 2.5amp supply from Fryes. The canakit one however did throw undervolts sporadically. The Fryes one does not.

Did more testing with both boards with the hdmi kernel.

Logging shows when most thjngs are working that the last log is cpu 0 starting main task. This is regardless of mt32 or sound font mode.

Sound font mode however will at least generate sound before locking up on instrument changes. But I can't rule out it's the USB dongle because it will throw invalid bytes according to the logging.

I still do not get any sound in mt32 mode. Yet. Will try hooking up some gpio midi next and see if that helps the first issue at least.

Is there supposed to be some kind of logging when it finds mt32 roms like I see for soundfont? I have sha1 matched roms in the rom folder. And using default old mode when I try.

Yes this is bare pi with no mistr integration or add on hats. Just the USB dongle.

Thanks!

dwhinham commented 3 years ago

There's no logging for MT-32 ROM scanning - if there's at least one valid set it'll work, otherwise it will fail and you'll only have SoundFont mode.

dwhinham commented 3 years ago

Can you please read all of the FAQ aswell, because it sounds like you might be trying to play MT-32 mode on Channel 1, which of course will not work.

ppuskari commented 3 years ago

That is correct I have the midi keyboard a Casio ht700 on channel 2 for transmit. It works great on that channel normally as well.

In soundfont mode it keys the HD light upon midi send data. On mt32 mode it also lights up the pi HD light on keysend data on mt32 mode as well. Just no sound at all out the pwm headphone jack

I'll keep plugging away. Yes l have been through the faq a lot trying to see if I just missed something like that. But no. It did take a while to find the roms properly as well as interleave properly a few of them from smaller eprom pulls. But everything matches according to your sha1 computes for each file I'm using.

Later this afternoon I'll build the din5 to gpio cable and try that method.