Derive Time-Domain Biquad Coefficients from Z-Domain I'm trying to derive the time-domain coefficients of a biquad filter based on its z-domain coefficients. The purpose is to import externally-generated EQ filters (in z-domain) into Max/MSP (in time-domain).
Could someone kindly explain how to do so?
Z-domain:
$$H(z) = \frac{b_0+b_1 z^{-1}+b_2 z^{-2}}{a_0+a_1 z^{-1}+a_2 z^{-2}}$$
Time-domain:
$$y[n] = a_0 x[n] + a_1 x[n-1] + a_2 x[n-2] - b_1 y[n-1] - b_2 y[n-2] $$
I'm not entirely sure what you are asking but if your Z-domain representation is
$$H(z) = \frac{b_0+b_1 z^{-1}+b_2 z^{-2}}{a_0+a_1 z^{-1}+a_2 z^{-2}}$$
Then your difference equation is
$$a_0 \cdot y[n] + a_1 \cdot y[n-1] + a_2 \cdot y[n-2] = b_0 \cdot x[n] + b_1 \cdot x[n-1] + b_2 \cdot x[n-2]$$
And solving for $y[n]$ we get
$$y[n] = \frac{1}{a_0}(b_0 \cdot x[n] + b_1 \cdot x[n-1] + b_2 \cdot x[n-2] - a_1 \cdot y[n-1] - a_2 \cdot y[n-2]) $$