[PD] better tabread4~
Mathieu Bouchard
matju at artengine.ca
Thu Jul 3 08:01:42 CEST 2008
On Wed, 2 Jul 2008, Matt Barber wrote:
> Seriously though, I tend to agree with you -- this should explain my
> unease about searching for every polynomial possibility with a certain
> number of points. I want to help out as much as I can, but I just
> don't want to be the one to close a door on an option.
While it's good to make software very open-ended in order to not close
doors on options, it's best to close a door on an option that both is
useless and takes special efforts to support. The distinction I make is
that useless features that are simple combinations of existing features
are fine, and it's normal to be able to patch silly things, but you really
don't have to spend time on code that specifically is not going to be
used.
> On the other hand, doesn't [tabread4~]'s Lagrange interpolator have a
> continuous 2nd derivative while the [tabread4c~] Hermite one does not?
No. A Lagrange interpolator on N points is a polynomial of degree N-1, and
so its Nth derivative is a flat zero function without holes, and so it is
infinitely differentiable. However, those are pieced together as a
disparate mosaïc in a way that is not even C1 (continuous 1st derivative),
which is what prompted Cyrille to work on a replacement in the first
place. Note that a discontinuous 1st derivative implies that all other
orders of derivatives are discontinuous.
> I don't know what that would mean spectrally, if anything. It's the
> "almost" in the "almost-arbitrary" curves you mention that I don't know
> how to gauge
I mean that if you have one Lagrange cubic going through x[-1] x[0] x[1]
x[2] and then a new one going through x[0] x[1] x[2] x[3], how are those
two polynomials specially related, other than the three intersections that
they need to have? perhaps not in any way that matters, and that must be
why [tabread4~] looks wrong.
> -- intuitively one could imagine that the more pieces of its surrounding
> environment are matched, the better the interpolation,
I wouldn't even claim that as more pieces are matched, the interpolation
wouldn't get worse. I'd claim the opposite. Matching too many points
exactly is not just pointless, it's harmful. It gives importance to things
that shouldn't be important. Matching points approximately is a completely
different matter, as long as it's approximate enough that the process
doesn't let itself be inappropriately influenced by any single point; but
then, that is usually called linear regression (or polynomial regression,
etc.)
> Of course, there's more than a strong possibility that this wheel has
> already been invented several times over and that the answers have been
> thoroughly established somewhere.
Reinventing the wheel is fun. It's tempting more than a few, every day.
> The thing that keeps bothering me is that the smart people who designed
> Pd and Csound both arrived at the Lagrange interpolation,
Maybe it's some kind of artistic statement that they made... perhaps it
could be called "Lagrangism".
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec
More information about the Pd-list
mailing list