Re: [LAU] rubberband and batch processing

From: pete shorthose <zenadsl6252@email-addr-hidden>
Date: Fri Jun 06 2008 - 16:38:29 EEST

On Fri, 06 Jun 2008 15:13:13 +0200
Jan Weil <Jan.Weil@email-addr-hidden> wrote:

> Am Freitag, den 06.06.2008, 14:02 +0100 schrieb Chris Cannam:
> > On 06/06/2008, M-.-n <nostromo@email-addr-hidden> wrote:
> > > [...] a script that I run after I checked it looks right
> >
> > In that situation (where I'm not totally confident of my syntax) I
> > generally just start off using "echo" or something equally innocuous
> > instead of the command I really want to run.
> >
> > e.g. for the loop I mentioned in my previous mail, start by running
> >
> > for x in *.wav; do
> > echo -t 0.8 "$x" "${x%%.wav}-100.wav"
> > done
> >
> > then if that looks right, just up-arrow and replace echo with
> > rubberband or whatever your program is.
> >
> > Doesn't work if your first argument happens to be one of those also
> > accepted by echo, of course. Also doesn't tell you whether you've
> > handled spaces in the filenames correctly or not.
>
> Regarding spaces in file names - took me a while to learn but now it
> comes in very handy (again Bash):
>
> export IFS=$'\n'; for i in *.wav; do rubberband -T1.25 $i ${i%.wav}-100.wav; done

i spent far too long looking for that little gem myself. you want to be careful
to restore the IFS if running in your shell and not a script though. it might affect
later commands. </pedantry>

also, i've since found that you can achieve the same result by quoting the output
expansion string, ie:

 for i in *.wav; do rubberband -T1.25 $i "${i%.wav}"-100.wav; done

because wildcarded filenames are parsed as a whole on the input side, regardless of spaces.

cheers,
pete.
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
Received on Fri Jun 6 20:15:02 2008

This archive was generated by hypermail 2.1.8 : Fri Jun 06 2008 - 20:15:02 EEST