From 7dc6659e701a1efd4217acbdbe5969113f7eacc4 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 18 Apr 2024 13:36:00 +0200 Subject: [PATCH] audioreactive: better do DC removal after FFT.complexToMagnitude(); --- usermods/audioreactive/audio_reactive.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usermods/audioreactive/audio_reactive.h b/usermods/audioreactive/audio_reactive.h index b21db32b..c3efd367 100644 --- a/usermods/audioreactive/audio_reactive.h +++ b/usermods/audioreactive/audio_reactive.h @@ -601,8 +601,8 @@ void FFTcode(void * parameter) FFT.windowing(FFTWindow::Blackman_Harris, FFTDirection::Forward); // Weigh data using "Blackman- Harris" window - sharp peaks due to excellent sideband rejection #endif FFT.compute( FFTDirection::Forward ); // Compute FFT - vReal[0] = 0; // The remaining DC offset on the signal produces a strong spike on position 0 that should be eliminated to avoid issues. FFT.complexToMagnitude(); // Compute magnitudes + vReal[0] = 0; // The remaining DC offset on the signal produces a strong spike on position 0 that should be eliminated to avoid issues. #else FFT.DCRemoval(); // let FFT lib remove DC component, so we don't need to care about this in getSamples()