I'm implementing a variable fractional delay element for use in online audio processing. Applications include ie. Karplus-Strong synthesis, flanger, chorus, echo, vibrato. I'm not oversampling, so drop-sample and linear interpolation are not really acceptable for interpolation.

Could a low order sinc FIR work as an alternative to 2:nd+ order polynomial interpolation? By low order I mean on the order of just a few zero crossings.

I really like sinc interpolation because it offers two advantages over polynomial interpolation.

  1. Coefficients (table of windowed sinc values) are independent of the delay amount, whereas in polynomial interpolation the filter coefficients are an N:th order polynomial of the delay amount. This complicates the code when the amount of delay is variable.
  2. Coefficients are independent of interpolation order. For polynomial interpolation you need precomputed polynomials in the delay amount for all the orders you might need.

The main drawback I see with higher order sinc interpolation is the amount of latency it imposes. N+1 point polynomial interpolation of order N gives just N/2 samples of latency.

I have also considered 1 pole allpass interpolation, but I suspect it will have bandwidth problems similar to linear interpolation. (Is multi pole allpass interpolation a thing?)

  • $\begingroup$ If you are using a table of windowed sinc values, doesn't that mean your delay resolution is limited? $\endgroup$ – Jim Clay Feb 7 '15 at 14:58
  • $\begingroup$ Yes, delay resolution is limited. With a large enough table this is not much of a problem. This is the oversampling route. It is also possible to use linear interpolation "between" stored coefficient values. In fact I believe this is what libsamplerate (Secret Rabbit Code) does. $\endgroup$ – Emanuel Landeholm Feb 7 '15 at 16:02
  • 1
    $\begingroup$ For simple windows, one can also just compute each needed sample point of a windowed Sinc interpolation kernel while filtering. On some CPUs these days, calling a few vectorized transcendental functions may be faster than a cache miss of a large table lookup. $\endgroup$ – hotpaw2 Feb 8 '15 at 4:26
  • 1
    $\begingroup$ I think you should try the Farrow structure. Note that you don't need to do polynomial interpolation with that structure, but the filters can be designed in any way you like. A frequency domain design might be most useful. You can trade off latency and performance. Also, oversampling by 2, Farrow structure, and downsampling can be cheaper than implementing a single-rate filter that performs well close to Nyquist. $\endgroup$ – Matt L. Feb 8 '15 at 11:17
  • 1
    $\begingroup$ A Farrow structure is just a piecewise polynomial interpolator of a low pass kernel, often a few lobes of a windowed Sinc. $\endgroup$ – hotpaw2 Feb 13 '15 at 13:13

If you don't need matching points to come thru the resample interpolation unchanged, then you can use a different low-pass filter kernel. A minimum phase equivalent to a linear phase windowed Sinc will have an identical frequency response, but less delay, especially when using a longer window.

  • $\begingroup$ How much less latency, 50%? $\endgroup$ – Emanuel Landeholm Feb 13 '15 at 8:20
  • 1
    $\begingroup$ For a windowed Sinc, the latency (or group delay) delta depends on the length and type of window, and the min phase approximation accuracy. $\endgroup$ – hotpaw2 Feb 13 '15 at 13:09
  • $\begingroup$ Right, but we're approaching 50% latency? $\endgroup$ – Emanuel Landeholm Feb 16 '15 at 12:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.