pub enum HostCommand {
Show 20 variants
LoadPlugin {
path: String,
sample_rate: f64,
block_size: u32,
tempo: f64,
time_sig_numerator: i32,
time_sig_denominator: i32,
},
UnloadPlugin,
CreateGui,
CloseGui,
StartProcessing,
StopProcessing,
SetParameter {
id: u32,
value: f64,
},
SetParameterAt {
id: u32,
value: f64,
offset: i32,
},
GetParameter {
id: u32,
},
GetAllParameters,
FormatParameter {
id: u32,
normalized: f64,
},
SendMidi {
event: MidiEvent,
},
Process {
inputs: Vec<Vec<f32>>,
frames: u32,
},
SaveState,
LoadState {
data: Vec<u8>,
},
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,
},
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.
SetParameter
Set a parameter (normalized 0.0..=1.0).
SetParameterAt
Schedule a parameter change at a sample offset within the next process block.
Fields
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.
Process
Process one block of audio. inputs is per-channel; frames is the block length.
Fields
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.
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).
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