23 comments

  • doctorhandshake4 hours ago
    I like this writeup but I feel like the title doesn&#x27;t really tell you what it&#x27;s about ... to me it&#x27;s about creativity within constraints.<p>The author finds, as many do, that naive or first-approximation approaches fail within certain constraints and that more complex methods are necessary to achieve simplicity. He finds, as I have, that perceptual and spectral domains are a better space to work in for things that are perceptual and spectral than in the raw data.<p>What I don&#x27;t see him get to (might be the next blog post, IDK), is getting into constraints in the use of color - everything is in &#x27;rainbow town&#x27; as we say, and it&#x27;s there that things get chewy.<p>I&#x27;m personally not a fan of emissive green LED light in social spaces. I think it looks terrible and makes people look terrible. Just a personal thing, but putting it into practice with these sorts of systems is challenging as it results in spectral discontinuities and immediately requires the use of more sophisticated color systems.<p>I&#x27;m also about maximum restraint in these systems - if they have flashy tricks, I feel they should do them very very rarely and instead have durational and&#x2F;or stochastic behavior that keeps a lot in reserve and rewards closer inspection.<p>I put all this stuff into practice in a permanent audio-reactive LED installation at a food hall&#x2F; nightclub in Boulder: <a href="https:&#x2F;&#x2F;hardwork.party&#x2F;rosetta-hall-2019&#x2F;" rel="nofollow">https:&#x2F;&#x2F;hardwork.party&#x2F;rosetta-hall-2019&#x2F;</a>
    • scottlawson3 hours ago
      I didn&#x27;t go into much detail about it but there&#x27;s a whole rabbit hole of color theory and color models. For example, the spectrum effect assigns different colors to different frequency bins, but also adjusts the assignment over time to avoid a static looking effect. It does this by rotating a &quot;color angle&quot; kind of like the HSL model.<p>I really like your LED installation in Rosetta Hall, it looks beautiful!
      • doctorhandshake2 hours ago
        Thanks! Great article - would like to read one about the color rabbit hole pls ;)
    • PaulHoule3 hours ago
      Yeah, &quot;diabolical&quot; overstates it. It isn&#x27;t a wicked problem<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Wicked_problem" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Wicked_problem</a><p>Kinda funny but I <i>am</i> 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)
      • scottlawson3 hours ago
        I&#x27;d actually argue it has some wicked problem characteristics. The input space is enormous (all possible audio), perception is subjective and nonlinear, and there&#x27;s no objective function to optimize against, only &quot;does this feel right?&quot;. Every solution you try reframes what &quot;good&quot; means. It&#x27;s not as hard as social planning but is way harder than it sounds, no pun intended.
        • PaulHoule2 hours ago
          Ever seen <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=oNyXYPhnUIs" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=oNyXYPhnUIs</a> ? There are a lot of things people might think feels right.<p>(Note both the scanner in front of KITT <i>and</i> the visual FX on his dashboard when he speaks, which changes from season to season.)
        • fragmede2 hours ago
          fta: The biggest unsolved problem is making it work well on all kinds of music.<p>The wickedness comes from wanting something that works just as well for John Summit as the Grateful Dead as Mozart and Bad Bunny.<p>But it seems like you could cheat for installations where the type of music is known and go from there. The other cheat is to have a &quot;tap&quot; button, and to pull that data and go from there.<p>mental note: the thought &quot;it can&#x27;t be that hard&quot; when obviously it is sent me down a rabbit hole for a couple of hours
  • MomsAVoxell3 minutes ago
    We have addressed this issue with the MagicShifter:<p><a href="https:&#x2F;&#x2F;magicshifter.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;magicshifter.net&#x2F;</a><p>.. which is a very fun little light synthesizer capable of POV rendering, in-air text effects, light sequencer programming, MIDI, and so on .. plus, has a 6dof sensor enabling some degree of magnetometers, accelerometers, touch-sensing and so on .. so you can use it for a lot of great things. We have a mode “BEAT” that you can place on a speaker and get reactive LED strips of a form (quite functional) pretty much micro-mechanically, as in: through the case and thus the sensor, not an ADAC, not processing audio - but the levers in between the sensor and the audio source. So - not quite the same, but functionally equivalent in the long-rung (plus the magicshifter is battery powered and pocketable, and you can paint your own POV images and so on, but .. whatever..)<p>The thing is, the limits: yes, there are limits - but like all <i>instruments</i> you need to tune to&#x2F;from&#x2F;with those limits. It’s not so much that achieving <i>perfect</i> audio reactive LED’s is diabolically hard, but rather making aesthetically&#x2F;functionally relevant decisions about when to <i>accept those limits</i> requires a bit of gumption.<p>Humans can be very forgiving with LED&#x2F;light-based interfaces, if you stack things right. The <i>aesthetics</i> of the thing can go a long way towards providing a great user experience .. and in fact, is important to giving it.
  • aleksiy1231 hour ago
    Fun I actually did a similar project during my time at UVic 10 years ago but it was a hoodie.<p><a href="https:&#x2F;&#x2F;youtu.be&#x2F;-LMZxSWGLSQ" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;-LMZxSWGLSQ</a><p>I remember thinking really hard on what to do with color. Except like you say mine is pretty much a naive fft.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;aleksiy325&#x2F;PiSpectrumHoodie?tab=readme-ov-file" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;aleksiy325&#x2F;PiSpectrumHoodie?tab=readme-ov...</a><p>Thanks for reminding me.
  • WarmWash3 hours ago
    The real killer is that humans don&#x27;t hear frequencies, they hear instruments, which are a stack of frequencies that roughly sometimes correlate with a frequency range.<p>I wonder if transformer tech is close to achieving real-time audio decoding, where you can split a track into it&#x27;s component instruments, and light show off of that. Think those fancy Christmas time front yard light shows as opposed to random colors kind of blinking with what maybe is a beat.
    • adzm2 hours ago
      real time audio stem separation is already possible, some specific models can even get around 20ms latency (HS-TasNet) <a href="https:&#x2F;&#x2F;github.com&#x2F;lucidrains&#x2F;HS-TasNet" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lucidrains&#x2F;HS-TasNet</a><p>There was a nice paper with an overview last year too <a href="https:&#x2F;&#x2F;arxiv.org&#x2F;html&#x2F;2511.13146v1" rel="nofollow">https:&#x2F;&#x2F;arxiv.org&#x2F;html&#x2F;2511.13146v1</a> that introduced RT-STT which is still being tweaked and built upon in the MSS scene<p>The high quality ones like MDXNet and Demucs usually have at least several seconds of latency though, but for something like displaying visuals high quality is not really needed and the real time approaches should be fine.
      • omneity30 minutes ago
        I&#x27;m pretty sure it should be possible to distill HS-TasNet into a version approximate and fast enough for the purpose of animating LEDs.<p>At the end it&#x27;s &quot;just&quot; chunking streamed audio into windows and predicting which LEDs a window should activate. One can build a complex non-realtime pipeline, generate high-quality training data with it, and then train a much smaller model (maybe even an MLP) with it to predict just this task.
  • iamjackg4 hours ago
    Scott&#x27;s work is amazing.<p>Another related project that builds on a similar foundation: <a href="https:&#x2F;&#x2F;github.com&#x2F;ledfx&#x2F;ledfx" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ledfx&#x2F;ledfx</a>
  • mdrzn6 hours ago
    Always been very interested in audio-reactive led strips or led bulbs, I&#x27;ve been using a Windows app to control my LIFX lights for years but lately it hasn&#x27;t been maintained and it won&#x27;t connect to my lights anymore.<p>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&#x27;t managed to figure out a good rule of thumb or something). I mainly use it when listening to EDM or club music, so it&#x27;s always a classic 4&#x2F;4 110-130bpm signature, yet it&#x27;s hard to have the lights react on beat.
  • menno-dot-ai4 hours ago
    Woow, this was my first hardware project right around the time it released! I remember stapling a bunch of LED strips around our common room and creating a case for the pi + power supply by drilling a bunch of ventilation + cable holes in a wooden box.<p>And of course, by the time I got it to work perfectly I never looked at it again. As is tradition.
    • scottlawson3 hours ago
      That&#x27;s awesome to hear! Sometimes the journey is the destination, its a great project to get started with electronics.
  • rustyhancock6 hours ago
    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.<p>It was fiddly, and probably too inaccurate for a modern audience but I can&#x27;t claim it was diabolically hard. Tuning was a faff but we were more willing to sit and tweak resistor and capacitor values then.
  • JKCalhoun5 hours ago
    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.<p>(And it looks like the 7 frequencies are not distributed linearly—perhaps closer to the <i>mel scale</i>.)<p>I tried using one of the FFT libraries on the Arduino directly but had no luck. The MSGEQ7 chip is nice.<p>[1] <a href="https:&#x2F;&#x2F;cdn.sparkfun.com&#x2F;assets&#x2F;d&#x2F;4&#x2F;6&#x2F;0&#x2F;c&#x2F;MSGEQ7.pdf" rel="nofollow">https:&#x2F;&#x2F;cdn.sparkfun.com&#x2F;assets&#x2F;d&#x2F;4&#x2F;6&#x2F;0&#x2F;c&#x2F;MSGEQ7.pdf</a>
    • empyrrhicist4 hours ago
      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&#x27;t seen one.
  • nsedlet1 hour ago
    I also attempted to do real-time audio visualizations with LED strips. What was unsatisfying is that the net effect always seemed to be: the thing would light up with heavy beats and general volume. But otherwise the visual didn&#x27;t FEEL like the music. This is the same issue I always had with the Winamp visualizations back in the day.<p>To solve this I tried pre-processing the audio, which only works with recordings obviously. I extract the beats and the chords (using Chordify). I made a basic animation and pulsed the lights to the beat, and mapped the chords to different color palettes.<p>Some friends and I rushed it to put it together as a Burning Man art project and it wasn&#x27;t perfect, but by the time we launched it felt a lot closer to what I&#x27;d imagined. Here&#x27;s a grainy video of it working at Burning Man: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=sXVZhv_Xi0I" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=sXVZhv_Xi0I</a><p>It works pretty well with most songs that you pick. Just saying there&#x27;s another way to go somewhere between (1) fully reactive to live audio, and (2) hand designed animations.<p>I don&#x27;t think there&#x27;s an easy bridge to make it work with live audio though unfortunately.
  • milleramp3 hours ago
    This guy has been making music controlled LED items, boxes and wrist bands. <a href="https:&#x2F;&#x2F;www.kickstarter.com&#x2F;projects&#x2F;markusloeffler&#x2F;lumiband-the-music-controlled-led-wristband" rel="nofollow">https:&#x2F;&#x2F;www.kickstarter.com&#x2F;projects&#x2F;markusloeffler&#x2F;lumiband...</a>
  • serf1 hour ago
    the hard part is dousing a room in pulsing bright colorful LEDs tastefully.<p>I haven&#x27;t seen that done yet. I think it&#x27;s one of those Dryland myths.
  • copypaper2 hours ago
    This is awesome! I did a similar project in college for one of my classes and ran into the same exact walls as you.<p>- The more filters I added the worse it got. A simple EMA with smoothing gave the best results. Although, your pipeline looks way better than what I came up with!<p>- I ended up using the Teensy 4.0 which let me do real time FFT and post processing in less than 10ms (I want to say it was ~1ms but I can&#x27;t recall; it&#x27;s been a while). If anyone goes down this path I&#x27;d heavily recommend checking out the teensy. It removes the need for a raspi or computer. Plus, Paul is an absolute genius and his work is beyond amazing [1].<p>- I started out with non-addressable LEDs also. I attempted to switch to WS2812&#x27;s as well, but couldn&#x27;t find a decent algorithm to make it look good. Yours came out really well! Kudos.<p>- Putting the leds inside of an LED strip diffuser channel made the biggest difference. I spent so long trying to smooth it out getting it to look good when a simple diffuser was all I needed (I love the paper diffuser you made).<p>RE: What&#x27;s Still Missing: I came to a similar conclusion as well. Manually programmed animation sequences are unparalleled. I worked as a stagehand in college and saw what went into their shows. It was insane. I think the only way to have that same WOW factor is via pre-processing. I worked on this before AI was feasible, but if I were to take another stab at it I would attempt to do it with something like TinyML. I don&#x27;t think real time is possible with this approach. Although, maybe you could buffer the audio with a slight delay? I know what I&#x27;ll be doing this weekend... lol.<p>Again, great work. To those who also go down this rabbit hole: good luck.<p>[1]: <a href="https:&#x2F;&#x2F;www.pjrc.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.pjrc.com&#x2F;</a>
  • londons_explore5 hours ago
    The mel spectrum is the first part of a speech recognition pipeline...<p>But perhaps you&#x27;d get better results if <i>more</i> of a ML speech&#x2F;audio recognition pipeline were included?<p>Eg. the pipeline could separate out drum beats from piano notes, and present them differently in the visualization?<p>An autoencoder network trained to minimize perceptual reconstruction loss would probably have the most &#x27;interesting&#x27; information at the bottleneck, so that&#x27;s the layer I&#x27;d feed into my LED strip.
    • akhudek17 minutes ago
      I&#x27;ve done this in my own solution in this space (<a href="https:&#x2F;&#x2F;thundergroove.com" rel="nofollow">https:&#x2F;&#x2F;thundergroove.com</a>). I use a realtime beat detection neural network combined with similar frequency spectrum analyses to provide a set of signals that effects can use.<p>Effects themselves are written in embedded Javascript and can be layered a bit like photoshop. Currently it only supports driving nanoleaf and wled fixtures, though wled gives you a huge range of options. The effect language is fully exposed so you can easily write your own effects against the real-time audio signals.<p>It isn&#x27;t open source though, and still needs better onboarding and tutorials. Currently it&#x27;s completely free, haven&#x27;t really decided on if I want to bother trying to monetize any of it. If I were to it would probably just be for DMX and maybe midi support. Or maybe just for an ecosystem of portable hardware.
    • calibas4 hours ago
      I was playing around with this recently, but the problem I encountered is that most AI analysis techniques like stem separation aren&#x27;t built to work in real-time.
  • panki275 hours ago
    Had a similar setup based on an Arduino, 3 hardware filters (highs&#x2F;mids&#x2F;lows) for audio and a serial connection. Serial was used to read the MIDI clock from a DJ software.<p>This allowed the device to count the beats, and since most modern EDM music is 4&#x2F;4 that means you can trigger effects every time something &quot;changes&quot; in the music after synching once.
    • JKCalhoun5 hours ago
      &quot;3 hardware filters…&quot;<p>The classic &quot;Color Organ&quot; from the 70&#x27;s.
  • wolvoleo3 hours ago
    Thanks for this! Exactly the thing I&#x27;m struggling with now. Making decent visualisation for music based on ESP32-S3.
  • 8cvor6j844qw_d65 hours ago
    Are these available commercially for consumers?
    • leptons34 minutes ago
      There are plenty of LED strips with audio controllers that work pretty well. I&#x27;ve used them in a few projects. Just go look at Amazon, you can get them for pretty cheap.
  • p0w3n3d6 hours ago
    IANAE but I would go for electric circuit, not electronic software that steers the led. I think that nowadays, with the LLM support it can be easier and better to optimise it for the sake of latency.
    • mrob5 hours ago
      If you want minimum latency, you want the input side of an traditional vocoder, not an FFT. This is the part that splits the modulator signal into frequency bands and puts each one through an envelope follower. Instead of using the outputs of the envelope followers to modulate the equivalent frequency bands of a carrier signal, you can use them to drive the visualizer circuit.<p>That can be done with analog electronics, but even half an analog vocoder needs a lot of parts. It&#x27;s going to be cheaper and more reliable to simulate it in software. This uses entirely IIR filters, which are computationally cheap and calculated one sample at a time, so they have the minimum possible latency. I&#x27;d be curious if any LLM actually recognizes that an audio visualizer is half a vocoder instead of jumping straight to the obvious (and higher latency) FFT approach.
    • avisser4 hours ago
      For recorded music, you could always buffer however many milliseconds of audio to account for the processing.
  • IshKebab2 hours ago
    It&#x27;s not <i>that</i> hard. I did a real-time version of the Beatroot algorithm decades ago that worked pretty well for being such a simple algorithm.
  • askl6 hours ago
    Interesting. I&#x27;m currently in the process of building something with a audio reactive LED strip but didn&#x27;t come across this project yet. The WLED [1] ESP32 firmware seems to be able to do something similar or potentially more though.<p>[1] <a href="https:&#x2F;&#x2F;kno.wled.ge&#x2F;" rel="nofollow">https:&#x2F;&#x2F;kno.wled.ge&#x2F;</a><p>Edit: Oh wait, that project needs a PC or Raspberry PI for audio processing. WLED does everything on the ESP32.
    • stavros6 hours ago
      Yeah WLED does it fine, I&#x27;ve built a few and it works well.
    • MrBuddyCasino4 hours ago
      WLED is decent but tbh the lag is very noticeable. Did you compare to this python thing?
      • askl3 hours ago
        No, haven&#x27;t tried it.<p>For my use case I want something fully portable and battery powered anyways. So the audio stuff should happen on the ESP32. (Or on my phone, that might work too)
        • tensor25 minutes ago
          It&#x27;s pretty easy to run a pi on a battery.
    • turbine4016 hours ago
      [dead]
  • mockbolt4 hours ago
    [flagged]
    • isoprophlex4 hours ago
      Are you using multiple accounts to post the same comment?!
  • kbouck4 hours ago
    [flagged]
  • m3kw94 hours ago
    how is it hard, do a A to D, add a filter, do compute, then do D to A.
    • kennywinker3 hours ago
      Not hard to do, hard to do well. Hiding all complexity with a hand wavey “do compute” doesn’t make that bit easy
      • m3kw93 hours ago
        Yeah i get it, the details are hard.
    • cogman104 hours ago
      The article covers that.<p>In short, audio and visual perception do not map perfectly. Humans don&#x27;t have a linear perception of either so a perfect A to D then D to A conversion yields unsatisfying results.