Parsing of 2 byte parameters [obsolete]

Hi, I 'm on the last hurdle of parsing the Korg 03 R/W preset:
I need to parse the following: fx parameters that are sent in two bytes:

  • An LSB of which bit 0-7 are used
  • An MSB of which bit 0-7 are used

The values must be parsed as follows:

  • If the MSB equals anything between 0 and 3 then value = LSB + 128*MSB (numbers 0-511)
  • If the MSB equals 127 then value = LSB - 128 (number -128 to -1)

Any fx parameter can be in any of the 2 cases. What is the best method to do this? Intermediate virtual controls? Can it be done simpler?

A bit of a disappointment here: I studied the sysex docs of the 03R/W and found there is no fixed relationship between the parameters on their own (as sent in the parameter change messages) and the numbering in the buffer dump! In other words the parameter tied to control 112 has a fixed relationship now with the identifier used in the Parameter Change Message but a variable relationship towards up to 8 different bytes in the Buffer Dump Message.

What can be done, is setting up 16 virtual and hidden controllers each receiving one of those bytes (8 bytes for 2 fx) and then use yet another array to map them to the 14 visible controllers. Yep you read it right: 16 bytes in the Dump, 14 parameters in total, using 28 bytes in Parameter Change.

Knowing I’m on the edge of the memory I’m seriously wondering if it is worth the effort.

Anyway the original question is obsolete for this challenge.

One thing to always keep in mind - the people that developed the hardware are using software to send/receive/process the MIDI data. They need to absolutely know the relationship between the data flowing in and out and the parameters inside the machine.

yes - sometimes due to legacy issues there is kludgy code and exceptions to be found, but the fact still remains - the machine has to know bytes X.Y.Z are for control/parameter A17 (or whatever). There has to be some logic behind it especially due to the fact that synths typically have very limited memory space internally for code and data. It could be two different teams did the sysex and the general CC implementations, but in the end they all have to map to the same controls.

Yep. I think this is valid here as well:

  • the patch editing on the synth corresponds one to one with the Parameter send messages. In here, they have been using 3 to 7 parameters per effect that are all in consecutive order. So if ‘eq low’ is the second parameter on the user interface it is the second parameter in the byte sequence of the Parameter send. If the next effect is having ‘eq low’ as the third parameter in the user interface, then it is the third parameter in the Parameter send.
    But when you look at the buffer dump the ‘eq low’ the position of that parameter is fixed on the 7th byte.

So there were obviously two teams at work that shared the memory, but they didn’t’ cooperate on the fx parameter set up, rather implemented a solution as effective as possible from their own perspective.

Is there a way you can set up a translation array so that you have a mapping from one to the other?
Without looking at precisely what you are seeing, my thought would be to have an array (single row) or table (multiple rows) that map between one parameter location and another. Then to store or retrieve at any given moment, you look up the position in the table.

Yep, that is what I wanted to do.

However, I’m hitting the memory frontier again(that was expected, as it is the same preset I had the memory issues before). So I’ll reduce my ambitions and try to parse the main FX settings only for now.