Show HN: Open-source binaural-beats engine

txus1 pts0 comments

GitHub - txus/farfield: Mind awake, body asleep - binaural-beat synthesis and analysis engine · GitHub

/" data-turbo-transient="true" />

Skip to content

Type / to search

Sign in<br>Sign upAppearance settings

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

txus

farfield

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>1 Commit<br>1 Commit

.github/workflows

.github/workflows

docs

docs

farfield

farfield

presets

presets

tests

tests

.gitignore

.gitignore

LICENSE

LICENSE

NOTICE

NOTICE

README.md

README.md

pyproject.toml

pyproject.toml

View all files

Repository files navigation

🌌 farfield

Mind awake, body asleep — binaural-beat synthesis and analysis engine.

An open-source engine for the territory Robert Monroe mapped — from his<br>expired patents and our own spectral analysis of the classic gateway-era<br>programs.

Farfield renders layered binaural-beat sessions from plain YAML<br>descriptions, and ships the measurement pipeline its presets were built<br>with. It exists for personal experimentation and research: render your<br>own custom meditation sessions and have fun with it.

What it does

Layered sessions : multiple simultaneous carrier pairs with<br>scheduled beat frequencies, phase-coherent segment crossfades, and<br>glide-free seams.

Spatial angle modulation (SAM) : antiphase sinusoidal phase<br>modulation of a shared carrier —<br>S_L/R(t) = A·sin[2πf_s·t ± φ_p·sin(2πf_m·t)] — which produces a<br>40 Hz beat percept where a conventional binaural pair won't fuse. See<br>docs/monroe-sound-science.md for the<br>math and the detector that verifies it.

Noise beds : pink/brown noise with slow amplitude modulation<br>("surf"), stereo decorrelation, and band-limited moving textures.

An analysis pipeline (farfield.analysis): coherent FFTs, envelope<br>demodulation, and mid/side complex projection that separates true phase<br>modulation from amplitude panning. It measures carriers, beat rates,<br>modulation depths and layer timelines from any stereo recording — it's<br>how the measured presets were made, and how the test suite verifies<br>every render against its numbers.

16 bundled presets (in presets/) in four provenance<br>groups, strongest first:<br>measured from the original tapes, measured from the MSS remasters, from<br>the patents, and original designs. The measurement data behind the<br>first two groups is published in<br>docs/tape-analysis/.

The measured presets were reverse engineered by spectral analysis of<br>personal copies of the classic gateway-era recordings and their modern<br>remasters; the rest implement techniques from the now-public-domain<br>patents (US 3,884,218; US 5,213,562; US 5,356,368) and their abandoned<br>SAM successors. No audio from any recording is included or reproduced —<br>presets are measured numbers, re-synthesized from scratch.

Quick start

Requires Python ≥ 3.11.

git clone https://github.com/txus/farfield && cd farfield

# run straight from the repo with uv, no install:<br>uv run farfield render presets/focus-10.yaml

# or install the CLI on your PATH:<br>uv tool install . # with uv<br>pip install . # with plain pip<br>farfield render presets/focus-10.yaml

Usage

farfield list # list the presets in ./presets<br>farfield list path/to/dir # or in any directory<br>farfield render presets/focus-10.yaml # render a session to WAV<br>farfield describe presets/focus-10-mss.yaml # print a session timeline<br>farfield plot presets/focus-10-mss.yaml # self-contained HTML visualizer

The CLI takes plain paths — sessions are YAML files, and the bundled<br>presets in presets/ are ordinary examples of them, not a<br>registry. Renders get an 8 s fade-in/out (--fade 0 disables), --seed<br>makes them reproducible, and --json writes a sidecar describing every<br>layer.

Roadmap

Layered sessions — stacked carrier pairs, mono anchors,<br>per-ear polarity, beat and carrier glides

Spatial angle modulation (SAM) — with closed, open and<br>discontinuous paths

Same-ear tremolo — independent rate and depth per ear

Shaped noise beds — two-slope spectra, two-stream crossfade<br>panning, fixed interaural delay

Moving band-limited textures — the MSS-era "3D" shimmer

Quadrature surf — common-mode swell locked to the texture pan

Phase-coherent crossfades — click-free seams, verified per render

Measurement pipeline — carriers, beats, modulation depths and<br>layer timelines from any stereo recording

Isochronic tones — first-class pulsed (gated) tones; the<br>technique most requested in the wider community, including in Tom<br>Campbell's freely published audio experiments

Monaural beats — both members summed pre-pan into both ears

Carrier FM — per-group LFO on carrier frequency

Arbitrary SAM spatial paths —...

presets farfield from beat analysis yaml

Related Articles