Batch Tempo Change

For Musicians to Share Their Music, Tips, Tricks and Reviews.
Forum rules
ImageIf 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
Cycy
Posts: 2
Joined: Tue Mar 06, 2018 2:09 pm
Operating System: Windows 10

Batch Tempo Change

Post by Cycy » Tue Mar 06, 2018 2:25 pm

Hello,

I have a folder with 212 sound files that need to be exactly the same length (0.8s). I am using the Change Tempo feature from Audacity, and edited a chain (> parameters > length > 0.8) in order to do it in batch since it is very time consuming. However the resulting sounds remain unchanged.

Is there anything I can do?

Thanks!

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

Re: Batch Tempo Change

Post by steve » Tue Mar 06, 2018 2:56 pm

I think that's it for now. Change Tempo takes its setting from the "percentage" control, so for different length sound files to all end up the same length, you have to adjust the setting for each file.

In the future it may be possible to write a script to automate the process, but unfortunately that does not help you now.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Cycy
Posts: 2
Joined: Tue Mar 06, 2018 2:09 pm
Operating System: Windows 10

Re: Batch Tempo Change

Post by Cycy » Tue Mar 06, 2018 3:00 pm

I see! thank you very much

Stilts
Posts: 1
Joined: Mon Sep 10, 2018 5:09 am
Operating System: OS X 10.11 El Capitan or later (macOS)

Re: Batch Tempo Change

Post by Stilts » Mon Sep 10, 2018 5:13 am

Ahh, I am trying to do almost exactly the same thing... I don't suppose anyone has made any progress to solve this: be able to define chains using length variables and not just percent change?

Or anyone else know of any programmatic way to achieve this same result? Going through manually for what I want to do would be super tedious

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

Re: Batch Tempo Change

Post by steve » Tue Sep 11, 2018 4:40 pm

steve wrote:
Tue Mar 06, 2018 2:56 pm
In the future it may be possible to write a script to automate the process, but unfortunately that does not help you now.
This is looking very likely for the next version of Audacity (Audacity 2.3.0).
I've tested this script successfully with the alpha version:
(It will NOT work with Audacity 2.2.2 or earlier)

Code: Select all

;nyquist plug-in
;version 4
;type tool
;name "Change to Length"
;author "Steve Daulton"
;copyright "Released under terms of the GNU General Public License version 2"

;control target "Target duration" time "" 30 1 nil

(let ((len (- (get '*selection* 'end)(get '*selection* 'start))))
  (setf pc (/ (* 100.0 (- len target)) target))
  (setf command (format nil "ChangeTempo: Percentage=~a" pc))
  (aud-do command))

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