Got FHT (variation of FFT) to work on an Arduino with FastLED. Put the code together from a couple of resources. Code: https://github.com/KevZhuArt/FFT-FastLED
Try it out!
Can now do audio-reactive blinkys with no MSGEQ7! Can’t tell the difference visually, but a much simpler control box schematic. I use 3 frequency bins, but you can change the averaging functions to make more or less bands.
I figured as much Already assembling some resources which I will post in comments here, then assemble into a document. Maybe even try to get it included in the FastLED base library? @Daniel_Garcia
It is snappy I couldn’t believe the Arduino was capable
Stereo to Mono summer. Feed the single line out into an analog in on the Arduino. I use one so I can run just a single FHT function. If you’re adventurous try stereo and let me know how it goes!
In order to use the Infrared library, I need to use a 2nd Arduino and then transmit commands serially to the one running FastLED. Do you know if we can run FHT on the same Arduino as FastLED? Also, would that work on a standard UNO/Nano/Pro?
I got an error: LED_COUNT was not declared in this scope. I just changed it to NUM_LEDS than it worked. quiet nice work. I used the adafruit electeret mic amp. It’s a nice effect and much more reliable than I had expected. It does though only work if the music is loud enough. Also it did detect a lot of false beats. Nevertheless I’m really impressed. That’s more than I achieved.
Oops thanks for catching that. Should be fixed now
There is a variable “baseline” which you can tune. This sets the threshold for whether or not a waveform triggers the effect pattern. And yes there will be some false beats. A lot of the time it’s finding a balance between too much sensitivity and too little, but same deal on the MSGEQ7 in my experience
Added some info about variables in the readme
To limit false beat detection, I sometimes will tune the variable ledTimer to limit how often the LEDs can be triggered.
I was able to get Kev’s demo running, but was unable to find where/how he stores FFT results, ie. an array with sound levels for increasing frequencies.