Struct Native Event V1
#[repr(C)]pub struct NativeEventV1 {
pub offset: u32,
pub kind: u32,
pub parameter_id: u32,
pub note_id: u32,
pub scope: u32,
pub channel: u32,
pub key: u32,
pub detail: u32,
pub value: f64,
pub words: [u32; 4],
}Expand description
The processor, event and transport records the table shares with
RavetNativeProcessor.h, RavetNativeEvent.h and RavetNativeTransport.h.
Fixed C layout matching include/RavetNativeEvent.h. Zero unused fields; scope
bits 1/2/4 select channel/key/id (unset means wildcard). detail selects gesture
(0 begin/1 end), expression (0 volume,1 pan,2 tuning,3 vibrato,4 expression,
5 brightness,6 pressure), MIDI byte count or UMP word count. MIDI packs its
bytes in increasing shifts of words[0]; UMP retains numeric words in order.
value stores exact widened f32 for global controls/velocities, and full f64 for scoped controls/expressions. Decoding rejects lossy f32 conversion. This record defines neither endpoint routing nor host-specific scalar conversion.
Fields§
§offset: u32§kind: u32§parameter_id: u32§note_id: u32§scope: u32§channel: u32§key: u32§detail: u32§value: f64§words: [u32; 4]Implementations§
§impl NativeEventV1
impl NativeEventV1
pub fn from_event(event: Event) -> Result<NativeEventV1, NativeEventError>
pub fn from_event(event: Event) -> Result<NativeEventV1, NativeEventError>
Encode one valid portable event, independent of a block’s timing/order. All unused fields are canonical zero; unrepresentable offsets reject.
Trait Implementations§
§impl Clone for NativeEventV1
impl Clone for NativeEventV1
§fn clone(&self) -> NativeEventV1
fn clone(&self) -> NativeEventV1
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more