On Sat, Feb 28, 2009 at 8:25 PM, David Doukhan <[email protected]> wrote:
> I don't even know what method have been used in vd~ ... > The only thing I've read in the corresponding help patch, is that the > interpolation method used by that component does an interpolation over > 4 values. > Does anyone know the name of the method used by that component? It > would allow me get better clues on its theoretical efficiency, and to > know if spending some time to program/test some alternative method > would be usefull... vd~ appears to use the same 4-point interpolation method as tabread4~, which is just a cubic polynomial fit through 4 points. Other methods of finding interpolation polynomials for improved response were discussed a few months ago in the thread on different tabread4's. Let me know if you need anything. Chuck http://lists.puredata.info/pipermail/pd-list/2008-06/062878.html http://lists.puredata.info/pipermail/pd-list/2008-06/063256.html http://lists.puredata.info/pipermail/pd-list/2008-06/063303.html I did a lot of analysis on the functions, involved. big math lecture is here: http://lists.puredata.info/pipermail/pd-list/2008-07/063601.html tables and transforms: http://lists.puredata.info/pipermail/pd-list/2008-07/063489.html Algorithm is here in d_delay.c: 262 while (n--) 263 { 264 t_sample delsamps = x->x_sr * *in++ - zerodel, frac; 265 int idelsamps; 266 t_sample a, b, c, d, cminusb; 267 if (delsamps < 1.00001f) delsamps = 1.00001f; 268 if (delsamps > limit) delsamps = limit; 269 delsamps += fn; 270 fn = fn - 1.0f; 271 idelsamps = delsamps; 272 frac = delsamps - (t_sample)idelsamps; 273 bp = wp - idelsamps; 274 if (bp < vp + 4) bp += nsamps; 275 d = bp[-3]; 276 c = bp[-2]; 277 b = bp[-1]; 278 a = bp[0]; 279 cminusb = c-b; 280 *out++ = b + frac * ( 281 cminusb - 0.1666667f * (1.-frac) * ( 282 (d - a - 3.0f * cminusb) * frac + (d + 2.0f*a - 3.0f*b) 283 ) 284 ); 285 } _______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
