Runge-Kutta is for integrating functions that you know a formula for.
So, at least in terms of signals in Pd, there's nothing better than the simple recursion formula (x is input, y is output): y[n] = y[n-1] + x[n]
Now, you may also want to scale by the sample rate y=integral(0 to t, x*dt) Then, it's just y[n] = y[n-1] + x[n]/44100 (or whatever sample rate)
In z-transform terms we get:
Y(z) * (1 - z^-1) = X(z) or Y(z) = X(z) / (1 - z^-1)
which tells us we have a single real pole at z=1 So, the object I think you want is just [rpole~ 1]
And you can apply the scaling by the samplerate as needed.
for messages, I don't know. To integrate them over time, you would have each value multiplied by the time in between messages.
Chuck
On Wed, Aug 17, 2011 at 4:10 PM, Jeppi Jeppi jeppiot@hotmail.com wrote:
Hi all! I would like to know whether there is any object or abstraction available to perform numerical integration (at control or audio rate, whatever) for Pd. Any examples around there? Thanks in advance! Josep M _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list