To elucidate on the change in Chi’s filter frequency knobs, previously the knobs ranged from 0 to 1, which were then scaled to the appropriate frequency sweeps for the low and high crossover points. I did this using a quadratic function for each, namely 540x2 + 20x + 80 for the low frequency point (0 -> 0.5 -> 1 becomes 80hz -> 225hz -> 640Hz) and 6800x2 + 200x + 1000 (0 -> 0.5 -> 1 becomes 1000z -> 2800Hz -> 8000Hz). I copied those frequency values from Ranes MP2015 rotary DJ mixer, and they cover the crossover points for most three band performance style isolators I’ve used (I have used an Isonoe isolator that had it’s mid/high crossover up at 12kHz, wasn’t my cup of tea).
All well and good and it sounded the way I wanted, but @Squinky correctly pointed out that it’d be better for the tooltips to show the actual value in Hz rather the arbitrary 0 to 1. configParam() has the capability to give a knob a separate display value from it’s actual value, which is used in lots of modules, e.g to display values in Hz for a knob that moves in semitone steps for VCOs. Passing paramters base, multiplier, and offset, to configParam() for a given knob with some actual value displays the value of that knob as:
display = multipier · base value + offset
if the given base paramter is greater than 0. For base = 0, it’s a linear relationship, for base < 0, it’s a logarithmic one. Since I was trying to approximate a sweep that was positively parabolic, the exponential function was the one for me. It turns out the functions
80 · 8x
and
1000 · 8x
approximate the original quadratic sweeps pretty well. The upper and lower limits of the knobs end up being the same, and the centre values are only slightly off what they originally were - 226.27Hz and 2828.4Hz, close enough to be almost inaudibly different, but frustratingly not round!