Details
ai / research
Brain Signal Processing Game
Brain Signal Processing Game is a neurofeedback research software project connecting OpenBCI/LSL EEG acquisition, Python processing, Welch PSD beta-feature output and a Pygame feedback loop.
Live 3D architecture
Use the navigator to move between diagrams and related work, then scroll for more details.
OpenBCI EEG becomes a beta-rhythm control stream before it ever reaches the game.
Problem
The research software needed a closed loop from OpenBCI EEG acquisition to real-time signal processing and readable game feedback for an adult ADHD neurofeedback protocol. The page frames this as research software rather than a clinical efficacy claim.
Contribution
I volunteered with BNEURD as a Data Analyst and Software Engineer and designed/implemented the real-time EEG processing server: stream handling, buffering, Welch band-feature extraction and game-facing beta marker output. The game/UI was produced by the team. The research protocol specifies filtering, while the processing implementation leaves filter application commented out.
Signal And Game Loop
Research protocol values: OpenBCI GUI acquisition, 8 EEG electrodes in 10/20 placement, 3-second processing batches, 300 ms refresh, 60 Hz notch and 4–100 Hz bandpass in the paper, Welch frequency-domain features and beta rhythm communication to the game. The processing server uses 256 Hz/8-channel setup, LSL EEG input, Welch PSD bands, 0.3 s refresh and beta marker output; its executable path uses a 4-second buffer and initial filter arguments notch=60, lowcut=5, highcut=35 while the filter application block in processSample is commented out; these timing and filter differences separate the paper protocol from the executable path.
Technical decisions
Research Context
I contributed to a BNEURD collaboration on a June 2024 CONCCEPAR neurofeedback paper, “Desenvolvimento de software para neurofeedback - modulação cerebral para manejo de déficits atencionais em adultos com TDAH.”
Tradeoffs
Outcome
A concrete brain-computer interaction artifact: EEG acquisition, signal processing, asynchronous data transport, and an interactive neurofeedback game connected into one reproducible research software loop.
Signal-processing layer
The processing server is the bridge between raw EEG and game behavior. It waits for stable stream data, buffers samples into experiment-sized windows, computes Welch band features, and emits a simple marker that the game can consume without knowing anything about EEG acquisition. Paper-vs-code filter differences are documented separately.
Game layer
The Pygame interface was designed as a feedback instrument rather than a normal game. It keeps the screen calm, uses a clear focus target, maps beta activity to aircraft movement, and separates baseline, active trial, and feedback states.
Stack and domains
- Python
- OpenBCI
- Lab Streaming Layer
- pylsl
- NumPy
- SciPy
- Welch PSD
- Pygame
- EEG
- neurofeedback
- BNEURD