[PD] cubic spline interpolation

Robert Scott lists at riscott.ukfsn.org
Fri Mar 3 16:37:00 CET 2006


Indeed, I reviewed my maths and realised that if it were just a bezier curve 
using the four samples as the control points (as was my assumption), there 
would be horrible jumps at the boundary of each sample, because of course, as 
you say, bezier curves usually don't pass through the control points.

This is what a lack of a formal mathematical education does to you.


robert.


On Friday 03 Mar 2006 09:34, geiger wrote:
> 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