MIDI Timing and PC soundcards
Mikko Helin
MHELIN at tne01.ntc.nokia.com
Tue Oct 13 14:36:15 CEST 1998
I once programmed a MIDI sequencer for DOS with Borland C on a PC with
8 MHz V20 (8088 clone), and there were no problems with timing,
even with my modified RS-232 (8250 chip) port MIDI interface. But
Windows is another story (hope someone developed a nice GUI on top
of DOS with some device driver standard like in Linux). Anyway, the biggest
problem with Windows isn't interrupt response time, but the difficulty
in writing VxD's (the "DOS" part of device drivers, which handles
interrupts and other realtime tasks). DirectX is good for audio,
it decreases latency quite a lot, but there are no DirectX services
for MIDI input or timer routines. For Window 95/98 all "realtime"
applications should also use 16 bit code, which is faster than
32 bit one, not executing faster but switching tasks (which isn't
done when 16-bit code is run, I mean that 16-bit apps don't
share runtime with each other, but they do so with 32 bit apps
running in background). This is usually done by calling routines
in 16-bit DLL's from the 32-bit code. There are some realtime
expansions for Windows, which are practically VxD's that take
all control of the computer.
-Btw. The Windows 98 DDK is free, you don't have to pay the MSDN
subscrition payments for it, see
http://www.microsoft.com/hwdev/ddk/ddk98.htm
Needs though Visual C++ 5.0 and Windows 98 or NT 4.0.
-Mikko
Karl H.:
>
>The result : The PC I tested on ('486, but I don't think a Pentium would
>make very much difference) would not respond faster than 50ms to incoming
>serial data. Also the time used was very erratic, varying from 50ms to
>150ms. This is a LONG time! The variations did not seem to be very
>dependant on processor load.
>
>The culpit is Windows, which puts the information in a message queue,
>instead of calling my message handler directly.
>
More information about the Synth-diy
mailing list