brainstorm reactor
Focus Audio & Voice Engine

Active musical instrument for cognitive work. No playlists. No streaming. Pure client-side synthesis.

The Focus Lab (/focus) is a standalone deployment of the Brainstorm Reactor's Neuro-Acoustic Sound Lab (NAL v3). It runs entirely inside the browser — no login, no API costs, no server dependency. Every audio sample is generated in real-time by a compiled Rust/WASM DSP kernel at 48 kHz.

The Focus Lab differs from the integrated NAL in one fundamental way: it operates independently of the Spatial Canvas. Where the full NAL reads the Canvas-Aware Diversity Score (CAD) to adapt its output, the Focus Lab exposes the same synthesis engine through direct user control — five sliders, three cognitive intents, and six cognitive profiles.


1. Five Generative Synthesis Layers

The audio engine produces sound through five independent synthesis layers. Each layer maps to a slider (0–100%) in the interface.

LayerSliderSynthesisFunction
Tonal Drone & PACEnergyElastic Overtone additive synthesis (β ≈ 0.997)55 Hz grounding fundamental + 40 Hz Gamma nested on 5.5 Hz Theta PAC
TextureTextureFractal Pink Noise (Kellett IIR, f64) with LPF sweepBroadband acoustic masking — isolates from environmental distraction
TensionBrightnessFiltered harmonic partials with spectral sweepSpectral openness — controls tonal density
Euclidean RhythmTempoStateless O(1) Euclidean pulse (Rust kernel)Tresillo (3,8) → Cinquillo (5,8) → Samba (7,16) based on Energy
Markov MelodyMelodyPentatonic Markov chain (Web Audio scheduling)Raga-style contour (Working Memory Guard: 0% recommended in Deep Work)

All layers except Melody run inside the WASM kernel. Melody uses native Web Audio for scheduling precision. A feed-forward Look-Ahead Compressor (256-sample delay, −15 dBFS threshold) prevents transient pumping at onset collisions.


2. Four Modes: Open-Ended States & Timed Protocols

One primary action starts sound immediately (Start Focus; returning users see Resume with their last open-ended mode). Three secondary choices appear below it, each labeled with its duration. Each mode carries one name throughout the interface: Focus, Meditate, Warm Up, Power Reset.

Internally, the modes fall into two interaction tiers:

Open-ended states (Focus, Meditate)

Continuous states operate as unrestricted, ongoing generative soundscapes designed for sustained cognitive workflows:

  • Focus [1]: Theta-Gamma Phase-Amplitude Coupling (PAC) nesting 40 Hz Gamma bursts within a 5.5 Hz Theta carrier envelope (Lisman-Jensen multiplexing). Minimizes working memory distraction and establishes parieto-occipital sensory gating. Safe for multi-hour deep engineering and writing sessions.
  • Meditate [2]: Autonomous Self-Transcending (AST) protocol featuring authentic Indian Tambura drones, 22-Shruti just intonation, and 0.15 Hz vagal modulation for autonomic calm and baseline mental recovery.

Continuous states switch immediately upon selection and continue indefinitely until paused or transitioned.

Timed protocols (Warm Up, Power Reset)

Guided protocols are structured, time-bounded neurological sequences designed for state transitions and neural recovery:

  • Warm Up · 3 min (Brain-Priming Ramp) [P or 3]: A 3-phase preparatory ramp (effect size g = 0.52 vs. g = 0.22 for purely peri-task audio) engineered to overcome executive initiation friction and task procrastination:
    • Phase 1 (0–45s): Autonomic Reset — 0.15 Hz Mayer wave breathing cue with deep Brownian noise (α = 2.0) to downregulate elevated tonic Locus Coeruleus firing.
    • Phase 2 (45–105s): Alpha IAF Sensory Gating — Smooth frequency sweep from 8.0 Hz to 10.0 Hz Individual Alpha Frequency (IAF) center, establishing thalamocortical filtering.
    • Phase 3 (105–180s): Executive Phase-Locking — Ramp into 40 Hz Gamma PAC and Beta frequencies.
    • Seamless Auto-Handoff: At second 180, the engine automatically transitions into Deep Work without interrupting audio playback.
  • Power Reset · 20 min (Neuro-Restoration) [R or 4]: An ultradian adenosine clearance protocol structured across three Non-REM stages:
    • Stage 1 (0–5 min): Hypnagogic Induction — Exponential frequency decay from 12.0 Hz Alpha down to 4.5 Hz Theta (τ = 120s).
    • Stage 2 (5–18 min): N2 Restoration — Sub-audible 2.0 Hz Delta drone with broadband pink noise masking to sustain N2 sleep spindles without cognitive intrusion.
    • Stage 3 (18–20 min): Re-Activation — Quadratic Beta sweep from 2.0 Hz up to 22.0 Hz with high-pass spectral brightening to restore executive alertness without startle response.
    • Sleep-Inertia Abort-Guard: Automatically pauses audio at minute 20:00 to strictly prevent entry into N3 Slow-Wave Sleep (which causes 30–60 minutes of post-nap prefrontal hypometabolism).

Timed protocols show a countdown and a three-step progress label (Warm Up: Settle, Tune in, Lock in; Power Reset: Drift off, Rest, Wake up). They can be skipped or stopped at any time without audio glitches.

Setup is optional

Sound starts without any setup dialog. The headphone check runs on request (Run headphone check). The optional hearing-threshold calibration appears as a dismissible hint 30 seconds after the first sound; until calibrated, the stochastic-resonance layer stays silent. Advanced controls (Sound profile, Sound controls, session timer, WAV export) sit behind Advanced.


3. Six Cognitive Profiles

Beyond intents, the Focus Lab offers six profiles that map to specific neurological processing styles:

ProfileOptimization Target
High-Stimulus ExecutionMaximum layers, high rhythmic density
Acoustic GroundingDense texture, minimal melody — sensory anchoring
Low-Arousal FocusSub-threshold layers — background barely perceptible
Gamma Divergence40 Hz entrainment, melody active — lateral thinking
Monotone HyperfocusSingle-layer drone — elimination of all variation
Circadian AdaptiveParameters follow time-of-day biological rhythm

4. Elastic Tether

Manual slider adjustments create an override that drifts back to the auto-calculated target over 18 minutes. This prevents parameter adaptation overload — the phenomenon where users continuously chase "better" settings, inadvertently creating auditory fatigue.

The Tether operates per-slider. Each override decays independently via exponential interpolation. Cultural Baseline selection bypasses the Tether entirely to preserve discrete integer routing.


5. Session Timer (Ultradian Pacing)

The built-in session timer follows the 80-8-10-2 ultradian cycle:

PhaseDurationAcoustic Behavior
Focus80 minFull synthesis at selected intent
Breathe8 minLayers strip to drone + texture, tempo decelerates
Movement10 minAudio pauses — screen prompts physical movement
Fade2 minGradual re-entry ramp

The cycle is based on the Basic Rest-Activity Cycle (BRAC) — the ~90-minute ultradian rhythm governing sustained attention in healthy adults. The 80-minute focus block accounts for the cognitive ramp-up period.


6. Onboarding: Phase-Cancellation Check

Before first playback, a modal presents a Phase-Cancellation Headphone Verification. Two tones are played in anti-phase across left and right channels. If the user hears silence (or near-silence), headphone isolation is confirmed. If the user hears the tone clearly, they are likely using speakers — binaural entrainment will not function.

This is a functional gate, not a preference. Binaural beat perception requires acoustic isolation between ears. Skull-conducted crosstalk from speakers eliminates the interaural phase difference that drives the Frequency Following Response.


7. Stochastic Resonance Calibration

After the headphone check, a calibration modal measures the user's personal hearing threshold. The Stochastic Resonance layer is then set to threshold minus 5 dB — a sub-threshold fractal Pink Noise floor that improves signal detection in downstream neural circuits via the SR effect (Benzi et al., 1981).

The calibration value is adjustable at any time via the SR slider in the interface.


8. WAV Export (Offline Rendering)

The Focus Lab renders audio offline via OfflineAudioContext at 48 kHz. The exported WAV file is mathematically identical to the live browser audio — verified via independent FFT spectral analysis.

Export duration is configurable. The full WASM engine runs inside the offline context, producing the same synthesis output without real-time constraints.


9. Cultural Auditory Baselines (V6.0)

Five tonal systems are routed natively inside the Rust kernel:

  1. Western 12-TET — Standard equal temperament
  2. Balkan Aksak — 7/8 asymmetric meter
  3. African Polyrhythm — Cross-rhythmic patterns
  4. Sino-Pentatonic — 5-limit Just Intonation
  5. Indian Raga — 22-Shruti Just Intonation with Meend Portamento

Selection is immediate and bypasses the Elastic Tether. These are neurologically distinct auditory baselines — not exotic presets.


10. Safety Architecture

The Focus Lab inherits the full acoustic safety guardrails compiled into the WASM audio kernel:

  • Anti-Subliminal Filter: 8th-order LPF at 15 kHz
  • Anti-Hypnosis Guard: Entrainment below 8 Hz clamped. 4 Hz blocked entirely.
  • Speech Envelope Suppression: 4–16 Hz AM detection and compression
  • Anti-Loop Monitor: Lempel-Ziv Complexity variance injection
  • Frequency Stacking Protection: 5th-order intermodulation pre-calculation

These guardrails are compiled directly into the binary. They are not configurable and cannot be overridden.


11. Sub-MMN Anti-Habituation Drift

During prolonged listening sessions (60–180 minutes), static background audio leads to sensory habituation in the primary auditory cortex (A1), reducing alertness and increasing vulnerability to external distractions.

