Combo Boxes with automation with Timer


#1

I have some Combo boxes which represent values which can be automated via the host. I use a Timer to periodically check that the combos are up to date with the AudioProcessor as per the Audio Plugin demo. The automation works fine - the problem being that when the combos are altered manually, the timer sometimes kicks in before the ‘comboBoxChanged’ callback is received - reverting the combo to the old value held in the AudioProcessor. The same behaviour does not appear to be a problem with Sliders and ToggleButtons. I can’t see a way to block the timer update whilst selecting a combo value.


#2

I guess you could check whether Component::getCurrentlyFocusedComponent() is a texteditor…?


#3

Thanks - this solves the problem. It does mean however if the the combo just happens to have the focus without being user changed, then it does’nt get updated with a changed parameter. Still it seems pretty esoteric to want to automate an integer based parameter anyway. By the way,I tried the changeListener approach to updating the GUI, but it caused glitches on the Reaper host - even when (for debug purposes) not changing any controls - does this mean using a Timer is the only recommended way for keeping the GUI up to date from processBlock/setParameter?


#4

Hello,

I’m also having issues with the TimerCallback() use in order to keep the GUI up to date. Did you finally manage to find another way?

Thank you