A fun web-based project where different keys trigger alien sound effects, with a built-in background music player and progress bar. Built using HTML, CSS, and JavaScript.
- 🎹 Play Sounds: Press keys
A, B, C, D, Eto play different alien sounds. - 🎵 Background Music: Play and pause music with a button.
- 📊 Progress Bar: Visual progress bar to track music playback.
If you want to change the current Alien tune to a piano version (which is also good by the way), follow these simple steps:
-
Open the
index.jsfile
This is where the sound mappings are defined. -
Find the section where the
soundMapobject is defined.
In theindex.jsfile, you will see a block of code like this:const soundMap = { "a": "sounds/Alien/A.mp3", "b": "sounds/Alien/B.mp3", "c": "sounds/Alien/C.mp3", "d": "sounds/Alien/D.mp3", "e": "sounds/Alien/E.mp3" };
-
Change the soundMap object to the following code to switch to piano sounds:
const soundMap = {
"a": "sounds/Piano/A.mp3",
"b": "sounds/Piano/B.mp3",
"c": "sounds/Piano/C.mp3",
"d": "sounds/Piano/D.mp3",
"e": "sounds/Piano/E.mp3"
};
4. **Save the script.js file.**
5. **The sounds for the keys 'a', 'b', 'c', 'd', and 'e' will now play piano notes instead of the alien calling sounds.**