Where does the Midi timecode go?

Use this forum to discuss Midi Issues as they relate to Cakewalk.

Where does the Midi timecode go?

Postby sergiii » Mon Dec 15, 2003 5:23 pm

I have written a Windows application that I want to sync with Sonar2. I can record midi notes played by Sonar with the Windows API. But I have no information at what position in the song the note was played. That is why I also want to record/receive the timecode Sonar produces. But where does it go? Is it, that if I choose Midi Sync, the rimecode goes in a certain format to some midi channel I can choose (where could I choose that?)? Or where can I read that timecode?

Thanx for your help!
sergiii
sergiii
 

Re: Where does the Midi timecode go?

by Sponsor

Forum Sponsor
 

Postby GretscGuy » Mon Dec 15, 2003 6:37 pm

Looks like you are missing what is called a "system common" message.

System Common messages have no channel numbers, and are common to ALL recieving devices.

MTC (1/4 Frame)

F1= Hex Value
241= Decimal Value
1= Bytes of Data

The FULL message consists of 10 bytes and is sent whenever timecode is starts/stops or repositions itself. This contains the entire smpte number (H/M/S/F - as well as smpte type (drop,non-drop, 25 or 24).

The format looks like this:
F0 7F 7F 01 01 hr mn sc fr F7

The hr byte will show both the hour and timecode format (type). The first bit is zero (always is for a data type)

The next two bits specify the type:
00 is 24
01 is 24
10 is Drop Frame
11 is non-drop

The last five bytes specify the hour.

So the hour byte for 6 hours (in 30-frame drop frame) would be:
0 10 001100 or 86H.

The hour byte for 17 hours in 25 would be:
0 01 10001 or 31H

The quarter frame message contains the entire smpte number but not all at once. It's broken up over 8 messages. The format is F1 nx, where n goes cyclically from 0 - 7 and x is the decimal.

example:
when n=3 x=seconds MS
when n=4 x= Minutes LS
when n=5 x= Minutes MS
when n=6 x= Hours LS
when n=7 x= Hours MS (which can only be 0,1 2 (only requires 2 bits) ans smpte type (using the remailing two bits following the same format as the full message.


Hope this helps.
Good Luck!
GretscGuy
 
Posts: 442
Joined: Sat Oct 18, 2003 1:26 pm
Location: Massachusetts USA

Postby sergiii » Sun Dec 21, 2003 8:39 pm

Thanx for you answer! I meanwhile found out by myself what you mentioned and I can record MTC from applications like Cubase, but SONAR denies to send MTC, it only sends Midi Sync messages, but I'd prefer to receiver MTC. Can Sonar act as a master and send MTC? (I just opened another thread asking that question)
sergiii
 

Postby GretscGuy » Thu Dec 25, 2003 2:00 am

Yes it can, i answered your question in the other thread.
GretscGuy
 
Posts: 442
Joined: Sat Oct 18, 2003 1:26 pm
Location: Massachusetts USA



Similar topics


Return to Midi Issues

Who is online

Users browsing this forum: No registered users and 1 guest


Music Engravers and Music Copyists
   Finale - Sibelius - Cakewalk - Archives - Cakewalk Books - Contact


Copyright © 1994 - 2019 by C.M. Press, LLC