A powerful drum sequencer built with Web Audio API. Create beats in your browser with synthesized drum sounds - no samples required.
BeatR is a modern, browser-based drum machine that uses the Web Audio API to synthesize drum sounds in real-time. With an intuitive grid interface and precise timing, you can create professional-sounding beats without any external audio files.
We've completely overhauled the audio engine and UI to bring you a professional-grade beat-making experience:
- ๐๏ธ Full Mixer Console - Control volume, pan, 3-band EQ, and reverb for every single channel.
- ๐ Groove Control - Break away from the rigid grid with adjustable swing parameters.
- ๐ฅ WAV Export - Record and export your beats directly to high-quality WAV files.
- ๐จ Visual Polish - Enhanced UI with smoother animations, new V2 branding, and refined controls.
- ๐ต 6 Synthesized Instruments - Kick, Snare, Hi-Hat, Tom, Clap, and Rim Shot
- ๐น 16-Step Sequencer - Classic drum machine grid interface
- ๐จ Modern Design - Clean, responsive UI with dark/light theme support
- ๐๏ธ Full Mixer - Volume, Pan, EQ, and Reverb per channel
- ๐ Swing/Groove - Add human feel to your beats
- ๐ Audio Visualizer - Real-time waveform visualization
- โก Precise Timing - Web Audio API scheduler for tight, accurate playback
- ๐พ Pattern Storage - Save and load your beats with localStorage
- ๐ฒ Pattern Generator - Create random patterns for inspiration
- ๐ฅ Audio Export - Export your beats as WAV files
- ๐ Zero Dependencies - Pure vanilla JavaScript, no frameworks required
- ๐ฑ Fully Responsive - Works on desktop, tablet, and mobile
Visit beatr.samseen.dev
# Clone the repository
git clone https://github.com/SamSeenX/beatr.git
cd beatr
# Open in browser
open index.html
# OR run a local server (recommended)
python3 -m http.server 8000
# Then visit http://localhost:8000- Play/Stop - Click the play button to start/stop playback
- Tempo - Adjust BPM (60-200) with the slider
- Grid - Click cells to toggle drum hits on/off
- Theme - Toggle between dark and light modes
| Button | Action |
|---|---|
| ๐ Clear | Remove all beats from the grid |
| ๐ฒ Random | Generate a random pattern |
| ๐พ Save | Save current pattern to browser storage |
| ๐ฅ Load | Load previously saved pattern |
- KICK - Deep bass drum
- SNARE - Crisp snare with noise
- HI-HAT - Bright metallic cymbal
- TOM - Mid-range drum
- CLAP - Hand clap sound
- RIM - Rim shot
- Start with a simple kick pattern (every 4 steps)
- Add snare on steps 5 and 13 for a classic beat
- Use hi-hats for rhythm (every 2-4 steps)
- Experiment with the random generator for inspiration
- Save your favorite patterns before closing the browser
beatr/
โโโ index.html # Main application page
โโโ css/
โ โโโ style.css # Styles with theme support
โโโ js/
โ โโโ audio-engine.js # Web Audio API synthesis
โ โโโ app.js # Application logic
โโโ assets/ # Images and icons
โโโ LICENSE # MIT License
โโโ README.md # This file
Unlike traditional drum machines that use audio samples, this sequencer synthesizes all sounds using the Web Audio API:
- Kick - Oscillator with exponential frequency decay
- Snare - White noise + triangle wave oscillator
- Hi-Hat - Filtered white noise burst
- Tom - Oscillator with frequency sweep
- Clap - Bandpass-filtered noise with envelope
- Rim - Square wave with bandpass filter
The sequencer uses a look-ahead scheduler to ensure tight, accurate timing:
- Schedules notes slightly ahead of playback time
- Uses Web Audio API's precise timing (not setTimeout)
- Updates UI independently of audio scheduling
- Maintains consistent tempo even under heavy load
- Chrome/Edge 89+
- Firefox 88+
- Safari 14.1+
- Opera 75+
Requires Web Audio API support.
- Zero latency - Direct audio synthesis
- Low CPU usage - Efficient Web Audio API implementation
- No network requests - All sounds generated in-browser
- Small footprint - ~15KB total (uncompressed)
Edit js/audio-engine.js to customize drum sounds:
playKick(time) {
// Adjust frequency, gain, or envelope
osc.frequency.setValueAtTime(150, time); // Change pitch
gain.gain.setValueAtTime(1, time); // Change volume
}- Add synthesis method to
AudioEngineclass - Add instrument name to
INSTRUMENTSarray inapp.js - Update
playSound()switch statement
Modify the STEPS constant in app.js:
const STEPS = 32; // For a 32-step sequencer- Export patterns as MIDI files
- Additional drum sounds (cowbell, conga, etc.)
- Swing/groove control
- Individual instrument volume controls
- Pattern chaining
- Audio recording/export
- Keyboard shortcuts
- Multiple pattern banks
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by classic drum machines like the Roland TR-808
- Built with the powerful Web Audio API
- Design inspired by modern music production tools
If you find this project useful:
- โญ Star the repository
- ๐ Report issues
- ๐ก Suggest improvements
- โ Buy me a coffee
Created with โค๏ธ by SamSeen