[LAU] OT: Combining a LOT of files

"Josh Lawrence" <joshlawrence-97jfqw80gc5Wk0Htik3J/[email protected]>
Newsgroups gmane.linux.audio.users
Message-ID <[email protected]>
hello everyone,

I have a directory full of wav files in folders.  Inside each folder, I have wav files, all with unique names, grouped into 2 files, one for each channel.  For example:

dir_1/
    hello-L.wav
    hello-R.wav
    alice-L.wav
    alice-R.wav

dir_2/
    bye-L.wav
    bye-R.wav
    bob-L.wav
    bob-R.wav
dir_3/
    etc...

I know I can use sox to merge 2 audio files into a stereo mix, like so:

sox -M left.wav right.wav output.wav

I would love to write a script that will descend into each directory, find 2 commonly named files, assume one is left channel and one is right, combine them, and carry on.  While I am familiar with bash scripting, this task is far beyond what I am able to do.  Does anyone have any tips, tricks or suggestions as to how to approach this?  I suspect the answer will be, "use a programming language," and I wouldn't fault anyone for saying that.  Unfortunately I have a hammer made of bash, so everything is a nail.  :)  

(That being said, if you *know* how to do this in, say, python, please tell me and I'll work until I can fill in the rest of the details - I don't mind doing the homework, I just need a map!)

Thank you!

Josh
_______________________________________________
Linux-audio-user mailing list -- linux-audio-user-cunTk1MwBs/[email protected]
To unsubscribe send an email to linux-audio-user-leave-cunTk1MwBs/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.