<div dir="ltr">As I say in the attached patch; problem is that whenever you change the number of samples without clearing or clearing the filter, it goes crazy...<div><br></div><div>not sure how to fix this.</div><div><br></div><div>cheers<br><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-12-08 10:40 GMT-02:00 Christof Ressi <span dir="ltr"><<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">the filter is working perfectly well for me. send me your testing patch.<br>
 <br>
 <br>
<br>
Gesendet: Dienstag, 08. Dezember 2015 um 13:36 Uhr<br>
<span class="">Von: "Alexandre Torres Porres" <<a href="mailto:porres@gmail.com">porres@gmail.com</a>><br>
An: "Christof Ressi" <<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</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>
</span>Betreff: Re: Re: Re: [PD] Moving Sum object?<br>
<span class=""><br>
not sure this is working either, I'm getting negative values when testing it with count~ (only positive values)<br>
 <br>
2015-12-08 10:30 GMT-02:00 Christof Ressi <<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>>:It certainly is and I have no idea how that happened :-D. but it has no effect whatsoever. just delete the connection.<br>
 <br>
<br>
Gesendet: Dienstag, 08. Dezember 2015 um 13:20 Uhr<br>
</span><span class="">Von: "Alexandre Torres Porres" <<a href="mailto:porres@gmail.com">porres@gmail.com</a>[<a href="mailto:porres@gmail.com">porres@gmail.com</a>]><br>
An: "Christof Ressi" <<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>[<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>]><br>
</span>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>]" <<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>
<span class="">Betreff: Re: Re: [PD] Moving Sum object?<br>
<br>
</span><span class="">what was the purpose of the output from the max object into rpole~ in your patch? that's a bug, right?<br>
 <br>
cheers<br>
 <br>
</span><span class="">2015-12-08 9:50 GMT-02:00 Christof Ressi <<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>[<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>]>:<br>
<br>
Or are you talking about a object that outputs the sum as a message? In that case just use [cmavg~] or [maverage~] with [snapshot~]. If you just want the sum of a signal vector, there are some objects in zexy that will do the job, like [avg~] or [pack~]+[sum]<br>
 <br>
<br>
Gesendet: Dienstag, 08. Dezember 2015 um 12:41 Uhr<br>
</span>Von: "Christof Ressi" <<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>[<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>][<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>[<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>]]><br>
<br>
An: "Alexandre Torres Porres" <<a href="mailto:porres@gmail.com">porres@gmail.com</a>[<a href="mailto:porres@gmail.com">porres@gmail.com</a>][<a href="mailto:porres@gmail.com">porres@gmail.com</a>[<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>][<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>]]" <<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>][<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>
<span class="">Betreff: Re: [PD] Moving Sum object?<br>
<br>
Well, a linear moving average filter is just something that  sums a series of samples. If you don't want the average but rather the true sum, either multiply the output by the number of samples or take my abstraction and get rid of the [/~] object.<br>
 <br>
<br>
Gesendet: Dienstag, 08. Dezember 2015 um 12:21 Uhr<br>
</span>Von: "Alexandre Torres Porres" <<a href="mailto:porres@gmail.com">porres@gmail.com</a>[<a href="mailto:porres@gmail.com">porres@gmail.com</a>][<a href="mailto:porres@gmail.com">porres@gmail.com</a>[<a href="mailto:porres@gmail.com">porres@gmail.com</a>]]><br>
An: "Christof Ressi" <<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>[<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>][<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>[<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>]]><br>
Cc: "Matt Barber" <<a href="mailto:brbrofsvl@gmail.com">brbrofsvl@gmail.com</a>[<a href="mailto:brbrofsvl@gmail.com">brbrofsvl@gmail.com</a>][<a href="mailto:brbrofsvl@gmail.com">brbrofsvl@gmail.com</a>[<a href="mailto:brbrofsvl@gmail.com">brbrofsvl@gmail.com</a>]]>, "<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>][<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>]]" <<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>][<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>
<span class="">Betreff: Re: Re: [PD] Moving Sum object?<br>
<br>
cool guys, but i was asking for an average "sum" object :)<br>
 <br>
</span>2015-12-08 9:19 GMT-02:00 Christof Ressi <<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>[<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>]>:Hey Matt,<br>
<span class=""><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>
</span>Von: "Matt Barber" <<a href="mailto:brbrofsvl@gmail.com">brbrofsvl@gmail.com</a>[<a href="mailto:brbrofsvl@gmail.com">brbrofsvl@gmail.com</a>]><br>
<span class="">An: "Alexandre Torres Porres" <<a href="mailto:porres@gmail.com">porres@gmail.com</a>[<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>]" <<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>
<br>
</span><span class="">Something like this? Almost completely untestsed. :D<br>
 <br>
</span><span class="">On Tue, Dec 8, 2015 at 12:20 AM, Alexandre Torres Porres <<a href="mailto:porres@gmail.com">porres@gmail.com</a>[<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>][<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][http://lists.puredata.info/listinfo/pd-list%5Bhttp://lists.puredata.info/listinfo/pd-list%5D][http://lists.puredata.info/listinfo/pd-list[http://lists.puredata.info/listinfo/pd-list][http://lists.puredata.info/listinfo/pd-list%5Bhttp://lists.puredata.info/listinfo/pd-list%5D]]" rel="noreferrer" target="_blank">http://lists.puredata.info/listinfo/pd-list[http://lists.puredata.info/listinfo/pd-list][http://lists.puredata.info/listinfo/pd-list%5Bhttp://lists.puredata.info/listinfo/pd-list%5D][http://lists.puredata.info/listinfo/pd-list[http://lists.puredata.info/listinfo/pd-list][http://lists.puredata.info/listinfo/pd-list%5Bhttp://lists.puredata.info/listinfo/pd-list%5D]]</a><br>
 _______________________________________________ <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 UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list[http://lists.puredata.info/listinfo/pd-list][http://lists.puredata.info/listinfo/pd-list%5Bhttp://lists.puredata.info/listinfo/pd-list%5D]_______________________________________________[http://lists.puredata.info/listinfo/pd-list[http://lists.puredata.info/listinfo/pd-list][http://lists.puredata.info/listinfo/pd-list%5Bhttp://lists.puredata.info/listinfo/pd-list%5D]_______________________________________________]" rel="noreferrer" target="_blank">http://lists.puredata.info/listinfo/pd-list[http://lists.puredata.info/listinfo/pd-list][http://lists.puredata.info/listinfo/pd-list%5Bhttp://lists.puredata.info/listinfo/pd-list%5D]_______________________________________________[http://lists.puredata.info/listinfo/pd-list[http://lists.puredata.info/listinfo/pd-list][http://lists.puredata.info/listinfo/pd-list%5Bhttp://lists.puredata.info/listinfo/pd-list%5D]_______________________________________________]</a> <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>[<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][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][http://lists.puredata.info/listinfo/pd-list[http://lists.puredata.info/listinfo/pd-list]]</a><br>
</blockquote></div><br></div>