The Focus Lab prevents cortical adaptation by applying continuous, non-repeating parametric drift driven by a deterministic Rössler chaos attractor. All modulations strictly remain beneath the electrophysiological Mismatch Negativity (MMN) detection threshold:

  • Frequency Drift: Subtle carrier pitch variation within safe bounds (±18 cents) with update velocity programmatically restricted to ≤ 2.0 cents/s.
  • Spectral Slope Modulation: Organic, non-periodic micro-variations in aperiodic slope that avoid higher-order cortical pattern learning.
  • Phase Continuity: Zero-glitch phase preservation eliminates transient clicks or pops during continuous modulation.

This preserves neural receptive field responsiveness and sustains executive attention over multi-hour working periods without cognitive fatigue.


12. Dynamic Equal-Loudness (ISO 226:2023) & Transducer Acoustic Calibration

Human hearing sensitivity is non-linear across frequencies: at quiet, fatigue-free focus listening volumes (40–55 dB SPL), the ear perceives substantially less low-frequency energy compared to mid-range tones. The Focus Lab implements dynamic ISO 226:2023 Phon Contour Compensation coupled with hardware-specific transducer acoustic profiles to preserve warm, punchy bass and crystalline clarity at any listening volume.

Dynamic Phon Tracking

  • Automatic Volume-Linked Tracking: The engine continuously calculates the target equal-loudness curve from your master volume slider (30 + volume^0.7 × 55 phon). As volume is reduced, a 5-band biquad filter cascade automatically raises low-end compensation (up to +16.5 dB bass shelf at 20 phon) to keep the 55 Hz drone and rhythm punchy and immersive.
  • Artifact-Free Slewing: Curve adjustments slew continuously over a 50 ms time constant, ensuring seamless transitions without clicks or zipper noise when altering listening volume.
  • Manual Phon Override: When disabled, you can manually lock the compensation contour to an exact phon rating (20–90 phon) independent of output gain.

Transducer Acoustic Profiles

Acoustic transfer characteristics vary significantly across listening hardware. Focus Lab includes three dedicated DSP filter profiles:

  1. Over-Ear Headphones (Reference):
    • Diffuse-field target tuned for full-size circumaural headphones.
    • Balances deep sub-bass compensation with open upper-mid detail and natural spatial imaging.
  2. In-Ear Monitors / Earbuds (IEM Notch):
    • Corrects for acoustic pressure coupling and ear canal occlusion.
    • Applies −3.5 dB sub-bass attenuation to eliminate boomy seal accumulation.
    • Inserts a steep −3.0 dB notch at 3150 Hz (Q = 2.0) to counteract the quarter-wavelength resonant peak of the occluded ear canal, protecting against outer hair cell (OHC) fatigue.
  3. Laptop & Desktop Speakers (Virtual Pitch):
    • Designed for small drivers incapable of reproducing frequencies below 80–100 Hz.
    • Limits sub-bass excursion (+4.5 dB max at 95 Hz) to prevent small cone clipping and mechanical distortion.
    • Activates Virtual Pitch / Missing Fundamental synthesis with a +4.0 dB boost at 120 Hz (the 2nd harmonic of the 55 Hz drone). The brain's auditory cortex psychoacoustically reconstructs the perceived 55 Hz fundamental tone even though the physical speaker cannot produce it.
    • Adds a +2.5 dB air-absorption shelf at 8.5 kHz for open, ambient room listening.

13. Tactile Keyboard Navigation & Background OS Controls

The Focus Lab cockpit is fully operable via zero-homing tactile keystrokes and native OS media controls, preserving deep flow without requiring physical mouse movement:

Keyboard Shortcuts

  • Space: Play / Pause toggle with immediate visual feedback.
  • 1: Focus.
  • 2: Meditate.
  • P or 3: Start or skip Warm Up (3 min).
  • R or 4: Start or stop Power Reset (20 min).
  • ↑ / ↓ or + / -: Adjust master volume in stepped ±5% increments with live phon recalculation.
  • M: Mute / Restore volume toggle.
  • T: Cycle transducer acoustic profile (Over-Ear → In-Ear → Speakers).
  • S: Toggle 80-8-10-2 Ultradian Session Sync timer.
  • D / C: Toggle DSP parameter inspector and Cognitive Profile drawers.
  • ?: Open the interactive shortcuts cheat sheet dialog.

Audio-Visual Micro-Interactions

Every shortcut trigger and mode transition emits an instantaneous radial pulse ripple across the active card border and triggers an ambient background glow surge on the visualizer canvas with smooth 700 ms spring decay.

Lock Screen & Dynamic Island (Media Session API)

Native OS integration (navigator.mediaSession) binds the Focus Lab directly to system media controls:

  • Artwork & Metadata: Displays high-resolution mode artwork, mode title, and phase descriptors on iOS/Android lock screens, macOS Control Center, and browser media hubs.
  • Hardware Key Control: Play, pause, and cycle next/previous cognitive modes directly using keyboard hardware media keys, Bluetooth headset controls, or lock screen buttons.

Note: In-depth mathematical formulations, WebAssembly kernel architecture, and full psychophysiological research datasets are cataloged in the internal engineering specifications (Admin Clearance).

On this page