[PD] smoothing things ...
IOhannes m zmoelnig
zmoelnig at iem.at
Mon Jul 25 17:07:35 CEST 2005
Thoralf Schulze wrote:
> Hi everyone,
>
> So, at the end of this lengthy post:
> - is there a possibility to amend Thomas' smoothing
> abstraction with a "set x"-message that would cause it
> to start interpolating from the x-value ? How
> demanding (in terms of cpu cycles) would that
> abstraction then be?
i don't think that you can use soemthing like "set <f>" with dsp-filters.
> - if not: is there an easy-to-implement algorithm that
> does non-linear smoothing of yet-unknown parameters
> and detects parameter jumps? My math is a bit rusty,
> and googling only yielded stuff regarding the
> interpolation of _known_ values.
now that'll be cool: doing interpolation between (however yet) unknown
values.
i guess this would solve many many problems.
a simple non-linear (IIR) low-pass filter is x[n]=a*x[n-1]+(1-a)*y[n]
(with 0<=a<=1)
however, this filter still only works for known values to filter.
apart from that, your problem is basically about unwrapping your
incoming values [0..360] to something covering all values;
if you have a series that goes 0..89..188..267..356..85 you want it to
become 0..89..188..267..356..445
attached is a file that unwraps degree-values.
it depends on zexy's [wrap] (because this was faster to do), but you can
replace wrap with something build with [%].
the basic idea is to wrap the difference between to consecutive values
and sum it up again.
mfg.a.sdr
IOhannes
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: unwrap.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20050725/113f703d/attachment.txt>
More information about the Pd-list
mailing list