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

avoid double-setting synth ui sliders when setting from mapper #15

Closed
balintlaczko opened this issue Feb 17, 2025 · 1 comment
Closed
Labels
enhancement New feature or request

Comments

@balintlaczko
Copy link
Owner

  • test throttling
  • test debouncing
@balintlaczko balintlaczko added the enhancement New feature or request label Feb 17, 2025
@balintlaczko balintlaczko added this to the Refinement release milestone Feb 17, 2025
balintlaczko added a commit that referenced this issue Feb 17, 2025
@balintlaczko
Copy link
Owner Author

Implemented debouncing where all synths create their own "debouncer thread" to avoid spamming the sliders with messages to set its value. The slider updates do look less attractive now, since there is a 50 ms lag from the last Probe movement until the sliders update, and also, they won't update while there is a continuous movement. I may experiment with a better tradeoff, but for now this avoids the ui becoming a liability to the interactivity if there are lots of sliders.

Also, every slider unobserves its callback before it is set, so the double-setting loop (where the synth updated the slider when its param buffer was set from a mapper, only to get the param buffer set again once or twice from the slider too).

The new setup also seems to fix the mysterious disconnects from sliders that only happened in the VS Code interactive from time to time. They may have happened because the widget models were overloaded with websocket messages(?).

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

No branches or pull requests

1 participant