Lua Scripting GUI Library

The intention here is to follow Ardour’s general UI concept regarding GUI actions:
Actions operate on the selection and perform one operation. Edit operations are supposed to be undoable.

Action scripts are usually instantiated: a factory method is is executed and compiled to bytecode which is then saved for later execution. They can be invoked remotely using access_action.
It would be possible to directly pcall() those from another Lua script, but it hasn’t yet come up.

Anyway, if you want to work on some GUI, that’ll be very welcome.

reaper.Undo_BeginBlock2( proj )
reaper.Undo_EndBlock2( proj, descchange, extraflags )

I wouldn’t know where to start.
I just thought with the script window the code is all there to list the scripts and run them that it could be modified to do as described.

This is a GUI Button in Lua

local function btn_click_chord_sharp_flat()
   commandID1 = reaper.NamedCommandLookup("_RS1004c26d8d7356510044c4e72d5a01625106f68a")
   reaper.Main_OnCommand(commandID1, 0) -- Script: ReaTrak flat sharp change.lua
end

GUI.New("chord_sharp_flat_btn",      "Button",           6, 865+x6, 620+y6, 40, 20, "♯ / b", btn_click_chord_sharp_flat)

I’m just putting out some suggestions and ideas for improvements, that’s what I do in other Beta development forums, most of what I have suggested got picked up or eventually got picked up. It just has so much potential if end users can create functions with scripting that they don’t have to wait years for it to be implemented natively, that’s how Reaper works and has a massive following.
Are there users here you can donate to that will implement things ?

I like the general direction. However Ardour’s philosophy is somewhat different with respect to Reaper when it comes to customization.

The main goal for scripting is to provide one-off solutions to specific issues that are unlikely to be implemented natively since they’re of little general use.

Once Ardour6 is done, we plan to return to a bi-monthly release schedule, so dev speed will pick up again.

That being said, for end-users to add scripted functions, we’ll also need an online repository with easy access to share and download user-contributed scripts. Maybe a separate git repository & pull requests?!
Also now that the number of scripts has increased over the last years we need some more elaborate script selector and ways to expose scripts.

Thanks. Conceptually this looks good.
Since Ardour scales arbitrarily (and uses system-default font & font-sizes) there won’t be a pixel-based layout. It’s also not yet clear how to handle interaction with custom UI Widgets (Lua event loop integration). But I dare say that Ardour will get there someday.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.