TL;DR
witheFlow is a real-time, open-source system that dynamically modulates audio effects during live music performances by analyzing both the performer's biosignals (EEG and ECG) and the audio itself. By running locally with low latency, it shifts the AI-music paradigm away from autonomous generation and toward a responsive, co-creative partnership that enhances human emotional expression.
What Problem Does This Paper Address?
While creative AI has made massive strides in music, most efforts focus on autonomous music generation—essentially treating AI as a replacement for human composers and performers. Conversely, traditional live music technology processes audio signals but completely ignores the performer's real-time physiological and emotional state.
witheFlow addresses this gap by exploring human-AI collaboration. Instead of altering the musical notes or generating new melodies, the system acts as an intelligent live-performance assistant. It bridges the gap between a performer's internal emotional experience and their sonic output, allowing them to focus entirely on self-expression while the AI handles complex, real-time audio effects modulation.
Methods
The witheFlow system is a lightweight, local Python-based application that communicates with a Digital Audio Workstation (DAW) via standard MIDI messages.
The architecture consists of three primary components:
- Biosignal Feature Extractor: Uses commercial-grade EEG and ECG sensors. EEG tracking (via four electrodes) extracts power from Alpha and Beta bands to calculate metrics for Attention and Relaxation. Simultaneously, ECG tracking samples heart rate variability to compute the Baevsky Stress Index (SI).
- Audio Emotion Regressor: To evaluate the emotional qualities of the music itself, the system uses a PANNs CNN10 architecture modified with a linear regressor. It analyzes 5-second windows of the performer's "dry" (unaffected) audio and maps it onto Russell's circumplex model of affect, outputting continuous values for Valence (positivity/negativity) and Arousal (energy level).
- Rule-Based Mixing Logic: This module acts as the conductor. Encoded via fully customizable YAML files, it applies piecewise rules combining the musician's physiological state with the audio's Valence-Arousal (VA) characteristics to adjust the gains of parallel effects chains (e.g., distortion, phaser, glitch, long reverb) in the DAW.
Datasets
The audio emotion regressor was trained on the DEAM (Development and Evaluation of Audio Music) dataset, a standard benchmark for isolating valence and arousal in music.
However, the authors note a significant limitation in existing data: most datasets contain full music productions rather than solo performances, which complicates real-time tracking for a single musician. To solve this, the authors are currently developing a novel, multi-instrumental dataset of solo performances featuring real-time annotations and biosignals.
Key Insights and Ideas
- AI as an Enhancer, Not a Competitor: By automating the technical overhead of adjusting pedalboards or plugin parameters, the AI gives musicians the mental bandwidth to focus purely on artistic decisions.
- The Bio-Awareness Loop: The system creates a unique closed-loop feedback system. The musician's internal state alters the sound, and the altered sound can subsequently shape the musician's psychological response, opening up entirely new pathways for improvisational expression.
- Interpretable-by-Design: Rather than relying on a completely black-box neural network for the entire pipeline, the mixing logic is structured as a transparent, rule-based system. This formalization ensures the artist remains in control and paves the way for training interpretable symbolic models (like decision trees) in the future.
Key Results
As a proof-of-concept, the system successfully achieves real-time, low-latency performance locally on a standard laptop without requiring cloud computation.
While quantitative performance benchmarks for the mixing logic are left for future evaluation frameworks, qualitative testing with multiple musicians yielded highly positive feedback. Performers reported that the system felt highly responsive and engaging, particularly during complex improvisational sessions where the audio effects naturally adapted to their internal stress and attention levels.
Limitations and Future Work
- Hard-Coded Rules: The current mixing logic relies on predefined YAML rules. The authors plan to explore learnable mixing logic, such as deep reinforcement learning agents trained to modulate effects to optimize specific performance criteria (e.g., minimizing unwanted stress).
- Sensor Robustness: Biosignals are notoriously noisy. While the system includes basic artifact detection and fallback imputation methods if an electrode loses contact, sudden physical movements during intense performances remain a challenge.
- Psychological Safety: Because of the closed-loop nature of the system, there is a risk of creating feedback loops that could induce anxiety or a loss of control. The authors emphasize that future iterations must prioritize safety features, such as the physical MIDI override pedal implemented in this version, allowing artists to instantly opt-out or reverse effects.
Summary updated