Resonaite pulses the middle frequencies of a piece of music 2 to 18 times a second, and a brain signal sets how deep the pulse goes.
Here the signal comes from a recorded session, a simulation running in this page, or a dial you turn yourself. A NeuroSky MindWave headset also works, in Chrome and Edge on a computer.
Bypass plays the original music. ×4 makes the pulse four times deeper, so you can hear what it does.
Band gain applied
waiting for sound
Pulse measured in the sound
waiting for sound
added by the engine the music’s own movement set rate
Signal
no frames yet
Engagement
0.55
Drag, scroll or use the arrow keys. The engine treats this number exactly as it treats the headset’s.
Control law
holding
- Rate
- 18.0 Hz
- Depth
- 6.0 %
- Band swing
- 0.9 dB
- Bed
- −14.0 dB
- Noise
- −26.0 dBFS
Sleep Scott Buckley
How it works
Four parts run in this page, once a second for the signal and continuously for the sound.
The control law
Each mode reads one metric and moves along a curve between three settings: deeper pulse, the preset, and a lighter pulse. A dead band around the last value it acted on keeps small wobbles from moving the sound, and the depth can change by at most a fixed amount per second.
| Mode | Pulse rate | Band | Metric | Deepest at | Lightest at | Depth range | Dead band |
|---|
What the display shows
- Band gain applied
- The gain the engine puts on the music’s middle band right now, in decibels against the original: the bed level plus the oscillator after the slow breathing and jitter. It is read from the audio graph, sample by sample.
- Pulse measured in the sound
- The envelope of the middle band is taken before and after the engine, on the audio thread, over the last five seconds. The bright line is the spectrum of after divided by before, which cancels the music’s own movement and leaves what the engine did; its peak at the dashed line is the pulse. The dim line is the music’s own movement, for scale. Bypass flattens the bright line.
- Signal
- The eight band powers from the source, each as a share of their total, with the bands the current metric uses highlighted. In Manual mode the dial replaces them.
- Control law
- The curve the controller follows. The shaded strip is the dead band, the filled dot is where the curve says the depth should go, and the ring is where it is now; the ring moves toward the dot at the rate limit.
Measured offline
Each track below was rendered through the engine in an OfflineAudioContext, bypassed, on and on ×4, and the pulse was measured from the rendered sound with the same envelope method the display uses.
At the preset depth the pulse is a level change of about 0.4 to 0.8 dB, which is why ×4 exists. At 2 Hz the music’s own swells are ten times larger than the pulse, so the Sleep figures are the least precise.
| Mode | Track | Music’s own movement | Bypassed | Engine on | ×4 |
|---|
The sources
Recorded session replays a stored band-power recording at one frame per second. The recording here comes from the simulator, saved to a file, and the label on the display says so. A recording from a real headset in the same format replaces it without code changes.
Simulated runs that simulator live: a hidden arousal value wanders slowly, engagement rises with it, and alpha share and meditation fall with it.
Manual hands the metric to you. The controller treats the dial’s value exactly as it treats a measured one, dead band and rate limit included.
Headset reads a NeuroSky MindWave over Web Serial at 57,600 baud and parses its ThinkGear packets in the page. It needs Chrome or Edge on a computer.
Music
All fifteen pieces are published on Wikimedia Commons under Creative Commons Attribution licences, checked on each file’s page on 5 December 2026. They were transcoded to AAC and brought to the same loudness (−16 LUFS, linear gain); nothing else was changed. Tempo is measured with a beat tracker and shown only where the music has a steady beat.