Arduino Music Visualizer

Prompt: Design an interactive project using at least 1 input device such as a button or knob and at least 1 output device such as a single color LED or RGB LED. Explore creative uses of the input and out device(s) you choose to work with.

What I built: A music visualizer that translates audio data into a pretty moving light pattern. There is a touch sensor (potentiometer), on the top, that allows users to control the color palette, and a nob to control how quickly the LEDs fade, and how bright they are.

Final product demo. (need to reshoot with clean lense).

Tools: Arduino, FastLED library, microphone module, touch potentiometer, normal potentiometer, Neopixel like LED strip.

Hurdles

  • Data types in Arduino programming language
    • Coming from Javascript background, I wasn’t familiar with all of the different data types, and their limitations. As a result, most of my debugging time was spent fighting with incorrect or incompatible variable types
  • Cheap microphone
    • Originally, I had hoped to pass the sound data into processing, and then separate it by frequency to make for a more compelling visualization, however, the microphone was cheap, and heavily favored the low-end energy, so I scrapped this step
  • Potentiometer weirdness
    • The touch potentiometer was super finicky and put out fairly noisy data at times. I ended up using a timed loop to only pull data from touch every 1/2 second, smoothing the data and making the hues less jumpy

Process:

Initial test of sound module, turning on pin 13 LED when sound detected

Testing light strip with 3rd party “confetti” code.

Learned how to assign gradient to LED array using palette tool with FastLED and then randomized flashes.

Testing change of LED display via audio input. This block of code sets the maximum detected volume, then lights up i LEDs where i = current volume/max volume. This value is then mapped to the 60 led string.


This test was succesful in the volume setting, but wasn’t as dynamic as I had hoped. I ended up tweaking the relationships to achieve a more dynamic visualization.

Fritzing diagram of the circuit. They didn’t have a touch potentiometer in the library FYI


https://github.com/clayton-kenney/arduino
0 forks.
0 stars.
0 open issues.

Recent commits: