Audio & MIDI

MIDI VLQ encoder

Encode a Standard MIDI File delta-time integer as hexadecimal bytes.

Your inputs

Start with an example

Your inputs stay in your browser.

Your result

Example result

How it works

Split the integer into 7-bit groups, most significant first. Set bit 7 on every byte except the last.

128 encodes as 81 00; 127 encodes as 7F.

Limits

Uses the SMF limit of four bytes. This is not a general unbounded LEB128 or network varint encoder.