First off I’m using windows 8.1 Pro and Audacity 2.2.2
Whenever I resample something in audacity, it resamples it but it also has an automatic low pass to prevent the alias frequencies from coming through. Is there a way I can disable this to hear for example a 8 khz sample rate file without the low pass, meaning including all of the hiss and alias noises along with that sample rate?
PS: I am willing to modify code in my copy of audacity to attempt this
It doesn’t “only” speed it up. It resamples the selected audio to 8 kHz, and returns the audio to the track. It does NOT change the Audacity track which is still set to 44.1 kHz.
Because there are less samples in the returned audio than there were in the original (because it has been resampled), it takes up less space in the audio track, effectively “speeding it up”.
By changing the track sample rate (from the track’s drop down menu) to 8000 Hz, the samples are then correctly spaced out at intervals of 1/8000 second, and the track will play at the correct speed.
Example, If you generate a sine tone at 5 kHz and resample to 8 kHz, the Nyquist frequency is 4 kHz. “Proper” resampling (with anti-alias filtering) will remove the 5 kHz sine tone and the result will be silence. Resampling without anti-alias filtering will create a strong peak at 3 kHz (the alias frequency).
The code I provided will also create additional frequencies at a much lower level. These are the result of “distortion” cause by the linear interpolation.
The problem is the sheer act of selecting 8khz in the drop down after using the nyquist command does the exact same effect as just selecting resample and selecting 8khz. The dblue crusher also doesn’t allow for a specific sample rate, just a number of sample reductions
When you select Resample, the audio is resampled by “soxr” (a high quality resampling library) which applies anti-alias filtering prior to resampling.
With the steps that I posted, the audio is resampled by Nyquist using linear interpolation and no pre-filtering.