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.7k stars 642 forks source link

Too much gain on lower end Frequency #348

Open Blauenfeldt opened 2 years ago

Blauenfeldt commented 2 years ago

Whenever i play a song, and there is some low end frequencies, 0-200 Hz, all of the visualization action gets cramped down the that area, and none of the other frequencies, ~200-8000 Hz, will be lit up.

Is there a way to turn down the gain at those frequencies?

Raspberry Pi 3 b Settings: N_Pixels = 88 Min Freq = 20 Max Freq = 8000 N FFT BINS = 14 Min Volume Threshold = 1e-4

Edit: I partially found a fix. At line 220 in visualization.py, I sat mel_gain.update(np.max(gaussian_filter1d(mel, sigma=1.0))) to mel_gain.update(np.max(gaussian_filter1d(mel, sigma=25.0))). Now I see more LEDs being lit, instead of the 10%, but with the cost of oversaturated colors in the middle of the strip.