-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat, Feb 03, 2007 at 05:33:42PM -0500, Paul Davis wrote: > On Sat, 2007-02-03 at 14:15 -0800, Ken Restivo wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > On Sat, Feb 03, 2007 at 04:39:31PM -0500, Matt Price wrote: > > > hi, > > > > > > just starting to use ardour2 for production (thanks everyone for the > > > help) and running into a little frustration with the mp3 files from my > > > recorder. ardour of course doesn't import from mp3; I can, I suppose, > > > convert the files to mp3 one at a time when I want to, but I wonder if > > > there's a more fluid way of e.g. converting files when they're uploaded, > > > or at least converting all files in a particular folder or something. > > > are there other people out there who have to deal with a similar > > > situation? > > > > > > > No big deal. Here's the bash one-liner I use: > > > > for i in `ls /path/to/your/mp3s`; do F=`basename $i`; mpg123 -r 48000 -w $F $i; done > > > > Obviously, change the /path/to/your/mp3s to wherever they are, and change 48000 to whatever rate you have ardour and jack set to. > > a warning to all who write such scripts (including me). they will very, > very often break with mp3 files that are named from CD rips because of > embedded spaces. for example, in the little script i just posted, i > should have used "$@" not "$*" for precisely this reason. > > long time *nix users will know that spaces have always been legal in > file names; new *nix users won't know that the oldtimers have never > really used them :) > Point taken. Corrected version: for i in `ls /path/to/your/mp3s`; do F=`basename "$i"`; mpg123 -r 48000 -w "$F" "$i"; done But I don't have many files with embedded spaces, and I wouldn't be using ripped (i.e copyrighted) CD tracks in my work anyway, because I like to CC license it. I occasionally end up with files with %20's in them, but the only things that seem to consistently end up with embedded spaces are M$ Word documents that people sometimes send me. - -ken -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFFxVuBe8HF+6xeOIcRAoToAJ9tsM3hZe30vo+rduI8Lj72enh5uACfU1vN Jt7cv+SGoW5xjzwvDla7630= =RiH8 -----END PGP SIGNATURE-----