My initial design was a piano that the keys changed color when hovered over them. I wanted to make the code more neat and concise so I decided to make a for loop () for the series of keys as well as a nested for loop () for the changing color keys. I decided to create an array for each color element (r, g, b) to randomize the color per 7 keys every time. I also downloaded 7 notes and made a folder called sounds. I declared them using let before the setup(), and initialized them by linking the files to the project. I then created an array to order the notes in the desired order I wanted. I created an if statement that if mouse is pressed is true, and within the parameters of the canvas, then play the notes in the array.
Here is my finished project: