BYTEBEAT LAB

one-line music — output = u8( f(t) ), t counting up at 8000 Hz

tweak:
Ctrl+Enter = play/pause
t = 0 0.0 s
click a cell to hear it β€” mutate again breeds from whatever you picked
library & export
what is this / notes

Each sample: evaluate the expression at integer t, keep the low 8 bits (& 255), play it as an unsigned byte. t advances at the selected rate (8000 Hz is the classic). Discovered by viznut, 2011.

Expressions are JavaScript: bitwise ops (>> << & | ^) behave like C int32, but / is floating point — write (x/y)|0 when you want C-style integer division. Math functions are in scope (sin(t) etc. work bare).

Exploring: drag the tweak chips to bend constants while playing; hit 🧬 mutate to breed variations and click thumbnails to audition them (t keeps running, so it stays in the groove); β˜… save keepers to the library.

Rabbit holes: viznut's 3rd video · kragen's write-up · dollchan bytebeat composer · greggman/html5bytebeat