Hallo, Oded Ben-Tal hat gesagt: // Oded Ben-Tal wrote:
Does anyone know of a patch/object that calculates the derivative of an incoming sequence of messages (not signal)?
A very simple way is a cross-connected trigger with substraction:
[t f f]
/
/
[- ]
to take the difference between successive values as derivatives.
I am trying to figure out a way of calculating the derivative (by DPCM) but all I can come up with are very cumbersome and ugly (keeping the last 4 values and then switching their positions ready for the next iteration works in c, but seems awkward in pd) I presume there is a simple elegant way of doing it but I just can't see it.
Maybe some objects of the [list]-abs collection can make what you want easier to patch, especially [list-lastx], [list-map] and [list-reduce]. I would try to help more if you could explain the algorithm you want to use with a bit more depth.
Frank Barknecht _ ______footils.org_ __goto10.org__