Opt-in single-zone RPN negotiation¶
RpnDecoder tracks selectors independently on all 16 channels and emits absolute
Data Entry updates. CC101/100 select an RPN in either order; null 127/127, NRPN
selection, CC121 and System Reset cancel pending data. Selection changes discard
old data; CC38 requires a preceding CC6. Each CC6 infers zero fractional data.
CC96/97 increments and NRPN values are not decoded.
NegotiatedVoices<N> explicitly chooses lower or upper zone and starts in
polyphonic mode with two-semitone bends. RPN6 CC6 on that side's master enables
1..15 members; zero disables. Invalid channels/counts leave configuration and
voices unchanged. Each accepted zone message clears all voices, including tails,
and controllers, reports occupied slots to the DSP owner, and restores 48/2
member/master bend ranges (2/2 when disabled). Repeated zone messages also reset.
While enabled, RPN0 CC6 values 0..96 adjust the master independently or apply the last member range to every member. Held/sustained snapshots refresh immediately; released tails retain their previous expression. Fractional CC38 ranges and polyphonic RPN0 are ignored. Reset clears notes/controllers/selectors but retains negotiated configuration. Consumers apply returned masks to their DSP slots; these APIs do not generate sound or communicate with a controller themselves.
The chosen wire behavior follows the MIDI Association MPE specification, sections 2.1 and 2.4; single-zone support remains a scoped receiver policy rather than complete MPE conformance. Master pressure and CC74 snapshots refresh all held/sustained members, remain distinct from member values and freeze on release. Tests cover both sides, live bend changes, frozen tails, invalid/null/NRPN cancellation and 10,000 allocation-free negotiations. See decision 0037.