Here is the project that I used as my Drum Machine one:
Because of the project was forcing me to play the audios using HTML, and I preferred to play them using the JS constructor Audio, I did not pass on the test.
But I think this project achieved the main point of the Drum Machine one, and that’s why I am using it as a curriculum project.
If you wanted to add additional feature, I think it would be cool to have the ability to play chords and see the keys light up at the same time. Right now only one key lights up when two keys are being pressed down.
That is just something optional I though of but you could totally leave it the way it is .
This is a great idea and I implemented it!
This feature wasn’t implemented perfectly, but I think the project is better than before. Thank you again for the suggestion!
Hey @julio-pinheiroo. Very good! I like it. But, seems like there is a little bit of delay before playing the sound. I mean, the sound does not play at the exact moment I hit on the keys. There is a little bit of delay.
Anyway, high-quality work! Thumbs up!
About it, you are right, it does exist, because when you play some note, the audio file is downloaded to your computer, and it can take some time depending on the host and the internet connection. So this delay should only happen on the first time you press some key, if you press the same key again, it should play normally because the audio file is already on your computer.
I think you still have delay problems. Even after I play a note the first time, if I click the mouse a bunch of times again on that note it often doesn’t play at all or will take a very long time before it plays.
Hey @julio-pinheiroo. Now it’s even worse! When I clicked the keys, it didn’t play any sound. So, I clicked many keys and still, there is no sound. So, I waited and after a minute, all the sounds came one by one and it was really a mess!