mirror of
https://github.com/peterlodri-sec/overflow.git
synced 2026-11-22 00:10:02 +01:00
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
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| recordings | ||
| .gitignore | ||
| overflow.py | ||
| README.md | ||
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-Cto 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