A powerful, web-based beat machine and sound design studio with AI-powered sound effects generation. Create professional beats, manage sound libraries, and generate custom sound effects using ElevenLabs AI technology.
- 16-step sequencer with expandable tracks (starts with 8)
- Real-time playback with visual step indicators
- Individual track controls (volume, mute, clear, delete)
- Pattern management (create, switch, delete multiple patterns)
- Professional transport controls (play, pause, stop, rewind)
- Web Audio API synthesis with ADSR envelopes
- Multiple waveforms (sine, square, triangle, sawtooth)
- Built-in sound presets (kicks, snares, hi-hats, bass, synths)
- Real-time audio processing with filters and effects
- Swing/groove control for humanized timing
- ElevenLabs integration for text-to-sound generation
- Advanced control options (duration, prompt influence)
- Category organization for generated sounds
- Instant integration with the sequencer
- Professional sound design capabilities
- Organized categories (Drums, Melodic, FX, Custom, Generated)
- File upload support for custom audio samples
- Drag-and-drop workflow for sound selection
- Sound preview and deletion capabilities
- Custom category creation
- SQLite database for reliable storage
- Pattern save/load functionality
- Settings persistence (API keys, preferences)
- Sound library management with metadata
- Export capabilities (JSON format)
- Black beatbox machine aesthetic with gradients and glows
- Responsive design with proper scrolling
- Intuitive workflow with visual feedback
- Professional controls mimicking hardware interfaces
- Toggle sidebar for optimal workspace management
- PHP 7.4+ with SQLite support
- Web server (Apache, Nginx, or PHP built-in server)
- Modern web browser with Web Audio API support
- ElevenLabs API key (optional, for AI sound generation)
- Clone or download the project:
git clone <repository-url>
cd beatbox-machine- Start the server:
# Using PHP built-in server
php -S localhost:8000
# Or place index.php in your web server directory- Access the application:
http://localhost:8000
- Database auto-creation: The SQLite database will be created automatically on first run.
- Visit ElevenLabs Dashboard
- Sign up/login to your account
- Navigate to Settings > API Keys
- Create a new API key or copy an existing one
- Click the βοΈ gear icon in the header
- Paste your API key in the input field
- Click πΎ to save - you'll see a β confirmation
- Start generating sounds in the Sound Library sidebar
- ElevenLabs offers a free tier with limited generations
- Check ElevenLabs Pricing for current rates
- Sound generation uses the
/v1/sound-generationendpoint
- Select a sound from the Sound Library (click to expand sidebar)
- Click grid squares to place/remove sounds on tracks
- Press Play
βΆοΈ to start the sequence - Adjust tempo, volume, and swing with the sliders
- Add tracks with the "+ Add Track" button
- Mute tracks with the "M" button
- Adjust individual track volume with sliders
- Clear tracks with the "Clear" button
- Delete tracks with the "Del" button
- Switch between patterns using the pattern tabs
- Create new patterns with the "+ Add Pattern" button
- Delete patterns with the Γ button (must have multiple patterns)
- Expand the Sound Library sidebar
- Describe your desired sound in the AI section:
- "Epic drum hit with deep reverb"
- "Futuristic laser beam sound"
- "Atmospheric pad with ethereal reverb"
- Adjust advanced options (duration, prompt influence, category)
- Click "Generate Sound Effect"
- Generated sound auto-appears in the library and can be used immediately
- Upload custom audio files using the upload buttons
- Save patterns to database with the Save button
- Export patterns as JSON files for backup/sharing
- Record audio from microphone (basic implementation)
- Frontend: Vanilla JavaScript, CSS3, HTML5
- Backend: PHP 7.4+ with PDO
- Database: SQLite 3
- Audio: Web Audio API
- AI Integration: ElevenLabs Sound Effects API
- File Handling: PHP file upload with security validation
beatbox-machine/
βββ index.php # Main application file (all-in-one)
βββ beatbox.db # SQLite database (auto-created)
βββ uploads/ # User-uploaded audio files (auto-created)
βββ README.md # This file
-- Patterns table
patterns (id, name, data, created_at)
-- Sounds table
sounds (id, name, category, subcategory, file_path, sound_data, created_at)
-- Tracks table
tracks (id, pattern_id, name, volume, muted, color, created_at)
-- Settings table
settings (id, setting_key, setting_value, created_at)- Real-time synthesis using Web Audio API oscillators
- ADSR envelope shaping for professional sound design
- Low-pass filtering with adjustable cutoff and resonance
- Multi-track mixing with individual volume controls
- Swing timing implementation for groove
- Built-in sounds: Edit the
samplePresetsobject in JavaScript - Upload files: Use the upload functionality in the UI
- AI generation: Use the ElevenLabs integration
- Custom synthesis: Modify the
createAdvancedSoundfunction
- All styles are contained in the
<style>section ofindex.php - CSS variables can be added for easier theme customization
- Gradient colors and glow effects define the aesthetic
- Add new tables by modifying the PHP database initialization
- Settings table can store additional user preferences
- Tracks table can be extended with more properties
Database not created
- Ensure PHP has SQLite extension enabled
- Check file permissions in the directory
- Verify web server has write access
Sounds not playing
- Check browser console for Web Audio API errors
- Ensure browser supports Web Audio API (Chrome, Firefox, Safari)
- Try clicking play button to initialize audio context (required by some browsers)
ElevenLabs generation fails
- Verify API key is correct and saved
- Check your ElevenLabs account limits/credits
- Ensure internet connection is stable
- Check browser console for detailed error messages
File upload issues
- Check PHP
upload_max_filesizeandpost_max_sizesettings - Ensure
uploads/directory is writable - Verify file is a supported audio format
- Chrome 66+ (recommended)
- Firefox 60+
- Safari 14+
- Edge 79+
- Limit concurrent sounds for better performance
- Use shorter audio files for faster loading
- Clear unused patterns to reduce memory usage
- Close other audio applications to avoid conflicts
- Fork the repository
- Make your changes in
index.php - Test thoroughly with different browsers
- Submit a pull request with detailed description
- Audio effects (reverb, delay, distortion)
- MIDI support for external controllers
- Song arrangement mode for full track creation
- Collaboration features for sharing patterns
- Mobile responsive optimizations
This project is open source and available under the MIT License.
- ElevenLabs for the amazing Sound Effects API
- Web Audio API developers for enabling browser-based audio
- PHP and SQLite communities for robust backend tools
- CSS Gradient techniques for the beautiful UI design
- Issues: Create an issue in the repository
- Questions: Check the troubleshooting section first
- Feature Requests: Open a discussion or issue
Made with β€οΈ for music producers and beat makers
π΅ Start creating professional beats today! π΅