Skip to main content

Module api

Module api 

Source
Expand description

Public entry points for running plugins from other crates (ferraus-synth renders InstrumentSource::Plugin through render_instrument; effect chains use process_effect). Every call starts its own host process, so a misbehaving plugin surfaces as an ErrorKind::Plugin error and never takes the caller down.

Re-exports§

pub use crate::client::PluginFormat;

Structs§

MidiEvent
One MIDI event at an absolute sample frame of the render.
PluginOptions
Everything that configures one plugin run.
PluginRef
A specific plugin: bundle path plus the plugin id inside it.
PluginRun
The result of a run: audio plus everything needed to record and reproduce it.
PluginSession
A loaded plugin in its own host process, for inspection (plugin info, presets, state) or for driving runs by hand.

Enums§

MidiEventKind
Tail
How long to keep processing after the input (or the render duration) ends.

Functions§

process_effect
Run audio through an effect plugin with tail_s seconds of tail. See process_effect_with.
process_effect_with
Run audio through an effect plugin. The output is input length plus the tail, with the plugin’s latency removed so every sample stays at its original position.
read_state_file
Read a state file written by plugin state save (JSON with state_b64), or a raw native blob.
render_instrument
Render an instrument plugin. params are (name or id, value) pairs; state is a native state blob (e.g. from plugin state save). See render_instrument_with.
render_instrument_with
Drive an instrument plugin with MIDI and return duration seconds of audio (plus the tail, see Tail), latency-compensated so events sound at their frame.