[PD] better tabread4~

cyrille henry cyrille.henry at la-kitchen.fr
Tue Jul 8 18:35:51 CEST 2008


hello Chuck,

i tested this. (and commited)
i think tabread6c~ is a bit better than tabread4c~. but differences are more smaller

thx

Cyrille


Charles Henry a écrit :
> On Sat, Jun 28, 2008 at 6:43 AM, cyrille henry
> <cyrille.henry at la-kitchen.fr> wrote:
> 
>> ok, i'll try that.
>> but i don't think adjusting the 2nd derivative is the best thing to do.
>> for me, having a 6 point interpolation would be more important.
> 
> I put together a 6-point interpolation formula and analyzed it.  For
> this I used a 5th degree polynomial, and 6 constraints:
> 
> (I want to change up the notation a bit, and not use the letters a, b,
> c, etc... when switching to 6-point.  Y[-2],Y[-1],Y[0], Y[1], Y[2],
> Y[3] are the points from the table. a5 is the coefficient of x^5, a4
> is the coeff. of x^4, ... a0 is a constant term.  f(x) is the
> interpolation polynomial.)
> 
> f(0)=Y[0]
> f(1)=Y[1]
> f'(0)= 1/12*Y[-2] - 2/3*Y[-1] + 2/3*Y[1] - 1/12*Y[2]
> f'(1)= 1/12*Y[-1] - 2/3*Y[0]  + 2/3*Y[2] - 1/12*Y[3]
> f''(0)= -1/12*Y[-2] + 4/3*Y[-1] - 5/2*Y[0] + 4/3*Y[1] - 1/12*Y[2]
> f''(1)= -1/12*Y[-1] + 4/3*Y[0]  - 5/2*Y[1] + 4/3*Y[2] - 1/12*Y[3]
> 
> This uses improved approximations for the derivative.  One advantage
> of going to 6-point interpolation is to get better numerical
> derivatives.  These approximations of the 1st and 2nd derivatives are
> accurate up to a higher frequency than before.  We can also continue
> to increase the number of points arbitrarily, without necessarily
> having to increase the degree of the polynomial.  The degree of the
> polynomial is only determined by the number of constraints, not the
> number of points.
> 
> The coefficients used in this scheme are
> 
> a0= Y[0]
> a1= 1/12*Y[-2] - 2/3*Y[-1] + 2/3*Y[1] - 1/12*Y[2]
> a2= -1/24*Y[-2] + 2/3*Y[-1] - 5/4*Y[0] + 2/3*Y[1] - 1/24*Y[2]
> a3= -3/8*Y[-2] + 13/8*Y[-1] - 35/12*Y[0] + 11/4*Y[1] - 11/8*Y[2] + 7/24*Y[3]
> a4= 13/24*Y[-2] - 8/3*Y[-1] + 21/4*Y[0] - 31/6*Y[1] + 61/24*Y[2] - 1/2*Y[3]
> a5= -5/24*Y[-2] + 25/24*y[-1] - 25/12*Y[0] + 25/12*Y[1] - 25/24*Y[2] + 5/24*Y[3]
> 
> 
> After that, I continued with the impulse response calculations and
> spectral response calculations, which are a bit disappointing.  I'll
> spare you the equations (for now) and post the graphs.  The new traces
> for the 6-point interpolator are shown in green.  It's a little bit
> hard to see, but the things to look for are the rate at which the
> graph falls off and the locations of the peaks.  The 6-point function
> has a flatter spectrum, which comes up closer to the Nyquist
> frequency, and falls off faster.  These are the key characteristics of
> the spectrum we want.  The green trace falls off according to 1/w^4,
> compared to 1/w^3 for tabread4c~ and 1/w^2 for tabread4~
> 
> You can see the impulse response in the first graph along with the
> spectrum.  The log vs. dB scale is used same as before, and secondly,
> I've posted a linear graph, so you can see the difference between
> functions near the Nyquist frequency (x=pi).
> 
> It gives me some ideas for another 6-point scheme, more like
> tabread4c~, which will fall off at a rate of 1/w^5 and have more
> notches in the frequency response.  I'll work on it a bit, and see how
> it goes.
> 
> Chuck
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list




More information about the Pd-list mailing list