Engineering record

Electronics · 2025

MIDI Transport Timing Investigation

Capturing and decoding a misbehaving MIDI transport with a logic analyser, isolating clock drift from buffering artefacts.

midiuartlogic-analysisoscilloscope

Context

A device dropped notes under dense traffic. Vendor guidance blamed the host; the host showed no errors.

Method

UART framing captured at the DIN side with a logic analyser, decoded at 31250 baud with a custom decoder. Edge timing measured on the oscilloscope, and optocoupler rise/fall behaviour examined.

Byte gaps were correlated with note loss. Two distinct effects appeared: clock drift in the sender and buffer overflow in the receiver's ISR when burst density peaked.

Outcome

Root cause was receiver-side: an undersized ring buffer plus long ISR work. Enlarging the buffer and deferring parsing out of the ISR eliminated the dropouts. Sender drift was real but secondary.

Notes

Measurement-first sequencing prevented a pointless sender-side rewrite.