I’m trying to update a Group name from a Bitwig controller script. I want it to be the name of the current device on the track. I’ve created a lua script that includes this function:
-- Helper to set group label (called via SysEx from Bitwig)
function sgt(groupId, title)
local group = groups.get(groupId)
if group then
group:setLabel(title)
end
end
Then in the Bitwig controller script I’m doing that following:
var luaCmd = 'sgt (' + groupId + ', "' + displayName + '")';
var sysexData = 'F0 00 21 45 08 0D ' + this.str2hex(luaCmd) + ' F7';
try {
this.midiOutCtrl.sendSysex(sysexData);
println("[DEBUG] Execute Lua sent to CTRL port OK");
} catch (e) {
println("[DEBUG] ERROR: " + e);
}
However, I’m not seeing the group name change. Any help here would be most welcome.
The script started working. I’m not exactly sure how, but I think it was probably me not completely understanding the workflow of uploading the lua and the epr.
Thanks Martin. It came right and I’ve managed to get the Lua script working. There seemed to have been an issue with my preset slots - some preset folders on the E-1 were missing and so even though the app was telling me that the files were transferred, they were not actually on the device. I manually re-created the folders (p02,p03 etc) and this seems to have solved the problem. At least I think it was this.
yes, it makes sense - especially in the context of other issues you mentioned recently. Pls note, you can download the factory “image” of the SD card from Downloads - if you wanted to be sure everything is in place.