Skip to main content

HostResponse

Enum HostResponse 

Source
pub enum HostResponse {
Show 28 variants Success { message: String, }, Error { message: String, }, Crashed { message: String, }, AudioOutput { outputs: Vec<Vec<f32>>, output_events: Vec<PluginEvent>, }, BusAudioOutput { outputs: Vec<AudioBusBuffer>, output_events: Vec<PluginEvent>, }, AudioBusLayout { layout: AudioBusLayout, }, ParameterValue { value: f64, }, ParameterString { value: String, }, Parameters { params: Vec<Parameter>, }, State { data: Vec<u8>, }, GuiCreated { width: i32, height: i32, }, PluginInfo { vendor: String, name: String, version: String, category: String, uid: String, has_gui: bool, audio_inputs: i32, audio_outputs: i32, output_channels: i32, has_midi_input: bool, has_midi_output: bool, compatibility: Vec<ClassCompatibility>, }, NoteStarted { note_id: i32, }, NoteExpressions { expressions: Vec<NoteExpressionInfo>, }, ParameterEdits { edits: Vec<ParameterEdit>, }, ParameterChanges { changes: Vec<(u32, f64)>, }, HostNotifications { notifications: Vec<HostNotification>, }, DataExchangeBlocks { blocks: Vec<DataExchangeBlock>, }, RestartFlags { bits: i32, }, BusArrangements { arrangements: BusArrangements, }, Units { units: Vec<PluginUnit>, }, SelectedUnit { unit_id: Option<i32>, }, ProgramPitchNames { names: Vec<ProgramPitchName>, }, OpaqueData { supported: bool, data: Vec<u8>, }, LatencySamples { samples: u32, }, TailSamples { samples: u32, }, MidiParameterMapping { id: Option<u32>, }, RemappedParameter { id: Option<u32>, },
}
Expand description

Responses from the isolated plugin process

Variants§

§

Success

Operation succeeded with message

Fields

§message: String

Human-readable success detail.

§

Error

Operation failed with error

Fields

§message: String

Error detail.

§

Crashed

Plugin crashed

Fields

§message: String

Crash detail.

§

AudioOutput

Per-channel audio output data ([channel][frame]), plus any MIDI the plugin emitted during the block (arpeggiators, MPE, etc.).

Fields

§outputs: Vec<Vec<f32>>

Output samples per channel, carried as base64 bit patterns.

§output_events: Vec<PluginEvent>

Owned VST3 events the plugin emitted this block, in order.

§

BusAudioOutput

Bus-preserving audio output from a ProcessBuses request.

Fields

§outputs: Vec<AudioBusBuffer>

Output buses in VST3 bus-index order.

§output_events: Vec<PluginEvent>

Owned VST3 events emitted during the block.

§

AudioBusLayout

Current audio-bus layout and activation state.

Fields

§layout: AudioBusLayout

Complete input/output layout.

§

ParameterValue

A single parameter value (normalized).

Fields

§value: f64

Normalized value.

§

ParameterString

A formatted parameter display string.

Fields

§value: String

The plugin-rendered display string.

§

Parameters

A list of parameters.

Fields

§params: Vec<Parameter>

All parameters reported by the plugin.

§

State

Opaque plugin state bytes (reply to SaveState).

Fields

§data: Vec<u8>

The serialized state.

§

GuiCreated

The isolated editor window was created (reply to CreateGui); carries the plugin-reported editor size so the host can report it without a second round-trip.

Fields

§width: i32

Editor width in pixels.

§height: i32

Editor height in pixels.

§

PluginInfo

Plugin information

Fields

§vendor: String

Vendor / manufacturer.

§name: String

Plugin name.

§version: String

Version string (may be empty if the plugin doesn’t report one).

§category: String

Plugin sub-categories (e.g. “Fx”, “Instrument|Synth”); may be empty.

§uid: String

Unique plugin class id (hex).

§has_gui: bool

Whether the plugin has an editor.

§audio_inputs: i32

Audio input bus count (clamped to a sane maximum on receipt).

§audio_outputs: i32

Audio output bus count (clamped to a sane maximum on receipt).

§output_channels: i32

Total output audio channels across all output buses (clamped on receipt: the host sizes buffers from this number, so it is not trusted verbatim).

§has_midi_input: bool

Whether the plugin has a MIDI/event input bus.

§has_midi_output: bool

Whether the plugin has a MIDI/event output bus.

§compatibility: Vec<ClassCompatibility>

Current/retired class-id mappings discovered by the helper.

§

NoteStarted

A note was started (reply to NoteOn); carries the helper-allocated raw note id.

Fields

§note_id: i32

Raw note id the host wraps back into a NoteId.

§

NoteExpressions

The per-note expressions the plugin advertises (reply to NoteExpressions).

Fields

§expressions: Vec<NoteExpressionInfo>

The advertised note-expression dimensions.

§

ParameterEdits

The ordered parameter-edit gestures drained from the helper (reply to TakeParameterEdits).

Fields

§edits: Vec<ParameterEdit>

The gesture events, in the order the plugin’s editor reported them.

§

ParameterChanges

Processor- and controller-originated parameter feedback drained from the helper.

Fields

§changes: Vec<(u32, f64)>

Parameter id and normalized value pairs, in drain order.

§

HostNotifications

Ordered IComponentHandler2 requests drained from the helper.

Fields

§notifications: Vec<HostNotification>

The queued host requests.

§

DataExchangeBlocks

Owned VST3 data-exchange blocks drained from the helper.

Fields

§blocks: Vec<DataExchangeBlock>

Block snapshots, in delivery order.

§

RestartFlags

Accumulated restartComponent flags.

Fields

§bits: i32

Raw VST3 restart flag bits.

§

BusArrangements

Each audio bus’s current speaker arrangement (reply to BusArrangements).

Fields

§arrangements: BusArrangements

The input/output arrangements.

§

Units

The plugin’s units and program lists (reply to GetUnits).

Fields

§units: Vec<PluginUnit>

The advertised units.

§

SelectedUnit

Currently selected unit.

Fields

§unit_id: Option<i32>

Unit id, or None when units are unsupported/unselected.

§

ProgramPitchNames

Program pitch names.

Fields

§names: Vec<ProgramPitchName>

Advertised pitch names.

§

OpaqueData

Opaque program/unit data.

Fields

§supported: bool

Whether the corresponding interface/data kind is supported.

§data: Vec<u8>

Opaque bytes; empty is a valid supported payload.

§

LatencySamples

The plugin’s reported processing latency in samples (reply to LatencySamples).

Fields

§samples: u32

Latency in samples.

§

TailSamples

The plugin’s reported tail length in samples (reply to TailSamples).

Fields

§samples: u32

Tail length in samples.

§

MidiParameterMapping

The parameter a MIDI controller is mapped to, if any (reply to MidiCcToParameter).

Fields

§id: Option<u32>

The mapped parameter id, or None if unmapped / not implemented.

§

RemappedParameter

A parameter-id compatibility mapping returned by IRemapParamID.

Fields

§id: Option<u32>

The replacement parameter id, or None if unsupported/unmapped.

Trait Implementations§

Source§

impl Debug for HostResponse

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for HostResponse

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for HostResponse

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.