diff --git a/usermods/audioreactive/audio_reactive.h b/usermods/audioreactive/audio_reactive.h index f05a28a1..86f98025 100644 --- a/usermods/audioreactive/audio_reactive.h +++ b/usermods/audioreactive/audio_reactive.h @@ -794,7 +794,7 @@ static void detectSamplePeak(void) { #if 0 // alternate detection, based on FFT_MajorPeak and FFT_Magnitude. Not much better... - if ((binNum > 1) && (maxVol > 8) && (binNum < 10) && (sampleAgc > 127) && + if ((binNum > 0) && (maxVol > 8) && (binNum < 10) && (sampleAgc > 127) && (FFT_MajorPeak > 50) && (FFT_MajorPeak < 250) && (FFT_Magnitude > (16.0f * (maxVol+42.0)) /*my_magnitude > 136.0f*16.0f*/) && (millis() - timeOfPeak > 80)) { havePeak = true; @@ -1218,7 +1218,7 @@ class AudioReactive : public Usermod { sampleMax = sampleMax + 0.5f * (sampleReal - sampleMax); // new peak - with some filtering #if 1 // another simple way to detect samplePeak - cannot detect beats, but reacts on peak volume - if (((binNum < 12) || ((maxVol < 1))) && (millis() - timeOfPeak > 80) && (sampleAvg > 1)) { + if (((binNum < 11) || (maxVol < 1)) && (millis() - timeOfPeak > 80) && (sampleAvg > 1)) { samplePeak = true; timeOfPeak = millis(); udpSamplePeak = true; diff --git a/wled00/FX.cpp b/wled00/FX.cpp index 107c01d9..278f2913 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -6057,7 +6057,7 @@ uint16_t mode_ripplepeak(void) { // * Ripple peak. By Andrew Tuli SEGMENT.custom2 = *maxVol * 2; } if (SEGMENT.custom1 < 1) SEGMENT.custom1 = 1; // WLEDMM prevent stupid settings for bin - if (SEGMENT.custom2 < 48) SEGMENT.custom2 = 48; // WLEDMM prevent stupid settings for maxVol (below 24 = noise) + if (SEGMENT.custom2 < 24) SEGMENT.custom2 = 24; // WLEDMM prevent stupid settings for maxVol (below 24 = noise) *binNum = SEGMENT.custom1; // Select a bin. *maxVol = SEGMENT.custom2 / 2; // Our volume comparator. @@ -6678,7 +6678,7 @@ uint16_t mode_puddlepeak(void) { // Puddlepeak. By Andrew Tuline. SEGMENT.custom2 = *maxVol * 2; } if (SEGMENT.custom1 < 1) SEGMENT.custom1 = 1; // WLEDMM prevent stupid settings for bin - if (SEGMENT.custom2 < 48) SEGMENT.custom2 = 48; // WLEDMM prevent stupid settings for maxVol (below 24 = noise) + if (SEGMENT.custom2 < 24) SEGMENT.custom2 = 24; // WLEDMM prevent stupid settings for maxVol (below 24 = noise) *binNum = SEGMENT.custom1; // Select a bin. *maxVol = SEGMENT.custom2 / 2; // Our volume comparator. @@ -7282,7 +7282,7 @@ uint16_t mode_waterfall(void) { // Waterfall. By: Andrew Tulin } if (SEGMENT.custom1 < 1) SEGMENT.custom1 = 1; // WLEDMM prevent stupid settings for bin - if (SEGMENT.custom2 < 48) SEGMENT.custom2 = 48; // WLEDMM prevent stupid settings for maxVol (below 24 = noise) + if (SEGMENT.custom2 < 24) SEGMENT.custom2 = 24; // WLEDMM prevent stupid settings for maxVol (below 24 = noise) *binNum = SEGMENT.custom1; // Select a bin. *maxVol = SEGMENT.custom2 / 2; // Our volume comparator.