[Pd] Pd's biquad

Charles Henry czhenry at gmail.com
Sun Jan 28 17:42:34 CET 2007

Hi, Chuck

Biquad filters are based on a finite-difference equation:

Now, we can get rid of w, because it's basically a dummy variable and
write everything in terms of x and y. Y is the output, and X is the



ff stands for feedforward, fb stands for feedback
The left side of this equation is the IIR part (feedback), the right
side is the FIR part (feedforward).
Usually, digital filters like these use a z-transform to write
transfer functions (relations of output/input) where z^(-1) is the
unit delay operator (one sample delay)
Y/X=(ff1 + ff2*z^(-1) + ff3*z^(-2))/(1 - fb1*z^(-1) - fb2*z^(-2))
again, the numerator is the feedforward part, the denominator is the
feedback part

Often, biquad filter equations are written with a plus, instead of a
minus on the feedback.  Is this one of the differences you find?

As for references, I have nothing in particular to suggest.  I just
have a digital control systems textbook with a z-transform table.

Here's an experiment I was playing with a while back, making a
percussion instrument from biquad filters.  I used the table to find
an expression for damped sines (ds.pd), and it goes like this:

Z[ a^n*sin(b*n)]=a*sin(b)*z^(-1)/ ( 1 - 2*a*cos(b)*z^(-1) + a^2*z^(-2) )

So, then, I just worked out some formulas to calculate a and b, given
decay time by 20dB (factor 10) and a fundamental frequency.  Then, I
put those calculations into the format of pd's biquad filter.  (These
objects like damped sines are just band-pass filters, and when you hit
them with an impulse they ring at the fundamental frequency)

You can find different types of expressions for biquad filters to do
efficient low-pass filtering, band-pass filtering, and high-pass
filtering.  And you can put several of them together to make filters
of higher order.  Probably some other things I'm missing?


On 1/28/07, Chuckk Hubbard <badmuthahubbard at gmail.com> wrote:
> I am already not quite on top of biquad filters, but as I research
> them I see Pd's version looks a lot different than the other ones I
> see around.  Is it comparable?  I can see that it should be IIR, as
> past values of w can be used in the current value, but I can't tell
> much else about it.
> Anyone know a reference explaining this kind of setup?
> -Chuckk
> --
> "Far and away the best prize that life has to offer is the chance to
> work hard at work worth doing."
> -Theodore Roosevelt
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ds.pd
Type: application/octet-stream
Size: 1547 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070128/3de9ca7f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: perc_inst1.pd
Type: application/octet-stream
Size: 2087 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070128/3de9ca7f/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fun1.pd
Type: application/octet-stream
Size: 3130 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070128/3de9ca7f/attachment-0002.obj>

More information about the Pd-list mailing list