Create a drumset using HTML, CSS, JS.
-
Focus on the JS. Get it working. Make it look pretty later.
-
Look up how to play audio in html and js. (w3schools)
-
Add event listeners for keyboard and/or mouse clicks.
-
for keyboard events, you can get the key by looking at the "event" object's keyCode.
-
for mouse click events, you can get the key by looking at the "this" object.
-
-
The repo contains a folder with soundfiles.
This looks complex, but its pretty simple.
- Get the clicked element, or key press.
- Use it's value to get the correct audio element.
- Play the audio element.
Have fun, good luck!