Lua for complete idiots

This concerns ardour 8.2.0 in avlinux.
I have (with the help of chatgpt) written a little script to modify midi events. I have placed it in ~/.config/ardour8/scripts. In Window,Scripting I can find no way to open this or any other script. Import is greyed out. What am I missing?

The script would be listed below the dropdown on the right (no need to “Import” if it’s already in the config folder).

Does the filename have a .lua extension?
If so, and it’s not listed, then most likely ChatGPT created nonesense. Either a missing script-header, or a script that does not compile (invalid Lua syntax).

Thanks. It does have a lua extension but if I copy paste the code in and try to save it, it produces: “Missing script header. The script requires an ‘{ardour}’ info table and a ‘factory’ function”. I’ll try to find a lua tutorial…

In case you didn’t find this yet, there is: The Ardour Manual - Lua Scripting

The section “Script Layout”, around the middle of the page has an example ardour info table.

Can you drop your script here or put it in pastebin so I can look at it?

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