scottlawsonbc / audio-reactive-led-strip

:musical_note: :rainbow: Real-time LED strip music visualization using Python and the ESP8266 or Raspberry Pi
MIT License
2.68k stars 644 forks source link

LEDs light up with no sound #252

Closed Xanthey closed 3 years ago

Xanthey commented 4 years ago

After the sound stops, a few moments later the LEDs begin to gradually light up until fully bright. It seems to be some sort of noise loopback that is being amplified over and over until it achieves "full volume." Any recommendation on how to stop this behavior?

denisTenis1 commented 4 years ago

The code thinks that music is still playing even when its not, so it tries to amplify the michrophones recording volume until it reaches max. You really should not mess around with these settings cause your LEDs will only work when youre blasting music.

Xanthey commented 4 years ago

That's actually fine by me, and would prefer it that way. My output volume from the PC that provides the audio input is ALWAYS set to max. So if it isnt playing any audio to go out to the RPi i would prefer the LEDs to be off entirely. Side Note: What i have here is a PC with an output going to a DAC in a secondary PC, that PC has multiple outputs and inputs. One output goes to the Pi and is a direct mirror of the output of the main PC, another output goes to a 24 port mixer board and returns back to the DAC for final mixing. This is really irrelevant to the issue.. but i wanted to illustrate that the volume of the PC providing the audio is always max because i control the actual audio levels through a mixer board and PA system.

tungheo commented 4 years ago

open config.py and change MIN_VOLUME_THRESHOLD = 1e-2

joeybab3 commented 4 years ago

I believe the solution is what @tungheo mentioned which would be editing your config, let me know if that works for you @Xanthey or if you are no longer working on this I can close the issue

joeybab3 commented 3 years ago

Closing due to inactivity.