Charles Henry a écrit :
On Wed, Jun 25, 2008 at 10:32 AM, Matt Barber brbrofsvl@gmail.com wrote:
For what it's worth, here's supercollider's cubic interpolation function, which differs from csound's and Pd's, which I believe are equivalent:
static float cubicinterp(float x, float y0, float y1, float y2, float y3) { // 4-point, 3rd-order Hermite (x-form) float c0 = y1; float c1 = 0.5f * (y2 - y0); float c2 = y0 - 2.5f * y1 + 2.f * y2 - 0.5f * y3; float c3 = 0.5f * (y3 - y0) + 1.5f * (y1 - y2);
return ((c3 * x + c2) * x + c1) * x + c0;
}
Matt
a0=(3b-a-3c+d)/2 (same as c3) a1=a-5b/2+2c-d/2 (same as c2) a2=(c-a)/2 (same as c1)
(b is c0)
f(x)=(((a0*x+a1)*x+a2)*x-+b
Actually that's just the same set of coefficients that I named in a previous post... just in a different form.
yes, and it's certainly the best i tried.
So, that's just the sort of thing we could add to pd-extended....
I agree so finally, what should be the name of this object?
is it ok if i remove the other test i made and to use only this one?
cyrille
It's good to know what other people are doing in their software too
Chuck
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list