[PD] smoothing numbers: something like Max's "slide" object?

Daniel Iglesia daniel.iglesia at gmail.com
Wed Jan 18 21:45:34 CET 2017


Grabbing the previous incoming value, and one [expr] should do it, to
implement a first order filter

y[i] := y[i-1] + α * (x[i] - y[i-1])

as

[expr if($f1>$f2, $f3+.1*($f1-$f3), $f3+.2*($f1-$f3))]

where $f1 is the incoming number, $f2 is the previous incoming number, the
output of this expr is routed into the second inlet as $f3.
.1 is the smoothing coeff for increasing, .2 is the smoothing coeff for
decreasing.

So:

[(floatatom)(
|
[t f f b]
|   \  /
|    \/
|    /\
|   /  \
|  [float]
|   |
|   |
|   |
[expr if($f1>$f2, $f3+.1*($f1-$f3), $f3+.2*($f1-$f3)) ]
|
|
[(floatatom)(
|
<route connection into 3rd outlet of expr>


On Wed, Jan 18, 2017 at 11:18 AM, Ali Momeni <batchku at gmail.com> wrote:

> Hello all,
>
> Can someone point me to an existing abstraction/external that behaves
> somewhat like Max's "slide" object?  Specifically, i'm looking for a way to
> smooth (low-pass) floats (control rate) but with the ability to smooth out
> increasing and decreasing values differently.
>
> Thank you!
>
> -ali
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/
> listinfo/pd-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20170118/b916ff37/attachment.html>


More information about the Pd-list mailing list