Data Transfer with MIDI Device Drivers

With MIDI system-exclusive events, data transfer between a client application and a MIDI device driver is identical to the sequence described previously for waveform drivers. However, for all other MIDI events, the driver uses a different transfer mechanism. Because all other MIDI events are three bytes or less in size, they are packed into a DWORD and sent directly to the driver for output. The driver parses the event to determine its size and sends the individual bytes to the MIDI output hardware. If the driver is for an internal synthesizer, it parses the event and responds accordingly. MIDI input device drivers wait until receiving a complete MIDI event before packing the event into a DWORD and sending it to the client application through its callback.