Highest quality realtime sample interpolation methods?

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

The FIR kernel doesn't have to be small. The number of multiplications per sample equals kernel length / resampling ratio.

But, really the thread is about non integer ratios. So this is getting a bit off topic.

Post

in my post above, i meant "causal IIR filter", sorry for the typo
i know that i can take the IR of an IIR and truncate/window it and use it as a FIR, i'd do that, except i don't think i know how to design a "very steep" lowpass IIR so i can sample it
that's why i thought to try and window the actual sinc() assymetrically, but i couldn't find a way to make it look "smooth" in the beginning
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

antto wrote:in my post above, i meant "causal IIR filter", sorry for the typo
i know that i can take the IR of an IIR and truncate/window it and use it as a FIR, i'd do that, except i don't think i know how to design a "very steep" lowpass IIR so i can sample it
that's why i thought to try and window the actual sinc() assymetrically, but i couldn't find a way to make it look "smooth" in the beginning
Cepstrum approach (from memory):

1. take the linear-phase kernel and FFT it
2. calculate the absolute magnitudes and take the logarithm (you can add a tiny offset like -200dB or something to keep the logarithm from going infinite at zeroes)
3. take IFFT of the "log-spectrum"
4. add the first half reversed into the second half, then zero out the first half
5. take FFT of the result
6. take the (complex) exponent of each bin
7. take IFFT of the result

This approach is somewhat imperfect as there is necessarily some aliasing and numerical errors, but it works well enough for stuff like windowed sincs that don't have too much going on in the spectrum.

Post

antto wrote:in my post above, i meant "causal IIR filter", sorry for the typo
i know that i can take the IR of an IIR and truncate/window it and use it as a FIR, i'd do that, except i don't think i know how to design a "very steep" lowpass IIR so i can sample it
that's why i thought to try and window the actual sinc() assymetrically, but i couldn't find a way to make it look "smooth" in the beginning
Hi Antto, well truncated IIR was just my third suggestion. First of all I mentioned cepstrum, which mystran has outlined nicely.

As for steep IIR filters for truncation have you seen this IIR designer? It can do elliptical up to 20th order, so should be good enough.

Here's the page with a code example of the cepstrum method.

Regarding a smooth start of the impulse response. I believe the steeper the filter the further the main peak of the transformed sinc will be from the beginning of the kernel. I imagine it should still be smooth though. Although presumably the frequency and phase response should be a better indicator than the shape of the kernel?

Post

Hello all,
Considering the subject of this thread is quite expert and focused on realtime, we hope it is a good place to ask if any of you would be interested in bringing their C++ realtime audio expertise, on a consulting mission, to assist our existing team with specific realtime / buffer / latency aspects of our upcoming audio plugin. Let us know!

Post Reply

Return to “DSP and Plugin Development”