lekernel_: a few ideas: to support lots of controls, it may be useful to do the MIDI value -> midiX variable value mapping with an array. that should be easier on the CPU than division and it would also allow for all kinds of application-specific mappings, e.g., a exponential/logarithmic curve, discrete values, [0, 127] -> [-1, 1], etc.

also things like compensating for hardware imperfections. e.g., if you want a slider that goes exactly from 0 to 1, but your sliders give you values from 6 to 123, then you'll want to do something like f = max(min(123, (v-6)/117), 0); which is kinda wasteful