Hello!
I am trying to get the following to work but keep going in circles -
The Current script “Control B” the Fader is getting stuck at 0
I know this has to do with the 14bit Signed Messages but i do not know how to fix it and ChatGPT keeps running in circles on this one.
The commented out Code on this works 100% for 7bit messages but gets buggy as well on 14bit messages. What I mean by buggy, A bipolar control when the control is touched… jumps to the far left negative value and does not respect the 0 (Middle position)
Any thoughts, help?
@martin
Hi, I have played around with the preset and I am a little bit confused what you want to achieve (from the Lua code).
If you wanted the CC ASSIGN 01 list to set the 14-bit CC message parameter for the first fader, the simplest way of doing that is:
-- Assigned to Control A (ID 1)
function getValue(valueObject, value)
currentCC = ccMap[value] or 3
print("Selected CC from Control A: " .. currentCC)
end
-- Assigned to Control B (ID 3)
function getMidiMessage(valueObject, value)
local cc = currentCC or 3
local msg = valueObject:getMessage()
msg:setParameterNumber(cc)
end
providing I left the rest of the code untouched, it relies on existence of the currentCC
global variable.
This code (as well as your original) does not retain the current values of the parameters managed by the CC ASSIGN 01 list. When you change a parameter, the newly selected parameter will continue from where the previous one left off. If you wanted to retain the values, an extra logic needs to be added.
I hope this will help you to get out of the circles. If not, let me know 
1 Like