Hi, I’m new here and to Arduino. I’ve learned quite a bit already and made a simple FX on/off MIDI pedal which works fine using a MIDI Control Change to a digital mixer thanks to a few of you here
So, I’m trying to send SysEx codes to my Roland Integra sound module.
There’s hundreds of commands and I’m fine with SysEx itself, been using it years. I have all the codes I need (deleted from here for space). Most are 14byte (but some can get up in the 70s).
The first 7 bytes are always the same, the next 3 are offsets, next 1 is the parameter I need to address, next come the value bytes (usually only 1), then the checksum (not using that at the moment as it seems to be ok for now…), then the stop byte.
Did it like this because it seemed a lot more intuitive to me, saves space, and easier to catergorize so many codes etc.
So, if any one of you could please tell me why the commented line near the end doesn’t work, but sending the full message does (the sendSysEx command wraps the start and end automatically), I’d greatly appreciate it! Surely using the full SysEx code for everything would be madness?
Thanks
Adam
#include <MIDI.h>
byte x = (0x20); // holder for the value byte
MIDI_CREATE_DEFAULT_INSTANCE();
// SYSEX HEADERS
const byte sysexStart[6] = {0x41, 0x10, 0x00, 0x00, 0x64, 0x12}; // Sysex Send Start
const byte sysexEnd[1] = {0x00}; // SysEx Send End
// OFFSETS //
// Part Common Offset
const byte PartCommon [3] = {0x18, 0x00, 0x20}; // for parts 2-16 (0x20 > 0x2F) last byte
//
// lots more 'offsets'
//
// PARAMETERS
const byte levelSet [1] = {0x09}; // Level (0 - 127)
//
// lots and lots more 'parameters'
//
void setup() {
MIDI.begin();
byte SysEx [] = {0x41, 0x10, 0x00, 0x00, 0x64, 0x12, 0x18, 0x00, 0x20, 0x09, x, 0x00};
//byte SysEx [] = {sysexStart, PartCommon, levelSet, x, sysexEnd};
MIDI.sendSysEx(sizeof(SysEx), SysEx);
}
void loop() {
}