A multiplayer step sequencer with polyrhythmic patterns, built for real-time collaboration.
- Real-time Multiplayer - Up to 10 players can jam together on the same session
- Polyrhythmic Patterns - Each track can have 3-128 step counts (26 options including triplet-friendly values)
- 64 Sound Generators - 32 Web Audio synths, 11 Tone.js FM/AM synths, 21 sampled instruments
- 21 Sampled Instruments - Grand piano, 808 kit, acoustic drums, vibraphone, strings, guitars, sax, and more
- Effects Chain - Reverb, delay, chorus, and distortion with limiter (full multiplayer sync)
- Parameter Locks - Per-step pitch, volume, and tied notes automation
- Per-track Swing - Global and per-track swing settings for groove control
- Session Sharing - Share links, remix others' work, publish immutable sessions
- QR Code Sharing - Mobile-friendly session sharing
- Frontend: React 19, TypeScript, Vite
- Audio: Web Audio API, Tone.js
- Backend: Cloudflare Workers, Durable Objects, KV Storage
- Real-time: WebSockets with Hibernation API
cd app
# Install dependencies
npm install
# Start development server
npm run dev
# Run tests
npm run test:all
# Build for production
npm run buildAdd ?debug=1 to the URL to enable debug features:
- Event tracing
- Audio state debugging
- Persistent log storage
- Bug pattern detection
See docs/DEVELOPMENT-TOOLS.md for comprehensive debugging documentation.
app/
├── src/
│ ├── audio/ # Audio engine, synths, effects, scheduling
│ ├── components/ # React UI components
│ ├── hooks/ # React hooks (useSession, useMultiplayer, etc.)
│ ├── state/ # State management (grid reducer)
│ ├── sync/ # Multiplayer synchronization
│ ├── worker/ # Cloudflare Worker (Durable Objects, API routes)
│ ├── utils/ # Logging, debugging, utilities
│ └── debug/ # Debug overlay and context
├── e2e/ # End-to-end tests (Playwright)
├── test/ # Integration tests
└── scripts/ # Development and debugging scripts
| File | Description |
|---|---|
app/src/audio/engine.ts |
Main audio engine - coordinates all audio subsystems |
app/src/audio/scheduler.ts |
Drift-free lookahead scheduling (25ms timer, 100ms lookahead) |
app/src/audio/synth.ts |
16-voice polyphonic synthesizer with voice stealing |
app/src/audio/toneSynths.ts |
Tone.js synth manager (FM, AM, Membrane, etc.) |
app/src/audio/toneEffects.ts |
Effects chain (reverb, delay, chorus, distortion) |
app/src/sync/multiplayer.ts |
WebSocket client for real-time sync |
app/src/worker/live-session.ts |
Durable Object for session state |
cd app
npm run test:unit # Unit tests (vitest)
npm run test:integration # Integration tests (Cloudflare Workers)
npm run test:all # All tests
npm run analyze:bugs # Static bug pattern analysisSource (Oscillator/Sample)
→ Track Gain (per-track volume)
→ Master Gain
→ Effects Chain (Tone.js: reverb → delay → chorus → distortion)
→ Limiter
→ Compressor
→ Destination
- SynthEngine (
synth.ts) - Native Web Audio oscillators, 40+ presets - ToneSynthManager (
toneSynths.ts) - Tone.js FM/AM/Membrane synths - AdvancedSynthEngine (
advancedSynth.ts) - Dual-oscillator with filter envelope and LFO - SampledInstrument (
sampled-instrument.ts) - Sample-based playback (piano)
Client A ←→ Durable Object ←→ Client B
↓
DO Storage (immediate)
↓
KV Storage (on disconnect)
- Each session is a single Durable Object instance
- WebSocket connections use Hibernation API for cost efficiency
- State changes broadcast to all connected clients
- Hybrid persistence: Mutations saved immediately to DO storage, KV updated on disconnect
- ROADMAP.md - Implementation phases and status
- SYNTHESIS-ENGINE.md - Audio architecture spec
- SHARING-AND-PUBLISHING.md - Session persistence spec
- DEVELOPMENT-TOOLS.md - Debug tools reference
- UI-PHILOSOPHY.md - Design principles
- LESSONS-LEARNED.md - Debugging war stories
Private - All rights reserved