top of page
Search

Color Me Piano (UPDATE)

  • Writer: Maria Paz Martinez
    Maria Paz Martinez
  • Oct 13, 2022
  • 1 min read

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:




 
 
 

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...

 
 
 

Comments


Maria's Creative Suite

©2022 by Maria's Creative Suite . Proudly created with Wix.com

bottom of page