|
From: Alfred M. <alf...@we...> - 2013-01-29 10:51:56
|
Hello, I am new to Mac OS X and scripting. I am recording talks as .WAV files with left channel speaker´s voice and right channel translator´s voice. Once in a while I want to split the .WAVs into two .MP3s with same filename but in folders ./speaker/*.MP3 and ./translation/*.MP3. I solved that for windows with a batch file, onto which I drag and drop a set of files and the batch does the job (see batch below). Now I need the same funcion on a Mac. I welcome any support to ease the implementaton: - I have a folder with SoX for Mac OSX - A script seems to be the equivalent to the batch. Hints for an easy start? Which scripting tool? How to call SoX? How to pass the files to split? - I got a LAME-library libmp3lame.lylib from http://www.thalictrum.com/en/products/lame.html. Will this work and where do I place it? Thanks Alfred And here the windows batch file rem --------------------------------------------------------------------------------- rem rem Batch to split 2-channel .wav´s into 2 .mp3´s rem Place this file in the same folder as sox.exe rem Drag and drop a selection of files onto the batch file. rem cd %~dp0 mkdir speaker FOR %%A IN (%*) DO sox %%A -C 48 "speaker/%%~nA.mp3" remix 1 mkdir translation FOR %%A IN (%*) DO sox %%A -C 48 "translation/%%~nA.mp3" remix 2 pause |