It was fun to finally come up with code that I want to write and think about on my own rather then being told what to code. My original idea was to create a disco ball and every time the user would press a key it would play a different beat or instrumental. So I downloaded instrumentals from some of my favorite songs and some from like really poppy or disco type songs. I made a vector of strings containing the names of the songs and every time the user clicked a key it would play a different song. I quickly realized that processing may not be able to handle 5 minute tracks stop and starting randomly and my computer crashed and the sketch wasn’t moving very smoothly. So I switched over to two second piano notes and changed my code to have the disco ball spin, change color, and play a different piano notes every time the user pressed a key. I even added like an EDM background change every time a key was pressed. I wanted to mess with the lighting so I could give the disco ball a depth illusion. So I found a function called pointLight() that let me add that effect . I kept the code for the longer instrumentals just because the sound matched with the image better. There are even these dots that orbit the sphere and change color every time the user presses a key. I originally wanted to color to change based on the type of note or song playing but color-sound relations proved to be very difficult. I tried uploading a screen recording of my animation to YouTube but for some reason my screen recording would never convert to mp4 format. So ill just being showing a video of my animation in class and what different kind of notes and songs I have attached to it.
Code on GitHub
https://gist.github.com/coder2310/fa8794cb465f44bbd9d5b8223e048f1f