Multiplayer polyrhythmic drum sequencer demo using PartyKit, Yjs and Tone.js. Designed by Mark Hurrell.
demo.mp4
There are three fixed tracks. You can turn the steps on and off. You can change the length of the loop separately for each track.
It gets noise. People dance with their cursors.
The app is built and served with PartyKit using the Remix template.
Data sync uses Yjs. So the backend party doesn't do much at all. But the Yjs doc is wrapped inside a hook that provides functionality: look at useSequencer for the high-level functions to edit the steps and the ranges.
The sound itself plays using the Tone.js Web Audio framework. Have a look at the Player component to see how the sequencer data is used to schedule the sounds.
It's hidden but this is already a multi room app. (Change the /rooms/1999
in the URL and pick a different room ID.) So it would be fun to allow for users to pick a room, and create and share their own set of tracks from a bank of samples.