Skip to content

feat(biofeedback): BCIBiofeedback egress core (ADR-011) - #77

Merged
aurascoper merged 1 commit into
mainfrom
feat/biofeedback-egress
Nov 8, 2026
Merged

aurascoper merged 1 commit into
mainfrom
feat/biofeedback-egress

Conversation

@aurascoper

Copy link
Copy Markdown
Owner

Adds the outbound half of the Muse-to-DAW chain as a new target that depends on BCICore and BCIEEG only: per-channel band powers in physical units, a BiofeedbackFrame egress boundary, a deterministic health-gated FeatureMapper, a Mind Monitor-compatible OSC mirror, MIDI 1.0 events with UMP encoding, the BiofeedbackSink protocol with null/recording/composite conformers, and the two transports (OSC/UDP, CoreMIDI virtual source) behind canImport. Promotes the test-only OSC encoder in MuseOSCDecoderTests to a production OSCEncoder in BCIEEG.

Off by default; nothing is wired into AppContainer in this PR (follow-ups in OSC and CoreMIDI wiring PRs). Raw EEG never reaches a frame; the explicit raw toggle goes through MindMonitorMirror.rawEEG(_:) only.

Verification on M4 (Swift 6.0)

  • swift build and swift test green on the M4 with the default (stub) configuration: all 64 PR 1 tests (10 band power, 11 feature, 20 mapper, 7 MIDI, 9 mirror, 7 OSC encoder) and all pre-existing test suites (539 tests total across 8 bundles) compiled and passed with 0 failures.
  • BandPowerEstimatorTests pass with the stated tolerances (a 20 uV 10 Hz sinusoid reads 200 uV^2 +- 4 in alpha).
  • No BCI* target other than NeuralComposeApp imports BCIBiofeedback (grep).
  • grep -rn "NWConnection(" Sources/ returns only OSCUDPSender.swift and the existing peer bridge.

Refs: #76, ADR-011, decision_registry.md entry 10, ADR-004 (inbound OSC), PRINCIPLES.md 1, 3, 4, 5, 7.

Adds the outbound half of the Muse-to-DAW chain as a new target that
depends on BCICore and BCIEEG only: per-channel band powers in physical
units, a BiofeedbackFrame egress boundary, a deterministic health-gated
FeatureMapper, a Mind Monitor-compatible OSC mirror, MIDI 1.0 events
with UMP encoding, the BiofeedbackSink protocol with null/recording/
composite conformers, and the two transports (OSC/UDP, CoreMIDI
virtual source) behind canImport. Promotes the test-only OSC encoder in
MuseOSCDecoderTests to a production OSCEncoder in BCIEEG.

Off by default; nothing is wired into AppContainer in this PR (follow-ups
in OSC and CoreMIDI wiring PRs). Raw EEG never reaches a frame; the
explicit raw toggle goes through MindMonitorMirror.rawEEG(_:) only.
All 64 unit tests across BCIBiofeedbackTests (57) and OSCEncoderTests (7)
compile and pass on M4 under Swift 6.0 alongside the full existing suite.

Refs: ADR-011, decision_registry.md entry 10, ADR-004 (inbound OSC),
PRINCIPLES.md 1, 3, 4, 5, 7.
@aurascoper aurascoper added the enhancement New feature or request label Nov 7, 2026
@aurascoper
aurascoper merged commit 1c28d5a into main Nov 8, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant