Struct Midi Program Decoder
pub struct MidiProgramDecoder { /* private fields */ }Expand description
Sixteen independent pending MIDI1 bank selectors and last request snapshots. CC0/32 update their own seven-bit half in either order, initially zero. Only Program Change emits a request, using the latest complete pending bank. Later bank changes never alter the last request. CC121/120/123 leave bank/program requests intact; explicit reset/System Reset clears both. Other messages are ignored. No implicit voice reset, program availability/commit, MPE mapping, callback scheduling, file/host/UI work or MIDI2 decoding. Fixed storage and bounded apply/reset/inspection use no heap, locks or I/O.
Implementations§
§impl MidiProgramDecoder
impl MidiProgramDecoder
pub fn reset(&mut self)
pub fn pending_bank(&self, channel: u8) -> Option<u16>
pub fn pending_bank(&self, channel: u8) -> Option<u16>
Pending bank; None for an invalid zero-based channel.
pub fn last_request(&self, channel: u8) -> Option<MidiProgramRequest>
pub fn last_request(&self, channel: u8) -> Option<MidiProgramRequest>
Last received Program Change, including requests for unavailable sounds. None before the first request, after reset, or for an invalid channel.
pub fn apply(&mut self, message: MidiMessage) -> Option<MidiProgramRequest>
Trait Implementations§
§impl Clone for MidiProgramDecoder
impl Clone for MidiProgramDecoder
§fn clone(&self) -> MidiProgramDecoder
fn clone(&self) -> MidiProgramDecoder
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more