Most audio spectrum analyzers feature a number of vertical bars, which grow based on the amplitude of a given frequency band. Evan Rust wanted to take this concept and make it linear, and more colourful, which he accomplished in his Teensy 4 Musical Lightshow.

Powered by a Teensy 4.0, the light show uses 240 WS2812 LEDs to represent the frequency bins. A Teensy 4 Audio Shield is used with the Audio System Design Tool to amplify audio from a WAV file on the SD card, then uses a 1024-bin Fast Fourier transform (FFT) analyzer to isolate frequencies and sort their amplitudes into the appropriate bin. These are reduced to 16 bins, with more weight given to lower frequencies, while the peak of the current waveform is read in order to determine the LEDs’ brightness. The WS2812Serial library leverages DMA for fast response, with 15 LEDs per bin, and colours assigned randomly. See it in action in the video below, and check out the Hackster project for more info and code.