[PD] derivative?

Frank Barknecht fbar at footils.org
Tue Sep 4 12:30:38 CEST 2007


Hallo,
Oded Ben-Tal hat gesagt: // Oded Ben-Tal wrote:

> DPCM is Differential pulse code modulation, and its possible to get an 
> estimate of derivative with the right predictor. While the difference 
> between the last two messages is an approximation of the derivative its is 
> a really bad one so extrapulating on 4-points is much better. (dsp theory 
> is really not my area but I'm sure some people will be able to explain 
> much better about dpcm)
>   What I'm looking for is a way to:
> (1) store the last 3 values in the series. 
> (2) an estimate of the derivative should be
>   x0 - 1/2 * x1 - 1/4 * x2 -1/4 * x3 (where x0 is the most recent element)
> (3) switch places so the x0->x1 x1->x2 x2->x3 ready to do it again.

Okay, that's not too hard to do. Attached is a solution using [expr],
you could of course also use the other math-objects in Pd. I converted
list-lastx.pd from [list]-abs into a subpatch here to avoid that
dependency. 

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dpcm.pd
Type: application/puredata
Size: 2507 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070904/3480946d/attachment.bin>


More information about the Pd-list mailing list