0
$\begingroup$

I am coding a music composition application and it uses a couple of different types of filter effects. I have implemented single pole, two pole and sinc filters to it successfully.

I would now like to add filters with more poles if possible.

I have these two filters here that are Second order IIR filters:

I know that poles are based on the angle of a circle and that I need an array of older samples one greater than the amount of poles to calculate the filtered sample. I also know you need the same amount of coefficients as older samples

For the IT filter I'd convert the coefficients $a$, $b$, and $c$ to $a[0]$, $a[1]$ and $a[2]$ to make it easier when I add more poles. I know there is correlation between the coefficients a, b and c of the IT filter with $a[0]$, $a[1]$ and $a[2]$, and $b[0]$, $b[1]$ and $b[2]$ of the biquad filter but how would I be able to calculate the in between poles.

e.g. if I had a 4 pole biquad filter or $a[0]$ $a[1]$ $a[2]$ $a[3]$ and $a[4]$ I believe that $a[0]$, $a[2]$ and $a[4]$ would be equals to $a[0]$, $a[1]$ and $a[2]$ from a 2 pole filter, but what would the other two be?

I'm sorry if I'm not specific enough I am only new to this field.

$\endgroup$

1 Answer 1

1
$\begingroup$

e.g. if I had a 4 pole biquad filter or $a[0]$ $a[1]$ $a[2]$ $a[3]$ and $a[4]$ I believe that $a[0]$, $a[2]$ and $a[4]$ would be equals to $a[0]$, $a[1]$ and $a[2]$ from a 2 pole filter ...

Generally no. Let's look at a 2nd order and 4th Butterworth filter with a cutoff frequency of $\pi/4$. The pole polynomials are

  2nd          1      -0.94281      0.33333
  4th          1      -1.9684       1.7359     -0.72447      0.12039

Other than $a_0$ the coefficients are different and there is no easy relationship between them

What formulas do I need to add poles to these two filter designs

That really depends on what you want your filters to do. The easiest is way is to simply double up, i.e. cascading two 2nd order lowpass filter gives you something that looks like a 4th order lowpass filter but it's not as good as a real 4th order lowpass.

In general the answer is "Use a filter design method that's suitable for the filter order and application". There are dozens of design methods, you just need to pick the best one for your task.

$\endgroup$
3
  • $\begingroup$ Take the IT filter which calculates the coefficients as a = 1/(1+d+e) b = (d+2e) / (1+d+e) c = -e / (1+d+e) How would've Jeffrey Lim Designed a filter like this one? The main filter I want is one just like the Impulse Tracker filter but with more poles so there is a more precise cutoff, mainly low pass filtering. $\endgroup$ May 5, 2022 at 4:33
  • $\begingroup$ The code I have for the IT filter is: here $\endgroup$ May 5, 2022 at 4:34
  • $\begingroup$ I just did cascading and it works fine. Thank you for your patience. $\endgroup$ May 8, 2022 at 4:54

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.