- construct with
new Model(sampleRateHz, channelCount) - call
process(interleaved)with aFloat32Arrayof interleaved samples ([s0_ch0, s0_ch1, …, s1_ch0, …]);getEegInterleavedSamples(frame)produces this from a headband frame processreturns a result object, orundefineduntil enough data has accumulated (min_samples()tells you how much)- call
reset()to clear state
channelCount is only known once the first frame arrives, construct models inside your first-frame handler.
WasmAlphaBumpDetector
Detects alpha bumps: transient changes in alpha band power that indicate state transitions, such as eyes closing.set_threshold(multiplier) and set_baseline_smoothing(alpha).
WasmAlphaPeakModel
Tracks the individual alpha peak frequency (typically 8 to 13 Hz), which varies from person to person.WasmCalmnessModel
Computes a calmness score from the ratio of alpha to beta power. Higher alpha relative to beta generally indicates a more relaxed state.AthenaWasmDecoder
Decodes raw Athena protocol packets from Muse S (Athena firmware) headbands. Used as a factory parameter forBleTransport:
BleTransport:
Next
Signal Processing
Band powers, FFT, spectrum analysis
Headband Transport
Frame schema and transport interface