The program at https://gamedev.cs.gsu.edu/~mweeks/sound_example/sound_example.html is similar to earlier examples of four colored rectangles. When you click on one, it sets the background to that color. In this example, it also plays a sound. Each rectangle has its own sound file associated with it. You can use this program as a template for this assignment.

The sound files (located in the same directory) are all short recordings made with Audacity ( https://www.audacityteam.org/download/ ). You don't need to use Audacity for this assignment, but you might want to at least know about it. All of these recordings were made with items laying around a table. These are:
glass_rubbing.ogg
grain_bag.ogg
grains_shaking.ogg
napkin_rustling.ogg
plastic_tapping.ogg
salt_shaking.ogg
toothpicks.ogg
water_DWTfiltered.ogg

A couple of the recordings did not turn out like expected. If you wet your finger and move it around the rim of a water glass, it will make a sound like a music instrument. The glass has to be a certain type (a percentage of lead crystal) for this to work, and the one tested is not the right type. Also, the recording of water splashing had a lot of noise, and the sound file here is the result of filtering the data with a discrete wavelet transform. The end result is interesting, but different.

The webpage also has a button labelled "Start". Pressing it will set up an interval, and one of the sounds will play each second. After that, the interval is cleared.

Wouldn't it be fun if pressing "Start" caused the program play a random sequence of the four sounds, then expected you to click on the rectangles in the correct sequence? That's the goal.

Your program should use (at least) 4 different sounds. You can use the ones provided, or you can record your own. If you do record your own, you might need to trim any silence before or after the sound. Also, you might want to increase/decrease its volume.

Your program should indicate when the player gets the sequence correct, and also when the sequence is incorrect. A sound effect for winning, and one for losing, would be a nice thing to add. For this assignment, you can use other means, like displaying "you win!"

You should check out the "Math.random();" function.

Turn this in through iCollege: a link to the html file, copies of any javascript files that you created, and the data files.