MIDI performance

Timing is critical to MIDI applications--most users of MIDI applications cannot tolerate inaccuracies and performance variations. However, these requirements are typically governed by perceptible differences. In general, people cannot perceive 10 millisecond (ms) timing differences. Studies show that for the average person to perceive two distinct notes, the notes must be 30 ms or more apart.

These perception limits make it possible to manage MIDI timing performance by quantizing the MIDI data--grouping MIDI messages and sending the groups at specified intervals. Quantizing the data helps prevent MIDI playback from dragging. It also helps prevent the MIDI system from placing too large a load on the CPU.

NOTE Quantizing MIDI data meters the load that the MIDI system puts on the processor. Think of a metered on-ramp to the freeway--by allowing one or two cars onto the freeway at timed intervals, the overall traffic flow is maximized. In the same way that metered ramps help prevent gridlock, quantizing MIDI data helps prevent the MIDI data from overloading the system.

You use TMIDIPlayer::SetQuantum to quantize MIDI data. For example, since 10 ms timing differences are virtually imperceptible, you can quantize the data at 10 ms intervals. If you quantize the MIDI messages A, B, and C in Figure 32 this way, message A occurs at 10 ms, and B and C both occur at 20 ms. To the listener, the difference is imperceptible.



[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker