David LoderTechnology Professional

Practice2020

JavaScript Drumkit

A playable drum sampler driven by keyboard events, in vanilla JavaScript with no libraries.

  • JavaScript
  • CSS
  • Web Audio
Screenshot of JavaScript Drumkit

Press a key, hear a sample, watch the pad light up. It's a small thing, but it's a clean lesson in keyboard event handling, the Audio API, and using transition events to know when an animation has finished rather than guessing with a timeout.