Skip to main content

Crate vst3_host

Crate vst3_host 

Source
Expand description

§vst3-host

A safe, simple, and lightweight Rust library for hosting VST3 plugins with audio playback, MIDI, and advanced plugin compatibility features.

The audio path is correctness-first, not yet lock-free/real-time-tuned — see the audio processing notes for the current model and limits.

§Quick Start (Simple API)

use vst3_host::simple;
use vst3_host::midi::MidiChannel;

// Load a plugin with sensible defaults
let mut plugin = simple::load_plugin("/path/to/synth.vst3")?;

// Start processing audio
plugin.start_processing()?;

// Send a MIDI note
plugin.send_midi_note(60, 127, MidiChannel::Ch1)?;

§Advanced Usage (Full Control)

use vst3_host::prelude::*;

// Create a host with custom settings
let mut host = Vst3Host::builder()
    .sample_rate(48000.0)
    .block_size(256)
    .with_process_isolation(true)  // Crash protection
    .add_scan_path("./my-plugins")
    .build()?;

// Load and configure plugin
let mut plugin = host.load_plugin("/path/to/plugin.vst3")?;
plugin.start_processing()?;

// Real-time parameter automation
plugin.update_parameters(|update| {
    update.set(1, 0.5).set(2, 0.8);
    Ok(())
})?;

Re-exports§

pub use audio::read_wav;
pub use audio::AudioBackend;
pub use audio::AudioBuffers;
pub use audio::AudioConfig;
pub use audio::AudioLevels;
pub use audio::AudioStream;
pub use audio::BusArrangements;
pub use audio::BusDirection;
pub use audio::ChannelLevel;
pub use audio::InputSource;
pub use audio::MediaType;
pub use audio::PeakMeter;
pub use audio::RmsWindow;
pub use audio::SignalSource;
pub use audio::SpeakerArrangement;
pub use discovery::discover_plugins_safe;
pub use discovery::get_detailed_plugin_info;
pub use discovery::probe_plugin_info_isolated;
pub use discovery::BusInfo;
pub use discovery::BusLayout;
pub use discovery::ClassInfo;
pub use discovery::DetailedPluginInfo;
pub use discovery::FactoryInfo;
pub use discovery::PluginReport;
pub use discovery::SafeDiscoveryReport;
pub use discovery::SafeDiscoverySkip;
pub use discovery::DEFAULT_PROBE_TIMEOUT;
pub use embed::EditorRect;
pub use embed::EmbeddedEditor;
pub use error::Error;
pub use error::Result;
pub use host::DiscoveryProgress;
pub use host::ProbeResult;
pub use host::Vst3Host;
pub use host::Vst3HostBuilder;
pub use midi::cc;
pub use midi::MidiChannel;
pub use midi::MidiEvent;
pub use midi::NoteExpressionInfo;
pub use midi::NoteExpressionType;
pub use midi::NoteId;
pub use midi_input::bind_to_handle;
pub use midi_input::connect;
pub use midi_input::list_midi_input_ports;
pub use midi_input::MidiInputConnection;
pub use midi_input::MidiInputPort;
pub use parameters::AutomationCurve;
pub use parameters::AutomationPoint;
pub use parameters::Parameter;
pub use parameters::ParameterAutomation;
pub use parameters::ParameterChange;
pub use playback::play_realtime_with_backend;
pub use playback::play_with_backend;
pub use playback::play_with_input_backend;
pub use playback::AudioHandle;
pub use playback::MidiSink;
pub use playback::RtAudioHandle;
pub use plugin::OutputMidiConsumer;
pub use plugin::ParameterEdit;
pub use plugin::ParameterEditKind;
pub use plugin::Plugin;
pub use plugin::PluginInfo;
pub use plugin::PluginPreset;
pub use plugin::PluginUnit;
pub use plugin::ProcessMode;
pub use plugin::WindowHandle;
pub use realtime::RealtimePluginRunner;
pub use realtime::RtControl;
pub use transport::AutomationLane;
pub use transport::BlockEvents;
pub use transport::MidiClip;
pub use transport::Timeline;
pub use window::PluginWindow;

Modules§

audio
Audio types and utilities for VST3 host
backends
Audio backend implementations
discovery
VST3 plugin discovery functionality
embed
Embed a plugin editor inside a host window (e.g. an egui/eframe window), as an alternative to the standalone PluginWindow.
error
Error types for the vst3-host library
host
VST3 host implementation
midi
MIDI types and utilities for VST3 host
midi_input
Bind a live MIDI input device and forward its messages as MidiEvents.
parameters
Parameter types and utilities for VST3 host
playback
Batteries-included audio playback: drive a Plugin from an AudioBackend.
plugin
VST3 plugin wrapper with safe API
prelude
Prelude module for convenient imports
process_isolation
Process isolation for VST3 plugin hosting
realtime
Lock-free real-time plugin runner.
simple
Simplified API for common VST3 hosting tasks.
transport
A sample-accurate musical timeline: schedule MIDI clips and parameter-automation lanes on a beat grid and drive them into a plugin block by block.
window
Plugin window management