Topic: Reading TimeCode via ASIO

Hello,

I'm using an HDSP AES-32 with TCO an read the TimeCode via ASIO in the BufferSwitchTimeInfo callback. The first thing is that I only get a valid TimeCode every second for some samples (~20samples or a tenth of a second) in a row and in between it is invalid (0 samples and the kTcValid flag is not set). This valid/invalid hopping is repeated in a nearly one second interval.
The second thing is that I want to get a frameRate, so I can show the frame number instead of the milliseconds. In the example of the ASIO documentation there is a field "frameRate" on ASIOTimeCode, but its missing in the official SDK from Steinberg. I saw that the flags field of ASIOTimeCode has some more bits set than described in the ASIO documentation (its 0x0203 when I get a valid TimeCode), so I'm wondering if the timecode info may be hidden there.

best regards,
Albert

Re: Reading TimeCode via ASIO

I never succeed doing things with timecode with asio. Therefor, I'm able to read the signal datas (LTC Timecode) and decode them to get the time.

An interesting link : http://www.philrees.co.uk/articles/timecode.htm#smpte

Re: Reading TimeCode via ASIO

Thanks to the quick response from the RME Support the time code samples can be read continuously with an updated driver.
However, I'm still having no idea on how to get the framerate in order to show a valid time code. I would be thankful for any hints (whether this is possible via ASIO, or in case of Grag38 how to read the signal data).

best regards,
Albert

4 (edited by Grag38 2011-05-03 12:28:53)

Re: Reading TimeCode via ASIO

It's quite easy...

You must look of all of datas (from LTC timecode) and check every time the phase is changing (passing thru 0 level)
At that time your must count how many samples were used since the phase changed. So from it's easy to know if you got un 0 or 1 in the tram of datas, by the way an 1 is twice the frequency of an 0. So the half phase of 1 will contains the half of datas of an 1 !

when you get the sync word, you can collect all of the data to construct the time of the frame.

this image is a good start to understand.

http://www.philrees.co.uk/articles/pix/smptefmt.gif

for a fast way of calculating the mean number of sample between 2 phase...

Let's consider an 48khz samplig freq for an 25 fps time code (EBU).

One LTC frame is 80 bits (as the image shows) and we get 25 frames (from 0->24) in one second.

So from 48000/25/80 = 24 audio samples
one frame is : 48000/25 = 1920 audio samples.

So from :

0 will be represented by around 24 identical samples (positive or negative)
1 will be represented by 2 times 12 identical samples.

You understand ?

If you send me a private mail, I can give you a piece of code I wrote that do that work.

Re: Reading TimeCode via ASIO

Thanks all for the help!
I'm now using MTC instead of APP, since with MTC I get a TimeCode with frames according to the frame rate set in the Hammerfall Settings Dialog. Apparently it's not possible to get the frame rate via APP.

best regards,
Albert