The problem with the knob interface is that it's difficult to maintain integer granularity (important especially at low frequencies) whilst also allowing fast access to higher frequencies. It's going to be a pain turning the knob ~10000 clicks to get to 10KHz for instance.

One method would be to multiply the current frequency by a set amount for each click, ie

if (KNOB_RIGHT) frequency*=1.1
else if (KNOB_LEFT) frequency*=0.909


But that still removes granularity (marginally more than a full musical tone IIRC), and still requires 71 clicks to get from 20Hz to 17KHz.

Another thought is to try and time the clicks, which I will try at some time;

long last_knob_click;
if (KNOB_RIGHT){
if (jiffies - last_knob_click <= a_really_small_time) frequency += 900;
if (jiffies - last_knob_click <= a_not_as_small_time) frequency += 90;
if (jiffies - last_knob_click <= a_small_time) frequency +=9;
frequency +=1;
last_knob_click = jiffies;
}

... and similar for the left clicks, but with subtraction instead.

But I discoved the existing calculator function could easily be copied and bastardised to supply a numeric input, and used it. Actually it'd be cool to have both.
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.