MCPcopy Create free account
hub / github.com/FastLED/FastLED / applySpectralEqualization

Method applySpectralEqualization

src/fl/audio/audio_reactive.cpp.hpp:604–619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

602}
603
604void Reactive::applySpectralEqualization() {
605 if (!mConfig.enableSpectralEqualizer) {
606 return;
607 }
608
609 // Apply spectral EQ in-place on the frequency bins
610 float equalizedBins[16];
611 span<const float> inputSpan(mCurrentData.frequencyBins, 16);
612 span<float> outputSpan(equalizedBins, 16);
613 mSpectralEqualizer->apply(inputSpan, outputSpan);
614
615 // Copy back
616 for (int i = 0; i < 16; ++i) {
617 mCurrentData.frequencyBins[i] = equalizedBins[i];
618 }
619}
620
621void Reactive::updateSpectralFlux() {
622 // Compute spectral flux from Reactive's own previous magnitudes.

Callers

nothing calls this directly

Calls 1

applyMethod · 0.45

Tested by

no test coverage detected