AUDIO
Source snapshot · 11 November 2026

API reference / ravet_plugin::native::NativeEventV1

Struct NativeEventV1 

#[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

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.

pub fn to_event(self) -> Result<Event, NativeEventError>

Decode strict v1 fields; unknown tags, scope bits, unused nonzero fields, invalid framing/scalars and lossy f32 values reject. No allocation.

Trait Implementations§

§

impl Clone for NativeEventV1

§

fn clone(&self) -> NativeEventV1

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Copy for NativeEventV1

§

impl Debug for NativeEventV1

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for NativeEventV1

§

fn default() -> NativeEventV1

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

impl PartialEq for NativeEventV1

§

fn eq(&self, other: &NativeEventV1) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · §

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
§

impl StructuralPartialEq for NativeEventV1

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> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

Performs copy-assignment from self to dest. 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> Same for T

§

type Output = T

Should always be Self
§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

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.