Struct Parameter Events
pub struct ParameterEvents { /* private fields */ }Expand description
Preallocated event translator, also usable for inactive parameter flushes.
Implementations§
§impl ParameterEvents
impl ParameterEvents
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Result<Self, BridgeError>
pub fn with_clap_note_input_port(
self,
port: Option<u16>,
) -> Result<Self, BridgeError>
pub fn with_clap_note_input_port( self, port: Option<u16>, ) -> Result<Self, BridgeError>
Select one native CLAP note/expression input port (0..256); None disables. On/Off with optional ID, scoped Off/choke and standard expressions retain timing/scope. Unknown kinds filter; malformed selected data rejects. Flush ignores performance events, and selected performance in zero-frame processing rejects. No voice policy or native metadata is synthesized; exporters advertise processor support.
pub fn with_scoped_parameter_input_port(
self,
port: Option<u16>,
) -> Result<Self, BridgeError>
pub fn with_scoped_parameter_input_port( self, port: Option<u16>, ) -> Result<Self, BridgeError>
Select endpoint-scoped parameter value/modulation translation on one note input port (0..256), independently of note-event translation. None keeps scoped filtering. Exact port/target/f64 values retain process timing; flush normalizes offsets to zero. Metadata/range/voice policy stay exporter-owned.
pub fn with_parameter_gesture_input(self, enabled: bool) -> Self
pub fn with_parameter_gesture_input(self, enabled: bool) -> Self
Select raw parameter begin/end translation. Default false ignores them. No pairing, ownership, scalar edits or recording policy is inferred. Process offsets preserve order; flush offsets normalize to zero.
pub fn with_global_parameter_modulation(self, enabled: bool) -> Self
pub fn with_global_parameter_modulation(self, enabled: bool) -> Self
Select global physical-unit modulation translation. Default false retains ignored modulation behavior. Scoped events remain ignored; no metadata flags, base-value changes, DSP policy or persistence are synthesized. Finite native amounts must narrow to finite f32. Flush offsets normalize to zero.
pub fn translate(
&mut self,
input: &InputEvents<'_>,
frames: usize,
flush: bool,
) -> Result<&[Event], BridgeError>
pub fn translate( &mut self, input: &InputEvents<'_>, frames: usize, flush: bool, ) -> Result<&[Event], BridgeError>
Flush timestamps carry no sample meaning and are normalized to zero. Process timestamps are checked across all events, including ignored kinds. Scoped parameters require explicit selection. Selected native notes/expressions are translated during process only; flush retains parameter-only behavior.
pub fn translate_midi(
&mut self,
input: &InputEvents<'_>,
frames: usize,
port: u16,
) -> Result<&[Event], BridgeError>
pub fn translate_midi( &mut self, input: &InputEvents<'_>, frames: usize, port: u16, ) -> Result<&[Event], BridgeError>
Translate global parameters and validated short MIDI on one explicit port. Process timestamps validate across all events; other-port MIDI, CLAP notes/expressions retain default filtering unless explicitly selected. SysEx, UMP and scoped/disabled modulation are ignored. CLAP’s three-byte MIDI padding is ignored beyond the status-defined length. Flush accepts only parameters, never notes/controllers.
pub fn translate_midi_ump(
&mut self,
input: &InputEvents<'_>,
frames: usize,
port: u16,
) -> Result<&[Event], BridgeError>
pub fn translate_midi_ump( &mut self, input: &InputEvents<'_>, frames: usize, port: u16, ) -> Result<&[Event], BridgeError>
Translates parameters, opt-in global modulation, MIDI short messages and complete UMP packets on one explicit port. UMP word count follows the message-type nibble; unused CLAP words are ignored. No semantic validation or protocol negotiation. Input count/timing validation includes ignored events and other ports.