Your SpawnClone plugin now has complete live performance capabilities integrated directly into the main PluginProcessor!
#include "processor/LivePerformanceIntegration.h"
#include "ai/LivePerformanceEngine.h" // For PerformanceMode enum
// Public methods added:
void setLivePerformanceEnabled(bool enabled);
bool isLivePerformanceEnabled() const;
void setLivePerformanceMode(spawnclone::ai::LivePerformanceEngine::PerformanceMode mode);
void configureLiveAIModulation(bool enabled, float intensity = 0.5f);
void triggerLivePatternGeneration();
spawnclone::processor::LivePerformanceIntegration* getLivePerformanceIntegration();
// Private member added:
std::unique_ptr<spawnclone::processor::LivePerformanceIntegration> livePerformanceIntegration;// Initialize Live Performance System Integration
livePerformanceIntegration = std::make_unique<spawnclone::processor::LivePerformanceIntegration>();
// Initialize with audio preview engine
livePerformanceIntegration->initialize(audioPreviewEngine.get(), nullptr);// processBlock() - Real-time live performance processing
if (livePerformanceIntegration && livePerformanceIntegration->isLivePerformanceEnabled())
{
auto transportInfo = getHostTransportInfo();
livePerformanceIntegration->processMIDI(midiMessages, transportInfo.ppqPosition, transportInfo.isPlaying);
livePerformanceIntegration->updatePerformanceState(transportInfo.ppqPosition, transportInfo.isPlaying);
}// prepareToPlay()
if (livePerformanceIntegration)
{
livePerformanceIntegration->prepareToPlay(sampleRate, samplesPerBlock);
}
// releaseResources()
if (livePerformanceIntegration)
{
livePerformanceIntegration->releaseResources();
}- Added
getDaemonClient()method toONNXModelManagerfor shared access - Added
getONNXModelManager()method toAIGenerationEnginefor integration - Updated daemon client to use
shared_ptrfor safe sharing between components
// In your PluginEditor or ParameterManager
processor.setLivePerformanceEnabled(true);using PerformanceMode = spawnclone::ai::LivePerformanceEngine::PerformanceMode;
// Pattern Generation only
processor.setLivePerformanceMode(PerformanceMode::PatternGeneration);
// AI Parameter Modulation only
processor.setLivePerformanceMode(PerformanceMode::ParameterModulation);
// Full live performance (all features)
processor.setLivePerformanceMode(PerformanceMode::FullLive);// Enable AI-driven synthesis parameter control
processor.configureLiveAIModulation(true, 0.7f); // enabled, intensity 70%// Trigger pattern generation on-demand
processor.triggerLivePatternGeneration();// Get direct access for advanced configuration
auto* liveIntegration = processor.getLivePerformanceIntegration();
if (liveIntegration)
{
// Configure trigger systems
liveIntegration->configureTriggers(
spawnclone::ai::LivePerformanceEngine::TriggerType::BeatSync,
0.1f, // probability
16 // beat division
);
// Set up pattern evolution
liveIntegration->startPatternEvolution(0.15f); // 15% evolution rate
}✅ Real-time Pattern Generation - AI-driven patterns using optimized ONNX daemon
✅ Dynamic Parameter Modulation - AI analyzes patterns and modulates synthesis parameters
✅ Pattern Evolution - Patterns gradually morph and evolve during performance
✅ Multiple Trigger Systems - Manual, beat-sync, probability-based, MIDI CC triggers
✅ Performance Modes - Pattern Generation, Parameter Modulation, Evolution, Full Live
✅ Thread-Safe Processing - All operations compatible with JUCE audio thread
✅ Host Transport Integration - Syncs with DAW playback and tempo
✅ SpawnClone plugin builds successfully with live performance integration
✅ All JUCE header issues resolved - Proper includes for modular JUCE
✅ ONNXDaemonClient integration - Shared access between components
✅ Thread-safe architecture - Audio thread compatible processing
Your SpawnClone plugin now has complete live performance capabilities:
- Start your DAW and load the SpawnClone plugin
- Enable live performance mode from your UI
- Choose a performance mode (Pattern Generation, Full Live, etc.)
- Start playback and experience real-time AI-driven music generation!
The system leverages your optimized ONNX daemon (10-200x performance improvement) and provides professional-grade real-time AI capabilities for live music performance.
PluginProcessor (Main Audio Thread)
↓ MIDI + Transport Info
LivePerformanceIntegration (Thread-Safe Bridge)
↓ AI Processing Requests
LivePerformanceEngine (Background Processing)
├── ONNXDaemonClient (Fast Pattern Generation)
├── AdvancedSynthesisEngine (Parameter Modulation)
└── Pattern Evolution (Morphing Algorithms)
Your SpawnClone plugin is now a complete real-time AI-driven live performance instrument! 🎭🎹