Flicker target (attended = filled) Simulated Oz EEG trace Power spectrum (decoded peak highlighted)

SSVEP Spectrum Decoder Bench

Steady-state visual evoked potential (SSVEP) is the workhorse of fast, calibration-free brain-computer interfaces: flicker a handful of on-screen targets at distinct frequencies, and the target the user is looking at "tags" their occipital EEG with that same frequency. This 2D bench generates a synthetic single-channel Oz signal driven by whichever target you mark as attended (with tunable attention gain and noise), then sweeps a real Goertzel spectral analysis continuously across 4–13 Hz and decodes the attended target with a harmonic-sum PSDA score — summing power at each candidate's fundamental and 2nd harmonic, the same technique real SSVEP spellers use to squeeze out extra robustness. Watch the live spectrum curve rise and fall as you change noise, attention gain and window length, and see decode confidence and correct-decode rate trade off against how fast the speller can issue a command.