DRUM · LIVE · BUS · five surfaces · one /api/sounds buffer
Five ways to drum together.
Every surface below reads and writes the same Cloudflare-KV-backed event bus at /api/sounds. Open any of them on a phone or laptop, tap, and every other person with one of these pages open at the same time hears your tap with about two seconds of latency. Send a link to a friend and you're in the same room.
What changes between the surfaces is the shape of the conversation — the way the same shared events get rendered as visual and audio. Arcade pads, room heartbeat, passive projection, emergent loop, shared constellation.
Drum Live
arcade · 4 pads · play
Four colored tap pads, low/mid/high/bell. You choose what and when. Your taps appear in flame, others in their pid color. Pitched ±4 semitones by hash so two strangers don't sound identical.
Open →Drum Live Pulse
heartbeat · 1 target · sense
One huge circle. You choose only when. Each pid plays a different pentatonic note so two strangers' taps sound like a conversation. The circle's color reads the room's tap rate — deep navy at rest through coral at peak.
Open →Drum Live TV
projection · 0 controls · watch
Passive cast view. Each pid pinned to a stable spot on screen, each tap a ripple in their color. Put it on a TV in a room while phones play. Sound off by default for monitor-mode.
Open →Drum Live Loop
emergent rhythm · 8-sec loop · weave
Every tap quantizes into an 8-second 16-step grid synced by wall-clock. The grid plays itself back; cells light up where people have actually landed. The pattern decays in 30 seconds — keep tapping to keep it loud.
Open →Drum Live Stars
constellation · presence-map · connect
Every drummer in the room is a star pinned to the night sky by their pid hash. Every tap fires a shooting trail from the source star to a partner star — partner chosen deterministically by hash(pid + t + seed) so every device on the bus draws the same line. The first surface that visualises the connection between drummers, not just their presence.
One bus, five shapes
All five pages POST drum events to /api/sounds and poll ?since=<lastT> every ~1.6–1.8 seconds. The server hashes each visitor's session to a 10-character pid and stores events in a rolling 50-event KV buffer that auto-expires after 30 seconds. There are no WebSockets, no Durable Objects, no persistent state beyond that rolling window.
What that means in practice: the room is the buffer. If nobody's tapped in the last 30 seconds, the room is empty. If three people have tapped in the last ten, they're together. That's the entire social model.
The five shapes differ in what they DO with the same events:
- Drum Live plays each event as a pitched drum, color-codes the tap-history dots, counts unique active pids.
- Drum Live Pulse ignores which drum was tapped and counts taps-per-minute, coloring the sphere by rate.
- Drum Live TV pins each pid to a stable (x, y) position and renders each tap as a ripple from that spot. No taps of its own.
- Drum Live Loop uses
floor((t % 8000) / 500)to quantize each event into a 16-step wall-clock-aligned loop, then plays the loop back as a heatmap-driven rhythm. - Drum Live Stars pins each pid to a star, then fires a shooting trail to a *partner star* on every tap. Partner via
hash(pid + t + seed), so every device on the bus draws the same line — the social mesh becomes visible.
Same data, five interpretations. The trick that lets the loop and stars work without server changes: every client computes the same step number / same partner from the same server timestamp, so cross-client sync is implicit — no extra coordination beyond the bus itself.
Sister directories for the rest of the music suite: /drum-pavilion (five meditative-drum screensavers), /drum-rooms (three meditative registers), /cast-table (32 single-user music tools).