<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I'm not sure how to do it with biquads, but I'm sure it's possible.
It is absolutley possible to design an IIR filter that approximates
this and then build it out of biquad sections, but I would have to
look long and hard at my DSP theory texts to figure it out.<br>
<br>
I <i>do</i> know how to do it with [czero~] objects, though. The
difference equation for a mean across m samples is:<br>
<br>
y(n) = 1/m * (x(n) + x(n-1) + ... + x(n-m+1))<br>
<br>
so the z-transform is:<br>
<br>
h(z) = 1/m * (1+ z^(m-1) + z^(m-2) + ... + z)<br>
<br>
This is a polynomial in z and the roots of this polynomial (which
are complex) are the locations of the zeros. I'm bad at algebra, so
I used octave (the function is called roots) to find the roots. It
turns out that whatever the value is for m, you will have n zeros
spaced at equal intervals around the unit circle for the mean filter
<i>except</i> for an absent zero at 1 (m-1 zeros in all). So for an
m=8, your zeros would be at [.707, .707] [0,1] [ -.707, .707] [-1,
0] etc. I attach the pole-zero plot of the filter for m=8.<br>
<br>
Your biquad-based solution to the 4 point average is very clever. It
is very challenging (for me anyway) to generalize this filter design
problem with biquads, so I have something to think about when I'm on
the bus for a little while. If I come up with anything I'll post it.<br>
<br>
Cheers,<br>
David<br>
<br>
<div class="moz-cite-prefix">On 9/7/2015 9:00 PM, Alexandre Torres
Porres wrote:<br>
</div>
<blockquote
cite="mid:CAEAsFmg9qVSsf2F+RqSPtHxZMNzvfoRJ+newxgDOCUzXHSZ12A@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr"><span
style="color:rgb(20,24,35);font-family:helvetica,arial,sans-serif;font-size:14px;line-height:17.5636348724365px">Hi,
I was able to implement a 4 point average filter with raw
filters and biquad~ in Pd (find attached patch). I'm
struggling to finda a way to implement an 8 point average
filter with biquads~ and raw filters...</span><br
style="color:rgb(20,24,35);font-family:helvetica,arial,sans-serif;font-size:14px;line-height:17.5636348724365px">
<span
style="color:rgb(20,24,35);font-family:helvetica,arial,sans-serif;font-size:14px;line-height:17.5636348724365px">Anyone
can help?</span><br>
<div><span
style="color:rgb(20,24,35);font-family:helvetica,arial,sans-serif;font-size:14px;line-height:17.5636348724365px"><br>
</span></div>
<div><span
style="color:rgb(20,24,35);font-family:helvetica,arial,sans-serif;font-size:14px;line-height:17.5636348724365px">thanks</span></div>
<div><span
style="color:rgb(20,24,35);font-family:helvetica,arial,sans-serif;font-size:14px;line-height:17.5636348724365px"><br>
</span></div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a>
</pre>
</blockquote>
<br>
</body>
</html>