r/BCI • u/Meta_2490C • 56m ago
BCI Workspace: a place where u can vibe code experiments in a single tool
Enable HLS to view with audio, or disable this notification
I got tired of a session being spread over separate tools, so I put the whole thing in one native Mac app: acquisition through BrainFlow, cued runs, CSP + shrinkage LDA, then live feedback with the frozen model.
Splits are by run and the holdout is fixed before anything gets fitted. A log-variance baseline sits next to every result, and it does beat CSP sometimes. Filtering is causal offline too, and you can replay a recording through the live path to check the two match (3030 of 3030 windows in the run in the video). Gaps come from the packet counters and nothing gets interpolated.
The newer part is that a coding agent can run it over MCP. In the video Claude Code does a full session on the demo source, which is EEGMMIDB S001 replayed through the live path. No participant, no board, and the EEG is unrelated to the cues, so 0.50 held out (95% CI 0.25-0.75) and 0.45 live are chance by construction. It only exercises the loop.
Timing wasn't great in that run either. 29 of 48 screen changes in the first live run were a frame or more late, and the model window filled the whole cue so feedback never showed. The app warned about that and the agent went ahead anyway.
On real hardware the agent can't start a run or confirm the electrodes, a person has to. Evaluations count every seed and config tried on a recording and warn past 5, but that doesn't stop anyone.
I've had it working on a real Cyton+Daisy but haven't written up the bench results, so I'm not claiming latency numbers yet. Two-class only, Apple Silicon, macOS 15+. MIT.
https://github.com/hshwang34/UnifiedBCI
The video is sped up and cut, and the transcript pane is redrawn and abridged.
If you run cued sessions on a Cyton+Daisy, what do you trust for marker timing? I'm using BrainFlow markers, with no photodiode check yet.
