0
$\begingroup$

I'm using a biquad filter algorithm in my project. I got 3, 16 size variable arrays summing into one and then gets filtered.

Now i want to filter each array seperately and sum after that, which if the filter was linear wouldn't be a problem, but result is non linear after all.

Am I doing something wrong with this process or biquad's non linear in nature?

If latter is true, can you recommend a nice filter to implement in embedded C, and musical sounding as well? (Quality factor is a must)

I'm using this to generate coefficients

http://shepazu.github.io/Audio-EQ-Cookbook/audio-eq-cookbook.html

$\endgroup$
  • $\begingroup$ A well-implemented biquad filter should be linear, excluding round-off noise and quantization. Are you sure you don't have overflow problems when you sum your input data? $\endgroup$ – Ben Apr 5 at 15:14
  • 1
    $\begingroup$ Biquads are linear. If you see non-linear behavior you are doing something wrong. $\endgroup$ – Hilmar Apr 5 at 15:14
  • $\begingroup$ Nevermind, solved the problem. Check my answer to this, thanks for the responses. $\endgroup$ – Can Uysal Apr 5 at 16:03
  • $\begingroup$ Can, I just saw this now. Have you found a lattice implementation of your biquaf? We've discussed that here before. $\endgroup$ – robert bristow-johnson May 5 at 19:39
  • $\begingroup$ @robertbristow-johnson Hey Robert, you pointed me before to your answer on lattice implementations but I found it confusing, and I didn't know if lattice filter is good for musical applications, if so, I will go further and implement it. Do you recommend it? I implemented paul kellet's version of moog ladder as well, but it doesn't sound good on low end as your biquad algorithms. But when using biquad, varying cutoff below 300hz makes some audible noise/rumble. I'm stuck. $\endgroup$ – Can Uysal May 7 at 8:50
0
$\begingroup$

Turns out I was using same state buffer and instance for all three filters.

Whenever an array finishes filtering, new filter uses the old state array for that different timeline and it results in non-linear outputs at the end/start of a new one.

I created different state arrays and instances for each different array and the problem got fixed. Working smoothly as intended now.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.