Hi folks,
need some help with a voltage controlled filter. I tried a lot of thinks, but i dont get it working in the way i want it.
If u use the Juce IIR Filter Class for static frequency surposes, everything works fine.
But when i try to change the frequenzy with time, crackling is the result.
Things I tried:
-
change the cutoff in every call of processBlock(for having allways the same frequency, I considered the blocksize (numSamples)…) :
filter.makeLowPass (theSampleRate, newCutoff); filter.processSamples (channelData, numSamples);
result => crackling, i gues due to the fact, u get a step Function by changing the cutOff only every time processBlock is been called.
-
like 1) but with lowpassed newCutoff values
result => little better than 1) but still i’ve got cracklings. -
load the values for the VCF in a buffer and process pass this buffer to another function, which is processing a lowpass for every value of the oscillator
for (int i=0; i<numSamples-1; i++) { float* ptr = valuesForVCF.getSampleData (0, i); makeLowPass (sampleRate, *ptr); processSingleSampleRaw (*samples); samples++; }
(btw processSingleSampleRaw is not working when I try to use it. so I store 2 values and process them with processSamples. But i decided to post the code with processSingleSampleRaw it is easyer to understand…)
result => cool VCF with … ahhhhh crackling!
where am I wrong ???
thanks a lot! for helping.
