Two shortcuts combined to One [SOLVED] (first lua script)

Hello, everybody!
Is there a way to combine multiple commands to one shortcut?
For example there’s a command: “Set Range to Selected Regions” and another: “Consolidate” - I’d like to run them by one shortcut.

You must make a Lua script for this, but it’s easy!

Example here:

Once you have the script you can launch it from one of the action buttons in the top-right, and from there they are assignable to a shortcut I think.

1 Like

Hello, Ben! Very cool possibilities!! Thank you!
The Set Range to Selected Regions command is working well in your example script (this command can be done with the “set-selection-from-region” in your list of available shortcuts).
But I can’t find a “Consolidate”. May be this is under another name?

I’ve just tried to unravel a combination, but no access:


Perhaps this:
Editor:access_action("Editor", "editor-consolidate")

If you use the Keyboard Shortcuts window’s Print Bindings button, the commands are shown in the lower section of the page. For example:
Editor/editor-consolidate ( Consolidate Range )

Superrr!! @ johndev
I’ve made a script GitHub - cooltehno/ardour-cooltehno-lua

Thank you people!! Community power!! :alien:

PS/ works only with Ardour 7 (6.9 - has no action for script)

1 Like

@BenLoftis @x42 or anybody,
I can’t find anything to assign a shortcut for my script knobs? Is is possible?

Move the selection two up in your screenshot to “LuaAction”, then expand the tree there.

1 Like

Brilliant, Robin! Thank you! Your program can do everything! :))

EDIT: Now I’ve made a new topic: MIDI Glue LUA script

1 Like