Hacker News

Show HN: Phantas – A browser-based binaural strobe engine (Web Audio API)

27 points by AphantaZach ago | 8 comments
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?

dvh |next [-]

ERROR> https://phantas.io/_next/static/chunks/f60f633011df6d3a.js(5...: Uncaught TypeError: Cannot read properties of undefined (reading 'cancel')

AphantaZach |root |parent [-]

Good catch. That’s an unguarded speechSynthesis call in the cleanup function. likely crashing on browsers that block the Speech API (or in privacy mode).

Just pushed a fix to wrap it in a conditional check. It should be live in ~2 minutes. Thanks for the stack trace!

aeon_ai |next |previous [-]

Any evidence supporting “higher performance”?

AphantaZach |root |parent [-]

Totally fair question. "Higher performance" is definitely a subjective claim, so I should clarify the mechanism I'm relying on.

The core concept is Photic Driving (the "Frequency Following Response"). There is decent literature (e.g., Herrmann, 2001) showing that the visual cortex effectively synchronizes its firing rate to match high-amplitude external flickers (like a 14Hz strobe).

My goal with this tool is to induce Transient Hypofrontality (down-regulation of the prefrontal cortex), which is often associated with "Flow States" (Dietrich, 2003).

To be clear: I haven't run a clinical trial. I built it to replicate the "Ganzflicker" effects (Reeder, 2021) in a browser environment to help with my own Aphantasia. Subjectively, it helps me clear cognitive noise faster than silence, but I'm releasing it for free to see if that holds true for others or if it's just placebo.

aeon_ai |root |parent [-]

All good - just interested in what the theory is behind it, and how effective it is purported to be.

Thanks for sharing your experience!

cantalopes |next |previous [-]

It looks like a fun toy and i don't mean to disrespect but isn't this kind of a snake oil that's bordrline with placebo?

I mean, strobing light at specific hz will definitely have some effect on increased hz activity in your brain somewhat, and perhaps even relax me, but whether would that translate to "deep work" or just flshing light in my face would vary from person to person. And the gained benefits would be probably very dimnishing (like the whole "premium bineural beats" scams)

Plus the "unlock pro for targeted emotional regulation" souns veeeeery far fetched and fishy.

But if it gets popular i'm pretty sure some people would buy it (hell, people buy "good energy stones for good aura" to protect from reptilians or something)

AphantaZach |root |parent [-]

Fair critique. The wellness space is definitely flooded with 'quantum energy' nonsense so the skepticism is appreciated.

I look at this tool less like a 'magic brain pill' and more like a metronome for a musician. A metronome doesn't make you play better, but it mechanically forces you to stick to a tempo. This app just saturates your visual cortex with a steady rhythm so your brain stops scanning the room for distractions. It’s essentially a distraction-cancellation for focus.

As for the 'emotional regulation' bit—I do admit that comes off as marketing speak(not my background!) It really just refers to wavelength impact: Red light avoids triggering melanopsin (good for winding down), while Cyan/Blue light triggers wakefulness (good for mornings). No magic stones involved

AphantaZach |previous [-]

Apologies to anyone who got flash-banged by the white screen earlier. I pushed a hotfix that accidentally nuked my Tailwind config and the animation engine. The site should be fully restored now. Thanks for your patience.