-
Notifications
You must be signed in to change notification settings - Fork 131
Sound Settings
Disclaimer: The information below is for the latest release version of SR WLED. If you use an older release, you will not have all options.
In order to accommodate a wide range of audio inputs, ambient environments and string lengths, we have added user configurable squelch (noise reduction/suppression) and gain controls on the sound settings page that apply to all sound reactive animations.
After changing the sound source (either GPIO pins or Microphone type), it is important to press the "reset" (RST) button on your ESP32 - don't forget to "save" first. WLED cannot change the sound input configuration "on the fly", due to a known hardware problem of ESP32. See https://github.com/espressif/esp-idf/issues/7442 "only a hard CPU reset can disconnect the I2S signal from built-in ADC".
We typically recommend using GPIO 36, aka VP or ADC1_CH0 for analog input, however the following pins should also work:
GPIO 32 => ADC1_CH4
GPIO 33 => ADC1_CH5
GPI 34 => ADC1_CH6
GPI 35 => ADC1_CH7
GPI 36 => ADC1_CH0, VP
GPI 37 => ADC1_CH1
GPI 38 => ADC1_CH2
GPI 39 => ADC1_CH3, VN
Do NOT use any of the pins from ADC2, as they will conflict with the WiFi and with I2S sampling.
Remember to press Reset after saving your new analog input configuration.
We have observed problems when using "analog buttons" (potentiometer) together with ADC analog sound input. It seems that different drivers (I2S-ADC for sound, analogRead() for potentiometer) are getting into conflict - more details in the related bug report for espressif software. If you plan to attach a potentiometer to your WLED device, we recommend to use an I2S digital microphone to avoid these problems.
More information about analog inputs on our analog microphones page.
Adjust this value on the Sound Settings page so that the leds are only activated above a certain 'background noise' level.
We don't know what your 'quiet' is. LED's should NOT be reacting when it IS quiet, so it's up to you to first make those adjustments.
See also
⇒ Sound setting examples for common microphones
Line-in signals are typically much lower than that of some of the microphones. Rather than use an auto gain function, you can manually adjust the gain from 1 to 255, which translates to 0.1 up to almost 6.5 gain. That's equivalent to a range of -20dB up to +16dB.
In addition, the 'Intensity' and "input level" sliders can sometimes adjust an animation to simulate increased gain.
Here's a method to setup squelch and gain for your SR WLED Device.
- Start out with the routine '*Gravimeter' with default sliders in the middle.
- Go to the sound settings configuration page.
- Increase gain to a high value, let's say 234 (or higher) and set the
squelch
to '1',AGC off
, then save. - Depending on your input, you should now see the led's flashing, even when the wind blows.
- In a quiet environment, increase and occasionally save the "squelch" incrementally until the led's are no longer flashing.
- Once that's done, set "gain" to 40. Make noise appropriate to your 'noisy' environment and number of led's. Then adjust/save the gain so that the led's are responding appropriately. When it looks good, you can set
AGC
todefault
. - Note that some of the animations allow further sensitivity adjustment with the 'Intensity' setting.
- Check out the 'Sound Reactive Animations' page to see what controls are available for each animation.
From faulty microphones to flaky wiring, to WiFi related issues, particularly in AP mode, getting reliable and spike free sound sampling with WLED and in particular analog sampling has been a challenge. Digital microphones such as the INMP441, the ICS-43434 provide the best results.
Currently the following I2S options are available:
Some more information can be found on our I2S digital microphones page.
to be extended soon
There are solutions available for line-in via I2S. For example, boards/shields with "es7243" chip should work already (we have a special driver for these), and we're investigating "es8388". Please check our I2S digital microphone hookup - I2S audio boards/modules page for more information.
We have recently improved the AGC (automatic gain control) algorithm in WLED-SR. It's not enabled by default, however we encourage you to give it a try - all sound reactive effects now support AGC, including 2D and frequency-reactive effects. The only prerequisite for using AGC is that you first adjust "Squelch" to define 'silence' (ambient noise level) in your environment - see previous section.
AGC will automatically perform sound input amplification, based on current sound loudness. For example, if you play music and then increase the speaker volume, WLED-SR will adjust internal gain factors to follow your music. Forget about manually changing "gain" settings. Just relax and let WLED-SR do it autonomously.
Currently WLED-SR offers four different AGC presets that can be selected in sound settings:
- Off - AGC off. WLED will strictly use the Gain value from sound input settings, without any adjustments.
- Normal - AGC tries to smoothly follow changes in sound input volume. Recommended as a balanced option for general use.
- Vivid - AGC will quickly adjust to changes in sound input volume. Recommended in case you want "more blinken from your LEDs".
- Lazy - AGC will take some more time before internal gain is adjusted. Recommended for GEQ effects, or when listening to music that features strong "dynamics".
to be extended soon
Introduction
Installing and Compiling
First Time Setup
Running Sound Reactive WLED
2D Support
Sound Settings
2D LED Preferences
ARTI-FX
UDP Sound Sync
Sound Reactive Animations
Non-Reactive Animations
Digital Microphone Hookup
Analog Audio Input Options
Using my PC for the Sound
News
It's Not Working
Noise and Spikes
Connectivity Issues
WLED Programming Notes
Modifying Sound Reactive WLED
Future Directions
Adding a new Settings Page
On Lossy Colours
Sliders in WLED
Testing