Skip to main content

load_plugin

Function load_plugin 

Source
pub fn load_plugin<P: AsRef<Path>>(path: P) -> Result<Plugin>
Expand description

Load a VST3 plugin with sensible defaults.

This function creates a host with default audio settings and loads the specified plugin. It’s the quickest way to get started with plugin hosting.

§Default Settings

  • Sample rate: 44100 Hz
  • Block size: 512 samples
  • Input channels: 2 (stereo)
  • Output channels: 2 (stereo)
  • Process isolation: disabled (in-process). Use load_plugin_isolated to opt in.

§Arguments

  • path - Path to the VST3 plugin (.vst3 file or directory)

§Returns

A loaded and configured plugin ready for audio processing.

§Examples

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

let mut plugin = simple::load_plugin("/Applications/Dexed.vst3")?;
plugin.start_processing()?;
plugin.send_midi_note(60, 100, MidiChannel::Ch1)?;