Skip to content
Join our telegram channel, click this bar now!
Join our telegram channel, click this bar now!
Arduino Spectrum Visualizer

Arduino Spectrum Visualizer

A music visualizer works by extracting waveform and/or frequency information from the music and feeding this information through some display rules, which produces what you see on the screen.

The rules are predefined by the programmer, but the actual output will depend on the unique waveform and frequency characteristics of the audio.

The visualizer software starts by analysing the waveform and frequency information in the audio.

The waveform is a series of numbers representing the loudness of the sound at moments in time. The waveform level is loosely related the beat of the music. The loudness values are typically higher during a beat.

The frequency information describes the levels of various pitches within the audio signal at moments in time. A technique called Fourier transform extracts frequency information from the waveform. The frequency information is loosely related to the notes of the music, but may not correspond to actual musical notes. It does provide information about distribution of high and low pitches at moments in time.

The range of the visualizer is 280Hz to 19 kHz. It is a 32 band audio frequency visualizer.  The device is capable of displaying the frequencies of the audio signal, which can be used for both entertainment or studying the audio signal.

The left and right channels of the audio would be mixed for input.

The Arduino board contains a multichannel 10 bit ADC (Analog to Digital Convertor). The ADC is configured so as to sample the input analog signal with clock signal 38.46 kHz. Consider the clock frequency as d. The ADC pre-scalar is configured to 32.

According to Nyquist theorem; in order to adequately reproduce a signal it should be periodically sampled at the rate that is twice the highest frequency that is to be recorded.

  • f = d/2
  • f = 38.46/2 = 19.23 kHz

We configure the ADC to use the 3.3v from the board as reference voltage.

The ADC cycle doesn’t consider the negative cycles of the input as analog signal oscillates above the zero voltage level.

The FFT library does most of the work in this code. Fast Fourier Transform (aka. FFT) is an algorithm that computes Discrete Fourier Transform (DFT). The main principle here is that any signal (even non-periodic ones) can be quite accurately reconstructed by adding sinusoidal signals together with different frequencies and amplitudes. The more sinusoidal signals we add together, the more our reconstructed signal will look like the original one. Theoretically speaking, with an infinite amount of sinusoidal signals we get an identical signal as the original.

The range of samples we can take is between 16 and 128. Also, the greater the number of samples the more accurate the result is BUT the computation time increases. Henceforth, 64 samples will be considered. Once the 64 samples are taken, the Arduino performs FFT on them.


Components required:

  1. Arduino board
  2. 32*8 LED matrix
  3. Jumper wires / Connecting wires
  4. 3.5mm Audio Jack
  5. 100k ohm and 4.7k ohm resistor
  6. 0.1 uf capacitor ( x2)
  7. Breadboard

I have used an Arduino Nano in this project, feel free to use whichever board available.

( or 4 x 8*8 LED matrices; just make sure you align the matrices in a proper order)


The point closest to the screw type part is the ground pin, the other two are the left and right channels. We would need to mix the two channels for sampling.



Find the code in our GitHub Repo


Author: Moksh Deepak Jadhav

Next article Raspberry Pi VS Arduino


RomanCet - October 4, 2020

7166 skinny exotic black teen oiled pussy fucked
15631 sexy oriental girl getting fucked while wearing cute ankle
9230 slutty blonde anuschka teen spreads her asshole for good fucking
24742 mature lesbian fun
10574 anal double fuck penetrat
22917 hot redhead in garter corset and white lace stockings waitin
17836 olive on november from atk natural hairy
18653 perky saggy plain pretty hardcore sluts get hairy pussy
21646 hardcore sex with big cocks hardc
25332 hot brunette karlee grey in boots tight dress spreading
5801 looking into the eyes of alice march optimized for your
11346 gqueen yume aikawa japanesebeauties
20054 latina takes big black dick at tomorrow
4179 anal sex loving brunette dillion harper made with guy
19258 set stella lane soarde
14733 clubseventeen yagami lil hardcore team
16243 xbooru bondage bunny malisha mplstudios tattoo
15092 jenna ebony fetching brooks blacks east babes
10389 horny teen babe katrin tequila gets her asshole drilled alb
14438 hustler mega pass marie mccray jessi palmer kickass lesbian

Leave a comment

* Required fields

Welcome Newcomer