Re: [linux-audio-dev] midi events in jack callback (was: Reborn)

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

Subject: Re: [linux-audio-dev] midi events in jack callback (was: Reborn)
From: Paul Davis (pbd_AT_op.net)
Date: Fri Aug 16 2002 - 17:35:13 EEST


>> none of this, alas, addresses the more fundamental question of how to
>> do the timing correctly. without something like the hard-timer patch,
>> its more or less impossible to do MIDI sequencing correctly under
>> linux. of course, you can do it "well enough" with existing
>> mechanisms, but the reason most people haven't noticed this yet is
>> that there is fairly strong division between audio + MIDI software.
>> its only when *this* MIDI event needs to be delivered at audio frame N
>> that you start to see the problems. there is no way to accurately
>> schedule anything under Linux with hard-timers unless by accurately

                                 ^^^^
                                 OOPS. make that "without"

>> you mean either "resolution = HZ" or "resolution = RTC Hz" or
>> "resolution = audio interrupt frequency".
>
> What do you think the solution is? Someone on #lad mentioned that

the hard-timers patch or something like it needs to go into the kernel.

>ardour apparently outputs MIDI clock sync. How do you swing that one?

no, it outputs MIDI Time Code, which is an entirely different beast.
it has nothing to do with event scheduling, since its resolution is a
video frame (about 1/30 sec). many people seem to confuse MIDI clock
with MIDI time code - they are not related in any way whatsoever. in
addition, ardour's MTC output is not "lockable" - it happens in a
bursty way that other MTC devices will not lock to, though the
reasonable ones will follow it (they will sync, but not lock).

> Right now, all of my MIDI messages are output with reasonably constant
>latency clocked from a remote MIDI clock: effectively software MIDI
>thru. This + close-to-realtime audio means that my PC will hopefully
>output correct on both MIDI and audio in sync with constant latency,

its only an issue when "correct" means "within less than a
millisecond". many proprietary MIDI devices these days claim to be
accurate to within the MIDI data rate (about 0.33msecs).

the truth is that right now, it doesn't make much difference because
most destinations for the message will take at least 1msec to respond
to the data. but if you want "correct", you're stuck on Linux without
the hard-timers patch.

>using my drum machine or hard disk recorder as the clock source.

these devices provide a very low resolution clock, and it can't be
used to schedule MIDI data, only to provide a low resolution
positional reference.

--p


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

This archive was generated by hypermail 2b28 : Fri Aug 16 2002 - 17:30:31 EEST