Struct Negotiated Voices
pub struct NegotiatedVoices<const N: usize> { /* private fields */ }Expand description
Explicit opt-in receiver for one chosen lower or upper MPE zone. Starts polyphonic with a two-semitone bend range. RPN6 on the chosen master enables 1..15 members or disables with zero; other masters and values >15 are ignored. Accepted zone messages kill all slots/controllers (including release tails), set member/master ranges to 48/2, and report changed occupied slots so the DSP owner can stop them. Disabling returns to polyphonic 2/2. Repeated valid zone messages also reset.
In MPE mode RPN0 CC6 values 0..96 set the independent master range or shared member range, refreshing held/sustained snapshots. CC38 fractional ranges are ignored. Polyphonic RPN0, overlapping zones, MIDI-CI, synthesis/format export are outside this receiver. Polyphony accepts bank/program requests independently on all channels; an active zone accepts them only on its master. Zone configuration/reset clears program selectors/requests; bend-range changes and CC121 preserve them. Prepared apply/reset/finish neither allocate nor perform I/O.
Implementations§
§impl<const N: usize> NegotiatedVoices<N>
impl<const N: usize> NegotiatedVoices<N>
pub fn new(side: ZoneSide) -> Result<Self, VoiceError>
pub fn mode(&self) -> VoiceMode
pub fn bend_ranges(&self) -> (f32, f32)
pub fn bend_ranges(&self) -> (f32, f32)
Current (member, master) ranges in semitones.
pub fn voices(&self) -> &[Voice; N]
pub fn last_program_request(&self, channel: u8) -> Option<MidiProgramRequest>
pub fn last_program_request(&self, channel: u8) -> Option<MidiProgramRequest>
Last accepted request; not a committed sound. Reset/zone configuration clears all channels; invalid channels return None.
pub fn finish(&mut self, index: usize) -> Result<(), VoiceError>
pub fn reset(&mut self)
pub fn reset(&mut self)
Clear notes, controllers and selectors; preserve the negotiated zone/ranges.