MoonModules / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi! MoonModules adds features on top of upstream.
https://mm.kno.wled.ge
GNU General Public License v3.0
187 stars 54 forks source link

Audio Responsive Custom Palette #106

Open houk001 opened 5 months ago

houk001 commented 5 months ago

Add an option to Create palette to save it as Audio reactive and only thing to do is switch color on sound impulse so if i create palette with 6 colors switch between them from the first to the last and to first again, nothing more :D I think that will be nice feature to used it with many effects.

softhack007 commented 5 months ago

Thanks for this proposal. We might be able to enhance our existing feature "audio responsive palettes" with this 👍 (@netmindz )

switch color on sound impulse

This is the only real problem. We could switch whenever the sound is above a certain level, however it would mean the palette is cycling constantly while music plays. A better solution would be to cycle at beats (or onsets) only. This will be possible in the future, once I find some time to completely rewrite our current (very bad) beat detection code.

A third option is to only cycle when transitioning between silence <-> sound. This is easy to detect, but it means the palette will only cycle once when music starts, and when music ends.

houk001 commented 5 months ago

That won't solve the problem? image

softhack007 commented 5 months ago

That won't solve the problem?

Sorry no, the dynamics limiter is not related to beat (or impulse) detection. It's just a method to smooth out strong peaks.

The "real solution" is sketched here: https://github.com/atuline/WLED/issues/225

Edit: actually it might help to compare the "limited" and "original" signal, as a bigger difference might be due to a strong onset 👍 will take that into consideration. Thanks for raising the point.

houk001 commented 5 months ago

ok, thanks for clarify :D Very nice beat detection is done in freestyler software for DMX management in module sound2light. its combination of auto gain control and auto treshold control. Works pretty well and I'm using it to control DMX fixture and WLED to :D Auto gain control is working now so only treshold control is needed and its working as a time function that lower treshold for another beat after beat and rise it to full on beat so preventing beat one after another. Page of that plugin https://www.digiplay.nl/cms/index.php?page=sound-2-light