#3 Add new callback

Beta 3.1
closed
nobody
None
5
2014-04-19
2012-08-23
$an4e$
No

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;
}
}

Discussion

  • $an4e$

    $an4e$ - 2012-08-23

    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)

     
  • Francois BEST

    Francois BEST - 2014-04-19
    • status: open --> closed
    • Group: --> Beta 3.1
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks