Selected Work
PurpleBrain
A real-time pipeline that turns raw EEG into FM synthesis — brain activity driving sound with low enough latency to feel immediate.
PurpleBrain takes a stream of EEG data and turns it into sound in real time — specifically, it drives an FM synthesis engine from features pulled out of brainwave data. The goal was to make the mapping feel immediate, intuitive, and fun: move your attention, hear the timbre shift, with no perceptible lag in between.
The problem
Biosignal-to-audio is a latency game. EEG is noisy, non-stationary, and low-amplitude; the interesting structure lives in frequency bands that you have to extract on a moving window. Do that naively and you either smear the signal with too much smoothing or chase noise with too little. Meanwhile the audio thread cannot wait — if synthesis stalls for even a few milliseconds, you hear it as a click or a dropout. The two halves want opposite things.
The approach
We used OpenBCI biosensing boards hooked to a 10-channel EEG. I built the signal path in Max/MSP to keep the it visually readable. OpenBCI pulls out band power and other features, Max ingests them using the OSC protocol, and we map them onto FM synthesis parameters — modulation index, carrier ratios, envelope. The audio callback stays lean and allocation-free; the heavier analysis runs off the hot path and hands results across without blocking the synth.
Real-time means the deadline is part of the spec. A correct result that arrives late is a wrong result.
The fun is in the mapping design: which features should move which synthesis parameters so that the result is both responsive and musical rather than just a sonified data dump.
What came out of it
A working instrument that plays your own brain activity, and a DSP foundation I keep extending.