Live data from Hacker News

Audio Reactive LED Strips Are Diabolically Hard

scottlawsonbc.com

51–60 of 76 posts

Re: Audio Reactive LED Strips Are Diabolically Hard

#51
Am I the only one who was surprised the obvious answer is to map frequencies to notes and basically turn your LED strip into a piano visualization? Then just norm to strip size?

There’s plenty of visual experiments of pianists doing this “rock band” “guitar hero” style visualization of notes.

Re: Audio Reactive LED Strips Are Diabolically Hard

#52

More than 20 years ago or so I made a small LED display that used a series of LM567 (frequency detection ICs) and LM3914 (bar chart drivers) to make a simple histogram for music. It was fiddly, and probably too inaccurate for a modern audience but I can't claim it was diabolically hard. Tuning was a faff but we were more willing to sit and tweak resistor and capacitor values then.

That would be “The Naive FFT”:

“Most people who attempt audio reactive LED strips end up somewhere around here, with a naive FFT method. It works well enough on a screen, where you have millions of pixels and can display a full spectrogram with plenty of room for detail. But on 144 LEDs, the limitations are brutal. On an LED strip, you can't afford to "waste" any pixels and the features you display need to be more perceptually meaningful.”

Re: Audio Reactive LED Strips Are Diabolically Hard

#53

> I think the future of audio visualization on LED strips will involve a mixture of experts tuned for different genres, likely using neural networks. I think its more likely going to come from a direct integration with existing synthesis methods, but .. I’m kind of biased when it comes to audio and light synthesizers, having made a few of each… We have addressed this expert tuning issue with the MagicShifter, which i…

> https://magicshifter.net/

I get a cert mismatch on that site, and when clicking the shop link I end up at https://hackerspaceshop.com/ which is advertising an online fax service.

Re: Audio Reactive LED Strips Are Diabolically Hard

#54
post #7

Always been very interested in audio-reactive led strips or led bulbs, I've been using a Windows app to control my LIFX lights for years but lately it hasn't been maintained and it won't connect to my lights anymore. I tried recreating the app (and I can connect via BT to the lights) but writing the audio-reactive code was the hardest part (and I still haven't managed to figure out a good rule of thumb or something).…

Yeah in a similar project getting line passthrough or similar to work (matching sampling frequencies etc.) to get a clean signal for the FFT proved much harder than setting up eg the ESP32 side of things. But it’s a lot of fun to play around accumulating values in the frequency buckets while trying to get the reactivity tradeoff right. Just don’t look directly into the LEDs in a dark room, maybe that’s a bit dangerous.

Re: Audio Reactive LED Strips Are Diabolically Hard

#55

Earlier quoted context omitted.

Yeah, "diabolical" overstates it. It isn't a wicked problem https://en.wikipedia.org/wiki/Wicked_problem Kinda funny but I am a fan of green LED light to supplement natural light on hot summer days. I can feel the radiant heat from LED lights on my bare skin and since the human eye is most sensitive to green light I feel the most comfortable with my LED strip set to (0,255,0)

I'd actually argue it has some wicked problem characteristics. The input space is enormous (all possible audio), perception is subjective and nonlinear, and there's no objective function to optimize against, only "does this feel right?". Every solution you try reframes what "good" means. It's not as hard as social planning but is way harder than it sounds, no pun intended.

isn't it the exact same problem than "making a good movie" or "making a good book" ? this is just thoroughly subjective.

When the author says:

> Every commercial audio reactive LED strip I've seen does this badly. They use simple volume detection or naive FFTs and call it a day. They don't model human perception on either side, which is why they all look the same.

well no, if they sell, then they are doing just fine until someone comes up with the $next $thing

Re: Audio Reactive LED Strips Are Diabolically Hard

#56

I made a decent audio visualizer using the MSGEQ7 [1]. It buckets a count for seven audio frequency ranges—an Arduino would poll on every loop. It looks like the MSGEQ7 is not a standard part any longer unfortunately. (And it looks like the 7 frequencies are not distributed linearly—perhaps closer to the mel scale .) I tried using one of the FFT libraries on the Arduino directly but had no luck. The MSGEQ7 chip is ni…

Have you ever seen anything like a MSGEQ14 or equivalent? It would be cool to go beyond 7 in such a simple-to-use chip, but I haven't seen one.

No, I have not.

Re: Audio Reactive LED Strips Are Diabolically Hard

#57
The moral of the story seems to be missing.

This kind of visualisation is an arbitrary artistic choice, not just a function of inputs. A can of spray paint is a tool that needs to be mastered, and it's different from, say, oil paints and brush. LED strip is just another tool. You need to figure out first which movements, pulses, patterns it can produce, and what “looks good”. Those would be the strokes.

The same happens on the other side. Choosing how to interpret sound is also an artistic choice. Everyone does the audio spectrum because everyone has seen the audio spectrum, and considers it a “natural” projection to some one-dimensional form. It only seems “natural” because of all of the graphs you've seen in textbooks. The need to use log scale or smoothing when real audio is not a pure set of harmonics is how “nature” has to smuggle itself back into the abstract reasoning. Beats work for a reason: what we call “modern music” is defined by its constant use of rhythm. When you have a different kind of sound, you need to process it differently.

So the goal is to match something you hear in the audio with something nice that the LED strip does. Which is also an arbitrary artistic choice, and can only be judged as a whole. There is no rule that tone has to match specific position or specific colour. Also, people rarely look at LED strips on their own. Just like film crews, you need to take ambient environment into account, and sometimes increase contrast with light, sometimes blend everything together. Some kind of compressor/expander for dynamic range is probably needed for different environments.

Often the thing that reflects the light is more important. I'd even say that the best way to increase the complexity of that low resolution source is to combine it with some complex object instead of using just the straight line. A Christmas tree should come to mind as an example.

It is wrong to think that the goal of such projects is to figure out a perfect simple process that turns one array of values into another. Their goal is to make people feel something.

Re: Audio Reactive LED Strips Are Diabolically Hard

#58

Earlier quoted context omitted.

I'd actually argue it has some wicked problem characteristics. The input space is enormous (all possible audio), perception is subjective and nonlinear, and there's no objective function to optimize against, only "does this feel right?". Every solution you try reframes what "good" means. It's not as hard as social planning but is way harder than it sounds, no pun intended.

isn't it the exact same problem than "making a good movie" or "making a good book" ? this is just thoroughly subjective. When the author says: > Every commercial audio reactive LED strip I've seen does this badly. They use simple volume detection or naive FFTs and call it a day. They don't model human perception on either side, which is why they all look the same. well no, if they sell, then they are doing just fine…

Fidget spinners also sell.

Re: Audio Reactive LED Strips Are Diabolically Hard

#59
That's one part of it but there are numerous, cheap, COTS audio to RGBA drivers with zillions of music-following modes that work well enough.

The hardest part IMO is distributing it to a lot of LEDs over a large area. It usually involves finding the single serial maximum power length, cutting a bit before that, and SPI multiplexer(s) like SP901E, and strategically distributing right-sized power supplies. SPI amplifiers are also sometimes needed on long runs that skip across areas.

Post reply on HN