I’m trying to write a script which would automate exporting all regions under a track to .wav sample files. Since I couldn’t find any way to trigger region export from within the script I’ve made it iterate over all regions on a selected track and run bash script to emulate keyboard/mouse inputs (xdotool/ydotool) and sleep for a certain time (until the export is finished). The problem is whenever you do something like os.execute('sleep 10') Ardour GUI just freezes until sleep is finished.
Is there some kind of method you can call from scripts to refresh editor GUI? Is it possible to do multi-threading within these scripts? Or maybe you can simply call some method to export a region into a wav file?
since these are system calls, I think you can accomplish the same thing in a bash script without anything lost in translation.
That said, maybe there’s a better way.
edit after re-reading your question, I realize this wouldn’t help, unless your shell script is doing all of the heavy lifting. E.g., just using the Ardour Lua script to provide some metadata as CLI arguments that the script uses to find the source files and do everything in its own process.