|
From: Jesse R. <jr...@co...> - 2013-01-29 14:00:24
|
Scripting is certainly a fantastic skill, and opens many doors! For scripting on OS X, I'd recommend "man bash" rather than "man sh", as the default shell on this platform is bash. In addition, googling something like "bash tutorial" would likely give you some more user-friendly resources than the man page. jesse On Tue, Jan 29, 2013 at 8:38 AM, Jan Stary <ha...@st...> wrote: > On Jan 29 11:51:55, alf...@we... wrote: > > 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 > > mkdir -p speaker > mkdir -p translation > for i in *wav ; do > sox $i speaker/${i%wav}mp3 remix 1 > sox $i translation/${i%wav}mp3 remix 2 > done > > If you are to work on a UNIX system, > you want to get familiar with scripting > in general. "man sh" is a good starting point. > > > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnnow-d2d > _______________________________________________ > Sox-users mailing list > Sox...@li... > https://lists.sourceforge.net/lists/listinfo/sox-users > |