Struct vst::event::MidiEvent

source ·
pub struct MidiEvent {
    pub data: [u8; 3],
    pub delta_frames: i32,
    pub live: bool,
    pub note_length: Option<i32>,
    pub note_offset: Option<i32>,
    pub detune: i8,
    pub note_off_velocity: u8,
}
Expand description

A midi event.

These are sent to the plugin before Plugin::processing() or Plugin::processing_f64() is called.

Fields§

§data: [u8; 3]

The raw midi data associated with this event.

§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].

§live: bool

This midi event was created live as opposed to being played back in the sequencer.

This can give the plugin priority over this event if it introduces a lot of latency.

§note_length: Option<i32>

The length of the midi note associated with this event, if available.

§note_offset: Option<i32>

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

§detune: i8

Detuning between -63 and +64 cents.

§note_off_velocity: u8

Note off velocity between 0 and 127.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
writes an event into the given placeholder memory location

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.