[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Date Index][Thread Index][Author Index]

Re: Real-time category



Travis Hartnett wrote:
 > In a non-RTOS, the overall response lag
 > may average at 1.5ms (although I seem to recall that Windows and Mac
 > OS take slightly longer than this), but there are times when another
 > task might have precedence, and so the looping app response drops down
 > to something like 20ms.

Yes, I get this part.  This doesn't explain why these timing
inaccuracies "tend to get multiplied as the loop repeats".  They
don't, they stay exactly the same as the loop repeats.  And it doesn't
explain the concern over MIDI clocks that come in at 20ms intervals
anyway and are always averaged.  But one thing at a time.

I can't deny that it is *possible* for there to be resource contention
so severe that MIDI interrupt handlers are not called quickly, and
that the millisecond timer is not maintained accurately.  My
contention is that it is *improbable* for this situation to exist if
you are following all of the common sense rules for running audio
applications on a PC.  It is possible for you to get into an accident
every time you drive a car, yet that doesn't prevent people from
driving safely.

Where did this 20ms number come from, did someone measure this in a
controlled scientific experiment?  How often did this anomaly occur,
every 10 MIDI events?  Every 100?  Every 10,000?  Were the suggestions
on musicxp.net followed?  Was the anomaly measured in the interrupt
callback function passed to midiInOpen, or was it measured in an
application thread processing untimestamped MIDI events?

It is difficult to draw conclusions without something more concrete
than "it is possible, therefore it must happen frequently, and
the effect must be obvious".

All I can say is that I don't get 20ms of jitter in the MIDI interrupt
handler.  It's more like 2 or 3.  And I'm not even particularly
careful about what else is running.

I would think that if there were a frequent 20ms delay in MIDI event
processing that we would be hearing something about that from the
thousands upon thousands of keyboard players and percussionists that
use soft synths.

Maybe I just can't hear it.  Eric Johnson claims he can determine the
brand of battery in his Tube Screamer by the way it sounds.  Some
people are gifted :-)

Jeff