Soundless Beatbox

A playful rhythm composer where users build "silent beats" by toggling steps on a 16-step grid across multiple tracks (kick, snare, hat, clap), with instant playback using the Web Audio API and a visual metronome. Include preset patterns, swing/tempo controls, and a simple "share" feature that encodes the pattern into a URL plus optional localStorage saving for personal libraries. The UI is split into clear components (transport controls, track grid, preset manager, and pattern export/import) and stays fully client-side.

To Do30
Scaffold Vite + Tailwind

Run: npm create vite@latest . -- --template react-ts && npm i && npm i -D tailwindcss postcss autoprefixer && npx tailwindcss init -p && npm i class-variance-authority clsx tailwind-merge lucide-react && npx shadcn@latest init

by system

Add Tailwind styles

Configure tailwind.config and src/index.css with Tailwind directives and a basic app theme.

by system

Create app layout

Build src/App.tsx with header/main layout and placeholder sections for transport, grid, presets, and share.

by system

Define pattern types

Add src/types/pattern.ts defining TrackId, Pattern (4x16), and helper constants (steps/tracks).

by system

Pattern state hook

Create src/state/usePattern.ts to store current pattern and expose toggleStep/clear/fill utilities.

by system

Tempo swing state

Create src/state/useTransport.ts to store isPlaying, bpm, swing, and currentStep.

by system

WebAudio engine module

Implement src/audio/engine.ts to manage AudioContext, master gain, and per-voice synth/noise nodes.

by system

Step scheduler module

Implement src/audio/scheduler.ts for 16-step scheduling with lookahead timing and swing offset.

by system

Audio playback hook

Create src/audio/usePlayback.ts to connect transport/pattern state to scheduler start/stop and step callbacks.

by system

Metronome visual bar

Build src/components/Metronome.tsx that highlights the current 16th step.

by system

Transport controls UI

Build src/components/TransportControls.tsx with Play/Stop, BPM slider/input, Swing slider, and Clear button.

by system

Track grid shell

Build src/components/TrackGrid.tsx that renders tracks and steps from the Pattern type.

by system

Step button component

Build src/components/StepCell.tsx as a clickable/toggleable step cell with active/current styling.

by system

Track row component

Build src/components/TrackRow.tsx to render one track label plus 16 StepCell instances.

by system

Wire grid interactions

Connect TrackGrid/TrackRow/StepCell to usePattern toggleStep and transport currentStep highlight.

by system

Keyboard shortcuts

Add src/hooks/useHotkeys.ts to support space play/stop and C to clear.

by system

Basic preset data

Create src/presets/builtinPresets.ts exporting a small list of named preset patterns.

by system

Preset manager UI

Build src/components/PresetManager.tsx to list built-in presets and load one into current pattern.

by system

Randomize pattern action

Add a randomize button and helper in usePattern to generate a simple randomized beat.

by system

Serialize pattern codec

Implement src/share/codec.ts to encode/decode pattern+bpm+swing into a compact URL-safe string.

by system

Share link component

Build src/components/SharePanel.tsx with a copy-to-clipboard URL and an import field to load encoded patterns.

by system

URL sync on load

Add src/share/useUrlPattern.ts to read pattern from location on startup and update URL when pattern changes.

by system

Local library storage

Implement src/storage/library.ts to save/load/delete named patterns in localStorage.

by system

Library manager UI

Build src/components/LibraryPanel.tsx to save current pattern with name and manage saved entries.

by system

Combine presets and library

Update PresetManager to show built-ins and saved patterns with consistent load behavior.

by system

shadcn UI primitives

Add needed shadcn/ui components (Button, Slider, Input, Card, Tabs) via generated files and use them in UI.

by system

Responsive styling pass

Refine Tailwind styling so the grid and controls work well on narrow screens.

by system

Audio safety and resume

Add user-gesture AudioContext resume handling and a master mute/volume control.

by system

Edge-case validations

Add guards for invalid decoded URLs/localStorage entries and provide simple inline error messages.

by system

Polish and docs

Update src/README.md with usage instructions, sharing format notes, and keyboard shortcuts.

by system

In Progress0
In Review0
Done0