Hey, I need to find an algorithm that will upsample from 11.025 kHz to 16.0 kHz. I am having trouble writing one. Does anyone have any insight or has anyone done this before?
I see, I am not a proficient coder however, and am having trouble writing the actual interpolation algorithm.
I could also upsample 11025 by 4x to 44100, interpolate to 48000, then downsample by 3x to get 16000, I am just having trouble with the actual coding of the interpolation part.
It needs to eventually be in C++, but I'm currently working in Matlab (similar to C, C++).
I could also upsample 11025 by 4x to 44100, interpolate to 48000, then downsample by 3x to get 16000, I am just having trouble with the actual coding of the interpolation part.
Isn't that the same as the original problem?
There is a mathmatical way of doing this, but I don't really have the time to figure it out.
1. Allocate an array 640X the length of your input. (7056K samples)
2. Copy in the 11.025KHz signal, each Hz put in 640 samples.
3. Read a Hz every 441 samples.
You can reduce this by playing with the numbers a bit. You can put a counter in and offset the sample by 1 every third read if you divide by 3, for instance.
If you are into DSP, you can interpolate it to your 44100 by padding with zeros, then use a FIR to reduce it to 16KHz.
-Erik
Last edited by egawtry; February 4th, 2010 at 10:51 AM.
Bookmarks