I have an Idea of using 15 WS2812b Bars (1m,60leds, inside a profile) to work as a strobe activated by audio input (Electret mic). But it needs to be somewhat random based on the input of audio, so if its a loud noise it will activate all or almost all bars but not always the same ones. It is possible to use this mic inside loud places like a club? Can Arduino Mega 2560 control this amount of bars?
Whats the best way to start developing this code? i have people helping me but they are not used to the FastLED library
The easiest solution I found for audio processing is with a Teensy and an electret mic. I started from this example :
It’s literally just a Teensy and a mic. Doesn’t get easier than that.
There is some tuning required in software of course, you have to be able to adapt the function to your needs, but it’s possible. You don’t have to understand what the Fourier does, just how to manipulate its output.
Since you are using WS2812B leds, you won’t be able to sample sound during FastLED.show(). I strongly suggest you look into parallel output to reduce your show() time. Or use a 4-wire protocol.
As for club decibels… I found the louder it gets, the murkier each frequency becomes.
A whole other solution is using an external sound processing chip like the MSGEQ7. It is limited to 7 bands but might be enough for your needs.
I would also recommend a Teensy for it’s speed and parallel output. The more in sync you can have the lighting matching the audio (ie. displaying as fast as possible once triggered) the better your display will look.
Are you trying to pick up general club/crowd noise or specifically the music? If the music, reading that signal directly should be a much more reliable way then a mic to get good lighting interaction. Search the FastLED G+ group here for MSGEQ7 and you’ll find a variety of cool sound projects.
Here’s a sudo code idea for you for doing the randomness.
if audio triggered {
for i=0; i<15; i++ { //loop over the 15 bars
if 75 > random8(0,100) { //run 75% of the time
light up bar i
}
}
}