How does "speed change " in Audacity work?

What algorithm is being used exactly?
Is it a simple sample rate change, or something else?
I ask because I’m trying to implement a speed changer in python myself where the pitch is NOT preserved. I tried changing the sample rate of my audio which changes the pitch and duration, but compared to the speed change in Audacity it’s far less smooth.
Im finding that simply changing the sample rate creates high frequency distortion/aliasing at lower or higher speeds.
So what’s the difference and what am I missing that’s in Audacitys speed change function?

Cheers (this is my first post)

Have you had a look at the code?

That’s only the UI code.

which references

I’m guessing that this is what you really want to know:

Audacity resamples the audio data using the libsamplerate library. This changes the number of samples that make up the data:

  • To slow down the audio, the number of samples is increased. (resampling to a higher sample rate)
  • To speed up the audio, the number of samples is decreased. (resampling to a lower sample rate)

The samples are then forced back into the track which still has its original sample rate. Thus, if there are now more samples, the audio becomes longer (slower and lower pitch), or if less samples, the audio becomes shorter (faster and higher pitch).

Thanks all, this answers my question!

This topic was automatically closed after 30 days. New replies are no longer allowed.