[PD] max value of last n samples

Roman Haefeli reduzent at gmail.com
Fri Feb 2 22:28:56 CET 2018

On Fre, 2018-02-02 at 18:31 +0000, Dario Sanfilippo wrote:
> There's an implementation of a peak holder in this blog post: http://
> dariosanfilippo.tumblr.com/post/162523174771/lookahead-limiting-in-
> pure-data. I remember testing it but please let me know if you find a
> bug.

Very nice write up. Thanks for sharing.

> The current peak is replaced to whatever the input is after a desired
> time, and the counter is reset whenever a new peak is found. It
> should be easy to change it so that the peak is reset periodically.

It's not exactly equivalent with what I've asked, since your
implementation only takes new peaks into account after the hold period
has ended. Assume an input signal consisting of a series of 1-sample
impulses with a period that is slightly lower than the hold period. The
output signal has a gap before each second impulse. For the use case in
your article (which is also the use case I'm interested in), that
doesn't matter much, because the peak holder signal is fed to a peak
enveloper which somewhat masks those gaps.

I'm going to use your implementation for peak holding. Thanks!


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180202/459b0a9b/attachment.sig>

More information about the Pd-list mailing list