A UGen to measure spectral flatness. Given an FFT chain this calculates the
Spectral Flatness measure, defined as a power spectrum's geometric mean divided
by its arithmetic mean. This gives a measure which ranges from approx 0 for a
pure sinusoid, to approx 1 for white noise.
The measure is calculated linearly. For some applications you may wish to
convert the value to a decibel scale. Note that this UGen may output NaN
when the input is zero (probably due to division by zero). In that case,
CheckBadValues can be used to prevent further problems.
Note that despite running at control-rate, the output remains constant for each
FFT frame. E.g. with an FFT size of 1024 and 50% overlap, a new measure is
generated every 512 audio frames, or (at control block size 64) every 8 control
blocks.
A UGen to measure spectral flatness. Given an FFT chain this calculates the Spectral Flatness measure, defined as a power spectrum's geometric mean divided by its arithmetic mean. This gives a measure which ranges from approx 0 for a pure sinusoid, to approx 1 for white noise.
The measure is calculated linearly. For some applications you may wish to convert the value to a decibel scale. Note that this UGen may output NaN when the input is zero (probably due to division by zero). In that case,
CheckBadValues
can be used to prevent further problems.Note that despite running at control-rate, the output remains constant for each FFT frame. E.g. with an FFT size of 1024 and 50% overlap, a new measure is generated every 512 audio frames, or (at control block size 64) every 8 control blocks.
CheckBadValues