Batch join wav files?

Audio Plugin Hosts and other audio software applications discussion
RELATED
PRODUCTS

Post

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

Post

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

Post

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

Post

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

Post

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..

Post

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
my other modular synth is a bugbrand

Post

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 :)

Post

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?

Post

mheo wrote: Tue Apr 07, 2020 2:58 pm 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.

Post

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.

Post

bemushroomed wrote: Tue Apr 07, 2020 3:26 pm 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!

Post

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!

Post

mheo wrote: Tue Apr 07, 2020 5:37 pm 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.

Post Reply

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