Login / Register 0 items | $0.00 New @ KVR
matt42
KVRian
 
996 posts since 9 Jan, 2006

Postby matt42; Thu Mar 08, 2018 5:13 am Re: Highest quality realtime sample interpolation methods?

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.
User avatar
antto
KVRAF
 
2495 posts since 4 Sep, 2006, from 127.0.0.1

Postby antto; Thu Mar 08, 2018 10:13 am Re: Highest quality realtime sample interpolation methods?

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.freenode.net >>> #kvr
mystran
KVRAF
 
4896 posts since 11 Feb, 2006, from Helsinki, Finland

Postby mystran; Thu Mar 08, 2018 11:45 am Re: Highest quality realtime sample interpolation methods?

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.
Image <- plugins | forum
matt42
KVRian
 
996 posts since 9 Jan, 2006

Postby matt42; Thu Mar 08, 2018 4:05 pm Re: Highest quality realtime sample interpolation methods?

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?
Previous

Moderator: Moderators (Main)

Return to DSP and Plug-in Development