C# wrapper for the OwnVst3 native library to work with VST3 plugins. Includes cross-platform native editor support (Windows, macOS, Linux).
$ dotnet add package OwnAudioVstA powerful, cross-platform C# wrapper for VST3 plugins with built-in visual editor support using Avalonia UI.
Install via NuGet Package Manager:
dotnet add package OwnVst3Host
Or via Package Manager Console:
Install-Package OwnVst3Host
using OwnVST3Host;
// Create wrapper instance (automatic platform detection)
var plugin = new OwnVst3Wrapper();
// Load a VST3 plugin
plugin.LoadPlugin("/path/to/plugin.vst3");
// Initialize audio engine
plugin.Initialize(sampleRate: 44100, bufferSize: 512);
// Get plugin information
Console.WriteLine($"Name: {plugin.Name}");
Console.WriteLine($"Vendor: {plugin.Vendor}");
Console.WriteLine($"Type: {(plugin.IsInstrument ? "Instrument" : "Effect")}");
// Clean up
plugin.Dispose();
using OwnVST3Host.Extensions;
// Check if plugin has a visual editor
if (plugin.HasEditor())
{
// Open editor in a new window
var editorWindow = plugin.ShowEditor();
// Check if editor is currently open
bool isOpen = editorWindow.IsEditorActive;
}
// Get parameter count
int paramCount = plugin.GetParameterCount();
// Get parameter information
var paramInfo = plugin.GetParameterInfo(0);
Console.WriteLine($"{paramInfo.Name}: {paramInfo.CurrentValue}");
// Set parameter value (normalized 0.0 - 1.0)
plugin.SetParameterValue(0, 0.5);
// Get current parameter value
double value = plugin.GetParameterValue(0);
// Prepare audio buffers
float[] inputBuffer = new float[512];
float[] outputBuffer = new float[512];
// Process audio
plugin.ProcessAudio(inputBuffer, outputBuffer, sampleCount: 512);
// Send a MIDI note on message
plugin.SendMidiEvent(
status: 0x90, // Note On
data1: 60, // Middle C
data2: 100 // Velocity
);
// Send a MIDI note off message
plugin.SendMidiEvent(
status: 0x80, // Note Off
data1: 60, // Middle C
data2: 0 // Velocity
);
// Get default VST3 directories for current platform
string[] directories = OwnVst3Wrapper.GetDefaultVst3Directories();
// Find all VST3 plugins in default locations
List<string> plugins = OwnVst3Wrapper.FindVst3Plugins();
foreach (string pluginPath in plugins)
{
Console.WriteLine($"Found: {Path.GetFileName(pluginPath)}");
}
// Get diagnostic information
string info = OwnVst3Wrapper.GetVst3DirectoriesInfo();
Console.WriteLine(info);
| Platform | Supported | Architectures |
|---|---|---|
| Windows | ✅ | x64, x86 |
| macOS | ✅ | x64, ARM64 (Apple Silicon) |
| Linux | ✅ | x64 |
Native libraries are automatically selected based on your runtime platform and architecture.
| Method | Description |
|---|---|
LoadPlugin(path) | Load a VST3 plugin from the specified path |
Initialize(sampleRate, bufferSize) | Initialize the audio processing engine |
ProcessAudio(input, output, samples) | Process audio buffers |
Dispose() | Release all resources and clean up |
| Method | Description |
|---|---|
HasEditor() | Check if the plugin has a visual editor |
ShowEditor() | Open the editor in a new window |
ShowEditor(owner) | Open the editor as a child of the owner window |
IsEditorActive | Check if the editor is currently open |
| Method | Description |
|---|---|
GetParameterCount() | Get the total number of parameters |
GetParameterValue(index) | Get the current value of a parameter (0.0 - 1.0) |
SetParameterValue(index, value) | Set a parameter value (0.0 - 1.0) |
GetParameterInfo(index) | Get parameter metadata (name, units, etc.) |
| Method | Description |
|---|---|
SendMidiEvent(status, data1, data2) | Send a MIDI message to the plugin |
IsInstrument | Check if the plugin is a MIDI instrument |
| Property | Description |
|---|---|
Name | Plugin name |
Vendor | Plugin vendor/manufacturer |
Version | Plugin version string |
IsInstrument | Whether the plugin is an instrument |
IsEffect | Whether the plugin is an effect |
This project is licensed under the MIT License. See the LICENSE.txt file for details.