I’ve nearly wrapped up my drum machine but I’ve been stuck on two issues which I can’t resolve and I’m hoping someone here could do it for me. My drum machine codepen is here: https://codepen.io/Crimson_Macaw/pen/NOmaXY?editors=1111
The first issue I need to solve is to swap the drum pad sounds between the “Drums” sounds and the “Sounds” sounds whenever I click the two respective buttons on the left-hand side. Right now it’s just the “Drums” sounds that I’ve mapped to the different pad buttons. I know I have to use an if/else statement but I’m unsure as to where I need to put it or how I need to properly write its syntax.
The second issue is related to the first in that I can’t figure out how to make all the colors on the left hand side go opaque/muted when I click on the power button, and also how to stop the volume and the two buttons from working when the power is off. It’s probably a case where I need to setState to something else but I’m unsure as to how I need to write it properly.
I’d appreciate it if someone could provide actual working code examples as opposed to simply hints because several people have already provided me with hints and I’m still stuck on this project after spending weeks on it.