mirror of
https://github.com/wled/WLED.git
synced 2025-07-22 18:26:32 +00:00
Merge branch '0_15' of https://github.com/aircoookie/WLED into 0_15
This commit is contained in:
commit
de89b516dc
@ -282,6 +282,7 @@ void FFTcode(void * parameter)
|
|||||||
//FFT.windowing(FFTWindow::Blackman_Harris, FFTDirection::Forward); // Weigh data using "Blackman- Harris" window - sharp peaks due to excellent sideband rejection
|
//FFT.windowing(FFTWindow::Blackman_Harris, FFTDirection::Forward); // Weigh data using "Blackman- Harris" window - sharp peaks due to excellent sideband rejection
|
||||||
FFT.compute( FFTDirection::Forward ); // Compute FFT
|
FFT.compute( FFTDirection::Forward ); // Compute FFT
|
||||||
FFT.complexToMagnitude(); // Compute magnitudes
|
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.
|
||||||
|
|
||||||
FFT.majorPeak(&FFT_MajorPeak, &FFT_Magnitude); // let the effects know which freq was most dominant
|
FFT.majorPeak(&FFT_MajorPeak, &FFT_Magnitude); // let the effects know which freq was most dominant
|
||||||
FFT_MajorPeak = constrain(FFT_MajorPeak, 1.0f, 11025.0f); // restrict value to range expected by effects
|
FFT_MajorPeak = constrain(FFT_MajorPeak, 1.0f, 11025.0f); // restrict value to range expected by effects
|
||||||
|
Loading…
x
Reference in New Issue
Block a user