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: Thu May 04 2000 - 19:38:04 EEST


Paul Barton-Davis wrote:
>
> Well, with a heavy heart, I am beginning to think that I have to use
> RTLinux after all. With ardour.
>
> As I've mentioned before, MIDI timecode seems very problematic for
> general purpose computers. Sending 2 bytes every 1.3 msec (for 30fps
> SMTPE) is just not something that Linux (or Windows, or MacOS) was
> really designed to make it easy to do. There is no way to use the RTC
> to generate periodic interrupts with the correct frequency, because
> the frequency is not an integer power-of-2.
>
> RTLinux, on the other hand, uses the 8253 timer, which be reprogrammed
> all the way down to 0.9usecs by RTLinux. Its apparently fairly easy to
> get RTLinux to do the right thing here, by getting an 8253 interrupt
> thats fairly close to 1.3msec.
>
> I can see only one potential way to generate a correct MIDI timecode
> data stream with regular Linux: handling data from the soundcard in
> roughly SMPTE-frame units. However, since doing so relies on the use
> of the RTC as a periodic interrupt, and the RTC cannot generate the
> correct periodic interrupt, I don't really see how this can work.
>
> I am very reluctant to make this transition, but given that I have a
> US$10K mixing desk that doesn't work fully without proper MIDI
> timecode arriving from an attached "tape" system, it seems inevitable.
>
> Does anyone have any last-minute thoughts on this ? :)

Some options that you have probably rejected, but I'm curious to hear why:

Is any `smart' MIDI interface supported? If not, writing an MPU-401
driver might be more fun than porting to RTLinux.

Since you have to run with Ingo's patch, what's one more? Use UTIME,
with their Posix.4 interval timers if you like. If you're feeling
political, find out why UTIME isn't in the kernel and get it there. :-)

How much jitter can a SMPTE receiver in general, and your mixer in
particular, tolerate? (If you are even considering non-RTLinux,
presumably an occasional couple of milliseconds is okay.) And how
expensive is it to take an RTC interrupt? If it's not too painful to
run at 8kHz (and if it is, something's wrong), rounding to the nearest
RTC gives a jitter of +/- 0.5/8192 sec, only two MIDI bits.

> ps. SMPTE pisses me *off*. what a totally stupid, absurd standard to
> have to base timecode/sync systems on. they could have at least
> used audio frames instead of video frames as the reference, or

Well, you know, Society of Motion Picture and Television Engineers. :-/

-- 
     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 : Thu May 04 2000 - 20:27:22 EEST