Play a sound at different speed

Audio software developers forum.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
jecaro
Posts: 4
Joined: Wed Oct 10, 2012 7:39 am
Operating System: Please select

Play a sound at different speed

Post by jecaro » Wed Oct 10, 2012 7:44 am

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

steve
Site Admin
Posts: 80678
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Play a sound at different speed

Post by steve » Wed Oct 10, 2012 2:27 pm

Do you mean changing the tempo and pitch (resampling) or changing the tempo without changing the pitch (time stretching)?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

jecaro
Posts: 4
Joined: Wed Oct 10, 2012 7:39 am
Operating System: Please select

Re: Play a sound at different speed

Post by jecaro » Wed Oct 10, 2012 2:30 pm

The first one, I mean changing the tempo and the pitch.

steve
Site Admin
Posts: 80678
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Play a sound at different speed

Post by steve » Wed Oct 10, 2012 2:40 pm

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.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply