Ok, hello. I have some scripts that I use on the command line to rip mp3s from .wav and .aif files. Lately I've been playing with this sampler that wants only mono wav files. WAIT - I promise this is a programming question. I want to run a command to split all wav files inside a directory to mono files with a different file name. So, for example Drummerrolleasy.wav, would then have DrummerrolleasyL.wav in the same directory as the left mono split of the original stereo wav. I will ensure that when the command runs, there are only stereo wav files in the directory. I have this command:
find . -name "*.wav" -execdir echo $1 {} \;
that works as expected, and provides me the names of the files, one by one, that I would like to then put inside a call to sox.
this:
find . -type f -name “*.wav” -exec sox {} "$1" L"$1" \;
does not work (runs but does nothing), and I'm not finding anything particularly illuminating for how to do this. I might need to spawn a new shell, but this doesn't work either because the shell just sits there:
find . -name "*.wav" -execdir sh -c 'sox "{}" "$1" “L””$1"’ \;
If I have to figure this out on my own, that can work too, and when I get there I will update but if someone would like to point me in the right direction I would be much obliged.