pub enum HostCommand {
Show 58 variants
LoadPlugin {
path: String,
sample_rate: f64,
block_size: u32,
tempo: f64,
time_sig_numerator: i32,
time_sig_denominator: i32,
class_id: Option<String>,
},
UnloadPlugin,
CreateGui,
CloseGui,
StartProcessing,
StopProcessing,
Reconfigure {
sample_rate: f64,
block_size: u32,
},
SetProcessMode {
mode: ProcessMode,
},
SetParameter {
id: u32,
value: f64,
},
SetParameterAt {
id: u32,
value: f64,
offset: i32,
},
SetTempo {
bpm: f64,
},
SetTimeSignature {
numerator: i32,
denominator: i32,
},
SetPlaying {
playing: bool,
},
GetParameter {
id: u32,
},
GetAllParameters,
FormatParameter {
id: u32,
normalized: f64,
},
SendMidi {
event: MidiEvent,
},
SendMidiAt {
event: MidiEvent,
sample_offset: i32,
},
SendPluginEvent {
event: PluginEvent,
},
MidiPanic,
Process {
inputs: Vec<Vec<f32>>,
frames: u32,
},
ProcessBuses {
inputs: Vec<AudioBusBuffer>,
outputs: Vec<AudioBusConfig>,
frames: u32,
},
AudioBusLayout,
SaveState,
LoadState {
data: Vec<u8>,
context: StateContext,
},
NoteOn {
channel: u8,
note: u8,
velocity: u8,
sample_offset: i32,
},
NoteOff {
note_id: i32,
sample_offset: i32,
},
SendNoteExpression {
note_id: i32,
kind: NoteExpressionType,
value: f64,
sample_offset: i32,
},
NoteExpressions {
bus: i32,
channel: i16,
},
SelectProgram {
unit_id: i32,
program_index: i32,
},
SetBusActive {
media_type: MediaType,
direction: BusDirection,
bus_index: i32,
active: bool,
},
BusArrangements,
SetBusArrangements {
inputs: Vec<SpeakerArrangement>,
outputs: Vec<SpeakerArrangement>,
},
GetUnits,
GetSelectedUnit,
SelectUnit {
unit_id: i32,
},
ProgramPitchNames {
program_list_id: i32,
program_index: i32,
},
GetProgramData {
program_list_id: i32,
program_index: i32,
},
SetProgramData {
program_list_id: i32,
program_index: i32,
data: Vec<u8>,
},
GetUnitData {
unit_id: i32,
},
SetUnitData {
unit_id: i32,
data: Vec<u8>,
},
BeginHostEdit {
parameter_id: u32,
},
EndHostEdit {
parameter_id: u32,
},
SendMidiLearn {
bus: i32,
channel: i16,
controller: u16,
},
SetAutomationState {
state: AutomationState,
},
RemapParameterId {
old_plugin_uid: String,
old_param_id: u32,
},
LatencySamples,
TailSamples,
MidiCcToParameter {
bus: i32,
channel: i16,
cc: u16,
},
TakeParameterEdits,
TakeParameterChanges,
TakeHostNotifications,
TakeDataExchangeBlocks,
ExecuteContextMenuItem {
menu_id: u64,
item_id: u32,
},
DismissContextMenu {
menu_id: u64,
},
TakeRestartFlags,
ServiceHostRequests,
Shutdown,
}Expand description
Commands that can be sent to the isolated plugin process.
This enum is the single source of truth for the isolation IPC protocol — the helper binary imports it from here rather than redefining it, so the two halves can never drift apart.
Variants§
LoadPlugin
Load a plugin from the specified path, configured for the given audio settings.
Fields
UnloadPlugin
Unload the current plugin
CreateGui
Create plugin GUI
CloseGui
Close plugin GUI
StartProcessing
Start the plugin’s audio processing.
StopProcessing
Stop the plugin’s audio processing.
Reconfigure
Re-run the plugin’s setupProcessing at a new sample rate / block size.
SetProcessMode
Switch the plugin between real-time and offline (kOffline) processing.
Fields
mode: ProcessModeDesired process mode.
SetParameter
Set a parameter (normalized 0.0..=1.0).
SetParameterAt
Schedule a parameter change at a sample offset within the next process block.
Fields
SetTempo
Set the transport tempo (BPM) advertised in the plugin’s host ProcessContext, taking
effect on the next processed block.
SetTimeSignature
Set the transport time signature advertised in the plugin’s host ProcessContext,
taking effect on the next processed block.
Fields
SetPlaying
Toggle the transport playing state (kPlaying) in the plugin’s host ProcessContext,
taking effect on the next processed block.
GetParameter
Read a parameter’s current normalized value.
GetAllParameters
Read all parameters.
FormatParameter
Ask the plugin to format a normalized value as a display string.
SendMidi
Send a MIDI event to the plugin.
SendMidiAt
Schedule a MIDI event at a sample offset within the next process block.
Fields
SendPluginEvent
Send a fully owned VST3 event, including pointer-backed SysEx/text payloads.
Fields
event: PluginEventThe event to deliver.
MidiPanic
Release all notes currently tracked by the plugin.
Process
Process one block of audio. inputs is per-channel; frames is the block length.
Fields
ProcessBuses
Process one block while preserving every VST3 audio bus.
Fields
inputs: Vec<AudioBusBuffer>Input buses in bus-index order, including inactive buses.
outputs: Vec<AudioBusConfig>Output bus shapes and activation flags.
AudioBusLayout
Query per-bus channel counts and activation state.
SaveState
Serialize the plugin’s current state to an opaque byte blob.
LoadState
Restore the plugin’s state from a blob previously returned by SaveState.
Fields
context: StateContextWhere the bytes came from, so the helper’s setState stream carries the same
IStreamAttributes an in-process restore would.
Absent on the wire means crate::plugin::StateContext::Project, which is what
every release before this field sent — so a new helper reads an old host’s
LoadState, and an old helper simply ignores a field it does not know.
NoteOn
Start a note (MPE). The helper’s plugin allocates the per-voice note id and returns
it in HostResponse::NoteStarted (in isolation the helper owns the real plugin).
Fields
NoteOff
Release a note previously started with HostCommand::NoteOn.
Fields
SendNoteExpression
Send a per-note expression value (normalized 0..1) for a voice. The expression
dimension crosses the boundary as the serializable NoteExpressionType enum.
Fields
kind: NoteExpressionTypeWhich note-expression dimension to set.
NoteExpressions
Enumerate the per-note expressions the plugin advertises (INoteExpressionController).
SelectProgram
Select a program in a unit’s program list (IUnitInfo).
Fields
SetBusActive
Activate or deactivate a single bus (IComponent::activateBus).
Fields
direction: BusDirectionWhether the bus is an input or an output.
BusArrangements
Query each audio bus’s current speaker arrangement (IAudioProcessor::getBusArrangement).
SetBusArrangements
Request specific speaker arrangements for the audio buses (re-runs setupProcessing).
Fields
inputs: Vec<SpeakerArrangement>Desired arrangement per input bus, in bus-index order.
outputs: Vec<SpeakerArrangement>Desired arrangement per output bus, in bus-index order.
GetUnits
Enumerate the plugin’s units and their program lists (IUnitInfo).
GetSelectedUnit
Query the currently selected unit.
SelectUnit
Select a unit.
ProgramPitchNames
Query pitch names for a program.
GetProgramData
Read opaque data for a program.
SetProgramData
Restore opaque data for a program.
Fields
GetUnitData
Read opaque data for a unit.
SetUnitData
Restore opaque data for a unit.
BeginHostEdit
Begin a host-edit session.
EndHostEdit
End a host-edit session.
SendMidiLearn
Forward live MIDI controller input to IMidiLearn.
SetAutomationState
Report the current automation state.
Fields
state: AutomationStateAutomation state.
RemapParameterId
Map a parameter id from a plugin class this controller replaces (IRemapParamID).
Fields
LatencySamples
Query the plugin’s reported processing latency in samples
(IAudioProcessor::getLatencySamples).
TailSamples
Query the plugin’s reported tail length in samples (IAudioProcessor::getTailSamples).
MidiCcToParameter
Resolve a MIDI controller to the parameter it’s mapped to (IMidiMapping).
Fields
TakeParameterEdits
Drain the ordered parameter-edit gesture log (begin/change/end) the helper’s plugin has accumulated from its editor since the last poll.
TakeParameterChanges
Drain processor- and controller-originated parameter value feedback.
TakeHostNotifications
Drain ordered IComponentHandler2 requests from the helper.
TakeDataExchangeBlocks
Dispatch and drain owned VST3 data-exchange blocks from the helper.
ExecuteContextMenuItem
Execute an item from a pending plugin-provided context menu.
DismissContextMenu
Dismiss a pending plugin-provided context menu.
Fields
Host-assigned popup id.
TakeRestartFlags
Drain accumulated restartComponent flags without applying lifecycle changes.
ServiceHostRequests
Drain restart flags and apply required lifecycle changes in the helper.
Shutdown
Shutdown the helper process
Trait Implementations§
Source§impl Clone for HostCommand
impl Clone for HostCommand
Source§fn clone(&self) -> HostCommand
fn clone(&self) -> HostCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more