Sequenced Binaural Beat Generator · originally created by Jim Peters · GPL v2

SBaGen.

The classic binaural-beat studio: plain-text .sbg sequences of binaural beats, tones and noise beds, played live or rendered to file. Written by Jim Peters, battle-tested since 1999 — still the reference the whole family grows from. This page keeps the family together.

$ sbagen focus.sbg
SBaGen 1.4.5 · playing focus.sbg

The SBaGen family

The maintained fork first — then the original, the community fork, and a clean-room successor inspired by SBaGen.

Modern Linux, the classic toolMaintained fork →
Installers · Docker · isochronicSBaGen+ →
Building something newEntrain →
The original, as releasedSBaGen 1.4.5 →
maintained fork Same program · modern machines

SBaGen, maintained

by Desireco · GPLv2 preserved

Desireco's fork of the original: cleaned up a little, never reinvented. Defect fixes from a full audit of the 1.4.5 code, sound output brought up to date — a working ALSA backend instead of the long-dead /dev/dsp — a real Makefile, and an 87-check regression suite pinned to the pristine upstream build. As close to the original as will work well today.

SBaGen 1.4.5 original

by Jim Peters · 1999 · GPLv2

Powerful, battle-tested C from another era, and the .sbg format that still defines the workflow. The 2011 release remains the reference — this fork and Entrain measure themselves against it.

SBaGen+ fork

maintained by Ruan Klein · GPLv2

Keeps the original alive with fresh binaries for Linux, macOS and Windows, Docker images, and isochronic tones. Development paused — the ideas continue in its successor SynapSeq.

Entrain inspired

clean-room Go · MIT licensed · actively developed

A from-scratch reimplementation inspired by SBaGen: reads .sbg today, authors a typed TOML format next. Renders WAV / FLAC / MP3 and ships beatscope to verify any renderer's output.

Making meditation tapes? This is enough.

No plugins, no subscriptions, no lock-in. The fork, as-is, is more than enough to create solid meditation tapes: write a plain-text .sbg session — carriers, beats, a noise bed — render it to WAV with one command, and you're done. People have been doing exactly that with the original since 1999; the fork just makes it work on the machine you own today. The tape is yours.

One command to try it — see Quick start ↓

Quick start — the maintained fork

Same SBaGen, working audio on modern Linux, and a test suite that proves it.

1. Build

git clone https://github.com/desireco/sbagen && cd sbagen
make            # dev/sbagen-fixed — file output (WAV)
make alsa       # rebuild with live ALSA playback — no /dev/dsp needed
make test       # 87-check regression suite
make check      # builds clean at -O0 through -Os

2. Play or render

# play a session live (ALSA build)
dev/sbagen-fixed my-session.sbg

# or render straight to WAV
dev/sbagen-fixed -o out.wav my-session.sbg

# helper: MP3 render — a whole .sbg file, or a one-line tone-set
./mksounds.sh focus10 dev/examples/focus/focus-10-a.sbg
./mksounds.sh drift '200+10/0.5' 00:30:00

3. Anatomy of a session

## One-hour focus: 40 Hz gamma + 24 Hz beta over pink noise
all-off: -
focus:   pink/20 180+40/30 320+24/25

0:00:00  focus
1:00:00  all-off

Tone-set line: carrier+beat/amplitude, amplitudes on a 0–100 scale (keep the sum under 100). Schedule lines: time name — absolute, NOW, or +mm:ss relative. 🎧 Headphones required — binaural beats collapse on speakers.

Live playback is Linux (ALSA). On Windows and macOS the plain build renders WAV files — or use SBaGen+ installers.

Three solid sessions

Copy, save as a .sbg file, play. A full library of 130 example sequences ships in the repo — these three are all you need to start.

Focus 40 Hz gamma

Sharp attention for deep work — 180 Hz carrier over a quiet pink bed.

all-off: -
focus: pink/15 180+40/25

0:00:00  focus
1:00:00  all-off

Relaxation 10 Hz alpha

Unwind without getting sleepy — 200 Hz carrier, half an hour.

all-off: -
relax: pink/10 200+10/20

0:00:00  relax
0:30:00  all-off

Creativity 6 Hz theta

Loose, associative thinking — 150 Hz carrier over a warm brown bed.

all-off: -
create: brown/10 150+6/20

0:00:00  create
0:45:00  all-off

Play any of them with dev/sbagen-fixed focus.sbg — and browse the full 130-sequence library on GitHub.

Questions

Is this the official SBaGen site?

No. The official home of SBaGen is uazu.net/sbagen — SBaGen is © Jim Peters and released under the GPL v2. This family page is maintained alongside the maintained fork; it is not affiliated with or endorsed by Jim Peters.

What changed in the maintained fork?

Only what had to change: defect fixes found while auditing the 1.4.5 code, a regression suite (golden hashes captured from the pristine upstream build, plus one test per fixed defect), a Makefile replacing the old build scripts, and the ALSA backend. The audio behavior of fixed builds matches upstream — that is what the golden hashes pin. The result: as close to the original as will work well on a modern machine.

Which one should I use?

Want the classic tool working on modern Linux? The maintained fork. Prefer installers, Docker, or isochronic tones? SBaGen+. Building something new — modern formats, embeddable engine, MIT license? Entrain.