<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Yep, you're right.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">To be clear to anyone else reading, the equation is y[n] = (y[n-1] + x[n] - x[n-k])/k . I have a mental block when it comes to the filter element objects and tend to do things the hard way at first. :)</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 8, 2015 at 6:19 AM, Christof Ressi <span dir="ltr"><<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey Matt,<br>
<br>
there's no need for the feedback path (and therefore no [block~ 1] ;-))<br>
<br>
Just use the following formula:<br>
<br>
y[n] = (y[n-1] - x[n-k])/k<br>
<br>
where k is the number of samples to be averaged (must be at least 1). see the patch I sent to Alex in my last mail.<br>
it uses [rpole~ 1] for the y[n-1] part and [z~ k] for the x[n-k] part (you can replace the latter one with a [delwrite~] [delread~] pair to make it purely vanilla).<br>
<br>
The funny thing about linear moving average filters is, that although it can be implemented as a recursive filter (like in both our patches), it is still a FIR filter (and therefore it defeats the notion that recursive filters are always IIR filters). The impulse response is just a rectangular pulse and therefore finite.<br>
 <br>
 <br>
<br>
Gesendet: Dienstag, 08. Dezember 2015 um 07:13 Uhr<br>
Von: "Matt Barber" <<a href="mailto:brbrofsvl@gmail.com">brbrofsvl@gmail.com</a>><br>
An: "Alexandre Torres Porres" <<a href="mailto:porres@gmail.com">porres@gmail.com</a>><br>
Cc: "<a href="mailto:pd-list@lists.iem.at">pd-list@lists.iem.at</a>" <<a href="mailto:pd-list@lists.iem.at">pd-list@lists.iem.at</a>><br>
Betreff: Re: [PD] Moving Sum object?<br>
<span class=""><br>
Something like this? Almost completely untestsed. :D<br>
 <br>
On Tue, Dec 8, 2015 at 12:20 AM, Alexandre Torres Porres <<a href="mailto:porres@gmail.com">porres@gmail.com</a>> wrote:<br>
<br>
Talking about averages I wonder if we have an object that sums (in a moving average fashion) a series of samples<br>
 <br>
cheers<br>
_______________________________________________<br>
</span><a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a>[<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[http://lists.puredata.info/listinfo/pd-list]" rel="noreferrer" target="_blank">http://lists.puredata.info/listinfo/pd-list[http://lists.puredata.info/listinfo/pd-list]</a><br>
 _______________________________________________ <a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list[http://lists.puredata.info/listinfo/pd-list]" rel="noreferrer" target="_blank">http://lists.puredata.info/listinfo/pd-list[http://lists.puredata.info/listinfo/pd-list]</a><br>
</blockquote></div><br></div>