# Phantas – A browser-based binaural strobe engine (Web Audio…

Hi HN, I’m a new developer with Aphantasia (no mental imagery). A side effect of this is that regaining focus after a distraction takes me a long time (the "23-minute lag"). I tried standard binaural beats, but I discovered a technical flaw: streaming compression (AAC/MP3 on Spotify/YouTube) often…

- **Page:** https://magpie.gallery/i/phantas-a-browser-based-binaural-strobe-engine-web-sesh
- **Type:** Link to an idea elsewhere
- **Category:** Health & fitness
- **Runs on:** web
- **Tags:** binaural, focus, audio, web-audio, aphantasia

## Source

Web · AphantaZach: Phantas – A browser-based binaural strobe engine (Web Audio API)

- **Original:** https://news.ycombinator.com/item?id=46414258

> Hi HN, I’m a new developer with Aphantasia (no mental imagery). A side effect of this is that regaining focus after a distraction takes me a long time (the "23-minute lag"). I tried standard binaural beats, but I discovered a technical flaw: streaming compression (AAC/MP3 on Spotify/YouTube) often muddies the specific phase differences required for effective entrainment. I realized that to get effective entrainment, I needed lossless audio. Since I couldn't stream lossless easily, I decided to generate it locally. I built Phantas – a browser engine that uses the Web Audio API to generate raw sine waves in real-time on the client side. This ensures mathematical precision with zero compression artifacts. For audio it uses Native AudioContext for dual-oscillator generation (Left/Right channel split). For visuals I pair the audio with a 490nm Cyan strobe. The hardest part was syncing the visual flash (using requestAnimationFrame) to the audio pulse without "drift" caused by JavaScript's event loop latency. I built this primarily for myself. Subjectively, it has reduced my "ramp-up" time from ~20 minutes to about 5 minutes. I’m releasing the generator for free (no login) to see if this works for others or if it's just my specific brain chemistry. I’d love feedback on: - Audio/Visual Sync: Does the strobe feel tight on your specific browser/refresh rate? - Intensity: Are the default 14Hz flickers too aggressive? https://phantas.io

## Rules for reuse

- Build your own version: don't copy another product's code, look, icons, colours or copy.
- The original belongs to its author; Magpie only links to it.
- The original content's copyright belongs to its creator. Magpie doesn't download or re-upload it; we only show the link and the official preview.
