I’ve been studying the SynthVoice Pod example, and had 2 questions:
-
AnalogControl::Process() is called 3 times on each knob in each audio callback. I would have thought once is enough. Is this just an oversight, or intentional?
-
Knob behavior is “jumpy”: turning the knob often has no effect at first and then jumps to new value. For example, tuning the oscillator frequency is difficult because the pitch may jump by an octave or more. I stumbled on a fix: the knob behaves smoothly if you comment out the test inside
ConditionalParameter()
:
//Updates values if knob had changed
void ConditionalParameter(float oldVal,
float newVal,
float ¶m,
float update)
{
//if(abs(oldVal - newVal) > 0.00005)
{
param = update;
}
}
I find this behavior surprising. Can someone explain it for me?
many thanks,
Charlie