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

◆ computePinkNoiseGain()

float fl::audio::computePinkNoiseGain ( float freq_hz,
float f_ref )
inline

Compute pink noise compensation gain for a single frequency.

Pink noise has 1/f spectral density → equal power per octave. To flatten it: multiply by sqrt(f / f_ref).

Parameters
freq_hzBin center frequency in Hz
f_refReference frequency (typically geometric mean of all bins)
Returns
Compensation gain factor

Definition at line 284 of file mic_response_data.h.

284 {
285 if (freq_hz <= 0.0f || f_ref <= 0.0f) return 1.0f;
286 return fl::sqrtf(freq_hz / f_ref);
287}
float sqrtf(float value) FL_NOEXCEPT
Definition math.h:453

References fl::sqrtf().

Referenced by computePinkNoiseGains().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: