• SONAR
  • Sample rate: 44.1 or 48 that is the question (p.3)
2013/04/07 17:37:14
losguy
Spot on, Oh Esteemed Flipper Of Bits. Incidentally, the interpolator often looks a lot like the truth that you cling to in your sig. In this case, though, your variable "t" is replaced by the new output sample, call it "m", and the parameter "Ts" works as the interpolation factor, call it "K". Oh, and of course, for practical DSP, the summation doesn't go to infinity, but occurs over a finite (moving) time window of samples. Also, a window function is typically applied, usually a symmetric bell shape function "h(m-nK)" over the sample window, to smooth out edge effects (among other things). Since the window is finite and non-uniform, you could say that the "truth" is approximate. But in these modern times, that approximation has been pretty good for audio purposes. (Of course, you may feel free to sum to infinity if you are in need of completely cling-able truth.)
2013/04/07 17:45:05
Paul P
losguy : "Since the window is finite and non-uniform, you could say that the "truth" is approximate. But in these modern times, that approximation has been pretty good for audio purposes. (Of course, you may feel free to sum to infinity if you are in need of completely cling-able truth.) "

That sounds more like religion to me than science :-)




2013/04/07 18:34:57
losguy
Paul P
That sounds more like religion to me than science :-)
"It is difficult to avoid the impression that a miracle confronts us here…or the two miracles of the existence of laws of nature and of the human mind’s capacity to divine them ... The miracle of the appropriateness of the language of mathematics for the formulation of laws of physics is a wonderful gift which we neither understand nor deserve."  - Eugene Wigner, The Unreasonable Effectiveness of Mathematics in the Natural Sciences, 1960
 
2013/04/07 21:05:47
wogg
drewfx1


wogg
Sample rate conversion is basically mathematically guessing where the signal lies at the time of the output sample based on the 2 closest input samples. 
It is NOT guessing and it is NOT based on only the 2 closest input samples. That's how people often assume it works, but it's doesn't work that way.
The value of a new sample between two existing samples is calculated and the calculation is based on a series of samples. The accuracy of the result is largely a factor of how much processing power you want to throw at it, but with the power available with modern CPU's there's really no reason for SRC's to cause problems. 

Semantics.  In the absence of actual data at that time it's still a guess, just a really educated and carefully calculated guess. 
 
Good point on the series of samples, it's probably been a really long time since anyone used two point interpolation.
2013/04/07 21:23:03
drewfx1
The "actual data at that time" is in fact contained in the series of samples.

That's the very crux of the sampling theorem.
2013/04/07 22:18:00
rabeach
drewfx1


The "actual data at that time" is in fact contained in the series of samples.

That's the very crux of the sampling theorem.

IMO the perfect band limitation of an infinite signal/sequence can be viewed as more an absurdity than a reality. 
2013/04/07 22:52:07
drewfx1
rabeach


drewfx1


The "actual data at that time" is in fact contained in the series of samples.

That's the very crux of the sampling theorem.

IMO the perfect band limitation of an infinite signal/sequence can be viewed as more an absurdity than a reality. 

But it doesn't have to be perfect - we're dealing with quantized data (likely already containing some noise) and humans.

Many of the SRC routines measured here easily surpass both 16bit (or even 24bit) audio and human hearing acuity:

http://src.infinitewave.ca/

IMO, if all of the SRC errors are already lost in the quantization error and/or are completely inaudible it's absurd to argue about theoretical imperfections.
2013/04/07 23:14:57
rabeach
drewfx1


rabeach


drewfx1


The "actual data at that time" is in fact contained in the series of samples.

That's the very crux of the sampling theorem.

IMO the perfect band limitation of an infinite signal/sequence can be viewed as more an absurdity than a reality. 

But it doesn't have to be perfect - we're dealing with quantized data (likely already containing some noise) and humans.

Many of the SRC routines measured here easily surpass both 16bit (or even 24bit) audio and human hearing acuity:

http://src.infinitewave.ca/

IMO, if all of the SRC errors are already lost in the quantization error and/or are completely inaudible it's absurd to argue about theoretical imperfections.
My comment was made in jest about the sampling theorem itself being based on perfectly band limiting an infinite sequence derived from an infinite signal; neither of which exist in our reality. 

2013/04/08 15:52:42
drewfx1
rabeach

   
My comment was made in jest about the sampling theorem itself being based on perfectly band limiting an infinite sequence derived from an infinite signal; neither of which exist in our reality. 

Fair enough! 

But that wasn't 100% clear, and I wanted to point out that just because theory vs. practice isn't 100% perfect (what you said is of course correct), it doesn't mean it's not "perfect enough".


But all this got me thinking. Since I'm a "prove it" kind of guy, I thought it would be fun to test Sonar's SRC vs. an independent calculation and see how good it did.

So here's what I did:

1. Calculated the "correct" values for a fairly high frequency 48kHz sine wave (I chose 15,200Hz) in Microsoft Excel.
2. Create a 64bit 44.1kHz 15,200Hz 0dBFS sine wave in Sound Forge 9.
3. Use the SRC algorithms in both Sound Forge 9 and Sonar X2 to convert from 44.1 to 48kHz.
4. Compare the actual SRC outputs with the values Excel said a 48kHz sine should have and express this as dBFS.

My results:

For Sound Forge 9, the average difference was ~-98dBFS. If you compare this to the results for SF9 given at http://src.infinitewave.ca/, you'll see that (by eye) it roughly matches their results and that SF9 indeed has a fairly poor SRC routine compared to others shown there.

For Sonar X2?
My average difference was ~-204dBFS (!!!!). The worst error was ~-193dBFS.

Those are pretty good "guesses", I'd say.
2013/04/08 17:40:03
rabeach
http://src.infinitewave.ca/



very nice link thanks for posting it.
© 2026 APG vNext Commercial Version 5.1

Use My Existing Forum Account

Use My Social Media Account