One day while chatting with my good friend Rituparna we stumbled upon building a sound reactive light for Ritu’s Ritz Car. Amplitude based light would be too stale for his taste and we needed something that was more dhinchaak. So why not visualize music in the frequency domain as well. So, as the sound changes bands we could change the color of his car’s interiors.
Hence we would certainly have to do some FFT so we have an idea of the relative amplitude of sound in different bands and then use the Neo Pixel strips to visualize the pattern. We planned to use the Tah as our number cruncher of choice.
One fine afternoon we met at doo Things to get the project up and running. We decided to use the MSGEQ7 which is a Seven Band Graphic Equalizer and produces analog voltages of the value of signal in a particular band. Its not difficult to interface and would help us update the strip real-time which could be difficult with software FFTs. Also it was directly capable of receiving signal from the standard 3.5mm line saving us with effort to make an amplifier if we used the standard FFT libraries. Reading it is similar to how you read a shift register.
We followed the standard circuit from the datasheet and programmed the Tah to read the signal and reflect the same on the neo-pixels. The whole circuit was built on a perfboard and powered by a standard 5V Adapter.
The test code we used is as follows:
So basically when we notice a higher value in the lowest band which is basically due to the percussion instruments used in the song. We make the whole strip flash. Check this out in the video below.
The song is by Adiba Parveen just in case you like it. Its here.
Cheers,
Rohit