Trimming first 16 seconds of 3500 files

Questions, discussion and recipes for scripting and batch processing in Audacity.
See also the "Scripting" section of the Audacity manual.
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
alainq
Posts: 3
Joined: Mon Feb 15, 2021 4:21 pm
Operating System: Windows 10

Trimming first 16 seconds of 3500 files

Post by alainq » Mon Feb 15, 2021 4:27 pm

Dear forum,

I like working with Audacity but there is still a lot that I cannot achieve.

I have 3500 wav files with an intro of 16 seconds that I need to cut. To do this manually, it's almost impossible.
I have been playing around with the macros but I couldn't find out how to trim the first 16 seconds of every wav file I have.

Anyone that did this already with a macro ?
Are there any other possibilities in Audacity to batch trim the first 16seconds of a wav file ?

Thanks a lot
Cheers
Alain

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

Re: Trimming first 16 seconds of 3500 files

Post by steve » Mon Feb 15, 2021 4:34 pm

I'm not sure if Macros will handle thousands of files in one go, though you should be OK if you split them into batches of a few hundred (start small and work up).

I'd expect something like this to work:

macro.png
macro.png (31.04 KiB) Viewed 564 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

waxcylinder
Forum Staff
Posts: 14669
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Trimming first 16 seconds of 3500 files

Post by waxcylinder » Mon Feb 15, 2021 6:32 pm

steve wrote:
Mon Feb 15, 2021 4:34 pm
I'm not sure if Macros will handle thousands of files in one go, though you should be OK if you split them into batches of a few hundred (start small and work up).
The Manual says:
It is recommended not to process more than 500 files at a time.
Peter
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

alainq
Posts: 3
Joined: Mon Feb 15, 2021 4:21 pm
Operating System: Windows 10

Re: Trimming first 16 seconds of 3500 files

Post by alainq » Mon Feb 15, 2021 7:23 pm

Thanks alot, this did the trick.
Is there a more detailed guide available for the macro part ? I love this.

Have a great evening
Alain

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

Re: Trimming first 16 seconds of 3500 files

Post by steve » Mon Feb 15, 2021 7:39 pm

alainq wrote:
Mon Feb 15, 2021 7:23 pm
Is there a more detailed guide available for the macro part ?
There's this: https://manual.audacityteam.org/man/macros.html
and then there's the list of available commands: https://manual.audacityteam.org/man/scr ... rence.html
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

alainq
Posts: 3
Joined: Mon Feb 15, 2021 4:21 pm
Operating System: Windows 10

Re: Trimming first 16 seconds of 3500 files

Post by alainq » Mon Feb 15, 2021 7:47 pm

steve wrote:
Mon Feb 15, 2021 7:39 pm
alainq wrote:
Mon Feb 15, 2021 7:23 pm
Is there a more detailed guide available for the macro part ?
There's this: https://manual.audacityteam.org/man/macros.html
and then there's the list of available commands: https://manual.audacityteam.org/man/scr ... rence.html
Its the scripting reference that I was actually looking for.
Thanks again for the expert help.

Cheers
Alain

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

Re: Trimming first 16 seconds of 3500 files

Post by steve » Mon Feb 15, 2021 10:47 pm

alainq wrote:
Mon Feb 15, 2021 7:47 pm
Its the scripting reference that I was actually looking for.
Note that the current implementation of scripting is relatively new, and so is the documentation.

Since Audacity 2.4.2 was released a few small errors have been discovered in the docs, and a few things not working quite as expected. The next Audacity release includes fixes for those. If you have any problems or things don't work quite as you expect, feel free to ask ;)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply