What happens when I resample audio?


My project rate is 16000 Hz. I generate a 5000 Hz tone. Listen to it.
Then I change project rate to 8000 Hz. Now when I listen to it, it sounds different. Plot spectrum still gives peak at 5KHz.

Then I export that tone (keeping project rate 8K). When I open it, the waveform is gone.

Can somebody please explain what is happening?


I recorded the output of my sound card while Audacity played the different sounding tone (when project rate was 8k). It was a 3KHz tone. Seems like it occurred due to folding back of 5KHz, also it’s amplitude was much lower than that of the 5KHz tone. I guess this is happening because of roll off of the low pass filter Audacity implements.

It doesn’t have to be filtering damage. You’re suffering from straight sample damage. Digital sampling has to be at least 2 times the tone you’re trying to reproduce. I use the older number of 2.6. To sample a 5000 Hz tone with unquestioned accuracy requires a 13000 Hz sampling frequency. Barely adequate results can be had by sampling at 10000Hz. Lower than that will produce trash, more or less unpredictable depending on the show.



Thanks for your reply.

I was trying to figure out why this ‘trash’ output was 3 KHz and not any other frequency. It seems if sampled below Nyquist rate aliasing effect (Aliasing - Wikipedia) occurs.
It says that in this case the apparent frequency would be |f - Nfs|, where f = sinusoid frequency = 5KHz. N = any integer, fs = sampling rate (8 KHz in my case). So it turns out | 5 -18| = 3KHz ! Seems like we can learn some dsp using audacity :slight_smile:

In analog systems, you’d be getting sum and difference frequencies.

It’s picket fencing. View two picket fences one in front of the other and with different numbers of boards. The “wave” you see from across the street is the difference between the two numbers of boards. You get into the brain-bleeding math if the original two fences weren’t nailed together evenly.