Skip to content

Building a 40 Hz Gamma Entrainment Rig

Published: at 10:15 AM

I’m building a device that flashes lights and plays weird sounds at 40 Hz because some mouse studies looked interesting and I’m bored. The plan: run this thing an hour a day, five days a week, and see if my brain does anything cool. Or nothing. Probably nothing.

Why 40 Hz? Turns out if you flash lights or play sounds at specific frequencies, you can drag your brain waves along for the ride. In mice, 40 Hz did some genuinely interesting stuff to amyloid plaques. In humans, early studies show it’s safe and does… something to brain activity. Good enough for me to spend a weekend building this.

The tool

If you want to try the audio version without touching code, use the web app:

Web app: https://40hz-gamma-entrainment.joonaheino.com/

Prefer Python? Here’s the repo I’m iterating on:

Code: https://github.com/lurnake/40hz_poc

The audio side currently supports three modes:

  1. Sine pulses (“MIT-style”) — a 10 kHz carrier gated on for 1 ms every 25 ms. What’s 40 Hz is the rhythm, not the tone.
  2. Click trains — short windowed noise bursts at 40 Hz. Easier to listen to for many people.
  3. Binaural beats — two steady tones separated by 40 Hz to create a perceptual beat. Comfort mode, lighter evidence.

Sessions are pre‑generated to keep timing tight. The web version adds volume calibration, fade‑ins, pink‑noise masking, and periodic breaks. This is a research tool, not a medical device.

Why 40 Hz at all

Short version: gamma‑band stimulation (especially at 40 Hz) has been shown in mouse models to change pathology and immune activity, and in early human work to be feasible and to modulate brain activity. Doesn’t seem to kill people. It is interesting enough to build and test carefully.

My protocol (so far)

One hour per day, five days per week. Target 60–65 dB SPL at the ear. I’ll log subjective notes, sleep, training, and quick attention/working‑memory tasks before and after sessions. I’ll add a light channel later with a diffused LED array at safe intensities once I’m happy with the audio.

Safety

Use common sense. If you have epilepsy, hearing issues, or neurological conditions, talk to a clinician first. Keep sound levels sane. Take breaks. Stop if you feel off. For visual stimulation, diffuse the light and avoid harsh point sources. I AM NOT A DOCTOR. Check the license - there’s a reason it says “no liability” in all caps.

How to try it

  1. Open the web app and run a short session first. Calibrate volume to comfortable speech level.
  2. If you prefer code, clone the repo, pre‑generate a session, and play it back on your rig. Start with 10–15 minutes.
  3. Keep notes. If nothing happens, that’s a result.

What this actually sounds like

The MIT-style pulses? They’re weird. Like, “I’m pretty sure this is doing something to my brain because it feels deeply uncomfortable” weird. The click trains are more tolerable. The binaural beats are basically the comfort food option - probably doesn’t do much but at least it sounds chill.

Why am I doing this?

Honest answer: the research looked cool, building it seemed fun, and worst case I waste an hour a day listening to annoying beeps or clicks. Earlier on, I have spent 8-9 hours per day listening to a neverending remix of the Sardaukar Chant from Dune, or a Gregorian Choir chant “Victimae Pascali Laudes”, so an hour of clicking is par for the course. Best case, my brain gets slightly optimized or something. Middle case (most likely): absolutely nothing happens but I learn some audio programming.

Notes on the “40 Hz sound” wording

When I say “40 Hz sound,” I mean a 40 Hz envelope applied to a higher‑frequency tone. Your ears hear the tone. Your brain gets the rhythm. That’s the point.

Selected references

If you try it and your brain feels weird, let me know. If you find a bug, definitely let me know - that’s actually useful. If you’re a neuroscientist and I’m doing this all wrong, please let me know so I can fix it before too many people download this thing. No medical claims. No promises. Just beeps and hope.


Previous Post
Moving House
Next Post
We Need a Name for This New Thing