integer overflow is oscillation — a tiny synth that folds back around max int (int8->16->32->float), fed by your mic and its own output
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-04 01:25:58 +02:00
recordings polish: align sync deploy — full workspace push 2026-08-04 01:25:58 +02:00
.gitignore overflow — integer overflow is oscillation (int8->16->32->float, mic + feedback) 2026-07-24 23:01:21 +02:00
overflow.py polish: align sync deploy — full workspace push 2026-08-04 01:25:58 +02:00
README.md overflow — integer overflow is oscillation (int8->16->32->float, mic + feedback) 2026-07-24 23:01:21 +02:00

overflow

Integer overflow is oscillation.

A phase accumulator that folds back around max int is a sawtooth oscillator — the beating heart of every digital synth. This tiny script walks that one idea up the ladder — int8 → int16 → int32 → float — each a different resolution of the same wraparound, and feeds it two inputs: its own output (feedback) and the room (your mic). Out comes sound.

Set it up

# clone, then, inside the folder:
uv venv && source .venv/bin/activate          # or: python3 -m venv .venv && source .venv/bin/activate
uv pip install numpy sounddevice              # or: pip install numpy sounddevice
python overflow.py
  • On macOS you'll get a microphone-permission prompt the first time — allow it (Terminal → mic).
  • Turn your speakers down first. The feedback loop is literal; headphones tame it.
  • Ctrl-C to stop.

What you're hearing

Every ~6 seconds it changes the width of the fold:

rung character
int8 coarse, buzzy, stepped — 256 levels of fold
int16 fuller, rounder
int32 smooth
float glassy — the fold with no floor under it

Same oscillator, different resolution of the same overflow. The pitch bends with how loud the room is (the mic) and with its own last output (the feedback). Two inputs, one fold.

Elegant, and easy. 🜂 ahogy a dolgok vannak