What to call this LED strip music visualizer is a puzzler. It lights up and pulsates in time with music similar to the light organs of 1970s psychedelia fame, but it’s more than that. Is it more like the Larson Scanner that graced the front of [David Hasselhoff]’s ride on Knight Rider? A little, but not quite.
Whatever you decide to call this thing, it looks pretty cool, and [Scott Lawson] provides not one but two ways to build it. The business end is a simple strip of WS2812b addressable LEDs. It looks like the first incarnation of the project had an ESP8266 driving the LEDs in response to commands sent to it from a PC running the visualization code, written in Python. That setup keeps the computationally intensive visualization code separate from the display, but limits the display to 256 pixels and probably has to deal with network latency. The Raspberry Pi version both crunches the numbers and drives the display, but the Pi doesn’t have the oomph to run both the LEDs and the GUI, which is pretty interesting to look at by itself. The video below shows the different visualization modes available — we’re partial to the “energy effect” at the end.
Take your pick of hardware and throw a couple of these things together for your next rave. And if you need a little more background on the aforementioned Larson Scanner, we’ve got you covered.
[via r/raspberry_pi]
I’m down with light sickness.
I want on my dashboard in my car!
Love it.
I want one
A different board could drive all three.
Orange Pi zero ?
Looks like it’s channeling Norman McLaren’ or at least his early work.
Hey, I’m the person who made this! Let me know if you have any questions.
Does it require 256 LEDs or can it use less and still look good?
You can do this easily with just a Teensy 3.2 & Audio library. It has FFT “built in”.
Tell me more… :)
I know I am going to get flamed,but this just looks like the long way to do something. However bravo for having a task and accomplishing it.
The computer is needed because the algorithms are more advanced than your typical FFT visualizer. It is unable to run on weaker embedded devices such as the teensy.
what do you mean? I looked at the code and its a simple FFT + smoothing
Exactly. And which CAN be easily achieved with Teensy or ESP8266.
It does more than simple FFT + smoothing, especially if you look at the experimental branch where I am using autocorrelations and more advanced filtering techniques. The most computationally intensive step is constructing the filter bank used to calculate the Mel-frequency cepstrum coefficients. In Python, the filter bank is memoized, but the ESP8266 would quickly run out of memory if it tried to the same thing. If you keep the frequency range fixed then you can work around this but you won’t be able to do adaptive frequency range adjustments.
In the experimental branch I have made some changes that significantly improve overall performance. I went from 80 FPS to 300 FPS on my laptop. I don’t this will run on micropython, but it might be possible to run on the ESP8266 or Teensy if you ported the code to C++ (without the GUI).
Or on an ATmega328. I’m doing FFT and all kinds of visualization processing in Arduino code: http://nootropicdesign.com/lumazoid
I’m dubious that the pi couldn’t run the GUI and the LED strips.
I should clarify that he recommends rpi1-3 I find it hard that there is not enough of a oomph difference from 1-3 that means the GUI can’t also be covered by the 3?
I’ll be releasing an update in the near future that improves several things including the performance of the GUI. I wouldn’t be surprised if the Raspberry Pi could run the GUI with the new update.
1 half the leds are wasted displaying mirror image
2 “running the visualization code, written in Python” is the main reason for the performance. Even bare ESP8266 at stock 80MHz is enough for this whole effect.
https://youtu.be/8ISbmQTbjDI?t=200s
“half the leds are wasted displaying mirror image’ The mirror image is, of course, part of the desired effect. But hey—I suppose you could rig up something with a real mirror if you didn’t want to “waste” the LEDs. /s
Impressively efficient. Usually neopixel hacks that attact hackaday’s interest require 3 PCs, 5 arduinos and a raspberry pi per pixel.
using a RPI on his own to drive thoses leds isn’t the best idea…
RPI operating system is not real time! messing up the timing..
The ws281x library is able to work around these restrictions by using direct memory access. Before this library was released, the Raspberry Pi was not suitable for these kinds of real-time tasks.
Neat use of a led-bar. Everybody likes audio responding lights and such (me included!)
Ive worked on something similiar in the form of Neon Bargraphs as a Visualizer, tough rather than use a PI i used a small ARM board (Teensy) and have it perform a Fast Fourier transformation on the analog signal fed to a ADC pin. Ok granted hardware wise that is a tiny bit more complicated than using ready to use parts (had to use a simple amplifier), but i’m still proud of it!!
Which type of microphone is good to get sound of a room? I have one but its designed to be near to mouth.
You might want an “omnidirectional” microphone. Look for one meant for recording meetings.
I’m no expert by any means, so try someone at the music store or a drummer. :)
I just got this working tonight. @scottlawsonbc, thank you so much for publishing all of this online!! I can’t even articulate how happy I am to have it going, and your guide on github was very well written.
That’s awesome! Thank you for the kind words
Hello Scott, I seen it’s been a while since anyone has interacted. I was wondering if with any new technology you would have a reccomedatuon on which way to do your project. ESP or Raspberry pi? I’m very interested in this project and have a lot of questions.