Formula to slow down audio with pitch correction

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
jamr
Posts: 6
Joined: Tue Nov 12, 2013 4:56 pm
Operating System: Please select

Formula to slow down audio with pitch correction

Post by jamr » Tue Nov 12, 2013 5:03 pm

Hello - I need to slow down audio by 25% and want to verify the math, after reading the wiki article, I was hoping you someone could validate that I am doing it correctly: http://wiki.audacityteam.org/wiki/Change_Speed

( ((original length) - (target length)) / (target length) ) * 100 = Percent Change

I want to reduce the speed by 25%, and therefore I will start with a length of 100 minutes.

(100 minutes - 75 minutes )/75 minutes * 100 = 33.3333333...%

That means I need to increase the speed by 33.3333% in order to slow down audio by 25% and have the pitch stay the same correct?

Thanks
Ron

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

Re: Formula to slow down audio with pitch correction

Post by steve » Tue Nov 12, 2013 6:51 pm

jamr wrote:( ((original length) - (target length)) / (target length) ) * 100 = Percent Change
...
(100 minutes - 75 minutes )/75 minutes * 100 = 33.3333333...%
If the original duration is 100 minutes and the "target" (final) length is 75 minutes, then it must be playing faster!
jamr wrote:I want to reduce the speed by 25%
This is the tricky part. "Percent" does not mean anything unless you say what it is a percentage of.
If I say that I want 25% of the money in your pocket, that is (probably) very different to saying that I want 25% of the money in Bill Gates' bank account.

If I have a recording and say that it is "slowed 25%", that is ambiguous because I have not specified whether the "25%" is "25% of the original" or 25% of the new track.

The way that it works in Audacity (and I don't think that this is very intuitive) is that it is 25% of the new track.

------------------------------------

If your original file 100 minutes duration, and you slow it down by 25% in the Audacity "Change Speed" effect, (Percent Change = -25), then the equation is:

Code: Select all

( ((original length) - (target length)) / (target length) ) * 100 = Percent Change
( (100 - (target length)) / (target length) ) * 100 = -25
which can be rearranged as:

Code: Select all

( (100 - (target-length)) /  (target length) ) = -25/100
(100 -  (target length) ) = (-25 *  (target length) ) / 100
100 = ( (-25 *  (target length) ) / 100 ) +  (target length)
100 = ( (-25 *  (target length) ) / 100 ) +  (100 * (target length)) / 100)
100 = (75 * (target length) ) / 100
(100 * 100) = (75 + (target length) )
((100 * 100) / 75) = (target length)
(target length) = 133.333333333
or to put it more simply... (I bet you're glad I said that ;))

Code: Select all

((original length) * 100) / (100 + (Percent Change)) = New length
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

jamr
Posts: 6
Joined: Tue Nov 12, 2013 4:56 pm
Operating System: Please select

Re: Formula to slow down audio with pitch correction

Post by jamr » Tue Nov 12, 2013 11:17 pm

Thank you! So good to have someone review. Ok so to make sure I have it correct, slowing down the video:

100 second song original length
125 second target length

( ((original length) - (target length)) / (target length) ) * 100 = Percent Change
( ((100) - (125)) / (target length) ) * 100 = -20

So therefore decreasing the speed by 25% means an increase in pitch by 20% if I want the pitch to maintain.

Correct?

Ron

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

Re: Formula to slow down audio with pitch correction

Post by steve » Wed Nov 13, 2013 12:52 am

jamr wrote:So therefore decreasing the speed by 25%
There's that "tricky part" again. "Percent" does not mean anything unless you say what it is a percentage of.

If the original length is 100 seconds and the final length is 125 seconds,
then the final length is ( ((125 -100) / 100) * 100) = 25 percent longer than the original
which is also ( ((125 -100) / 125) * 100) = 20 percent of the final length.

The same goes for tempo and frequency.
As it speeds up, the pitch goes up and the duration becomes less.
As it slows down, the pitch goes down and it goes on longer.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply