CornellJam
A browser music session where nearby players join by QR code, play instruments on their phones, and hear the mix through one shared speaker.
Top 10 · LotusHacks · 20 March 2026
Playing Together
We built CornellJam for nearby players using ordinary browsers rather than separate instruments. Players join a host's session by QR code, choose drums, bass, melody, or effects, and tap the pads on their phones.
The host controls tempo and playback, and the session aligns taps to the beat before playing the shared mix. Bass and melody draw from the same small set of notes. The prototype shows how a group can contribute different parts to one piece of music without each phone playing a separate full mix.
Building a Shared Music Session
Joining the Room
A session code connects the host and players to the same Socket.IO room. Players join with a display name rather than creating an account. The server broadcasts membership and playback changes to the room, but sends instrument input to the host for sound generation. The event flow documentation describes this separation between shared session updates and player controls.
Keeping Players in Time
The server maintains one beat clock per session and sends beat ticks to the connected browsers. Those events drive the beat indicators, rather than each phone running its own metronome. For each tap, quantization assigns the input to the current or next beat according to its timestamp relative to the server's beat start. The active clock and connected players stay in memory; the database holds session and player records.
Producing the Mix
Players send control events rather than recorded audio. The host uses Web Audio to turn those events into synthesized instruments and combine them into one speaker output. Phones can play local previews without becoming separate hosts for the full mix. Bass and melody use a C major pentatonic scale, so both instruments draw from a shared set of notes.
Session Components
| Component | Responsibility |
|---|---|
| Phone | Instrument pads, local previews, and beat indicators. |
| Server | Node.js sessions and beat clock, with Socket.IO event delivery. |
| Host | Tempo, playback controls, and Web Audio synthesis. |
| Storage | MySQL or TiDB session metadata through Drizzle. |
Team
Built with Đàn Trần and Lê Bách Nhân Nguyễn.