oops, you're right, I skipped the x[n], that's quite important!!! In my patch, however, the x[n] is there (otherwise it wouldn't work).
@Alex: Did you try the filter based on my wrong formula or on my correct patch? The former one would explain why you got negativ numbers...
Gesendet: Dienstag, 08. Dezember 2015 um 15:45 Uhr
Von: "Matt Barber" <[email protected]>
An: "Christof Ressi" <[email protected]>
Cc: "Alexandre Torres Porres" <[email protected]>, "[email protected]" <[email protected]>
Betreff: Re: Re: [PD] Moving Sum object?
Von: "Matt Barber" <[email protected]>
An: "Christof Ressi" <[email protected]>
Cc: "Alexandre Torres Porres" <[email protected]>, "[email protected]" <[email protected]>
Betreff: Re: Re: [PD] Moving Sum object?
Yep, you're right.
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. :)
On Tue, Dec 8, 2015 at 6:19 AM, Christof Ressi <[email protected]> wrote:
Hey Matt,
there's no need for the feedback path (and therefore no [block~ 1] ;-))
Just use the following formula:
y[n] = (y[n-1] - x[n-k])/k
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.
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).
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.
Gesendet: Dienstag, 08. Dezember 2015 um 07:13 Uhr
Von: "Matt Barber" <[email protected]>
An: "Alexandre Torres Porres" <[email protected]>
Cc: "[email protected]" <[email protected]>
Betreff: Re: [PD] Moving Sum object?
Something like this? Almost completely untestsed. :D
On Tue, Dec 8, 2015 at 12:20 AM, Alexandre Torres Porres <[email protected]> wrote:
Talking about averages I wonder if we have an object that sums (in a moving average fashion) a series of samples
cheers
_______________________________________________
[email protected][[email protected]] mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list[http://lists.puredata.info/listinfo/pd-list]
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list[http://lists.puredata.info/listinfo/pd-list]
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
