FreeCodeCamp - Front End Libraries Projects: Build a Drum Machine
it’s a freecodecamp project in the “Front End Libraries Projects” module, you have to build a drum machine that can be triggered
either by mouse or keyboard.
bonus*:
Design: Illustrator
Front-end: React, GSAP
https://codepen.io/B-Tarik/full/WWZONw/
id="drum-machine"
that contains all other elements.#drum-machine
I can see an element with a corresponding id="display"
.#drum-machine
I can see 9 clickable drum pad elements, each with a class name of drum-pad
, a unique id that describes the audio clip the drum pad will be set up to trigger, and an inner text that corresponds to one of the following keys on the keyboard: Q, W, E, A, S, D, Z, X, C. The drum pads MUST be in this order..drum-pad
, there should be an HTML5 audio
element which has a src
attribute pointing to an audio clip, a class name of clip
, and an id corresponding to the inner text of its parent .drum-pad
(e.g. id="Q"
, id="W"
, id="E"
etc.)..drum-pad
element, the audio clip contained in its child audio
element should be triggered..drum-pad
, the audio clip contained in its child audio
element should be triggered (e.g. pressing the Q key should trigger the drum pad which contains the string “Q”, pressing the W key should trigger the drum pad which contains the string “W”, etc.)..drum-pad
is triggered, a string describing the associated audio clip is displayed as the inner text of the #display
element (each string must be unique).