2
$\begingroup$

I'm trying to write my own high quality audio sample rate converter. I barely know anything about signal processing though so I need help. From what I understand I need to sum together normalized sinc functions that touch every sample to find the value at any arbitrary point. I'm guessing this is hard because that would mean more than a billion calculations for a few second long audio file. So do I only use the sinc functions for the samples that are closest to my x value? Is this what is meant by "windowed sinc"? How many samples should I go in each direction away from my x value? Additionally, my DAW has something called "32 point sinc" resampling. What is the "32 point" supposed to mean in this case?

$\endgroup$
9
  • 1
    $\begingroup$ Have a look at dsp.stackexchange.com/questions/59740/… and the comments on dsp.stackexchange.com/questions/69033/… $\endgroup$ – Cedron Dawg Jul 13 '20 at 2:10
  • $\begingroup$ @CedronDawg I think that it is worth putting those in an answer. This question is "far enough" from those original topics to be deemed a duplicate. $\endgroup$ – A_A Jul 13 '20 at 13:48
  • $\begingroup$ @A_A I'm not understanding what you mean. The referenced questions are meant to give an understanding of how a sinc interpolation (for upsampling) works and how it relates to maybe using a FFT for efficiency. So, they don't really answer the OP directly, but give context. The analysis of error consequences vs truncation length is a different beast and I would defer to Olli as he does a spectacular job on those. $\endgroup$ – Cedron Dawg Jul 13 '20 at 15:34
  • 1
    $\begingroup$ @CedronDawg No I certainly do not mean close the question just like that. If the OP accepts it, then the question is not going to remain "unanswered" and keep coming back. $\endgroup$ – A_A Jul 15 '20 at 12:05
  • 1
    $\begingroup$ @olliniemitalo The "32 point sinc" is a option in FL Studio. $\endgroup$ – sincman Jul 18 '20 at 9:04
4
$\begingroup$

"So do I only use the sinc functions for the samples that are closest to my x value?"

Yes, when you are truncating.

"Is this what is meant by "windowed sinc"?"

Yes. The sinc goes to infinity, calculating that is impractical.

"How many samples should I go in each direction away from my x value?"

The sinc diminishes the further away you are. At some point additional points become insignificant (no wider than a whisker on a gnat).

"Additionally, my DAW has something called "32 point sinc" resampling. What is the "32 point" supposed to mean in this case?"

I'm pretty sure it means a 32 point window, centered on your current sample.

Sinc interpolation is one form of interpolation. It is the "Fourier compatible" one as it gives limits on a bandwidth basis.

Here is another link that may be even more useful: Multi-channel audio upsampling interpolation

On re-reading this reference, Olli has already done this analysis, spectacularly.

$\endgroup$

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.