pub struct NoteEvent {
pub sample_offset: u32,
pub note_id: i32,
pub port_index: i16,
pub channel: i16,
pub key: i16,
pub kind: NoteEventKind,
}Expand description
One timed note-scoped event inside a process block.
Fields§
§sample_offset: u32§note_id: i32Host note id, or NOTE_UNSPECIFIED.
port_index: i16§channel: i16§key: i16§kind: NoteEventKindImplementations§
Source§impl NoteEvent
impl NoteEvent
pub fn on( sample_offset: u32, note_id: i32, key: i16, velocity: f64, ) -> NoteEvent
pub fn off( sample_offset: u32, note_id: i32, key: i16, velocity: f64, ) -> NoteEvent
Sourcepub fn end(sample_offset: u32, note_id: i32, key: i16) -> NoteEvent
pub fn end(sample_offset: u32, note_id: i32, key: i16) -> NoteEvent
CLAP_EVENT_NOTE_END — voice silent; host can drop per-note modulators.
Sourcepub fn to_midi1(self) -> Option<MidiMessage>
pub fn to_midi1(self) -> Option<MidiMessage>
7-bit MIDI for VST3/LV2 (On/Off/Choke only). End / expressions stay CLAP-native.
Sourcepub fn matches_voice(self, note_id: i32, key: i16) -> bool
pub fn matches_voice(self, note_id: i32, key: i16) -> bool
True when this event applies to the sounding voice (-1 = wildcard).
Trait Implementations§
impl Copy for NoteEvent
impl StructuralPartialEq for NoteEvent
Auto Trait Implementations§
impl Forget for NoteEvent
impl Freeze for NoteEvent
impl RefUnwindSafe for NoteEvent
impl Send for NoteEvent
impl Sync for NoteEvent
impl Unpin for NoteEvent
impl UnsafeUnpin for NoteEvent
impl UnwindSafe for NoteEvent
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