ogarza.binaural-noise
Binaural beat and noise generator for the Omarchy shell. One detached
ffmpeg process writes stereo PCM to PipeWire as ogarza.binaural-noise.
Headphones are required for a true binaural beat. Each ear must hear its own frequency. Pure and surf modes still work on speakers; the channels mix in the room and the pulse is weaker.
How binaural audio works
A binaural beat is not a third tone in the file. The left channel plays carrier + beat/2, the right plays carrier − beat/2. Your auditory system hears a pulse at the difference.
Example: carrier 200 Hz, beat 6 Hz → left 203 Hz, right 197 Hz. You hear a 6 Hz pulse, not 200 Hz throbbing.
The beat can stay fixed or sweep linearly from start to end over the
session. The sweep uses the integral of instantaneous frequency, so the
heard rate is exactly b(t) = start + (end − start) · t / T. A naive
sin(2π f(t) t) would drift off that line.
Common beat ranges (the slider goes 0.5–40 Hz):
| Band | Hz | Typical use |
|---|---|---|
| Delta | 0.5–4 | Deep sleep |
| Theta | 4–8 | Meditation, settling |
| Alpha | 8–12 | Relaxed focus |
| Beta | 13–30 | Alert, active work |
| Gamma | 30–40+ | High-tempo focus; 40 Hz |
These are conventional EEG bands, not a guarantee of a brain state.
Features
- Three modes: tone + noise, pure noise, surf
- Noise color: white, pink, brown
- Carrier 80–400 Hz (engine allows 60–500)
- Beat start/end 0.5–40 Hz, fixed or linear sweep
- Session length 1–240 min, fade in/out
- Live PipeWire volume (not lavfi gain)
- Tone mode: noise bed, tone level, optional pulse at the beat rate
- Surf: crash every period seconds, depth sets how quiet the lull is, crash scales the break above the lull, splash the tap gain, splash freq the highpass (default 450 Hz, lowpass stays 6 kHz)
- Named presets (user file, not this repo)
- Launch sliders and the hearing guide follow the current mode
- Bar icon shows remaining time and current beat Hz while playing
- One session across monitors; start or stop from any bar icon
How to use
Add Binaural noise to a bar section if the icon is missing. Click the icon to open the popup.
- Pick a mode and noise color.
- Set the sliders for this mode (tone, pure, or surf).
- Adjust volume. In tone mode, noise bed and tone level mix the two layers. In pure/surf, noise bed is the generator level at launch.
- Start. Right-click the icon to stop. With two monitors there is still one session; both icons show the same remaining time.
- While playing, remaining time and beat Hz show in the popup.
Open What am I hearing? in the popup for the same field notes.
Settings persist on the bar widget in ~/.config/omarchy/shell.json.
Presets live in $XDG_STATE_HOME/omarchy/ogarza.binaural-noise/presets.json
(not this directory; writes here reload the plugin). First launch writes
the built-in preset set if that file is missing.
Modes
Tone + noise — Classic binaural: a sine per ear over a noise bed. Headphones required for the beat. Pulse depth (tone only) swells the sine at the beat rate; 0 is a steady drone.
Pure noise — No sine. The same noise is bandpassed to two slightly different centers, one per ear. Softer on speakers. Bandpass centers step along the beat sweep and crossfade.
Surf — Pure noise plus a breaking-wave envelope: short attack, longer wash, brief highpass splash at each break. Period is spacing between crashes (8–14 s is typical). Depth is lull quietness, not wave height. Crash is how loud the break is above the lull (100% is the original hit). Splash is the highpass tap at each break (default 450 Hz, lowpass 6 kHz). Crash timing is fixed in seconds, not a fraction of the period. The popup hides sliders that do not apply to the current mode.
Noise color — White is bright hiss. Pink is balanced. Brown is deep and rumbling.
Session examples
Built-in presets (also a starting point to copy). Volumes are set so the set is about the same loudness:
| Preset | Mode | Noise | Beat | Length | Notes |
|---|---|---|---|---|---|
| Theta deep | Pure | Pink | 6 → 4 Hz | 45 min | Theta meditation, settling |
| Alpha focus | Tone | Brown | 10 Hz | 30 min | Steady alpha |
| Delta sleep | Tone | Pink | 3 → 1 Hz | 90 min | Volume 65%, tone 35% |
| Windy shore | Surf | Pink | 15 Hz | 45 min | Default. Carrier 300 Hz |
| Ocean surf | Surf | Brown | 4 Hz | 45 min | Carrier 110 Hz, splash 350 Hz |
| Rain | Tone | Pink | 8 Hz | 45 min | Volume 50% |
| Beta focus | Tone | Brown | 16 Hz | 30 min | Volume 60% |
| Gamma 40 | Tone | Pink | 40 Hz | 20 min | Volume 60%, tone 15% |
| Low gamma | Tone | Pink | 32 Hz | 20 min | Volume 55%, tone 15% |
| Nap | Tone | Pink | 10 → 5 Hz | 20 min | Volume 50%, pulse 20% |
Variations of those presets:
- Theta deep — Ships as 6 → 4 Hz. For a steady hold, set start = end to 6 Hz, 20–45 min. Carrier 140–200 Hz; lower is warmer.
- Delta sleep — Ships as 3 → 1 Hz over 90 min, tone + pink, carrier 100 Hz, volume 65%, tone level 35%. For a longer theta → delta, start at 6 Hz and end at 2 Hz (or 4 → 1), 60–90 min. Headphones on; take them off after you are down if the cable is a problem.
- Alpha focus — Ships as 10 Hz both ends, 30 min, tone + brown, volume 65%.
- Windy shore — Default. Surf, pink, carrier 300 Hz, 15 Hz, period 11 s, depth 40%, volume 100%, noise bed 95%, crash 95%, splash 80%, splash freq 450 Hz.
- Rain — Ships as 8 Hz, 45 min, tone + pink, volume 50%.
- Beta focus — Ships as 16 Hz both ends, 30 min, tone + brown, volume 60%. Low beta is ~13–15 Hz; high beta is ~20–30 Hz.
- Gamma 40 — Ships as 40 Hz both ends, 20 min, tone + pink, volume 60%, tone level 15%. Pulse off; 40 Hz AM is a fast flutter. Headphones.
- Low gamma — Ships as 32 Hz both ends, 20 min, tone + pink, volume 55%, tone 15%, pulse 5%. Less flutter than 40 Hz.
- Nap — Ships as 10 → 5 Hz over 20 min, tone + pink, volume 50%, tone 15%, pulse 20%. Alpha into theta. Not a sleep session.
Start a new session after changing beat or mode; the graph is built at launch. Volume can change live.
Install / remove
omarchy plugin add https://github.com/ogarza/ogarza.binaural-noise.git --enable
Stop the session before plugin remove. Removal does not kill the
detached ffmpeg process; it can keep playing for up to 240 minutes
(the duration cap). Right-click the bar icon, or:
# /proc/pid/comm must be ffmpeg; helper shells share the command line
for p in $(pgrep -f -- 'stream_name ogarza[.]binaural-noise'); do
[ "$(cat /proc/$p/comm 2>/dev/null)" = ffmpeg ] && kill "$p"
done
Then remove the plugin. Presets stay in
~/.local/state/omarchy/ogarza.binaural-noise/ (or
$XDG_STATE_HOME/omarchy/ogarza.binaural-noise/ if that is set):
omarchy plugin remove ogarza.binaural-noise
rm -rf "${XDG_STATE_HOME:-$HOME/.local/state}/omarchy/ogarza.binaural-noise"
Bar widget settings live in ~/.config/omarchy/shell.json and are not
removed either. Drop the Binaural noise entry there if you want a
full delete.
Defaults
Windy shore: surf, pink, carrier 300 Hz, beat 15 → 15 Hz, 45 min, volume 100%, noise bed 95%, period 11 s, depth 40%, crash 95%, splash 80%, splash freq 450 Hz, fade 10 s.
Source of truth is Engine.DEFAULTS. Keep manifest.json
barWidget.defaults and Panel.qml setting() fallbacks in sync.
License
MIT. See LICENSE.