pub enum ClapEvent {
MidiShort {
time: u32,
bytes: [u8; 3],
len: u8,
},
NoteOn {
time: u32,
channel: u8,
key: u8,
velocity: f32,
},
NoteOff {
time: u32,
channel: u8,
key: u8,
velocity: f32,
},
ParamValue {
time: u32,
clap_param_id: u32,
value: f64,
},
}Expand description
A CLAP input event, mirroring the CLAP event union SIM accepts from a host.
Each variant carries a sample-relative time offset and maps to a matching
BlockEvent via ClapEvent::to_block_event.
Variants§
MidiShort
A short (up to 3-byte) raw MIDI message.
Fields
NoteOn
A note-on event.
Fields
NoteOff
A note-off event.
Fields
ParamValue
A parameter value change addressed by CLAP parameter id.
Implementations§
Source§impl ClapEvent
impl ClapEvent
Sourcepub fn to_block_event(&self, params: &ClapParamMap) -> BlockEvent<'_>
pub fn to_block_event(&self, params: &ClapParamMap) -> BlockEvent<'_>
Translates this CLAP event into the audio-graph BlockEvent.
Note and MIDI events pass through unchanged; a ClapEvent::ParamValue
has its CLAP parameter id resolved to a SIM parameter id through
params.
Trait Implementations§
impl StructuralPartialEq for ClapEvent
Auto Trait Implementations§
impl Freeze for ClapEvent
impl RefUnwindSafe for ClapEvent
impl Send for ClapEvent
impl Sync for ClapEvent
impl Unpin for ClapEvent
impl UnsafeUnpin for ClapEvent
impl UnwindSafe for ClapEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more