Sample rate conversion theory..

blahblah99

Platinum Member
Oct 10, 2000
2,689
0
0
Are there any good documents out on the web that discuss this theory? I've "googled" the search and came up with a couple of explanations, but none have given a good example.


This application is for audio, converting samples from 44.1khz to 48khz and possibly higher, and vice versa.
 

uart

Member
May 26, 2000
174
0
0
What exactly are you trying to achive. My thoughts are that if the original signal is currently samped at 44.1kHz then you've already lost any of the extra information that may have been preserved had 48kHz have been used. You cant get it back.

Or are you just enquiring about how to re-sample from 44.1 to 48 without introducing any noise or distortion or in any way losing further info.

To resample at 48kHz you only need to interpolate the existing sample points and resample the interpolated signal at the new time points. The simplist interpolation is linear between adjacent points but higher order splines would give a better result.

I consider it highly dubious as to whether you can actually increase the "quality" of any material by this process, though I guess that if you can do a better job at the interpolation that the hardware in your cd player or whatever just maybe there could be some tiny quality advantage to the resample.
 

Peter

Elite Member
Oct 15, 1999
9,640
1
0
First law of data processing: Processing information ALWAYS implies losing information. There is no gain, ever.

That said, resampling is best done by inflating the original information to a sample rate that is the smallest common multiple of the original and target sample rates - using a nice interpolation algorithm to do so. Then condense it back onto your target rate, again using a nice algorithm for averaging the data.

It's still going to sound noticeably worse then.
 

blahblah99

Platinum Member
Oct 10, 2000
2,689
0
0
Well, I should have given a little more details with the question. :)

I have an audio ADC that samples at 48KHZ and would like to upsample it to a rate (say 50khz) that can be used in USB, which is ran off a 24MHZ clock. I would also like to take audio data sampled at the "USB rate" and down-sample it to 48khz for use in a typical DAC.

I'm aware of the interpolation methods (linear, quadratic, cubic, cubic spline, etc etc) and how to implement it, but which interpolation method would be suitable for audio use? I know the error term in the interpolation process translate directly into harmonic distortion, but how much is unknown to me.

Hence, if anyone knows a good paper or book discussing sample rate conversion, the interpolation methods used, and its relation to THD, please let me know.


This sample rate conversion is going into an FPGA.
 

Matthias99

Diamond Member
Oct 7, 2003
8,808
0
0
I don't understand why you need to resample at all, then, since 24Mhz / 48Khz = 24,000,000 / 48,000 = 500; the clocks will line up just fine.

For a simple conversion, a linear interpolation would probably be alright. A gaussian sampling curve often gives very "natural"-sounding results, although high-order splines are likely better. I don't know much about doing this in hardware, though; my exposure to this was in terms of resampling visual data in software.