Add Audio Track Lua Script still does not work

9.8.127 Nightly

I mentioned this in the past that the “Add Audio Track” Lua script that comes with Ardour does not work.
After you assign it to a toolbar button, it works once and then if you click on it again it opens the “Add Shortcut or Lua Script” dialog.
I was wondering if anyone would be willing to fix this?

Not sure if any other scripts no longer work?
Seems like if they are included they should probably work?

Thank You

Thanks for the heads up. Fixed now since 9.8-181-g6bd4cb6886

Bundled scripts are tested as part of out unit-tests, but this one is an odd case since it only failed the second time.

2 Likes

Possible minor typo. Didn’t you want this:

…
function factory () return function ()
local sel = Editor:get_selection ()
if not sel:empty () and not sel.tracks:routelist ():empty () then
…
instead of this last commit:
…
function factory () return function ()
local sel = Editor:get_selection ()
if not Editor:get_selection ():empty () and not Editor:get_selection ().tracks:routelist ():empty () then
…
Either works, but wouldn’t the first example using the assigned local variable be “best practices”?

Yes, it would. Thanks for the heads up.

Robin
Yeah that was strange behavior to work but to only work once.
I was able to test this update out and everything seems to work as expected now.
Thank you very much for making this update.

JoeSams
Thank you also for the correction.

1 Like