Repository navigation
Feat/neurostate games - #2
Open
MichalSzandar wants to merge 14 commits into
Open
MichalSzandar wants to merge 14 commits into
MichalSzandar wants to merge 14 commits into
Conversation
UI/lab instrument
- Support the BrainAccess MIDI: model profiles in the BrainAccess adapter (MIDI pin order and bias from Board's template); the sidecar reports the model and republishes EEG on LSL while streaming. - Add the neurostate sidecar: runs the neurostate library on the cap's LSL stream and publishes attention/relaxation on 13854-13856 for the games, and to KNeuron over stdout. BrainMetricsService falls back to it for raw EEG caps, so Neuorrun (WebGL) works with BrainAccess too. - Add Neurosniper and Neurorun modules: PLAY installs the latest GitHub release (SHA-256 checked) and launches it; LOCAL BUILD... overrides. The shell only launches the known games and only downloads their own releases. - Add Signal Check: neurostate's `check` inside KNeuron, with live traces, per-channel status (flat/noisy/mains), regions, gaps and alpha spectrum. - Fix Linux dev: Vite watched the sidecars' .venv folders and ran out of inotify watches; build the new sidecar in both bootstraps and CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
KNeuron can now run the native Neurosniper and Neurorun builds, controlled by attention and relaxation from neurostate, with a BrainAccess MIDI, on Linux. It also gains a Signal Check module for fitting the cap.
Changes
BrainAccess MIDI
BA MIDI …headset.brainAccessProfiles.ts. MAXI behaviour is unchanged.brainaccess-bridgerepublishes the EEG on LSL. Timestamps come from the device's sample counter. If LSL fails, the raw EEG for Cortex and Miner keeps flowing.neurostate sidecar (
neurostate-sidecar/)neurostate.txt, or fromNEUROSTATE_SRC.brainaccess-midiuses the MIDI montage and allows 10× mains hum on dry electrodes.NeuroStateServiceruns it while the cap is connected, so the one-minute resting baseline carries over between games.BrainMetricsServicefalls back to it for raw EEG caps, so Neuorrun (WebGL) also works with BrainAccess.Native games (
src-tauri/src/games.rs,releases.rs,src/modules/externalGame/)<Name>-linux-x86_64-<tag>.tar.gzor<Name>-windows-x64-<tag>.zip.<app data>/games/<id>/<tag>/(keeping only the newest), and launches the game.Neuorrun.exeis accepted.Signal Check (
src/modules/signalCheck/)assess_channelswith the cap's profile.Linux
vite.config.tsno longer watches the sidecars'.venv/build/distfolders, which exhausted inotify watches (ENOSPC).setup-and-run.sh,setup-and-run.ps1and CI build or test the new sidecar. Python 3.12+ is required.Testing
npm run build.cargo test --lib -- --ignored real_release).tauri:dev): Dashboard, Device page, game screen, file dialog, launch, leave and re-enter, QUIT GAME (checked with a stand-in executable).Not tested: connecting a real MIDI (the BLE scan found no headset at the time), the Windows bootstrap and build scripts, and a MAXI regression on hardware.
Notes for reviewers
src-tauri/gen/schemas/*are regenerated by Tauri, which causes a large diff. They're now excluded from prettier.npm run typecheckchecks nothing, because the roottsconfig.jsonhasfiles: [].npm run builddoes the real type check.neurostate-sidecar/neurostate.txtand rebuild the sidecar.Try it
Then connect your BrainAccess cap on the Device page and open Signal Check, Neurosniper or Neurorun.