Re: [linux-audio-dev] rtlinux, MIDI timecode

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] rtlinux, MIDI timecode
From: eli+@gs211.sp.cs.cmu.edu
Date: Sat May 06 2000 - 03:23:01 EEST


Paul Barton-Davis wrote:
> while (1) {
>
> ... arrange to sleep for about 33msec ...
> ... get current SMPTE time ...
> ... write enough qtr frame messages to catch up ...
> }

[...]
 
> while (1) {
> ... arrange to sleep for 33msec ...
> ... get current SMPTE time ...
> ... send corresponding qtr frame message(s) ...
> }
>
> the difference is both subtle and obvious at the same time.

Ah, yeah. I say an MTC generator wants to think like a sequencer.
This gives that subtlety plus one you didn't go into: you don't
literally try to sleep for 33 ms, because that will cause drift. You
try to sleep until 33 ms after the current logical time (abstract time,
score time), not after the current wall-clock time.

-- 
     Eli Brandt  |  eli+@cs.cmu.edu  |  http://www.cs.cmu.edu/~eli/


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sat May 06 2000 - 04:02:40 EEST