Add new callback
Brought to you by:
franky47
There is "setHandleTimeCodeQuarterFrame" callback, but there is one more message, that is used in Midi Time Code. It's called Time Code Full Frame
Here is picture of how it should look like:
http://www.muzoborudovanie.ru/articles/midi/pict/407.gif
Here is some code, which I use now to catch this message (should be used with bug fix I have posted):
MIDI.setHandleSystemExclusive(HandleTCFF);
...
void HandleTCFF(byte* array, byte arsize)
{
if((arsize > 2) && (array[1]==0x7F))
{
Hours = array[5] & 0x1F;
Minutes = array[6] & 0x3F;
Seconds = array[7] & 0x3F;
Frames = array[8] & 0x1F;
}
}
Forgot to mension why &'s are used. There can be some other data in byte:
Frames: xxxyyyyy
xxx - Reserved
yyyyy - Frame number (0-29)
Seconds: xxyyyyyy
xx - Reserved
yyyyyy - Second number (0-59)
Minutes:
xx - Reserved
yyyyyy - Minute number (0-59)
Hours: xyyzzzzz
x - Reserved
yy - Frame format:
00 - 24 fps
01 - 25 fps
10 - 30 fps Drop frame
11 - 30 fps Non-drop
zzzzz - Hour number (0-23)
Hello,
I moved this issue to GitHub, here's the new link:
https://github.com/FortySevenEffects/arduino_midi_library/issues/18
Best regards,
Francois.