Hello,
Relatively new to Ardour and LUA. I’ve got a working script that sets track and bus colors based on key words in each track/bus name. Works perfectly. Tonight I tried to add groups to the same script and hit a wall. Here is my group loop:
for g in Session:route_groups():iter() do
local gname = g:name():lower()
if gname == "fx" then
print( "Successful match!" )
local pi = g.presentation_info_ptr()
pi:set_color(0xFFFFFFFF)
end
end
I do see “Successful match!” print in the output, so I know the loop itself is working. However, I get an error: “attempt to call a nil value (field ‘presentation_info_ptr’).” When I looked for this error online, I got back many results about needing to initialize the group correctly with ARDOUR:RouteGroup(). I’m not sure how that applies to my situation. I’m not trying to use LUA to create a group. I’m just trying to modify the color of groups I created using the Ardour software menus.
I also tried just doing “g:set_color()”, but that didn’t work.
Thank you in advance for your help.