Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

🎲 Entropy Beatbox

This is what entropy sounds like when it finds the pocket.

A drum machine that doesn't repeat itself. Ever.

Every 16th note, the OS's random number generator picks the instrument — kick, snare, or hi-hat. The swing isn't fixed; it breathes, slowly morphing from tight and mechanical to that lazy, behind-the-beat feel and back again on a ~10 second cycle. No loops. No presets. Just chaos with a pulse.


Requirements

Install dependencies:

pip install numpy sounddevice

macOS/Linux users: sounddevice may also require PortAudio.

  • macOS: brew install portaudio
  • Ubuntu/Debian: sudo apt-get install libportaudio2

Usage

Just run it:

python entropy_beatbox.py

Or dial it in with options:

# Slow and heavy
python entropy_beatbox.py --bpm 80 --kick-freq 45 --volume 0.18

# Fast and glitchy
python entropy_beatbox.py --bpm 160 --swing 0.05 --hat-freq 3000

# Maximum swing breathe, jazzier snare
python entropy_beatbox.py --bpm 95 --swing 0.4 --swing-rate 0.1 --snare-freq 180

# Lock the chaos down (no swing)
python entropy_beatbox.py --swing 0.0

Press Ctrl+C to stop.


Parameters

Flag Default Description
--bpm 110 Tempo in beats per minute
--volume 0.12 Master volume (0.0 – 1.0)
--swing 0.15 Max swing delay as a fraction of a tick (0.0 – 0.5)
--swing-rate 0.2 How fast the swing breathes in Hz (~0.1 = slow/lazy, ~0.5 = rapid)
--kick-freq 55 Kick drum noise frequency in Hz
--snare-freq 220 Snare noise frequency in Hz
--hat-freq 1500 Hi-hat noise frequency in Hz
--sample-rate 44100 Audio sample rate in Hz

How It Works

Instrument selection is driven by os.urandom() — actual OS entropy. Every tick, a single random byte decides what hits next: 40% kick, 30% hat, 30% snare. No pattern engine. No sequencer. Pure stochastic percussion.

The swing is a slow sine wave applied to off-beat (even-numbered) 16th notes. The sine oscillates over 1 / swing_rate seconds, so the delay between on-beats and off-beats breathes from zero up to max_swing and back. At 0.2 Hz (the default), one full swing breath takes about 10 seconds.

The sound is noise — each instrument is a wavetable of random bytes sampled at a pitch-dependent frequency, shaped by a sharp exponential decay envelope. Lo-fi, raw, percussive.


Vibe

Lo-fi chaos with a pulse. Industrial jazz energy. A drum circle held inside a computer that's running out of memory — in the best way.

The pocket is a jazz concept: that sweet spot where rhythm feels inevitable, locked in, almost gravitational. Entropy Beatbox achieves it by accident, through randomness. Like the universe doesn't plan the groove either. It just has enough chaos and enough structure and somehow funk emerges.


License

MIT — do whatever you want with it. Let the entropy flow.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages