[PD] better tabread4~
Matt Barber
brbrofsvl at gmail.com
Sat Jul 19 22:39:05 CEST 2008
Chuck,
Thanks again for this. Quick question: out of curiosity, how much
would this differ from the one which has the standard derivative
approximations?
Also, if one wanted to put together the one with the standard
approximations, would you use the best approximations available for
each derivative, or would you use the ones which come from the same
"series" of approximations? I don't know how to call them, but one
series of approximation derivations need a 3 points for 1st and 2nd
derivatives, and 5 points for 3rd and 4th -- while the next series up
needs 5 points for 1st and 2nd and 7 for 3rd and 4th -- can you mix
these freely in a 6-point interpolation using the 5-point
approximations for everything?
I guess one important next direction is to work on the anti-aliasing
problem -- you mentioned modulating the interpolation coefficients
depending on the speed through the table -- would this be a continuous
thing, or would there be a pre-defined set of ideal functions among
which to choose? Or would this be a matter of figuring out the linear
combination of the appropriate anti-aliasing filter (which might need
to change with each sample?) and a standard interpolation function?
(or am I totally misunderstanding?)
Thanks again,
Matt
On Sat, Jul 19, 2008 at 3:40 PM, Charles Henry <czhenry at gmail.com> wrote:
> Sorry it took me so long to make something usable out of that mess. I
> played around with factoring but it seems like it got me nowhere, so I
> finally just multiplied out all the polynomials to get the usual form.
>
> (given input points g[-2] g[-1] g[0] g[1] g[2] g[3]
>
> a5 = 3/64*g[-2] + 13/64*g[-1] - 27/32*g[0] + 27/32*g[1] - 13/64*g[2]
> - 3/64*g[3]
> a4 = -3/16*g[-2] - 19/64*g[-1] + 63/32*g[0] - 9/4*g[1] +
> 23/32*g[2] + 3/64*g[3]
> a3 = 9/32*g[-2] - 9/16*g[-1] + 9/16*g[1] - 9/32*g[2]
> a2 = -3/16*g[-2] + 5/4*g[-1] - 17/8*g[0] + 5/4*g[1] - 3/16*g[2]
> a1 = 3/64*g[-2] - 19/32*g[-1] + 19/32*g[1] - 3/64*g[2]
> a0=g[0]
>
> output[x]=((((a5*x+a4)*x+a3)*x+a2*x)+a1)*x+a0
>
> and I did some analysis of the function:
>
> This function is continuous up to the 3rd derivative with derivative
> approximations:
>
> g'(0)=3/64*g[-2] - 19/32*g[-1] + 19/32*g[1] - 3/64*g[2]
> g''(0)=-3/8*g[-2] + 5/2*g[-1] - 17/4*g[0] + 5/2*g[1] - 3/8*g[2]
> g'''(0)=27/16*g[-2] - 27/8*g[-1] + 27/8*g[1] - 27/16*g[2]
>
> but here's the rub. These approximations of the derivatives are
> horrible. They have terrible spectral response and are not very good
> for higher frequencies. I'm not sure what this all means in terms of
> how they sound, but I've got a solid grasp on how this problem works.
>
> 1st off: the number of computations is roughly linearly proportional
> to the number of points, and the degree of the polynomial.
> 2nd: High frequency response can be obtained by increasing the number
> of points, beyond the number of points required to constrain the
> problem for a given degree of polynomial.
> 3rd: The set of functions specifying the impulse response as sums of
> (|t|-a)^n*(|t| < a) should be used to construct interpolating
> polynomials for two clear reasons. First, the lowest degree of
> polynomial, n, that is used determines the number of continuous
> derivatives (for n=2, there is 1 continuous derivative, for n=4, there
> are 3 continuous derivatives). Second, n determines the fastest
> possible rate of attenuation in the stop-band (for n=2, 1/w^3, for
> n=4, 1/w^5, etc...)
>
> In the accompanying graphs, the newest spectrum has been added in magenta.
>
> And the question is, where do we go from here.... are there any
> remaining problems with tabread's? Is the high-frequency response
> good enough? Do we need faster attenuation?
>
> I think there is little point in trying to increase the rate of
> attenuation. 1/w^3 is good for a fast interpolator..... 1/w^5
> should be good enough for a high-accuracy interpolator (in my
> opinion).... so if this were carried out to 8-point, 10-point and so
> on.... we could get better high-frequency response..... ahhhh..... I
> don't know!
>
> Chuck
>
More information about the Pd-list
mailing list