Page 1 of 1

Play a sound at different speed

Posted: Wed Oct 10, 2012 7:44 am
by jecaro
Hi there,

for the project I'm working on I need to play a sound at different speed. Every single sound playing library I came accross was able to do this. I've seen that Audacity is able to do it. So I'm wondering:
  • How do you achieve this ? Which library do you use ? Could you point out where is the code related to this ?
  • Is it possible to somehow remote control audacity from my application to play my sound ?
Thanks for your help,

Jean-Charles

Re: Play a sound at different speed

Posted: Wed Oct 10, 2012 2:27 pm
by steve
Do you mean changing the tempo and pitch (resampling) or changing the tempo without changing the pitch (time stretching)?

Re: Play a sound at different speed

Posted: Wed Oct 10, 2012 2:30 pm
by jecaro
The first one, I mean changing the tempo and the pitch.

Re: Play a sound at different speed

Posted: Wed Oct 10, 2012 2:40 pm
by steve
Audacity uses (depending on the build) either libreample, or libsamplerate or libsoxr.

If you are looking for command line access to resampling, have a look at SoX http://sox.sourceforge.net/Docs/Features
If you just want the library, see libsoxr.