Plugins (app/plugins/)
Plugin window management, swapping, and macro parameter mapping.
Architecture
Files
| File | Purpose |
|---|---|
PluginManager.cpp | Opening/closing plugin editor windows, changing plugins on tracks. Handles plugin scanning, window lifecycle, and the changePlugin flow (remove old → insert new → restore position). |
MacroMapper.cpp/.h | Maps semantic macro names (e.g., brightness, drive, comp_thresh) to actual plugin parameter names and indices. Used by both .bird step automation and the AI copilot’s set_plugin_param tool. |
MacroMapper/ | Per-plugin macro mapping profiles (future: JSON definitions for each supported plugin). |
Macro Mapping System
The macro system lets.bird files and the AI copilot use semantic names instead of plugin-specific parameter names:
- Synth:
brightness/cutoff,resonance,attack,decay,release - Drums/Bass:
pitch,decay,volume,drive - Effects:
mix,decay,width - Channel Strip (Console 1):
input_gain,comp_thresh,comp_ratio,eq_mid_gain,low_cut
documentation/bird.md for the complete macro reference.
Design Principles
- Plugin window ownership — Plugin windows are owned by Tracktion’s
UIBehavioursystem viaExtendedUIBehaviour. The plugin manager requests windows through the engine, not by creating JUCE components directly. - Async plugin loading — Plugins load asynchronously. After
changePlugin(), there’s a settling period whereaudioProcessorParameterChangedfires as the plugin initializes. TheisLoadFinishedgate prevents these from triggering erroneous commits. - Normalized values — All macro mappings work with normalized
0.0–1.0values. The mapping layer handles conversion from semantic values (e.g., percentage 0–100) to normalized plugin parameters. - Plugin scanning —
scanForPlugins()discovers available VST3/AU plugins on the system. Results are cached and sent to React viagetAvailablePluginsfor the plugin selector UI.
Extending
To add macro support for a new plugin:- Use
tools/scan_plugin_params.cppto dump the plugin’s parameter names - Add the parameter name mappings in
MacroMapper.cpp - Test with
.birdstep automation to verify the mapping