Interactive virtual drum kit that lets you play 8 different drum sounds using your keyboard or mouse clicks.
- ๐น 8 unique drum sounds with keyboard controls
- ๐ฑ๏ธ Mouse click support on all drums
- ๐จ Visual feedback with animations on key press
- ๐ High-quality drum sound samples
- ๐ฑ Fully responsive design
- ๐ No installation required - runs directly in browser
- Visit the live demo
- Press the corresponding keys on your keyboard
- Or click the drum buttons with your mouse
- Create your own beats and rhythms!
| Key | Drum Sound |
|---|---|
| A | Clap ๐ |
| C | Hi-Hat (Closed) ๐ฉ |
| Z | Kick Drum ๐ฅ |
| F | Open Hi-Hat ๐ |
| G | Boom ๐ฅ |
| H | Ride Cymbal ๐ |
| S | Snare Drum ๐ฅ |
| K | Tom ๐ช |
- HTML5 - Structure
- CSS3 - Styling and animations
- Vanilla JavaScript - Interactivity and event handling
- HTML5 Audio API - Sound playback
# Clone the repository
git clone https://github.com/smita1078/Music-DrumKit.git
# Navigate to directory
cd drumkit
# Open in browser
open index.html
# Or simply double-click index.htmldrumkit/
โโโ index.html + js script # Main HTML file # JavaScript logic
โโโ style.css # Styling and animations
โโโ sounds/ # Audio files folder
โ โโโ clap.wav
โ โโโ hihat.wav
โ โโโ kick.wav
โ โโโ openhat.wav
โ โโโ boom.wav
โ โโโ ride.wav
โ โโโ snare.wav
โ โโโ tom.wav
โโโ README.md
This project demonstrates:
- โ DOM manipulation
- โ Event listeners (keyboard events & mouse clicks)
- โ Audio playback in JavaScript
- โ CSS animations and transitions
- โ Responsive web design
- โ Clean code structure
document.addEventListener('keypress', function(event) {
playSound(event.key);
addAnimation(event.key);
});Each key press triggers a CSS animation for visual feedback, making the experience more interactive and engaging.
You can easily customize:
- Sounds: Replace audio files in
/soundsfolder - Keys: Modify key mappings in
script.js - Styling: Edit
style.cssfor colors and animations - Layout: Adjust drum positions in
index.html
Free to use for learning and personal projects!
Smita Prajapati
- ๐ผ Senior Analyst @ Deutsche Bank
- ๐ NIT Raipur Silver Medalist
- ๐ Portfolio: smita-portfolio.netlify.app
- ๐ป GitHub: @smita1078
- ๐ผ LinkedIn: Smita Prajapati
Contributions, issues, and feature requests are welcome!
- Fork the project
- 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
- Built as part of web development learning journey
๐ต Happy Drumming! ๐ฅ