hello,
Charles Henry a écrit :
On Tue, Jun 10, 2008 at 10:29 AM, cyrille henry cyrille.henry@la-kitchen.fr wrote:
...
I'm having trouble compiling, due to the garray_getfloatwords symbol. Which version of Pd are you using?
vanilia 0.41.4
I'd like to see the waveform and test it out. Here's my analysis of key points
(a=x[-1], b=x[0], c=x[1], d=x[2])
83 a0 = d - c - a + b; 84 a1 = a - b - a0; 85 a2 = c - a; 86 *out++ = ((a0*frac+a1)*frac+a2)*frac+b;
At frac=0, output should be b. Check!
At frac=1, output should be c
((a0*1+a1)*1+a2)*1+b =a0+a1+a2+b =d-c-a+b + a-b-(d-c-a+b) + c-a + b =d-c-a+b + a-b-d+c+a-b + c-a + b =d-c-a+b + 2a-2b+c-d + c-a + b =c
Check!
1st derivatives:
At frac=0, d/dx f(x) = c-a
(This quantity really ought to be (c-a)/2, but let's see how the rest comes out)
At frac=1,
d/dx f(x) = 3*(d-c-a+b) + 2*(a-b-d+c+a-b) + c-a =d-b
So, we've got 1st derivatives that match between samples. Check!
This looks like a really good plan. I might suggest some new coefficients to try:
a0=(3b-a-3c+d)/2 a1=a-5b/2+2c-d/2 a2=(c-a)/2
ok, i don't have time for now to test anything. i'll have more time in 1 or 2 weeks.
The only difference is the 1st derivatives are (c-a)/2 and (d-b)/2, respectively.
Maybe you could try a 5th-degree polynomial next and set the 2nd derivatives for continuity. This would involve 4-points as before, but it might introduce a ripple in the interpolation (cubic interpolation can't do that, since it only has two critical points).
i tried a Hermite interpolation. it sound great, but i did not had time yet to explore the tension parametter.
here is the code if you wish to explore it.
I'm not keen on doing the spectral analysis, because it would take about 4 hours, to do it by hand.
There's something I would like to see (once I can compile it). I made a patch (attached) a while back to view the tabread4~ interpolation function (impulse response). Give it a try if you're inclined to do so, because it might surprise you.
attachement is a pict of the impulse response of tabread4~ and tabread4c~.
cyrille
Chuck
cyrille
Chuck
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list