A Drum Machine app
- ➡ Solution URL: Repo GitHub SimonaPiz/
- ☑ Live Site URL: drum-machine-simonapiz.netlify.app
Build an app that is functionally similar to this: drum-machine.freecodecamp.
- I should be able to see an outer container with a corresponding
id="drum-machine"
that contains all other elements. - Within
#drum-machine
I can see an element with a correspondingid="display"
. - Within
#drum-machine
I can see 9 clickable drum pad elements, each with a class name ofdrum-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. - Within each
.drum-pad
, there should be an HTML5audio
element which has asrc
attribute pointing to an audio clip, a class name ofclip
, and an id corresponding to the inner text of its parent.drum-pad
(e.g.id="Q"
,id="W"
,id="E"
etc.). - When I click on a
.drum-pad
element, the audio clip contained in its childaudio
element should be triggered. - When I press the trigger key associated with each
.drum-pad
, the audio clip contained in its childaudio
element should be triggered (e.g. pressing theQ
key should trigger the drum pad which contains the stringQ
, pressing theW
key should trigger the drum pad which contains the stringW
, etc.). - When a
.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).
-
🗂 Initialize the project on GitHub and use Git for log my commits and versioning my work.
-
✏ I looked at the designs to start planning how to approach the project
-
⚙ Implemented project features:
- Create React Elements ☑issue #1
- 🟧 Main component
id="drum-machine"
- 🟩 pads container
- 🟦 9 clickable drum
.drum-pad
elements, , each with 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. - Within each
.drum-pad
, there should be an HTML5audio
element which has asrc
attribute pointing to an audio clip, a class name ofclip
, and an id corresponding to the inner text of its parent.drum-pad
(e.g.id="Q"
,id="W"
,id="E"
etc.).
- 🟦 9 clickable drum
- 🟥 element
id="display"
- 🟩 pads container
- Add Interactivity ☑issue #4
- Menage Status with Redux ☑ issue #5
- 🟦 When I click on a
.drum-pad
element, the audio clip contained in its childaudio
element should be triggered. - 🟦 When I press the trigger key associated with each
.drum-pad
, the audio clip contained in its childaudio
element should be triggered (e.g. pressing theQ
key should trigger the drum pad which contains the stringQ
, pressing theW
key should trigger the drum pad which contains the stringW
, etc.). - 🟥 When a
.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).
✔ All tests passed
- Semantic HTML5 markup
- CSS/SCSS custom properties
- Flexbox
- React 18
- Redux 5
- react-redux 9
- @reduxjs/toolkit 2
- Website - Simona Pizio
- Codepen - SimonaPiz/pen
- Freecodecamp - freecodecamp/SimonaPiz
This is a solution to the Build a Drum Machine project to earn the Front End Development Libraries certification by FreeCodeCamp.