ποΈ 08_00 Plugin Infrastructure¶
π Overview¶
This module provides the foundational infrastructure for all AudioLab plugins (L4 and L5). It contains the core interfaces, base framework classes, utilities, and developer tools needed to build professional audio plugins.
π Module Structure¶
08_00_plugin_infrastructure/
βββ 08_00_00_contracts/ β Plugin interface contracts
β βββ IPluginProcessor.hpp β Core lifecycle interface
β βββ IStateManager.hpp β State persistence interface
β βββ IParameterHost.hpp β Parameter management interface β¨ REFACTORED
β βββ IAudioEngine.hpp β DSP processing interface
β βββ IModulationTarget.hpp β Modulation system interface β¨ REFACTORED
β βββ IUIController.hpp β GUI communication interface β¨ REFACTORED
β
βββ 08_00_01_l4_framework/ β L4 plugin framework (single engine) β¨ NEW
β βββ include/
β β βββ PluginL4Base.hpp β Base class for simple plugins
β β βββ L4ParameterManager.hpp
β β βββ L4StateManager.hpp
β β βββ L4ProcessingContext.hpp
β βββ src/
β
βββ 08_00_02_l5_framework/ β L5 suite framework (multi-engine) β¨ NEW
β βββ include/
β β βββ PluginL5Base.hpp β Base class for suite plugins
β β βββ L5SlotManager.hpp β Manages plugin slots
β β βββ L5RouterManager.hpp β Signal routing between slots
β β βββ L5GlobalParameterManager.hpp
β βββ src/
β
βββ 08_00_03_utilities/ β Helper utilities β¨ NEW
β βββ include/
β βββ ParameterHelpers.hpp β Conversion, formatting functions
β
βββ 08_00_04_developer_tools/ β Development utilities β¨ NEW
βββ include/
β βββ PluginValidator.hpp β Plugin validation
β βββ MockPlugin.hpp β Mock plugin for testing
βββ src/
β¨ What's New (2025-10-09)¶
Phase 1: Interface Refactoring β ¶
All plugin interfaces now inherit from 04_CORE atomic interfaces:
| Interface | Inherits From |
|---|---|
IParameterHost |
core::IObservable + core::IMessageable |
IModulationTarget |
core::IObservable |
IUIController |
core::IObservable + core::IMessageable |
Namespace Migration: All interfaces now use audiolab::plugins namespace.
Phase 2: L4 Framework β ¶
Complete framework for simple single-engine plugins:
- PluginL4Base - Abstract base class for L4 plugins
- L4ParameterManager - Parameter registration and management
- L4StateManager - Preset save/load (JSON format)
- L4ProcessingContext - Timing and transport information
- ParameterHelpers - Conversion utilities (normalizedβnative, dBβlinear, etc.)
Phase 3: L5 Framework β ¶
Complete framework for suite plugins with multiple engines:
- PluginL5Base - Abstract base class for L5 suites
- L5SlotManager - Manages multiple plugin slots
- L5RouterManager - Signal routing with cycle detection
- L5GlobalParameterManager - Hierarchical parameter system
Phase 4: Developer Tools β ¶
Tools to help plugin developers:
- PluginValidator - Validates plugins for common issues (RT-safety, parameters)
- MockPlugin - Mock implementation for unit testing
π― Quick Start¶
Creating an L4 Plugin (Simple)¶
#include "08_00_01_l4_framework/include/PluginL4Base.hpp"
class MyCompressor : public PluginL4Base {
public:
MyCompressor() {
// Register parameters
registerParameter(new Parameter("threshold", "Threshold",
-60.0f, 0.0f, -20.0f));
registerParameter(new Parameter("ratio", "Ratio",
1.0f, 20.0f, 4.0f));
}
const char* getName() const override { return "TS Compressor"; }
const char* getVersion() const override { return "1.0.0"; }
void processBlock(AudioBuffer& buffer,
const ProcessContext& context) override {
if (isBypassed()) return;
float threshold = getParameterValue("threshold");
float ratio = getParameterValue("ratio");
// DSP processing...
}
};
Creating an L5 Suite Plugin (Complex)¶
#include "08_00_02_l5_framework/include/PluginL5Base.hpp"
class MyChannelStrip : public PluginL5Base {
public:
MyChannelStrip() {
// Add slots
addSlot("gate", new GatePlugin());
addSlot("eq", new EQPlugin());
addSlot("compressor", new CompressorPlugin());
// Setup serial routing
routeSlots("gate", "eq");
routeSlots("eq", "compressor");
// Register global parameters
registerParameter(new Parameter("input_gain", ...));
registerParameter(new Parameter("output_gain", ...));
}
const char* getName() const override { return "TS Channel Strip"; }
const char* getVersion() const override { return "1.0.0"; }
void processBlock(AudioBuffer& buffer,
const ProcessContext& context) override {
// Apply input gain
buffer.applyGain(getParameterValue("input_gain"));
// Process through slots
m_slotManager->processSlots(buffer, context);
// Apply output gain
buffer.applyGain(getParameterValue("output_gain"));
}
};
π§ͺ Testing¶
All components have comprehensive unit tests:
# Run interface tests
./test_plugin_interfaces
# Run L4 framework tests
./test_l4_framework
# Run L5 framework tests
./test_l5_framework
Test Coverage: - β Interface inheritance verification - β Namespace correctness - β MockPlugin functionality - β L4/L5 lifecycle management - β SlotManager operations - β RouterManager cycle detection - β Parameter delegation
π Architecture Diagram¶
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 04_CORE (Foundation Layer) β
β βββ IObservable β
β βββ IMessageable β
β βββ IAudioProcessor β
β βββ IResettable β
β βββ ISerializable β
ββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β inherits
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 08_00_00_contracts (Plugin Contracts) β
β βββ IPluginProcessor (inherits from core) β
β βββ IStateManager (inherits from core) β
β βββ IParameterHost (inherits from core) β¨ β
β βββ IAudioEngine (inherits from core) β
β βββ IModulationTarget (inherits from core) β¨ β
β βββ IUIController (inherits from core) β¨ β
ββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β implements
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 08_00_01_l4_framework (Simple Plugins) β
β PluginL4Base β Implements all 4 interfaces β
β βββ Used by: Compressor, Reverb, EQ, etc. β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 08_00_02_l5_framework (Suite Plugins) β
β PluginL5Base β Multi-slot architecture β
β βββ Used by: Channel Strip, Mastering Suite β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Dependencies¶
Internal Dependencies¶
- 04_CORE - Core interfaces (IObservable, IMessageable, etc.)
- 03_INFRA - Testing framework (Catch2)
External Dependencies¶
- C++17 - Language standard
- Standard Library -
<memory>,<string>,<vector>,<map>, etc.
π Implementation Status¶
| Component | Status | Coverage |
|---|---|---|
| Interface Refactoring | β Complete | 100% |
| L4 Framework | β Complete | ~80% |
| L5 Framework | β Complete | ~80% |
| Utilities | π‘ Partial | Basic helpers |
| Developer Tools | π‘ Partial | Validator stubs |
| Documentation | β Complete | All modules |
| Tests | β Complete | 30+ test cases |
π Learning Resources¶
- Start Here: 08_00_00_contracts/README.md
- L4 Tutorial: 08_00_01_l4_framework/TUTORIAL.md (coming soon)
- L5 Guide: 08_00_02_l5_framework/GUIDE.md (coming soon)
- Examples: ../../08_13_products/
π Next Steps¶
After completing this module, you can:
- β
Build L4 plugins using
PluginL4Base - β
Build L5 suites using
PluginL5Base - β Integrate DSP engines (see
08_02_dsp_integration_layer) - β Add UI components (see
08_04_ui_composition_system) - β Create actual products (see
08_13_products)
π Support¶
- Issues: Report in main repo issue tracker
- Questions: See
IMPLEMENTATION_PLAN.mdfor detailed specs - Contributing: Follow AudioLab contribution guidelines
Status: β COMPLETE (All 4 phases finished) Last Updated: 2025-10-09 Total Effort: ~10-14 hours Maintainer: AudioLab Core Team
Built with β€οΈ using Claude Code parallel development workflow