FastLED 3.9.15
Loading...
Searching...
No Matches

◆ applyCompression()

float fl::audio::SpectralEqualizer::applyCompression ( float value) const
private

Apply dynamic range compression per band.

Parameters
valueInput value
Returns
Compressed value

Definition at line 223 of file spectral_equalizer.cpp.hpp.

223 {
224 // Simple soft-knee compression
225 if (value <= mConfig.compressionThreshold) {
226 // Below threshold - no compression
227 return value;
228 }
229
230 // Above threshold - apply compression ratio
231 float excess = value - mConfig.compressionThreshold;
232 float compressed = excess / mConfig.compressionRatio;
233 return mConfig.compressionThreshold + compressed;
234}
SpectralEqualizerConfig mConfig
constexpr int type_rank< T >::value

References mConfig, and fl::type_rank< T >::value.

Referenced by apply().

+ Here is the caller graph for this function: