Skip to content

Sound Settings

Frank edited this page Jul 6, 2022 · 46 revisions

Introduction

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.

WLEDSR-Sound-Setings-start

Analog Input Pins

WLEDSR-Sound-Setings-Analog

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

GPIO 34 => ADC1_CH6

GPIO 35 => ADC1_CH7

GPIO 36 => ADC1_CH0

GPIO 37 => ADC1_CH1

GPIO 38 => ADC1_CH2

GPIO 39 => ADC1_CH3

Do NOT use any of the pins from ADC2, as they will conflict with the WiFi and with I2S sampling.

Squelch

Adjust this value on the Sound Settings page so that the leds are only activated above a certain 'background noise' level.

Gain

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.0 gain.

In addition, the 'Intensity' and "input level" sliders can sometimes adjust an animation to simulate increased gain.

How To

Here's a method to setup squelch and gain for your SR WLED Device.

  1. Start out with the routine '*Gravimeter' with default sliders in the middle.
  2. Go to the sound settings configuration page.
  3. Increase gain to a high value, let's say 234 (or higher) and set the squelch to '1', AGC off, then save.
  4. Depending on your input, you should now see the led's flashing, even when the wind blows.
  5. In a quiet environment, increase and occasionally save the squelch incrementally until the led's are no longer flashing.
  6. Once that's done, 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.
  7. Note that some of the animations allow further sensitivity adjustment with the 'Intensity' setting.
  8. Check out the 'Sound Reactive Animations' page to see what controls are available for each animation.

Voltage Fluctuation

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.

I2S Digital Input

WLEDSR-Sound-Setings-Part2

Currently the following I2S options are available:

WLEDSR-Sound-Setings-Digital_Part2

to be extended soon

I2S Line-in

There are solutions available for line-in via I2S. For example, boards/modules with "es7243" chip already work and we're investigating "es8388".


AGC - improved Autonomous Gain Control

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-based 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.

WLEDSR-Sound-Setings-AGC_only

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 its internal gain factor accordingly 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 preset from sound settings.
  • 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

Clone this wiki locally