AUDIO
Source snapshot · 11 November 2026

API reference / ravet_clap::ParameterEvents

Struct ParameterEvents 

pub struct ParameterEvents { /* private fields */ }
Expand description

Preallocated event translator, also usable for inactive parameter flushes.

Implementations§

§

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>

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>

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

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

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>

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>

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>

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.

Trait Implementations§

§

impl Default for ParameterEvents

§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AutoreleaseSafe for T
where T: ?Sized,

§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.