[Ardour-Users] Importer progress

Ken Restivo ken at restivo.org
Sat Feb 27 02:26:50 PST 2010

On Fri, Feb 26, 2010 at 11:06:15PM -0500, Paul Davis wrote:
> On Fri, Feb 26, 2010 at 10:56 PM, Ken Restivo <ken at restivo.org> wrote:
> > Well the import script appears to be working. Will import these 500 files, and if it survives that, then I'll post the code for everyone to laugh and/or barf at.
> >
> > I have only one more stupid question.
> >
> > The % signs in the stereo file names. Is that absolutely necessary? Does Ardour expect those %'s in there, or will a '-' do instead, i.e. overheads-L.wav instead of overheads%L.wav?
> the %L and %R naming convention comes from protools. its not very

Really? The files I got from ProTools have the convention "Overheads.L.wav"

Anyway, no big deal.

> important if you build the session file yourself. it does have
> semantic significance if you ask ardour to import the files for you
> because it does some heuristics about grouping foo%L and foo%R into
> the same track if it seems appropriate.
> > Just trying to have to avoid putting %% in the sprintf's if I can.
> if that's the core of your troubles ... then smile on :)

It was by that point, certainly. I'd already pursued a very hackish strategy of using Python string interpolation, and, by that time, going back and figuring out all the % escaping issues would have made the whole house of cards fall down.

Anyway, the evil beast is here if anyone wants it:

It works! I managed to (mostly) painlessly import some hundreds of files from ProTools, although, I also was able to pare it down a bit by using the filter feature so that I avoided importing the scratch vocal tracks, just made life easier and saved disk space.

Anyone who wants is welcome to use it, GPL, etc, but gawd this is some awful, hacky, just-get-it-done code, so I doubt anyone'd be interested.

Notice that the template I'm using is very specific to the band I'm recording right now. If anyone else wants to use the script, I'd suggest replacing that with their own template, but making sure to leave the string interpolations in there.

I guess the right way to do this would be to take a proper template or session file in as an argument, parse it in using some XML library, add the new elements also using an XML library (not sprintf's!), and then write it out as a session file. But I don't know or like XML, or any of the libraries which deal with it, so I'll leave that for another time.

Thanks again for everyone who helped out!


More information about the Ardour-Users mailing list