Continuing with my initial Soundlight project, I have modified the code to produce six distinct lights depending on the frequency of the music! Why six? Well, that’s the limit of the Arduino’s PWM (analog out) pins, so that’s as much as you can get with a single Arduino Uno. It works by using Fast Fourier Transforms to analyze the sound frequencies and find how much sound is coming out from each frequency range (special shout out to Luis for helping me understand this beautiful math!)
Here’s a quick demo video: