Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update circle to test stuck notes issue #755

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

probonopd
Copy link
Owner

@probonopd probonopd commented Nov 14, 2024

DO NOT MERGE THIS. It causes stuck notes.

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

References:

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

References:
* #750
* #747
Copy link

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

@diyelectromusic
Copy link
Collaborator

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
Copy link
Owner Author

probonopd commented Nov 15, 2024

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
Copy link
Collaborator

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
Copy link
Owner Author

probonopd commented Nov 15, 2024

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 probonopd marked this pull request as draft November 15, 2024 20:26
@probonopd
Copy link
Owner Author

@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
Copy link
Collaborator

diyelectromusic commented Nov 15, 2024

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
Copy link
Contributor

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
Copy link
Owner Author

probonopd commented Nov 16, 2024

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
Copy link
Collaborator

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

Specifically:

  • Pi version
  • USB or Serial MIDI or both
  • MIDI channel configuration in use
  • Multi TG or single TG
  • Level of polyphony (both as configured and as played when causing the issue)
  • When playing manually or when sending MIDI from a DAW/sequencer
  • 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...)
  • All sounds or just specific voices/performances?

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

Kevin

@probonopd
Copy link
Owner Author

  • Pi version: Zero 2 W
  • USB or Serial MIDI or both: USB (Serial not tested)
  • MIDI channel configuration in use: Any Performance with sustained notes, e.g., HouseOrgan
  • Multi TG or single TG: Multi
  • Level of polyphony (both as configured and as played when causing the issue): Default config. Playing maybe 5 notes concurrently while playing a quick glissando up and down
  • When playing manually or when sending MIDI from a DAW/sequencer: playing 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... : Not done yet
  • 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...): PC keyboard is not connected
  • All sounds or just specific voices/performances?: Any Performance with sustained notes, e.g., HouseOrgan

@diyelectromusic
Copy link
Collaborator

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
Copy link

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
Copy link
Contributor

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.

@soyersoyer
Copy link
Contributor

With the Minilab3 firmware 1.2.0, there are no more stuck keys in Hold mode. Neither with the main branch nor with this one.

@probonopd
Copy link
Owner Author

probonopd commented Jan 1, 2025

Thanks @soyersoyer although I suspect that you might still get stuck notes if you

  • Use a voice that does not decay (plays forever)
  • Play as many notes at the same time as quickly as you can (playing fast glissando with many fingers did it for me above; maybe I should make a sample MIDI file for this)

@soyersoyer
Copy link
Contributor

soyersoyer commented Jan 1, 2025

With Minilab3 (fw v1.2.0) there are no stuck notes. But with Minilab2 it happens pretty quickly.
Edit: I tested them on RPI4, on RPI3b+ there are stuck notes with both controllers.

@soyersoyer
Copy link
Contributor

soyersoyer commented Jan 1, 2025

I bisected it with rpi3b+, this commit is the culprit: rsta2/circle@ae00d9d
rsta2/circle#467

@omersiar
Copy link

omersiar commented Jan 2, 2025

@soyersoyer Thanks, mentioned at circle

rsta2/circle#509

@probonopd
Copy link
Owner Author

Note to self, TODO: Retest once Circle Step49 is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants