Stuck/Hanging Notes

Hi
I am currently going through the tutorial of my Midibox Sequencer and noticed there are constant stuck notes which I can only clear via the Panic button.
It is a simple 3 track setup with a basic bass/lead/drum track.
When I solo each track on the Midibox they each play fine.
All 3 together causes stuck/hanging notes right away.
I have many Zynths but the two newest Zynthian Mini Pi5 have Oram staging and vangelis updated today and both have that problem. I have an older Pi4 Zynth which works fine but is way way before Oram.
The Midibox does send Midi Clock, could this be the issue?
Because when I record the Midi with the Midi recorder I hear the hanging notes during the recording, but when I play it back it is clean again.

Hi @HansDampf !

  • Are you using the DIN-5 connector? Could you try with USB?
  • Could you check if the note-offs are received from the webconf’s MIDI log?
  • Could you try disabling the MIDI clock?

Thanks

If I understand you correctly: I think I had the same issue once when I tried Native Instruments Super8 Synthesizer with one of my Midi controllers (I think it was Launchpad X). I learned that some controllers send note-off (0x80) messages and others are sending note-on (0x90) messages with velocity “0” on note end. Most instruments might understand both, but in my case it wasn’t the case for Super8.

This might be related here, but I don’t know. Just as possible additional context.

Edit: Probably this is also connected? Strange sustain behaviour in Zynthian?

Hi
yes this was oldschool DIN5.
Had to hunt down an usb cable to test.
No issues with the usb cable.
I did not find an option to turn off the midi clock in the Midibox.

What is wrong with DIN5 midi?
I assume if it works with usb there is no issue with note-off or should I check this?

I’m starting to suspect that the MIDI overlay for the Pi5 is not working totally fine. We never had this problems with the Pi4. The zynthian MIDI circuit has not changed, but the Pi5 clock subsystem has changed a lot and a timing issue could cause this kind of behavior. I would like to test the real working frequency in the DIN5 MIDI ports with the Pi5. Could somebody measure this? You simply generate some traffic in the DIN-5 MIDI out and measure the frequency with an oscilloscope.

I will try to do it in the next days, but perhaps somebody could do it before :wink:

Regards,

1 Like

This is valid beahviour and has been part of the MIDI specification since 1.0 (mid 1980’s) so all instruments should support it. The purpose of the is to allow running status to be used. This is where the command byte is not sent for messages with the same status byte, thinning MIDI traffic by approx.1/3. By sending NOTE-ON messages only for both note-on and note-off you can use running status for both which was a significant boon on DIN-5 MIDI at 31250 baud.

3 Likes

Hi jofemodo
unfortunately I do not have an oscilloscope at hand, but I can confirm your suspicion that it is Pi5 related. I did update my older Zynth with a Pi4 to the latest Oram stable branch and did not have any issues with DIN5 midi there.

I made a couple of tests and I hope this will shed some light as to what is going on.
I put a pc between the zynth and did record the midi there with reaper, as well as on then pi5 zynth. So both recordings should be the same, but they are not. In addition to that I also captured the Midi log.
The midi hangs are not as bad as directly connected but still there and happen instantly. Channel 3 seems to be the worst.
There is also something wrong with the midi recorder because channel 3 does not play afterwards, it does play during recording. I believe channel 3 and 1 got swapped, on the zynthian recording.
2025-03-06_08_56_34_last_state.001.mid (2.3 KB)
pi5_midi_through_pc_real_t1.mid (2.5 KB)
pi5_midi_through_pc_real.log (32.3 KB)
014-tut3.zss (8.0 KB)

FWIW I had a stuck note yesterday when I was playing the Zynthian from a USB controller while I programmed sounds. Just one in a whole afternoon, though.

zyncoder: oram-2502.1 (092fb26)
zynthian-ui: oram-2502.1 (e48c01b)
zynthian-sys: oram-2502.1 (a0a0ac5)
zynthian-data: oram-2502.1 (10f663b)
zynthian-webconf: oram-2502.1 (9e5e062)

Hi
for me this is way more then one stuck note. Today I made two recordings on a Zynthian Mini V2 with a Raspberry Pi 4B 2GB and a Raspberry Pi 5 2GB. The first recording is a 3 track midi, the second a 6 track midi file.The software is both on the same level
zyncoder: oram-2502.1 (092fb26)
zynthian-ui: oram-2502.1 (e48c01b)
zynthian-sys: oram-2502.1 (a0a0ac5)
zynthian-data: oram-2502.1 (10f663b)
zynthian-webconf: oram-2502.1 (9e5e062)
The Pi 4 is fine but the Pi 5 does what it wants and is basically not usable for more than 2 tracks playing simultaniously.
Here are the two tracks on the Pi 4:


Here are the same tracks on the Pi 5:


Any help making the Pi5 work would be swell. I did search the web for midi issues on the Pi 5 but did not find anything useful. If you want me to create an issue for this I can do that as well.
cheers
HansDampf

1 Like

Hi @HansDampf !

Are you overclocking your Pi5?

Thanks

Hi
it is set to whatever is the default option of the image, I did not change anything. I will check over the weekend, if that makes any change.
Thanks
HansDampf

There is a fix for stuck notes is in testing, not stable. We plan to push this out to stable soon which may resolve this issue.

I doubt it’s the same issue, @riban ! This is related to DIN-5 input and Pi5. Probably a low-level clock issue.

1 Like

Hi
the overclocking was set to medium, but even if I turn it off the issue is still present. I tested staging and vangelis as well with the same result. It is very consistent, those high pitched notes which should not be in there at all, seem to be at the same position on each try.

I guess by clock he means the clock rate of the UART signal.

Hi
today I played around with my zynthian mini and PI 5 again and I still have this issue no matter what midi device I use. So today I tried with the official sound demos. The link is not working right now, but the great Money For Nothing can be downloaded here Play MIDI files - #10 by C0d3man.
If I load this snapshot and play the midi file on my computer and send it through DIN Midi I get the hanging notes. Sometimes I have to play it twice to get it but it happens pretty consistent.
After the file is finished channel 2,4,5 and 6 all have hanging notes.
I tried it on Vangelis updated today.
The same setup with a PI4 works everytime and is silent after the file is finished.
Am I really the only one with this issue, or am I doing something wrong?

Could someone with a Pi 5 Zynthian try this at home?

When this happened to me using SFZ it was lways solved using a sustain pedal. Some notes got stuck in sustain nad using the pedal you could quickly solve it.

Hi
it has been raining a lot here so I decided to do some digging myself. I found this thread on the raspi forums https://forums.raspberrypi.com/viewtopic.php?p=2316221&hilit=ttymidi+issue#p2316221
While I did not find this 50 Mhz clock in any of the overlays it also mentions a newer kernel. The zynthian kernel is 6.6.47+rpt-rpi-2712. So I decided to be brave and do an apt-get update and apt-get upgrade even so the wiki tells me not to do so. This brought my kernel to 6.12.25+rpt-rpi-2712. I rebooted the zynthian and a lot of settings were messed up like multitimbral mode and the mixer levels were all over the place but it did come up. And now the best part I believe all my midi issues have vanished with this kernel. No more hanging notes on all my tests so far.
Did I open another can of worms with this upgrade or can I stay on this kernel?