MIDI bank and program requests¶
MidiProgramDecoder holds sixteen independent pending zero-based 14-bit banks
and last requests. CC0/32 replace their seven-bit half in either order, initially
zero; bank changes alone do not request a sound change. Program Change emits
MidiProgramRequest { channel, bank, program } with the pending bank, including
repeated identical requests. Subsequent bank edits preserve the last request.
CC120/121/123 leave this decoder's bank/request intact; explicit/System Reset
clears it. Invalid channel queries return None. Fixed storage/apply/reset are
heap-free. The MIDI Association overview
and controller table describe
the bank/program combination. These are requests, including unavailable sounds,
rather than committed consumer program identity.
A consumer can use ProgramBank::midi_index then state for exact complete
selection, preserving current values when unavailable. Channel/MPE master routing,
sample offsets, atomic publication, voices, host/program extensions and UI
notifications remain consumer responsibilities. Existing static voice allocators ignore
Program Change; negotiated single-/two-zone receivers return routed requests,
and the sine reference consumes them on its chosen master.
See decision 0080.