My Hybrid Pi5 DIY Zynthian experiment

Would you come help me on raspi forum?
I am under attack from the moderators there,
they keep saying it’s my fault, now the DIN MIDI discrete BAUD issue is
resolved because Zynthian said so!
It would mean a lot to me…

Thanks… but don’t attack anyone or else they will lock the thread down.
It’s all to clear, they are in denial and don’t want to address the elephant in the room…

Could you please explain here what the problem is now from your perspective?

As far as I know, the moderator(s) is correct, the problem with MIDI baud rate with RPi5 has been resolved, pretty much the same way it was in RPi4, by changing the higher frequency main clock for the UART, then picking 38,400 to get 31,250.

I only looked at https://forums.raspberrypi.com/viewtopic.php?p=2209655&hilit=midi+baud+rate#p2209655 in the Raspi forum.

1 Like

Sure, let’s create a dtbo overlay, past the content of uart-speed script, then save it somewhere, sudo cp it into /boot/firmware/overlays. Nano into config.txt
and add dtoverlay=uart-speed.dtbo. reboot.

I have no idea what that does. Vcgencmd measure_clock uart hasn’t changed.
It is still 48001464

Despite. I am using a Pi4B with Bookwork 64 bit, with latest rpi-update.
I have already installed ttymidi-sysex and bento-ttymidi. I gave up on Pi5B some time ago, I can use Usb Midi there. ldrolez-ttymidi has only been tested up to Pi4, so
because he’s also the maker of my Midi hat, I have been trying to follow his instructions. And they aren’t working. So now he suggested me to open an issue on his github.

I also tried install python -m venv and install ttymidi over there, I’m still searching
for mod-ttymidi as used in Zynthian. There is zero documentation on the rpi forum.
Even if venv should only be useful for Pi5 models, I had problems with the Pi4 too
when trying to install WiringPi, so I installed it there.

The thread you linked was locked, So any kind of feedback was cut off.
Now I have opened Yet another thread, release the MIDI baud on pins 14-15.

I can monitor the MIDI input with Gtkterm, set tty0 port to 38400 for listening, but it’s dead silent. My SQ64 is connected to Midi in of the SLIM MIDI HAT, playing a random pattern constantly.

Whatever I try to do, I can’t listen to an external Midi.
The problem is there are issues evidently, and not enough testing.
Because I have been testing non-stop for two months now…
There is not one seamless guide to follow, it’s all a patchwork
of fixes after another. This is my problem.
I have a Midi transposer running on an Arduino Nano, and a Raspberry Pi Pico.
It’s a simple script, Midi in, Midi out. It just works. Easy.
On the Pi4-Pi5 it used to be fairly easy untill 2018, then someone
started having problems. To me it seems that whatever caused the first
time the old methods to go belly up, it’s still there, lurking beneath.
Whatever issue seems to be approached with a “fix” but there is no
time to wait for someone to actually test the various scenarios and
Pi4, Bullseye, Buster, Pi5, Bookworm, everything is merged together
and it’s impossible to get a clear picture of anything.
Only now, after months, it finally seems that someone is trying to get to the core
of the issue. But we are far from over.

The Cherry on top was “but it seems that on Zynthian the issues has been resolved”…

https://forums.raspberrypi.com/viewtopic.php?t=389528

PhilE wrote:

Wed Jul 02, 2025 3:26 pm

So you either try to set a custom baudrate using the UPF_SPD_CUST feature to get 31250 baud or you use the overlay and ask for 38400 baud. With the overlay, that whole set_custom_baudrate function in the bento_ttymidi bridge is unnecessary.
I confirm! The bento code seems to be buggy since it tries to set the baudrate to 38400 and then 31250. Moreover the code does not handle Sysex properly.

Hi @bambalaya !

You are really overcomplicating things. It works out the box with the last RaspberryPiOS official kernel (6.12.25). You don’t need to tweak anything. Simply load the needed overlays. In zynthian we do it like this:

enable_uart=1
[pi5]
dtoverlay=uart0-pi5
[all]
dtoverlay=midi-uart0

Most probably this works too:

enable_uart=1
dtoverlay=uart0
dtoverlay=midi-uart0

That’s all you need in a fresh burned RaspberryPiOS image.
In zynthianOS you don’t need to change absolutely nothing because it’s already configured with the 3 lines above in the config.txt file.

AFAIK, there are no current issues. It simply works. If it doesn’t work for you, the problem is probably in your side. Are you sure your MIDI circuit is OK and it’s correctly wired? BTW, what is your MIDI-IN circuit?

Perhaps you could stop tweaking the configuration and concentrate in the hardware side :wink:

All the best,

3 Likes

Indeed, if you have an issue with someone else’s code - post a report on their site.

It is on the zynthian GitHub site: GitHub - zynthian/mod-ui: Web-based interface for the MOD.

As @jofemodo says, it already works out-of-the-box on standard Raspeberry Pi OS and Zynthian so you have to look at your own (hardware) configuration for the problem. You won’t make friends by blaming everyone else when some of them have already put in the hours to fix the problem. Nor will you make friends by complaining about one forum on another. DIY by its nature involves problem solving. If one can’t resolve one’s problems with the good intentioned help of the whole world of contributors then maybe one should consider accepting their own limitations… but I wouldn’t recommend anyone give up if they retain a spark of inspiration or determination.

3 Likes