top of page
  • Writer's pictureMaria Paz Martinez

Color Me Piano (UPDATE)

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:




9 views0 comments

Recent Posts

See All

Color Me Piano

I worked with my partner Sophie to create this colorful piano. I came up with the concept of creating the piano that is interactive through the colorful keys and she helped me create the dimensions. W

bottom of page