Well, I wrote a huge explanation to my problem and obviously didn't post it right.
Short Explanation: I don't want to filter in higher regions then 10kHz. I want to stop the filter at this value and wait till the lfo falls again, hits this threshold and the filter start to fall then, too.
I found this in <filter_variable.h>:
void frequency(float freq) {
if (freq < 20.0) freq = 20.0;
else if (freq > AUDIO_SAMPLE_RATE_EXACT/2.5) freq = AUDIO_SAMPLE_RATE_EXACT/2.5;
setting_fcenter = (freq * (3.141592654/(AUDIO_SAMPLE_RATE_EXACT*2.0)))
* 2147483647.0;
// TODO: should we use an approximation when freq is not a const,
// so the sinf() function isn't linked?
setting_fmult = sinf(freq * (3.141592654/(AUDIO_SAMPLE_RATE_EXACT*2.0)))
* 2147483647.0;
}
If I just add
if (freq > 10000) freq = 10000;
my problem should be solved. Is this the way to get a max. cuttoff freq?
Thanks for your help so far
