This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
- NO PLACEHOLDERS. NO FALLBACKS. FAIL HARD!!! If the code is not implemented, THROW AN ERROR!!! Fail LOUDLY by throwing an exception.
- NO DUPLICATION. Move files, code elements instead of copying them. Search for elements before adding them.
- FP style. No interfaces, classes, or mutable state. Pure functions with no side effects.
- Tests must FAIL HARD. Don't add allowances and print warnings. Just FAIL!
- Keep functions under 20 lines long.
- Do not use Git commands unless explicitly requested
- Keep files under 400 LOC, even tests
- NEVER use the late keyword
- Document all public functions with Dart /// doc, especially the important ones
- Don't use if statements. Use pattern matching or ternaries instead.
- Only native machine code. No AOT or Dart runtime!
This a Steinberg VST® 3 toolkit for Dart and Flutter. Use this toolkit to implement VST® plugins and VST® hosts. This toolkit enables anyone to create VST® 3 plugins with pure Dart and Flutter.
VST® is a trademark of Steinberg Media Technologies GmbH.
The main project is flutter_vst3. Use this to create your own VST® 3 plugins with Flutter and Dart. There is also VST3 host and audio graph system written in Dart with native C++ components. The project enables loading VST3 plugins into a customizable audio graph that can be controlled from Dart and Flutter applications.
Download Steinberg SDK here: https://www.steinberg.net/vst3sdk curl -L -o vst3sdk.zip https://www.steinberg.net/vst3sdk
- dart_vst_host - High-level Dart bindings for VST® 3 plugin hosting with RAII resource management
- dart_vst_graph - Audio graph system allowing connection of VST® plugins, mixers, splitters, and gain nodes
- flutter_vst3 - Complete framework for building VST® 3 plugins with Flutter UI and Dart audio processing (auto-generates ALL C++ from Dart parameter definitions)
- flutter_ui - Desktop Flutter application providing a GUI for the VST host
- native/ - C++ implementation of VST3 host and audio graph using Steinberg VST3 SDK
- vsts/ - Individual VST plugin packages, each builds its own .vst3 plugin (flutter_reverb, echo)
The system uses FFI to bridge Dart and C++. The native library (libdart_vst_host.dylib/so/dll) contains both VST host functionality and the audio graph implementation. Dart packages provide high-level APIs that manage native resource lifetimes using RAII patterns.
The audio graph supports:
- VST3 plugin nodes
- Mixer nodes (multiple stereo inputs → single stereo output)
- Splitter nodes (single stereo input → multiple stereo outputs)
- Gain nodes with dB control
- Arbitrary connections between compatible nodes
- VST3_SDK_DIR environment variable must point to Steinberg VST3 SDK root (or use bundled
vst3sdk/directory) - CMake 3.20+
- C++17 compiler
- Dart SDK 3.0+
- Flutter (for UI component)
Setup (First time):
./setup.sh # Downloads Steinberg VST® 3 SDK and builds native library automaticallyPrimary build targets using Makefile:
# Build Flutter Dart Reverb VST3 plugin (default target)
make
# Build specific plugins
make reverb-vst # Build Flutter Reverb VST3
make echo-vst # Build Echo VST3
# Install to system VST folder
make install
# Build native library (required for all Dart components)
make native
# Clean and rebuild
make clean reverb-vstManual Native Library Build:
cd native/
mkdir build && cd build
cmake ..
make
# Copies libdart_vst_host.dylib to project root for Dart tests
cp libdart_vst_host.dylib ../../VST3 Plugins (auto-generated from Dart parameter definitions):
# Build flutter_reverb plugin
cd vsts/flutter_reverb/
mkdir build && cd build
cmake ..
make
# Output: flutter_reverb.vst3 bundle
# Build echo plugin
cd vsts/echo/
mkdir build && cd build
cmake ..
make
# Output: echo.vst3 bundleDart Packages:
# Install dependencies for all packages
make dart-deps
# Or manually:
cd dart_vst_host/ && dart pub get
cd dart_vst_graph/ && dart pub get
cd dart_vst3_bridge/ && dart pub getFlutter UI:
make flutter-deps
cd flutter_ui/
flutter runRun all tests:
make testRun individual package tests:
make test-host # dart_vst_host tests
make test-graph # dart_vst_graph tests
# Manual test runs:
cd dart_vst_host/ && dart test
cd dart_vst_graph/ && dart test
cd vsts/flutter_reverb/ && dart test
cd vsts/echo/ && dart testImportant: Tests require the native library to be built and present in the working directory. The test framework will fail with a clear error message if libdart_vst_host.dylib is missing.
The flutter_vst3 framework now auto-generates ALL C++ boilerplate from Dart parameter definitions:
- Define parameters in Dart with doc comments:
class ReverbParameters {
/// Controls the size of the reverb space (0% = small room, 100% = large hall)
double roomSize = 0.5;
/// Controls high frequency absorption (0% = bright, 100% = dark)
double damping = 0.5;
}- CMake auto-generates C++ files:
add_dart_vst3_plugin(flutter_reverb reverb_parameters.dart
BUNDLE_IDENTIFIER "com.yourcompany.vst3.flutterreverb"
COMPANY_NAME "Your Company"
PLUGIN_NAME "Flutter Reverb"
)- Generated files (completely hidden):
generated/flutter_reverb_controller.cppgenerated/flutter_reverb_processor.cppgenerated/flutter_reverb_factory.cppinclude/flutter_reverb_ids.h
native/include/dart_vst_host.h- C API for VST hostingnative/include/dvh_graph.h- C API for audio graphdart_vst_host/lib/src/host.dart- High-level VST host wrapperdart_vst_graph/lib/src/bindings.dart- FFI bindings and VstGraph classdart_vst3_bridge/native/cmake/VST3Bridge.cmake- Shared CMake functions for plugin buildsvsts/*/CMakeLists.txt- Individual plugin build configurationsflutter_ui/lib/main.dart- Flutter application entry pointMakefile- Primary build system with all targetssetup.sh- Environment setup script
- Run
./setup.shfor first-time setup (downloads SDK, builds native library) - Use
maketo build Flutter Dart Reverb VST3 plugin - Use
make testto run all tests and verify FFI bindings - Use Flutter UI (
make run-flutter) for interactive testing - Build individual VST plugins in their respective
vsts/directories - Each plugin package is self-contained and builds its own .vst3 bundle
- Tests will fail loudly if native dependencies are missing
- macOS: Outputs
.dyliband.vst3bundle - Linux: Outputs
.solibrary - Windows: Outputs
.dlllibrary - All platforms require VST3 SDK and appropriate build tools
- Use
make installto install VST3 plugins to system folders automatically
# Validate built plugins
./validate_echo.sh # Runs VST3 validator on echo plugin