An interactive drum sequencer with AI-powered beat generation and retro pixel aesthetics.
- 🎤 Voice Input: Speak your beat requests using OpenAI's Whisper API
- 🤖 AI Beat Generation: Generate beats from text descriptions using GPT-4
- 🎛️ Manual Sequencer: 16-step drum sequencer with kick, snare, and hi-hat
- 🎨 Retro Pixel Style: Authentic 8-bit aesthetic with neon colors
- 🎵 Real-time Audio: Professional drum sounds using Tone.js
- 🎯 Preset Library: 10 different genre presets (rock, hip-hop, electronic, etc.)
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5173/
For voice input and AI-powered beat generation, you'll need an OpenAI API key:
-
Get an OpenAI API key from OpenAI Platform
-
Create a
.envfile in the project root:cp .env.example .env
-
Add your API key to the
.envfile:VITE_OPENAI_API_KEY=your_actual_api_key_here -
Restart the development server for changes to take effect
- ✅ Text input with local beat mapping
- ✅ Manual sequencer editing
- ✅ Preset selection
- ✅ Real-time playback
- ❌ Voice input (disabled)
- ❌ AI-powered beat generation (falls back to local mapping)
- ✅ All features above
- ✅ Voice input with speech recognition
- ✅ Advanced AI beat generation from natural language
-
Text Input: Type descriptions like:
- "heavy metal drums"
- "chill hip hop beat"
- "fast electronic dance"
-
Voice Input: Click the microphone and speak your request
-
Manual Editing: Click the sequencer grid to add/remove drum hits
-
Preset Selection: Use the genre buttons for quick beat loading
-
Playback Controls: Play, pause, stop, and adjust tempo (60-200 BPM)
- Frontend: React + TypeScript + Vite
- Audio: Tone.js for synthesis and sequencing
- AI: OpenAI API (GPT-4 + Whisper)
- Styling: Custom CSS with retro pixel aesthetics
src/
├── components/
│ └── BeatMachine.tsx # Main beat machine component
├── utils/
│ ├── drumEngine.ts # Audio engine with Tone.js
│ ├── beatPatterns.ts # Preset beat patterns
│ └── openaiService.ts # OpenAI API integration
├── types/
│ └── index.ts # TypeScript type definitions
└── App.tsx # Main application
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build
- Modern browsers with Web Audio API support
- Microphone access required for voice input
- HTTPS required for microphone in production
MIT License - feel free to use this project for learning and experimentation!