How to deal with parsed sysex values which differ from the CC ones

Hi there !

This is my first post here, and it certainly won’t be my last! :slight_smile:

First of all, thank you very much to everyone for the wealth of information on this forum.

My problem: I’ve created an instrument to control the parameters of my synth in CC and everything is working fine, I’ve been able to make a sysex request and the patch parsing that allows me to retrieve almost all the values currently in my edit buffer on the Elecra One.

Unfortunately, for some parameters the CC values don’t match the concerned byte values of the sysex that I receive.
For example: in midi CC I send the values 0; 26; 49; 73; 97 and in the sysex it’s the values 0; 1; 2; 3; 9 that I get back. This means that parsing will work for this parameter but I imagine there is a workaround for this problem.

Could someone explain how to get around this problem?

I haven’t found a similar topic in the forum, my apologies if this question has already been asked.

Thank you in advance for your help!


Hi Francoise

See this Thread. I had the same Question. If you get stuck, don’t hesitate to ask again.


Hi Busa,
Many thanks for your quick response ! I did’t find your thread, sorry.

I tried the following lua code, but there is a problem :


The problem is that I have to push the patch request button twice to get the the PT_CC7 104 to update with the correct value and the second time it also sends out the CC value (which I actually don’t care because it sends the value which is actually set, so it doesn’t have any effet).

This is the behaviour when I change the parameter on my synth:

First patch request button press:
The virtual parameter (1104) is correctly updated with the parsed sysex response from the synth but there’s no other change happening

Second patch request button press:
PT_CC7 104 is updated with the corresponding value according to the function and it does send out the CC value (which is not necessary).

Any idea what I’m doing wrong ? In advance, many thanks for your precious help !

I think you get the Value of the PT_Virtual 1104 BEFORE it has been updated. So i would just use parameterMap.onChange to see if PT_Virtual 1104 has changed and then based on this change, i would update the PT_CC7 104.
The Midi Messages are send as you are changing a PT_CC7 Value which triggers the sending.

function parameterMap.onChange (valueObjects, origin, value)
    if(valueObject:getId () == "1104") then
            if (value == 0) then parameterMap.set (deviceId, PT_CC7, 104, 0) end