pub struct MidiVSTConverter { /* private fields */ }
Expand description

This is an unsafe converter from MIDI events received from midir into the rust-vst VST api.

It’s unsafe because it must do manual memory allocation & management to interface with the VST C-style API.

Pre-allocates buffers of MIDI events up-front. Capacity is set to 100 MIDI messages by default.

More than 100 midi messages being passed into it in a single buffer tick will result in dropped messages.

The collecting phase of the audio-thread should collect at most a limit of messages.

Threshold can be changed in the future to include more.

Implementations

Create a new MidiVSTConverter with capacity.

Will pre-allocate buffers.

Pushes MIDI messages onto a pre-allocated Events struct. Returns a reference to it.

This should be real-time safe.

The vst::api::Events returned may be passed into a VST plugin instance.

Get a reference to the events

Trait Implementations

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

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.