Hello. I am trying to get a UI-element on my ui to affect a variable in the RCB. It is a ui_value_edit element and let´s users enter a value of their choice between 1-19. The value is then used in on release as a minimum velocity under/over which to play or not to play certain things. It all works fine on init, I set the ui-element to make_persistent and I can retrieve the values fine, also upon pressing the "Apply" button in the script´s slot it always responds to the latest value.
My issue is what happens when I enter a new value on the ui. It does not respond to it correctly.
These things happening every time:
1. open instrument, variable is read via the persistence and is correct. No notes play below the set velocity value in the ui_value_edit.
2. I change the value in the ui_value_edit element, now it is a lower value, below the current velocity being played. The tone plays fine. As it should, it is above the minimum velocity value.
3. I again change the value in the ui_value_edit element, but now to a higher value than the previous one. I now play a velocity below the new value. It should not play, but it does anyway. The latest value was not used, whereas just a second ago, that was the case when the value was lowered.
I did not change or apply the script since the last 2 value changes, they both had the same chance to affect the RCB.
Is there something I am missing?
(my variable in the RCB that reports the current minimum velocity, is the same as the one on the ui.)
My issue is what happens when I enter a new value on the ui. It does not respond to it correctly.
These things happening every time:
1. open instrument, variable is read via the persistence and is correct. No notes play below the set velocity value in the ui_value_edit.
2. I change the value in the ui_value_edit element, now it is a lower value, below the current velocity being played. The tone plays fine. As it should, it is above the minimum velocity value.
3. I again change the value in the ui_value_edit element, but now to a higher value than the previous one. I now play a velocity below the new value. It should not play, but it does anyway. The latest value was not used, whereas just a second ago, that was the case when the value was lowered.
I did not change or apply the script since the last 2 value changes, they both had the same chance to affect the RCB.
Is there something I am missing?
(my variable in the RCB that reports the current minimum velocity, is the same as the one on the ui.)