I am developing a comb filter. The structure is simple. There is just a buffer and a feedback. The filter (comb) frequenzy will set the time for the delay buffer. It works fine. But if I add a simple 6db LP (damping) to the feedback, the comb frequency is not 100% correct anymore. the more I decrease the damping frequency, the more the comb frequency will go down. do someone know how I can compensate this?
Here is the code from the simple LP. If lpFraction is set to 1.0, everything works fine and there are no frequency-shiftings. The damping is off. When I decrease the value, more damping is active but also the frequency will go down.
Code: Select all
//Feedback LP Filter
// lpFraction between 0-1
out = out + lpFraction * (memoryOut - out);
memoryOut = out;
Code: Select all
const double delay = 1.0 / combFrequency * SAMPLERATE;