[PD] better tabread4~

Mathieu Bouchard matju at artengine.ca
Tue Jun 24 15:54:20 CEST 2008


On Tue, 24 Jun 2008, IOhannes m zmoelnig wrote:

> true that "4" doesn't say much about the interpolation alogrithm and 
> that is definitely a weakness in the current naming scheme.

Well, I'd have expected "4" to be a cubic spline algorithm, because it 
uses a sliding window of 4 samples, polynomial interpolation is pretty 
much the default, 4-point polynomial leads to cubic curves (using Lagrange 
or not), and beyond having a continuous curve (C0) and continuous 
derivative (C1), it's also nice to have a continuous second-derivative 
(C2). All this leading to basically one specific formula, which [tabread4] 
doesn't use, but which I assumed [tabread4] was using, until Roman told me 
that Cyrille had looked at it closely and found it to be non-C1.

(I made a mistake while talking to Roman. I said it's only C1, but the 
thing is that first derivatives are the last derivatives to be chosen 
according to samples. Second derivatives are chosen so that they fall to 
zero at every junction of pieces, and never anything else than zero. It's 
like that because there are 4 degrees of freedom, which are used up for 
start & end points of f & f'... that's 4, so f''(0) and f''(1) can't be 
set by variables... but it can be set by constants.)

All this to say that I don't think that the current interpolator deserved 
to be called THE "4", because there's a more generally useful interpolator 
that uses up the same power and thus would've been a much better choice 
for a default. The point of a default value or default algorithm is so 
that you need to specify a non-default as seldom as possible, and an 
unqualified "4" looks like a default to me (the name of the algorithm is 
implied)

> it, however, was my intention to say that [tabread_tweak~] is one of the 
> worst possible names i could think of. i do not say that this is is 
> "constructive" criticism, rather i meant it as a preventive criticism.

It's like the names of the codecs in Quicktime-related GUIs... they all 
come out with different names than what the rest of the world is calling 
them... I don't have any names off the top of my head anymore, but it sure 
is/was confusing.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec


More information about the Pd-list mailing list