Higher Order Delay Line Interpolation
Lagrange Interpolation
Lagrange Interpolation Frequency Response ExamplesSearch Physical Audio Signal Processing
Would you like to be notified by email when Julius Orion Smith III publishes a new entry into his blog?
// tlagrange.dsp - test lagrange.lib import("lagrange.lib"); N = 16; // Change "processX" to "process" in one case below: // Aggregate test: processA = 1-1' <: (fdelay1(N,5.5), fdelay2(N,5.5), fdelay3(N,5.5), fdelay4(N,5.5)); // To see results: // [in a shell]: // make tlagrange.m // [in Octave]: // plot(db(fft(faustout,1024)(1:512,:))); // Conclusion: 4th order seems worth it, all considered. // Individual tests: process1 = 1-1' : fdelay1(N,5.5); process2 = 1-1' : fdelay2(N,5.5); process3 = 1-1' : fdelay3(N,5.5); process4 = 1-1' : fdelay4(N,5.5); // Test a range of 4th-order cases: process = 1-1' <: (fdelay4(N,5.1), fdelay4(N,5.2), fdelay4(N,5.3), fdelay4(N,5.4), fdelay4(N,5.5)); // Test a range of 3rd-order cases: process3R = 1-1' <: (fdelay3(N,5.1), fdelay3(N,5.2), fdelay3(N,5.3), fdelay3(N,5.4), fdelay3(N,5.5)); // Test a range of 2nd-order cases: process2R = 1-1' <: (fdelay2(N,5.1), fdelay2(N,5.2), fdelay2(N,5.3), fdelay2(N,5.4), fdelay2(N,5.5)); // Test a range of 1st-order cases: process1 = 1-1' <: (fdelay1(N,5.1), fdelay1(N,5.2), fdelay1(N,5.3), fdelay1(N,5.4), fdelay1(N,5.5)); |
// lagrange.lib - Lagrange interpolation utilities declare name "Lagrange Interpolation Library"; declare author "Julius O. Smith (jos at ccrma.stanford.edu)"; declare copyright "Julius O. Smith III"; declare version "1.0"; declare license "STK-4.3"; // Synthesis Tool Kit 4.3 (MIT style license) //declare reference //"http://www.dsprelated.com/dspbooks/pasp/Lagrange_Interpolation"; import("music.lib"); // define delay, frac // NOTE: While the implementations below appear to use multiple delay lines, // they in fact use only one thanks to optimization by the |