MIDI Sample Dump Standard: How Waveform Transfer Works
The MIDI Sample Dump Standard (SDS) is a specialized communication protocol established by the MIDI Manufacturers Association that allows hardware samplers and computers to transmit raw digital audio waveforms across standard MIDI connections. By translating complex, multi-byte audio samples into MIDI-compliant System Exclusive (SysEx) messages, SDS enables cross-platform sample exchange regardless of hardware manufacturer. This article breaks down how SDS operates, including its data formatting, packet structure, and the bidirectional handshaking process used to guarantee accurate waveform transfers.
The Foundation: System Exclusive Messages
Standard MIDI messages typically handle performance instructions, such as note pitch, velocity, and timing, using 7-bit values. Because audio samples consist of larger 8-bit to 16-bit linear PCM representations, standard MIDI channels cannot interpret them. SDS solves this by utilizing Universal System Exclusive (SysEx) messages. SysEx acts as a neutral transport container, allowing manufacturers to transmit arbitrary binary data—including raw digital audio—through standard 5-pin DIN cables.
Initialization and the Dump Header
A waveform transfer begins with a specific initialization message called a Dump Header. Before sending any actual sound data, the transmitting device sends the receiving device essential metadata about the waveform, which includes:
- Sample Number: The memory slot or destination index where the sample will reside.
- Sample Format/Resolution: The sample resolution (typically from 8 to 16 bits).
- Sample Rate: The sample period defined in nanoseconds, which tells the receiver the playback frequency (e.g., 44.1 kHz).
- Sample Length: The total number of sample words in the waveform.
- Sustain and Loop Points: Marker positions indicating where the waveform loops and ends during sustained playback.
Once the receiver processes this header, it allocates the necessary buffer memory to accept the incoming audio stream.
Byte Encoding: Translating Audio to 7-Bit Words
The primary challenge of transferring audio over MIDI is that all MIDI data bytes must keep their most significant bit (bit 7) set to zero, effectively restricting data values between 0 and 127. Audio data, however, uses full 8-bit, 12-bit, or 16-bit values.
To bypass this restriction, the Sample Dump Standard splits each digital audio word into smaller 7-bit segments. For example, a 16-bit sample is broken down into three consecutive 7-bit MIDI bytes, discarding the unused higher bits. The receiving sampler gathers these pieces and reconstructs the original 16-bit audio word in memory.
Data Packets and Checksums
Instead of transmitting an entire waveform in a single, uninterrupted stream, SDS fragments the audio into small, manageable data packets. Each standard data packet contains:
- Packet Header: Marks the packet as an SDS transmission and identifies the channel.
- Packet Number: A running counter from 0 to 127 that ensures packets are processed sequentially and none are skipped.
- 120 Bytes of Encoded Audio: Containing the reconstructed sample points.
- Checksum: A mathematical validation value calculated by running an XOR operation across the packet's contents. The receiver recalculates this value upon arrival to ensure the data was not corrupted in transit.
Bidirectional Handshaking (Closed-Loop Transfer)
While SDS can function in an "open-loop" mode (where data is sent blindly in one direction), it is most reliable when using a "closed-loop" two-way MIDI connection (both MIDI In and MIDI Out connected between devices). Closed-loop communication uses a strict handshaking system:
- ACK (Acknowledge): If a packet arrives intact with a valid checksum, the receiver sends an ACK back to the transmitter, prompting it to send the next packet.
- NAK (Negative Acknowledge): If a packet is corrupted or dropped, the receiver sends a NAK, prompting the transmitter to resend that specific packet.
- WAIT: If the receiver's memory buffer becomes full or needs time to write to disk, it sends a WAIT command, pausing transmission until it is ready to continue.
- CANCEL: Either device can terminate the transfer instantly if an unrecoverable error occurs.
Through this structured packet architecture, byte-splitting process, and bidirectional verification, the MIDI Sample Dump Standard successfully bridged the gap between proprietary sampler formats, allowing digital waveforms to move reliably across disparate hardware ecosystems.