Batch join wav files?

Plug-in hosts and other software applications discussion
mheo
KVRer
20 posts since 16 Feb, 2018

Post Mon Apr 06, 2020 4:48 pm

Yeah, "free" but unwanted programs (antivirus etc.). Then have a look at BIGASOFT (Total Video Converter). It works for sure (tried it myself "batch" merging 24bit wav files: output single file remains 24bit). Not free, alas.

http://www.bigasoft.com/total-video-converter.html

bemushroomed
KVRist
72 posts since 28 Dec, 2003 from Sweden

Re: Batch join wav files?

Post Mon Apr 06, 2020 5:00 pm

No i think i'm fine with your recommendations for now lol. thanks.

User avatar
Googly Smythe
KVRAF
2858 posts since 12 May, 2011 from Albion

Re: Batch join wav files?

Post Mon Apr 06, 2020 6:19 pm

ffmpeg
https://ffmpeg.org/

But you might need a couple of years to figure out how to do it!
https://ffmpeg.org/documentation.html
https://trac.ffmpeg.org/wiki/Concatenate
Bandcamp - Soundcloud
What is life without a little whimsy?

MusicMayor
KVRer
25 posts since 7 Dec, 2007

Re: Batch join wav files?

Post Mon Apr 06, 2020 6:28 pm

An example on how to concat wav files via ffmpeg can be found here:
https://superuser.com/q/587511

Also, SOX (another command-line utility) can be used:
https://sourceforge.net/projects/sox/files/sox/14.4.2/

Example shown here:
https://superuser.com/a/1164761

bemushroomed
KVRist
72 posts since 28 Dec, 2003 from Sweden

Re: Batch join wav files?

Post Mon Apr 06, 2020 6:43 pm

Yeah, i actually ended up using Sox.

For future searches on the forum or google; to merge / join several wav audio files all you need to do is this simple command line (or batch file):

sox *.wav AllWavs.wav
this will take all .wavs in that folder and make it into 1 long wav file. Super simple and takes less than a second for 60 files (my files are very small though).

just make sure you have the required sox.exe in this folder too..

User avatar
whyterabbyt
Beware the Quoth
28177 posts since 4 Sep, 2001 from R'lyeh Oceanic Amusement Park and Funfair

Re: Batch join wav files?

Post Tue Apr 07, 2020 3:22 am

Ah, I was just about to recommend Sox.

>>just make sure you have the required sox.exe in this folder too..

You dont really need to, you can use the full path (as long as you enclose it in quotes if there's a space in the path) so

"C:\Program Files (x86)\sox-14-4-2\sox.exe" *.wav AllWavs.wav

will work, for example


Alternately, you can add the path to windows so it will always find it. See here:

https://stackoverflow.com/questions/176 ... in-windows
"The bearer of this signature is a genuine and authorised pope."

bemushroomed
KVRist
72 posts since 28 Dec, 2003 from Sweden

Re: Batch join wav files?

Post Tue Apr 07, 2020 3:26 am

yes true, i just went with the easiest / fastest way for most users. I'm probably gonna do a batch file since i'm gonna use this a lot.

Didn't know about the last part, interesting :)

mheo
KVRer
20 posts since 16 Feb, 2018

Re: Batch join wav files?

Post Tue Apr 07, 2020 6:58 am

Can someone be so kind and explain how SOX works (in simple step-by-step for dummies words)? I installed it, click on "sox.exe" but nothing happens (just a very fast black windows which disappears immediately). Is that normal? Why "exe" if nothing happens at all?

User avatar
Googly Smythe
KVRAF
2858 posts since 12 May, 2011 from Albion

Re: Batch join wav files?

Post Tue Apr 07, 2020 7:18 am

mheo wrote:
Tue Apr 07, 2020 6:58 am
Can someone be so kind and explain how SOX works (in simple step-by-step for dummies words)? I installed it, click on "sox.exe" but nothing happens (just a very fast black windows which disappears immediately). Is that normal? Why "exe" if nothing happens at all?
It requires parameters/arguments on the command line - see the posts before yours.
Bandcamp - Soundcloud
What is life without a little whimsy?

bemushroomed
KVRist
72 posts since 28 Dec, 2003 from Sweden

Re: Batch join wav files?

Post Tue Apr 07, 2020 7:26 am

Yes, it should either be run from the Command Prompt or you can make a batch file (extension is .bat).

In my case i have created a file called merge.bat that i can drop in any folder with .wavs that i want to merge.

open notepad, put in this line:
"C:\Program Files (x86)\sox-14-4-2\sox.exe" *.wav AllWavs.wav
save as merge.bat
run it (in a folder with .wavs) it will almost instantly have created a new wav file called AllWavs.wav

there's a ton of other things you can do with SOX too though, so it requires you to read up about what parameters or arguments to put in your batch file to make it do what you want. Just clicking the .exe means you didn't give it any job, so it won't do anything.

mheo
KVRer
20 posts since 16 Feb, 2018

Re: Batch join wav files?

Post Tue Apr 07, 2020 7:48 am

bemushroomed wrote:
Tue Apr 07, 2020 7:26 am
Yes, it should either be run from the Command Prompt or you can make a batch file (extension is .bat).

In my case i have created a file called merge.bat that i can drop in any folder with .wavs that i want to merge.

open notepad, put in this line:
"C:\Program Files (x86)\sox-14-4-2\sox.exe" *.wav AllWavs.wav
save as merge.bat
run it (in a folder with .wavs) it will almost instantly have created a new wav file called AllWavs.wav

there's a ton of other things you can do with SOX too though, so it requires you to read up about what parameters or arguments to put in your batch file to make it do what you want. Just clicking the .exe means you didn't give it any job, so it won't do anything.
WOW, FANTASTIC! :love:

Thank you very much!

mheo
KVRer
20 posts since 16 Feb, 2018

Re: Batch join wav files?

Post Tue Apr 07, 2020 9:37 am

FOR THE RECORD

I just found an issue working with SOX: the batch solution

"C:\Program Files (x86)\sox-14-4-2\sox.exe" *.wav AllWavs.wav

only works with maximum 508 files :(

Thanks, anyway!

bemushroomed
KVRist
72 posts since 28 Dec, 2003 from Sweden

Re: Batch join wav files?

Post Wed Apr 08, 2020 12:52 am

mheo wrote:
Tue Apr 07, 2020 9:37 am
FOR THE RECORD

I just found an issue working with SOX: the batch solution

"C:\Program Files (x86)\sox-14-4-2\sox.exe" *.wav AllWavs.wav

only works with maximum 508 files :(

Thanks, anyway!

Maybe its limited by RAM, if it needs to hold the files there, no idea though.

Shouldn't really be a problem unless it's important for many thousands of files. If you're doing it for 1000 files you need to to do the process just 2 times (merge the newly created .wav file with the rest of the 500 wavs), so maybe 5 seconds of extra work. So not a huge problem.

If you need to do this for hundreds of thousands of wavs then sure, it'll be an issue, but i don't see a lot of scenarios where that would be something you normally do.

Return to “Hosts & Applications (Sequencers, DAWs, Audio Editors, etc.)”