<div dir="ltr">> <span style="font-size:12.8000001907349px"> It turns out that whatever the value is for m, you will have</span><span style="font-size:12.8000001907349px"> n zeros</span><div><span style="font-size:12.8000001907349px">> spaced at equal intervals around the unit circle for the mean filter</span><span style="font-size:12.8000001907349px"> </span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">I had that intuition, thanks for clarifying</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">it should be easy to convert from cpoles and czeros to biquad, I'll get to it soon.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">cheers</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-08 18:07 GMT-03:00 David Medine <span dir="ltr"><<a href="mailto:dmedine@ucsd.edu" target="_blank">dmedine@ucsd.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div 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<div><div class="h5"><br>
    <br>
    <div>On 9/7/2015 9:00 PM, Alexandre Torres
      Porres wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      
      <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></fieldset>
      <br>
      </div></div><pre>_______________________________________________
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br></div>