[PD] cubic spline interpolation

geiger geiger at xdv.org
Fri Mar 3 10:34:00 CET 2006


On Thu, 2 Mar 2006, Mathieu Bouchard wrote:
> On Thu, 2 Mar 2006, Robert Scott wrote:
>
> > Have you looked at tabread4~ ? From its description as a '4 point
> > interpolation', I've always assumed it to be a cubic bezier spline.
>
> It's a cubic but not a Bézier: a Bézier would use 2 points plus the
> derivatives at those points. To identify a cubic you always need to get 4
> values but they don't have to be points. When all you have is points and
> not derivatives, the best you can do is get 4 points and do some kind of
> non-Bézier cubic with it. Conversely, when you have 4 points you can
> always build a cubic with it.

tabread4 uses lagrange interpolation, which assures that the
resulting polynomial goes through the sample points.

bezier curves use 4 points as well, but the result only goes through
point 1 and 4, 2 and 3 are used to describe the derivative.

bezier works well for graphics, whereas lagrange works better for sound.
In sound you normally want to have the interpolation exactly on the
points, otherwise you do unwanted lowpass filtering.

further info at:
http://ccrma.stanford.edu/~jos/resample/resample.html

Günter




More information about the Pd-list mailing list