Thanks so much @martin for this awesome help and even providing a ready to test preset. I really appreciate your kind help.
I experimented a bit with it using just two controls for testing purposes and got a working version which looks like this:
ctrlSysexSentBD = false
local ctrlMessage = { 0x43, 0x10, 0x7F, 0x1C,0x0C, 0x01, 0x10, 0x27, 0x00 }
function sendSysexBD (valueObject, value)
if (ctrlSysexSentBD == false) then
midi.sendSysex(PORT_1, ctrlMessage)
ctrlSysexSent = true
end
end
ctrlSysexSentSD = false
local ctrlMessage = { 0x43, 0x10, 0x7F, 0x1C,0x0C, 0x01, 0x10, 0x27, 0x01 }
function sendSysexSD (valueObject, value)
if (ctrlSysexSentSD == false) then
midi.sendSysex(PORT_1, ctrlMessage)
ctrlSysexSent = true
end
end
The result is that it sends the SysEx in between each of the control value steps like this:
SysEx Yamaha 11 bytes F0 43 10 7F 1C 0C 01 10 27 00 F7
Control 1 7 1
SysEx Yamaha 11 bytes F0 43 10 7F 1C 0C 01 10 27 00 F7
Control 1 7 2
SysEx Yamaha 11 bytes F0 43 10 7F 1C 0C 01 10 27 00 F7
Control 1 7 3
SysEx Yamaha 11 bytes F0 43 10 7F 1C 0C 01 10 27 01 F7
Control 2 7 1
SysEx Yamaha 11 bytes F0 43 10 7F 1C 0C 01 10 27 01 F7
Control 2 7 2
SysEx Yamaha 11 bytes F0 43 10 7F 1C 0C 01 10 27 01 F7
Control 2 7 3
Using the following adaption (“ctrlSysexSentBD/SD” also before the “end” with “= true” which was probably meant like this…
ctrlSysexSentBD = false
local ctrlMessage = { 0x43, 0x10, 0x7F, 0x1C,0x0C, 0x01, 0x10, 0x27, 0x00 }
function sendSysexBD (valueObject, value)
if (ctrlSysexSentBD == false) then
midi.sendSysex(PORT_1, ctrlMessage)
ctrlSysexSentBD = true
end
end
ctrlSysexSentSD = false
local ctrlMessage = { 0x43, 0x10, 0x7F, 0x1C,0x0C, 0x01, 0x10, 0x27, 0x01 }
function sendSysexSD (valueObject, value)
if (ctrlSysexSentSD == false) then
midi.sendSysex(PORT_1, ctrlMessage)
ctrlSysexSentSD = true
end
end
… sends each SysEx command just once turning the knob after loading the preset to the E1, then never again.
Ideal case would be if the SysEx were sent once each time the controller is used. The target unit I am using switches the kind of section with the SysEx before using the controller data. And I am not yet sure if the switch is necessary at some later point because in this pretty simple example using just CC07 it even works without switching the section because of the different MIDI channel.
But I can live with the working version. I am just not sure if the SysEx commands between the controller data might cause too much “data salad”. I had the E1 hanging once this morning during my tests.
EDIT: I got the second version of my adaption also working with a SysEx command but it behaves the same, the “one time SysEx” ahead of the controller SysEx is just being sent once. The first way didn’t work at all, it changed the controller SysEx data to “00” for the last three bytes (instead of >… 66, value, F7< it just sends >… 00, 00, 00<).
But please don’t invest too much time in this topic. I know you are very busy with your development and I am just in a phase of investigation and testing by myself. And I am quite happy even with this result.
Thanks again so much!