Ardour in batchmode?


is something like

$ ardour --batch-export --format=wav --samplerate=16 --dither=none sessionfile.ardour result.wav
Reading sessionfile.wav … done.
Connecting to jack … success.
Setting up jack connections … done.
Exporting … 100%
Exported 3min32 into result.wav


I would like to write some perl script that sets up a session file and then calls ardour to do the downmix.



@johmue: “possible” is an unfortunate word. if you’re a programmer, then sure, its possible to do something like this. we have, somewhere, an example of a minimal C/C++ program that loads a session, for example. but possible for a user to do ? not at this time.

Hi Paul,

thanks for your answer. Let me ask differently: I am not a professional programmer, but I can program in C++. I have no experience in gtk though. Can you estimate the amount of work to do something like that in lines of code to write? Would it be in the range of 50, 500, 5000 or 50000? Take away the all the command line options. Just a program, that loads a session file takes care of the jack connections, exports the downmix of the sessionfile and then finishes.



I had filed a feature request along these lines quite some time ago:

Curious, what is the advantage to you, in being able to do this? Do you normally prefer to run your system from the command prompt?


I can give one BIG advantage to me, but I have a somewhat specialized workflow. But that is being able to export a session from the commandline, means that I can tie it into a VCS with my Ardour session. So when I update my VCS copy of a session it automatically generates a new export for myself or others to listen to and I can keep working on other things (Which right now exports of the sessions I edit take between a half hour and an hour in most cases where my CPU is obviously maxed limiting my ability to work on other projects).

Another thing it would be useful for is when doing fast collaborative efforts via mutliple Ardour sessions over VCS. Say for the 48 Hour Film Projects I have done in Ardour and Mixbus for the past several years with a 3D animation team. It would allow me to have a team of mixers and editors for audio, and break the clip into scenes much more easily with one session that would embed each exported file of the scene snapshots to export the entire clip. That way each time someone completes their work on a scene or shot, they update, and the server automatically exports based off the new session, which in turn would ping the master session to re-export if desired.

So yes it can be insanely useful for specialized workflows:)



For a small colaborative web radio station I want to collect for the news bulletin, news items that are handed in by the people contributing. I’d hack some script that determines the length of the news items and then sets up a sessionfile that after the ardour invocation results in an audiofile containing the news bulletin with all the jingles, background music, daytime announcement etc. Finally the script would upload that audiofile to the streaming server.

The idea is to run all this completly automatically. The news speaker, who will be trained to do simple recordings using, say, audacity, will upoad or email audiofiles. By doing this the script is called and from the next full hour on the news bulletin will be updated until new news is submitted.

So generally speaking: for any kind of automizable work the batch mode feature would be useful.


Yeah, I can see that.


use-case as simple as this:

I am on the road, with the possibility to access my studio remotely from say Putty.exe on Windoze. I want to get an export of a session of mine to play to someone nearby. What do I do ?

from the putty ssh session:

ardour --no-gui --session “session name” --export “format” --output-file “somefile.wav”
lame -h -b 320 “somefile.wav” “somefile.mp3” (or use oggenc for ogg)

then I WinScp the mp3 (ogg) export to the winblows machine.

The absence of X-Windows on some machines makes a GUI-less ardour for quick exports a good feature.

You could also extend this sort of remote session by firing up jack in netjack mode, and having ardour play the session in GUI-less mode and in “realtime”, with netjack doing the CELT encoding on the fly (this requires a working jack on the windrowse machine though, but this should be fine with jack2).