FastLED 3.10.8
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 217 of file spectral_equalizer.cpp.hpp.

217 {
218 // Simple soft-knee compression
219 if (value <= mConfig.compressionThreshold) {
220 // Below threshold - no compression
221 return value;
222 }
223
224 // Above threshold - apply compression ratio
225 float excess = value - mConfig.compressionThreshold;
226 float compressed = excess / mConfig.compressionRatio;
227 return mConfig.compressionThreshold + compressed;
228}
SpectralEqualizerConfig mConfig
constexpr int type_rank< T >::value

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

Referenced by apply().

+ Here is the caller graph for this function: