Expand description
MIDI 2.0 default resolution scaling (Min-Center-Max) between bit widths.
MIDI 1.0 carries 7-bit / 14-bit values; MIDI 2.0 carries 16-bit / 32-bit
values. Up-scaling uses the “bit-repeat” expansion from the MIDI 2.0 UMP
specification so that minimum, center, and maximum map exactly (e.g. 7-bit
0x40 center scales to the 16-bit center). Down-scaling is a right shift.
Functions§
- scale_
down - Scale
valuefromsrc_bitsdown todst_bits(a right shift by the width difference).dst_bits <= src_bits. - scale_
up - Scale
valuefromsrc_bitsup todst_bitsusing the MIDI 2.0 Min-Center-Max bit-repeat algorithm.src_bits <= dst_bits <= 32.