Tutorial - first attempt

This is a first attempt at providing an example of how to parse system exclusive dumps.

You will need to load the Sysex Example preset found in the Preset Library and unzip the attached sysex_tutorial file.

The main thing you need is the sysex_dump file.
Bring up the web editor, go into the Console, and load the file into the bottom window. Once the preset is loaded in the Electra One, send the sysex dump to it and you should see the screen change values to match what was in the dump.

This tutorial uses LUA extensively to parse the sysex data. Maybe someone can use the updated JSON editor to provide a parallel example using the same dump file eventually.

sysex_tutorial.zip (139.9 KB)

This example focuses on the “7 in 8” system exclusive packing scheme where 7 bytes of data are converted and stored as 8 bytes of MIDI sysex. Other schemes are “1 in 2” where 1 byte of data is stored as 2 bytes of MIDI sysex (4 bits per byte), and “1 to 1” where each byte of data maps directly to 1 byte of MIDI sysex. There’s also more esoteric things like the “full stream” used by some early MIDI products (Lexicon LXP series or Alesis Quadraverb - I forget exactly) where they concatenate every byte of data and then break it into 7 bits chunks.

The reason for these schemes is that internally, devices use values for parameters that are larger than the MIDI range of 0 to 127 or negative or both. All MIDI data has to fit in 7 bit bytes and if all 7 bits are used, that is the number 127 so to send and receive large/negative numbers some system to pack that data into multiple bytes has to be used.

6 Likes

@oldgearguy thanks for doing this. I am going to read and give it a try. Will provide my feedback on it.

I’m certainly open to any/every suggestion to make it useful. Definitely going to clean up the existing controls/colors to make it slightly more appealing to the eye.

1 Like

I created a second example of using LUA to parse a system exclusive dump.
This example is found in the preset library: Sysex example 2

This focuses on a device that uses 2 MIDI system exclusive bytes to hold 1 full 8 bit byte of data. So, every 2 MIDI bytes = 1 actual data byte.

This device stores the data in ‘reverse’ order. The first byte of a pair holds the lower 4 bits and the second byte holds the lower 4 bits.

The LUA code has enough comments (I think) to be helpful in this case and also in the case where the byte pair is reversed.

As a small bonus, this preset also shows how I decided to display the current note name/octave by using a format() function rather than some lists or other approaches.

This is a standalone example that doesn’t actually do any patch requesting or parsing. Just mainly here to show how one might parse another system exclusive dump format.

3 Likes

Hey this is great stuff @oldgearguy I will give it a try at some point.

Thanks for doing this, thanks for sharing knowledge in general. :slight_smile: