Skip to content

Latest commit

Β 

History

History
66 lines (51 loc) Β· 1.78 KB

File metadata and controls

66 lines (51 loc) Β· 1.78 KB

πŸ₯ JavaScript Drum Kit

A fun interactive drum kit built with vanilla JavaScript. Press keys on your keyboard or click the buttons to play drum sounds!

Features

  • 🎹 9 Drum Sounds - Clap, Hi-hat, Kick, Openhat, Boom, Ride, Snare, Tom, and Tink
  • ⌨️ Keyboard Support - Press A, S, D, F, G, H, J, K, L to play sounds
  • πŸ“± Mobile Friendly - Click/tap buttons to play on touch devices
  • ✨ Visual Feedback - Keys animate when played
  • πŸ”„ Rapid Fire - Play multiple sounds simultaneously

How to Use

  1. Open index-FINISHED.html in your web browser

  2. Press keyboard keys A through L to play different drum sounds:

    • A - Clap
    • S - Hi-hat
    • D - Kick
    • F - Open Hat
    • G - Boom
    • H - Ride
    • J - Snare
    • K - Tom
    • L - Tink
  3. Or click/tap the drum pads directly on the screen

Project Structure

β”œβ”€β”€ index-FINISHED.html    # Main HTML file
β”œβ”€β”€ 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
β”‚   └── tink.wav
└── README.md              # This file

Technologies Used

  • HTML5 - Audio elements and structure
  • CSS3 - Styling and key animations
  • Vanilla JavaScript - Event handling and audio playback

Browser Support

Works on all modern browsers that support:

  • HTML5 Audio API
  • ES6 JavaScript
  • CSS3 Transforms

Notes

  • Sounds play with visual feedback (key scale animation)
  • Multiple keys can be pressed simultaneously
  • Audio resets on each keystroke for rapid playback

Enjoy making beats! 🎡