Struct vst::api::MidiEvent

source ·
#[repr(C)]
pub struct MidiEvent { pub event_type: EventType, pub byte_size: i32, pub delta_frames: i32, pub flags: i32, pub note_length: i32, pub note_offset: i32, pub midi_data: [u8; 3], pub _midi_reserved: u8, pub detune: i8, pub note_off_velocity: u8, pub _reserved1: u8, pub _reserved2: u8, }
Expand description

A midi event.

Fields§

§event_type: EventType

Should be EventType::Midi.

§byte_size: i32

Size of this structure; mem::sizeof::<MidiEvent>().

§delta_frames: i32

Number of samples into the current processing block that this event occurs on.

E.g. if the block size is 512 and this value is 123, the event will occur on sample samples[123].

§flags: i32

See MidiEventFlags.

§note_length: i32

Length in sample frames of entire note if available, otherwise 0.

§note_offset: i32

Offset in samples into note from start if available, otherwise 0.

§midi_data: [u8; 3]

1 to 3 midi bytes. TODO: Doc

§_midi_reserved: u8

Reserved midi byte (0).

§detune: i8

Detuning between -63 and +64 cents, for scales other than ‘well-tempered’. e.g. ‘microtuning’

§note_off_velocity: u8

Note off velocity between 0 and 127.

§_reserved1: u8

Reserved for future use. Should be 0.

§_reserved2: u8

Reserved for future use. Should be 0.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

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