I’m trying to create a MidiMessage.controllerEvent(), and then use it to hold older CC events that are coming through. The problem is that when I create an empty MIDI event, and then try to create the CC message, its not testing as a CC message using isController(). Any thoughts? here is my dirty little test code, it prints fail every time.
MidivsttestAudioProcessor::MidivsttestAudioProcessor() :
lastMidiMessage(0xf4),
stepSize(96.0)
{
lastMidiMessage.controllerEvent(1, 14, 127);
if(lastMidiMessage.isController()) {
DBG("win!");
} else {
DBG("fail :(");
unsigned char *data;
data = lastMidiMessage.getRawData();
unsigned char byte1 = *data;
*data++;
unsigned char byte2 = *data;
*data++;
unsigned char byte3 = *data;
DBG("HEX: " + String(byte1) + " " + String(byte2) + " " + String(byte3));
}
}