@toxonic
But won't I need to use an inline function for realtime?
No, and also your UI script should be deferred (non-realtime) anyway. I think all callback functions (except control callbacks) are non-inline.
Yeah a loop inside the function is fine. You might want to reverse the order of controls in your array, it seems strange that element 3 is knob 1, but it won't affect the functionality.