Reputation: 25
I have connected my effect processor midi out to arduino midi in shield and I am trying to read sysex messages coming from my effect processor using the Midi library of arduino everything runs fine but when it comes to hexademical number F7 my arduino read 0. I know F7 is 247 does anyone knows why is this happening?
I use this code
#include <MIDI.h>
void handle_sysex(byte *a,byte sizeofsysex)
{
Serial.println(sizeofsysex,DEC);
for(int n=0;n<sizeofsysex;n++)
{
Serial.print(a[n]);
Serial.print(" ");
}
Serial.print('\n');
}
void setup() {
Serial.begin(9600);
// Initiate MIDI communications, listen to all channels
MIDI.begin(MIDI_CHANNEL_OMNI);
MIDI.setHandleSystemExclusive(handle_sysex);
}
void loop() {
// Call MIDI.read the fastest you can for real-time performance.
MIDI.read();
}
Upvotes: 0
Views: 470
Reputation: 193
This was discussed on github and it looks like it was a bug fixed by either #67 or #66. The args for handler function changed too, second arg is now unsigned size
to allow for size beyond 255.
Upvotes: 1