UPDATED: Drum Machine tests not passing, "Q" plays but tests say it doesn't play

UPDATE: I got the volume slider working…see my most recent reply below!

Previous Post:

Hello all - I am working on the Drum Machine project…I’m done with it and passing all the tests, however, the audio volume doesn’t work. I’m not sure what I’m doing wrong, but I can still hear the sound even if I have the volume at 0 (zero). Here’s my pen below if someone could take a quick look at it. Thanks in advance!

the link you gave seems to point to a broken pen?
(or perhaps you are working on it so it looks broken?)

I was probably working on it :slight_smile: Sorry I’m just now responding…been so busy lately that I haven’t gotten much coding done :neutral_face:

Your drummachine won’t load for me.

Hmmm… well it’s not loading for me either at the moment. I will repost the link here once I figure out why.

Oh brother… it was a stupid syntax error that was preventing it from loading. Here’s a new link:

Ok - I got the volume slider fixed this morning…it was only that I forgot to set the volume on the audio elements! My only issue now is that when I run the tests, it fails 2 because it says that the “Q” button doesn’t play a sound when clicked.

That’s not true however…it does play a sound. I thought maybe I need to preload the audio?? Any ideas?

Here’s a fresh link just in case the above one doesn’t work:

Sorry for the late reply.

The test checks for button presses on your keyboard. When you press Q on your keyboard it should play the sound of the button labeled Q.

For error: 5, when I click on a .drum-pad element, the audio clip contained in its child

1 Like

No worries - I haven’t been on much lately… life get so busy some days :slight_smile:

Ok - I had been talking to someone on the chat and he thought that was the case too. I’m finally getting to work on it this morning so will see what happens! I had seen that on other’s drum machines but I didn’t see it in the requirements. If it is a requirement, someone needs to add it to the user stories because I wouldn’t have known it any other way than what you said here. I’m sure I’m not the only one.

Thank you so much for your help! I will post here again when I get that solved!

It is in one of the user stories but maybe you just missed it, happens to me all the time :slight_smile:
If you think that the text should be changed I recommend you open an issue at the FCC repository and discus an alternative to the text.

User Story #6: When I press the trigger key associated with each .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.).

Good luck finishing the project!

1 Like

Oh wow - I guess I did totally miss it! Thanks for pointing that out! :slight_smile: