MUSIC 256A HW#2 - Everglow

Emily Kuo

Everglow Screenshot 1 Everglow Screenshot 3

Everglow is an audio visualizer that illustrates the frequency spectrum through a palette of lights in rainbow colors. Red light corresponds to the lowest frequencies and purple light corresponds to the highest frequencies, just like their wavelengths in real life. The time domain signal is wrapped around a sphere in the middle to show the polar patten that steady state signals portray. The spectrum history is displayed through the propagation of circular waves to create a feeling that the visualizer is "everglowing".

A video demo of Everglow can be viewed below:

 

This project was my first time building an audiovisual design with Chuck and ChuGL, so the most difficult parts were figuring out what to design and how to use the tools. I chose to play with lights because they looked really calming and majestic. I think my overall concept of displaying frequency magnitudes through light intensities worked out well. I wasn't sure how it would look when I first thought of the idea, but it ended up being surprisingly reactive to music. It was also a lot of fun "coding" music in Chuck. I utilized multiple existing examples (such as the Drum Machine and Krystal Choir) to help me create the sound narrative.

I'd like to thank the teaching team (Andrew & Ge) for answering our questions promptly through Discord and office hours.

Download the code below to play with Everglow live!

everglow.zip

sound_narrative.zip

Run go.ck in each .zip folder to run the audio visualizer / sound narrative.




HW#2 Milestone#2

I originally wanted to visualize spectrograms as northern lights, so I was looking into using light classes and custom shaders, and I even searched up how to simulate northern lights mathematically. However, after trying, I realized that it might be too difficult to draw out aurora realistically and smoothly, so I decided to play with the concept of light in another way.

When I came across the light.ck ChuGL example, I thought it looked really beautiful (if only I could make the lights vertical!), so I decided to incorporate that into my code. An unexpected challenge I faced was figuring out how to shine lights on the same plane as the other graphs. It took me a bit to understand how the “ground” placement would affect how the lights look. Sometimes, when you define the ground plane on a different axis or change the camera angle, the shapes of the lights completely change. Also, I thought the idea of mapping frequency intensities to light intensities would be pretty intuitive, but it took me a long time to come up with a formula that would both look good and “read” to the audience. Because I wanted to display the whole frequency spectrum through 8 circular lights, I had to figure out a way to map the FFT array of 1024 complex values into 8 light intensity values. I ended up doing so by summing the frequency magnitude of each subband and doing a lot of manual tweaking with trial and error. Another unexpected challenge was that the lights could be blinding sometimes when the intensity is too high or when multiple lights shine at the same spot, so I had to tweak the light placement and the intensity equation to make it look nicer. 

One surprising thing I ran into was that if I place the circular lights next to each other in a horizontal line and keep on zooming in, it actually creates a cool visual effect that makes the lights look like they are coming from the sky (kind of similar to how northern lights look!). I might try to play with this idea in a later project.

Overall, it was a lot of fun building this! I’ve never built any visual designs before, so it was quite satisfying to see my visualizer respond to songs that I love listening to. Several things that I want to improve before the final deadline are:

  1. Try changing the frequency scale to the log scale. I noticed that because the scale is linear right now, the highest-frequency lights like blue and purple barely get activated. The light intensities of red and orange are also too high sometimes, so I want to try converting the frequency scale to log to see if those issues get improved.

  2. Try drawing the spectrum history as circles that propagate from each light. That was what I originally envisioned, but I ran into a segmentation fault that I wasn’t able to resolve, so I will look into that more to see if the idea could be implemented.