System Exclusive

Understanding the sysex data

Do some dumps in your favorite midi monitor and copy or save the sysex messages in a document.
Describe about each message what it's about, it's size, and separate the parts that are always the same from the parts that vary with each different "patch" in the same "bank". E.g. spd-11.wikispaces.com/sysex
You should find information about the meaning of each number in the SysEx specification in your manual.

Following are the datamembers and methods where you need to enter your sysex information.

sysexID

The part of the sysex message that is always the same for a certain type of patch or bank or other information that can be dumped. This is used 'by several' (TODO: specify) methods to check if a patch is of the right type for a certain driver. In your manual it may be referred to as "header", but it can also hold bytes of the "adress".
Use @@ signs for where the global channel aka deviceID is described.

SYSEX_REQUEST
The message to send to the synth, so that the synth outputs the data you ask for.
Again, you can use @@ for deviceID and other variables can be named between asterix's like e.g. *patchNumber*, *checksum*.

calculateCheckSum()

There must be some information in the synth's manual about if and how a checksum is calculated for the sysex messages that are sent across the MIDI cables.
If the method is not a standard method, you will have to write a calculateChecksum() method to tell JSynthLib how to calculate the checksum.
The standard method does this calculation:
int sum = 0;
for (int i = start; i <= end; i++)
sum += sysex[i];
sysex[ofs] = (byte) (-sum & 0x7f);
equivalents of the above are:
p.sysex[ofs] = (byte) (sum & 0x7f);
p.sysex[ofs] = (byte) (p.sysex[ofs] ^ 0x7f);
p.sysex[ofs] = (byte) (p.sysex[ofs] + 1);
p.sysex[ofs] = (byte) (p.sysex[ofs] & 0x7f);
See Bitwise and Shift operators Java Tutorial or probably even better Java Notes: Bitwise Operators
&: bitwise AND operation.
^: bitwise exclusive OR operation.

offset, ofst

The place in the array where the number we're working with is located.
e.g. if the sysex is F0 41 09 60 F7 and you want to point to the third in the row (09), your offset or ofst value should be 2 like in sysex[2].
To have a useful document to work with, it's a good idea to describe a message with a separate line for each hexadecimal number.
To describe the above message it would look like:
F0 : 0 :System Exclusive status / F0 is the standard start for all sysex messages
41 : 1 : Manufacturer ID / = Roland
09 : 2 : Device ID / = channel 10 (spd11 uses channel as device ID
60 : 3 : Model ID / SPD-11 Octapad
F7 : 4 : End of exclusive message / F7 is the standard end for all sysex messages

two's complement

For values that go into the negative numbers, synths often use two's complement calculation to convert the negative values into positive values using modulo calculation.
e.g. RolandSPD11 "Decay" (not much to see there yet)

Notes:

  1. Dave Philips wrote an intro about SysEx and JSynthLib in Linux MIDI: A Brief Survey, Part 3
  2. You can use Google as a hex calculator: e.g. Google 0xFF modulo 128 or as a hex2decimal converter: e.g. Google 0x80 in decimal or Google 80 in hexadecimal.
  3. You can find a detailed Guide to MIDI here.
  4. ASCII to hex converter