Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Software To Batch Trim The End Of WAVs (Read 1277 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Software To Batch Trim The End Of WAVs

I'm working on a project using MIDI from a video game which comes in short (5 - 10 second mostly) segments of four bars each. The best software I have found for exporting these to WAV is Foobar's Foo_MIDI plugin. The only issue I have is that it automatically applies a loop and fade out when exporting using BASSMIDI, and I cannot make that extra bit shorter than 10ms. The effect this has on transitions is subtle and most users probably won't notice, but if I'm going to spend dozens of hours listening to these tracks I really need to get rid of that fade for my own sanity.

All I need to do is trim 10ms off the end off every file. The problem is that I have exported nearly 20 different versions of each section using different soundbanks and now have over 4000 files to work with. I've tried a bunch of different software and nothing free is doing quite what I need. I am actually at a point where I would consider buying something (but am not in a position to make major purchases at the moment, moving across the province in a month).

Does anybody know of something that does what I need?

Thanks!

(P.S. bonus points if it can maintain an existing file structure during the process)

Re: Software To Batch Trim The End Of WAVs

Reply #1
I once used SoX to batch trim a defined number of samples from the end with the example .cmd file SoX provides.
There may be even more options like the value used in ms but i didn't check this.
This code is for 1000 samples.
Code: [Select]
rem Example of how to do batch processing with SoX on MS-Windows.
rem
rem Place this file in the same folder as sox.exe (& rename it as appropriate).
rem You can then drag and drop a selection of files onto the batch file (or
rem onto a `short-cut' to it).
rem
rem In this example, the converted files end up in a folder called `converted',
rem but this, of course, can be changed, as can the parameters to the sox
rem command.

cd %~dp0
mkdir converted
FOR %%A IN (%*) DO sox %%A "converted/%%~nxA" trim 0s -1000s
pause
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: Software To Batch Trim The End Of WAVs

Reply #2
Great thanks, I'll give that a go!

 

Re: Software To Batch Trim The End Of WAVs

Reply #3
After much arguing with my old nemesis "the batch file" I have managed to have Sox create a copy of my entire folder structure with just the required trim. I think that perhaps I should learn how to use Sox more thoroughly, I have a feeling I'm going to be needing it again.