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


  • $\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
    Commented Apr 5, 2019 at 15:14
  • 1
    $\begingroup$ Biquads are linear. If you see non-linear behavior you are doing something wrong. $\endgroup$
    – Hilmar
    Commented Apr 5, 2019 at 15:14
  • $\begingroup$ Nevermind, solved the problem. Check my answer to this, thanks for the responses. $\endgroup$
    – Can Uysal
    Commented Apr 5, 2019 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$ Commented May 5, 2019 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
    Commented May 7, 2019 at 8:50

1 Answer 1


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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