Ardour in batchmode?

8 replies [Last post]
johmue
User offline. Last seen 13 hours 28 min ago. Offline
Joined: 2010-08-16
Posts:

Hi,

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
$

possible?

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

Thanks.

Johannes

paul
paul's picture
User offline. Last seen 12 hours 5 min ago. Offline
Joined: 2006-03-16
Posts:

@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.

johmue
User offline. Last seen 13 hours 28 min ago. Offline
Joined: 2010-08-16
Posts:

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.

Cheers

Johannes

thorgal
User offline. Last seen 1 year 20 weeks ago. Offline
Joined: 2007-08-03
Posts:

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

http://tracker.ardour.org/view.php?id=3179

Ricardus
Ricardus's picture
User offline. Last seen 11 hours 43 min ago. Offline
Joined: 2009-05-31
Posts:

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?

seablade
User offline. Last seen 59 min 18 sec ago. Offline
Joined: 2007-01-22
Posts:

@Ricardus

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:)

Seablade

johmue
User offline. Last seen 13 hours 28 min ago. Offline
Joined: 2010-08-16
Posts:

Ricardus:

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.

Johannes

Ricardus
Ricardus's picture
User offline. Last seen 11 hours 43 min ago. Offline
Joined: 2009-05-31
Posts:

Yeah, I can see that.

thorgal
User offline. Last seen 1 year 20 weeks ago. Offline
Joined: 2007-08-03
Posts:

@Ricardus:

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).