Sliding Time Scale/Pitch Shift

Effects, Recipes, Interfacing with other software, etc.
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
sammy201
Posts: 7
Joined: Sat Jan 30, 2010 8:09 am
Operating System: Please select

Sliding Time Scale/Pitch Shift

Post by sammy201 » Sat Jan 30, 2010 8:37 am

I am looking for a way to change the tempo AND pitch (concurrently) on a sliding time scale (or better yet, a time function I specify (i.e. not necessarily linear)).

It's for recordings from tape, taken with a wonky tape machine that slowed down and sped up whenever it felt like. Since a time track was recorded too, I can estimate the speed changes fairly accurately.

I'm looking at 1.3 Beta's "Sliding Time Scale/Pitch Shift" effect - it's very close to what I need, but it requires me to specify the tempo change and shift change separately. How many semitones correspond to how many percent speed change?

Alternatively, does anyone know how to write a function that could do that (without introducing audible artifacts)? I've been trying to google for some sample code I might adapt, but I'm not sure of the exact terminology of what I'm looking for... dynamic resampling? warping?

Any help very greatly appreciated!
Thanks,
Sammy.

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

Re: Sliding Time Scale/Pitch Shift

Post by steve » Sat Jan 30, 2010 11:47 am

12 semi-tones = 1 octave.
1 octave up = double speed
1 octave down = half speed

Each semitone is equal to one twelfth of an octave. This is a ratio of 2^(1/12) (approximately 1.0594630943592952645618252949463 - thanks Wikipedia)

100% tempo increase = double speed
-50% tempo decrease = half speed

If this job is a one off, then I'd suggest using the "Sliding Time Scale/Pitch Shift" effect (and get your calculator out, or just tweak it 'till it sounds right).
If you're going to be doing a lot of this, then it may be worth looking toward making a custom Nyquist plug-in for the job. I should be able to help you with that if necessary, but it's a bit tricky.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

sammy201
Posts: 7
Joined: Sat Jan 30, 2010 8:09 am
Operating System: Please select

Re: Sliding Time Scale/Pitch Shift

Post by sammy201 » Sat Jan 30, 2010 12:23 pm

Thanks! (Looked at wiki too, wasn't sure if semitones rely on scale (tempered, etc. - I don't know that stuff at all!)

But yes, it is actually something I need a lot, a lot... (I keep getting drunken recordings to fix!) And it needs to be pretty accurate - the speed changes aren't actually audible (at least not usually), but they need to be fixed so frequency measurements made on the audio aren't skewed. I'd love a plugin!

I'm looking at the Nyquist documentation now... Will hopefully find the code for that "Sliding Time Scale/Pitch Shift" in the 1.3 Beta source code to give me an idea... but if you already happen to know roughly what's required to do what I need, I'd much much appreciate a little bit of pseudocode to get me going...?

Many thanks!

Sammy.

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

Re: Sliding Time Scale/Pitch Shift

Post by steve » Sat Jan 30, 2010 2:07 pm

The sliding pitch effect is not a Nyquist plug-in, it's a built in effect, probably written in C+. I don't know about that stuff.

Nyquist is a scripting language and is pretty easy to get started with, though time warp functions are weird and still confuse me. But not to get put off, I'm sure we can sort this.

Check out the links section at http://audionyq.com - there's links to the manual and other important resources.
Look on the main Audacity website and find the "TurntableWarp" Nyquist plug-in and download it - we'll hack that code.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

sammy201
Posts: 7
Joined: Sat Jan 30, 2010 8:09 am
Operating System: Please select

Re: Sliding Time Scale/Pitch Shift

Post by sammy201 » Sat Jan 30, 2010 2:19 pm

You're such a star!! I didn't even see the turntable warping script! OK, I've got some learning to do here, but I'll be back before long - Thank you!

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

Re: Sliding Time Scale/Pitch Shift

Post by steve » Sat Jan 30, 2010 4:04 pm

9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply