Hi folks, first post to the forum, and I'm really impressed by the depth of the BC Manager software and grateful for Mark's efforts on it. But I've run into a bit of a snag in my attempt to define a sysex ini file for an Axe-FX II XL device. When I start BC Manager, it complains that it cannot load the ini file due to "Invalid text" and I don't know what text it considers to be invalid. I loaded the file just fine without the error when I removed the parameter definitions so it appears to be something about that.
Here's what I have in the ini file right now, I called it "Axe-FX_II_XL.ini":
ManufacturerID=00 01 74
ModelName=Axe-FX II XL
; Insert parameter definitions below
6A 00 01 00 | 00 00 00 - 7E 7F 03 | val14.20 val7.13 val0.6 01 ;Amp1 Input Gain
I want to organize a large number of FX block parameter sets so I'm using the braces for sections, and those aren't the problem either because I removed the braces and still got the error when I started BC Manager.
Here's a single sysex message that I captured that was sent from the Axe-Edit software to the Axe-FX device, for the same Input Gain parameter that I've attempted to define properly in the ini file above:
F0 00 01 74 06 02 6A 00 01 00 6D 61 00 01 67 F7
Here's the anatomy of the message, the LS byte is always first for each element:
F0 = sysex start, of course
00 01 74 = Manufacturer ID
06 = Model ID (Axe-FX II XL)
02 = Function ID (this indicates that the sysex message is a "set parameter" message, and this byte will always be the same for everything I define in the ini file)
6A 00 = FX block ID (this indicates the target FX block for the message, in this case the Amp1 FX block; this ID will be different for different FX blocks such as compressor, cabinet, delay, reverb, etc.)
01 00 = Parameter ID (this indicates the specific parameter to set within the target FX block, in this case the parameter is Input Gain, and each parameter has its own unique ID here)
6D 61 00 = Parameter value (see Axe-FX wiki snippet below for details on this)
01 = the "Set" byte, indicating that the message is to set the value of the target parameter, and every parameter definition in the ini file will have this same byte here
67 = checksum byte (see below Axe-FX wiki snippet regarding the checksum detail)
F7 = sysex end
Here's a snippet from the Axe-FX wiki concerning the format of the sysex for setting the value of a parameter:
MIDI SysEx: MIDI_SET_PARAMETER
0xF0 sysex start
0x00 Manf. ID byte0
0x01 Manf. ID byte1
0x74 Manf. ID byte2
0x03 Model #
0x02 Function ID (2)
0xdd effect ID bits 6-0
0xdd effect ID bits 13-7
0xdd parameter ID bits 6-0
0xdd parameter ID bits 13-7
0xdd parameter value bits 6-0
0xdd parameter value bits 13-7
0xdd parameter value bits 15-14
0x00 0=query value, 1=set value
0xF7 sysex end
And here's a snippet from the Axe-FX wiki concerning the checksum:
- The Axe-FX II units require a checksum to be added to the end of the SysEx string that is sent to it (before the terminating F7 byte) as a verification step.
- In order to calculate the checksum, you basically have to XOR every byte from the start of the SysEx message, up to the character BEFORE the terminating F7 byte. For example, to send the following SysEx message (to fetch a preset name):
F0 00 01 74 03 0F F7
We would have to XOR all the byte values from the starting 'F0' to the '0F' which is the second last byte:
0xF0 ^ 0x00 ^ 0x01 ^ 0x74 ^ 0x03 ^ 0x0F = 0x89
Then, we would need to strip the leftmost bit from the result (by ANDing it to 0x7F):
0x89 & 0x7F = 0x09
And, we add this byte (actually, a septet now) to the end of the SysEx string, BEFORE the terminating F7:
F0 00 01 74 03 0F 09 F7
Obviously, in a 'static' SysEx message like above, you do not have to recalculate the checksum each time as it will always be '09' as the rest of the message does not change, but if you are sending a SysEx string to change a parameter value etc. then you will have to calculate the checksum on the fly as byte values towards the end of the SysEx string will be different each time.
I left the Command byte empty in the definition file because I wasn't entirely sure what to do about the Device ID (I'm not clear on what that should be here and it doesn't seem like the Axe-FX uses a Device ID in the sysex messages anyway), and I'm trying to insert the Function ID byte (0x02) there instead because that's going to be the same for everything, and I'm inferring that doing it this way will result in that Function ID byte being inserted directly after the Model ID byte, which is where it needs to go.
Perhaps the way I've defined the 'val' elements here is incorrect? Although the Axe-FX only uses bits 14 and 15 from the MS byte, it does appear that a full byte is sent. But perhaps val14.20 isn't a valid definition here?
I appreciate any suggestions or pointers here, thank you!