πΈ L4 Plugin Architecture - L3 Orchestration (08_10_00)¶
Integra engines L3 (DSP puro) en arquitectura L4 (Simple Plugins).
π¦ Componentes¶
1. L3EngineIntegrator¶
Wrapper que convierte L3 engine en L4 plugin completo.
// Create L3 engine
auto engine = engineFactory.createEngine("Compressor");
// Wrap in L4
L3EngineIntegrator integrator(std::move(engine));
integrator.exposeParameter("threshold", -60.0f, 0.0f, -20.0f);
integrator.exposeParameter("ratio", 1.0f, 20.0f, 4.0f);
// Use as plugin
integrator.prepareToPlay(44100.0, 512, 2);
integrator.process(buffer);
2. ParameterMapper¶
Mapea parΓ‘metros L3 internos β L4 automatable.
ParameterMapper mapper;
mapper.mapParameter("internal_cutoff", "Cutoff", 20.0f, 20000.0f);
mapper.mapParameter("internal_q", "Resonance", 0.1f, 10.0f);
3. StatePersistence¶
Guarda/restaura estado completo del plugin.
// Save preset
auto state = integrator.getState();
saveToFile("MyPreset.dat", state);
// Load preset
auto state = loadFromFile("MyPreset.dat");
integrator.setState(state);
π Features¶
- β Zero-copy integration: L3 engine procesa directamente
- β Automatic parameter smoothing: Sin clicks
- β Smooth bypass: Transiciones suaves
- β State persistence: Presets completos
- β DAW automation: ParΓ‘metros expuestos
π Example: Complete Compressor Plugin¶
class CompressorPlugin {
public:
CompressorPlugin() {
// Create L3 compressor engine
auto engine = EngineFactory::getInstance()
.createEngine("DynamicsCompressor");
// Integrate into L4
m_integrator = std::make_unique<L3EngineIntegrator>(std::move(engine));
// Expose parameters
m_integrator->exposeParameter("threshold", -60.0f, 0.0f, -20.0f, "Threshold (dB)");
m_integrator->exposeParameter("ratio", 1.0f, 20.0f, 4.0f, "Ratio");
m_integrator->exposeParameter("attack", 0.1f, 100.0f, 5.0f, "Attack (ms)");
m_integrator->exposeParameter("release", 10.0f, 1000.0f, 100.0f, "Release (ms)");
m_integrator->exposeParameter("makeup", -20.0f, 20.0f, 0.0f, "Makeup Gain (dB)");
}
void prepareToPlay(double sr, int blockSize) {
m_integrator->prepareToPlay(sr, blockSize, 2);
}
void processBlock(AudioBuffer<float>& buffer) {
m_integrator->process(buffer);
}
void setParameter(const std::string& id, float value) {
m_integrator->setParameter(id, value);
}
private:
std::unique_ptr<L3EngineIntegrator> m_integrator;
};
π― L3 β L4 Integration Pattern¶
βββββββββββββββββββββββββββββββββββββββ
β L4 Plugin (Host-facing) β
β - VST3/AU/AAX wrapper β
β - Parameter automation β
β - Preset management β
β β
β βββββββββββββββββββββββββββββββββ β
β β L3EngineIntegrator β β
β β - Parameter mapping β β
β β - State persistence β β
β β - Bypass handling β β
β β β β
β β βββββββββββββββββββββββββββ β β
β β β L3 DSP Engine β β β
β β β - Pure processing β β β
β β β - No GUI, no params β β β
β β β - Real-time safe β β β
β β βββββββββββββββββββββββββββ β β
β βββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββ
Status: β Phase 1 Complete Dependencies: 08_00, 08_02 Version: 1.0.0