Skip to content

Conversation

@danngreen
Copy link
Member

@danngreen danngreen commented Oct 17, 2025

Moves MIDI feedback to run in UI loop immediately after getting new MIDI values from audio->UI param sync.

This fixes glitchy behavior where the audio thread has sent new CC values to UI thread, but the MIDI feedback routine is using old values because it's being run before the UI has a chance to read the new values.

With this PR, the MIDI feedback output happens right after the UI receives new values. There might be more latency in the feedback (MetaModule -> controller, not controller->MetaModule) if the GUI is overwhelmed, but the values should always be correct and this adds no additional load to the audio thread.

Values sent as feedback will be correct when a patch is first loaded or refreshed. But they might be incorrect if the MIDI controller knobs are being turned at the same time the internal parameters are changing due to other reasons (knob mappings, or module is changing its own values).

Needs further testing especially with loading patches with different mappings, changing MIDI mappings, etc.

This might also fix #533 (?)

…DI values from audio->UI param sync

This fixes glitchy behavoir where audio thread has sent new CC values to
UI thread, but the MIDI feedback routine is run before the UI has a
chance to read the new values
- was not getting called
- Only needs to send MIDI feedback if the CC did not change since the last check
@danngreen danngreen marked this pull request as draft October 27, 2025 15:35
@danngreen
Copy link
Member Author

Further testing... this still has laggy/glitchy issues so I'm downgrading this PR to Draft status

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.

Bug: occasional crash when removing a MIDI mapping with MIDI Feedback enabled

2 participants