diff --git a/usermods/audioreactive/audio_reactive.h b/usermods/audioreactive/audio_reactive.h index da6005db..b234b43c 100644 --- a/usermods/audioreactive/audio_reactive.h +++ b/usermods/audioreactive/audio_reactive.h @@ -36,7 +36,7 @@ #endif #if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) -// this applies "pink noise scaling" to FFT results before computing the major peak for effects. +// this applies "pink noise scaling" to FFT results before computing the major peak for effects.0 // currently only for ESP32-S3 and classic ESP32, due to increased runtime #define FFT_MAJORPEAK_HUMAN_EAR #endif @@ -549,6 +549,7 @@ void FFTcode(void * parameter) // find highest sample in the batch float maxSample = 0.0f; // max sample from FFT batch + zeroCrossingCount = 0; for (int i=0; i < samplesFFT; i++) { // set imaginary parts to 0 vImag[i] = 0; diff --git a/usermods/usermod_v2_auto_playlist/usermod_v2_auto_playlist.h b/usermods/usermod_v2_auto_playlist/usermod_v2_auto_playlist.h index e39f4c2b..8be728b1 100644 --- a/usermods/usermod_v2_auto_playlist/usermod_v2_auto_playlist.h +++ b/usermods/usermod_v2_auto_playlist/usermod_v2_auto_playlist.h @@ -34,8 +34,8 @@ class AutoPlaylistUsermod : public Usermod { int change_threshold = 10; int change_lockout = 100; // never change below this numnber of millis. I think of this more like a debounce, but opinions may vary. - int ideal_change_max = 5000; // ideally change patterns no more than this number of millis int ideal_change_min = 2000; // ideally change patterns no less than this number of millis + int ideal_change_max = 5000; // ideally change patterns no more than this number of millis std::vector autoChangeIds; @@ -65,7 +65,7 @@ class AutoPlaylistUsermod : public Usermod { unsigned int zcr = extra[0]; int energy = extra[1]; - int lfc = getFFTFromRange(um_data, 0 , 3); + int lfc = extra[2]; // getFFTFromRange(um_data, 1 , 3); // WLED-MM/TroyHacks: Calculate the long- and short-running averages // and the squared_distance for the vector.