Introduction to sound visualization
Sound visualization, or music visualization, has been an integral part of the music industry since the evolution of media players. For example, on your computer, when you play any music, you can see the visualization in the default media player or VLC media player, as shown in the following image:
You have noticed that, as the loudness of the music, or the frequency of the sound changes, the visualization changes. We will use the same principle to visualize sound using Arduino.
How to visualize the sound
In simple terms, sound/music is nothing but a series of signals with a certain frequency and a certain amplitude. We can get the value at each point by using analogRead()
. But, this function would be much too slow for sampling audio. So, we will use the microcontroller's analog-to-digital converter, which automatically takes repeated analog intervals at precise intervals. We will learn both ways of sampling audio. There are a number of algorithms available...