probonopd / MiniDexed

Dexed FM synthesizer similar to 8x DX7 (TX816/TX802) running on a bare metal Raspberry Pi (without a Linux kernel or operating system)
https://github.com/probonopd/MiniDexed/wiki
1.13k stars 81 forks source link

Update circle to test stuck notes issue #755

Open probonopd opened 1 week ago

probonopd commented 1 week ago

DO NOT MERGE THIS. It causes stuck notes.

No other changes. See whether we get the stuck notes issue.

References:

github-actions[bot] commented 1 week ago

Build for testing: MiniDexed_2024-11-14-000464e Use at your own risk.

diyelectromusic commented 1 week ago

I think we need a bit more detail here - what makes you think circle is the issue?

These PRs are adding an awful lot of code between them which is a pretty major concern to me and almost certainly likely to lead to performance issues at some point - especially including networking into what is essentially a real-time, latency-critical signal processing system...

To be honest, I have to suggest that if someone wants a networked Dexed, then maybe they ought to be using Zynthian or Raspberry Pi OS with Dexed itself...

One of the key unique features of MiniDexed is that it is an embedded appliance. If you're just going to stick it on a Pi at the end of a network link, the maybe you don't really need an embedded system in a box like this (in my view).

Kevin

probonopd commented 1 week ago

Yes, in this build I get stuck notes when playing rapid glissando on the MIDI keyboard.

No networking code involved here at all.

If you look at https://github.com/probonopd/MiniDexed/pull/755/files then you see that the only change in this build is the circle update.

diyelectromusic commented 1 week ago

I mean why do you think this will solve the stuck notes issue, which has been reported as part of those other two PRs?

Is it a problem with the current release? If so, they why do you think updating circle will solve it. If not, then why are we updating circle at all?

Kevin

probonopd commented 1 week ago

This PR is not meant to be merged. Just to show (by the way of providing a build) that merely updating circle is what causes the "stuck notes" issue.

probonopd commented 1 week ago

@rsta2 do you have an idea on what might be going on here? We suspect that circle Step48 introduces an issue that causes notes to be stuck (playing forever) in MiniDexed (as in the test build a few posts above), whereas this issue did not exist in Step47. Thank you very much for having a look!

diyelectromusic commented 1 week ago

So are you're saying this update actually /causes/ the stuck notes issue or fixes it? I've not seen anything reported against the main build that there is an issue with stuck notes...?

If this update to circle is causing it, then we'd probably need to know what hardware you're using; what MIDI interface; does it have issues with serial or USB MIDI or both; what does the profiler say is going on with respect to process/audio performance; does the MIDI dump show out of sequence MIDI events; and things like that really...

Kevin

soyersoyer commented 1 week ago

With this branch I get stuck notes much sooner. I experienced stuck notes also with the main branch, but only while using the hold mode of my controller. In hold mode it sends more note off messages at once. With my another controller I can get stuck notes with the main branch without hold mode also, but it's not easy.

probonopd commented 1 week ago

So are you're saying this update actually /causes/ the stuck notes issue or fixes it?

This (updating circle with no other changes) causes stuck notes.

diyelectromusic commented 1 week ago

In that case can you both please provide details of your hardware configuration and under what conditions stuck notes are observed?

Specifically:

@soyersoyer can you describe what the "hold mode" is for your controller?

Kevin

probonopd commented 1 week ago
diyelectromusic commented 1 week ago

I'll see if I can reproduce something here too to try to work out what is going on. It would be particularly good to know if this is just a USB thing or not. That might give some clues.

I wonder if there are similar issues in USB gadget mode...

Kevin

omersiar commented 4 days ago

For me, RPi3 A+, USB Host mode with Arturia Keyboard, it seems NoteOn and NoteOff becomes inverted after bug triggers. Pressing a key sends a NoteOff, depressing it sends a NoteOn. This is why it feels like it become stuck. Hard to capture trigger point for the bug on MIDIDump to console.

soyersoyer commented 1 day ago
The button marked Hold will hold the last note(s) played until a new note is played or until
you disengage the Hold function
Pi version 3b+ and 4
USB
MIDI channel configuration: any
Multi TG
Level of polyphony (both as configured and as played when causing the issue): default
When playing manually or when sending MIDI from a DAW/sequencer: manually
Ideally a MIDI log of the notes getting stuck, but if it is performance related then slowing things down might not cause the same issue...
Does it do the same (get stuck) when the "PC keyboard" input is being used (might not be possible to reproduce if performance related of course. Unless you can "play" a PC keyboard pretty quickly...), not tested
All sounds or just specific voices/performances? All

I hear some crackling when it happens. According to the logs, noteoff messages are not being received.