I think I’m using this feature in a wrong way. I’ve spread multiple types of controls across hidden pages. All these controls are set to use a virtual function. When controlling a knob, it seems that all controls of all pages of the current knob’s slot are calling their virtual function. What did I do wrong here?
Minimal repro case: Electra One App
The controls on those three pages use the parameter numbers, ie. they share identical parameterMap entry. The function callback is called on a parameterMap entry change (which can come from many sources - knobs, midi, touch, lua). This means that a change initiated by turning a knob will eventually cause update of value and function call on all controls assigned to that parameter.
I guess I feel where you are heading. You would like (parked) controls on hidden pages to ignore it, is that correct?
Exactly, I wasn’t expecting parked to controls to react to anything. Alternatively, being able to change the parameter index in the fly would also help since I could assign a very high parameter number when parking a control.
When I’ve needed controls to share a parameter number, I’ve used a workaround to prevent the ‘double updating’
Inside the functions, I’d check the current page and if the control was on the current page, I’d do the update. If the pages didn’t match, I knew I was somewhere else and just return.