spectralflatness
spectralflatness(
@mode 0
) -> llll
Generates audio descriptor to calculate the spectral flatness of a buffer, defined as the ratio between the spectrum's geometric mean and arithmetic mean. See analyze
.
The resulting buffer will be updated with the following keys:
spectralflatness
info
spectralflatness
is a mirror implementation of the same algorithm in the Essentia library.
For more details on the algorithm, please check the Essentia Algorithms reference.
Arguments
@mode
[int]: analysis mode. (default:0
).0
: global1
: time series2
: time-tagged time series3
: buffer
Output
spectralflatness descriptor [llll]
Usage
spectralflatness
is meant to be used with the analyze
function:
$buffer = importaudio('singing.wav'); ## input buffer
$descr = spectralflatness(); ## generate spectralflatness audio descriptor
$buffer.inspect('before analysis');
$buffer = $buffer.analyze($descr); ## apply analysis
$buffer.inspect('after analysis')