Spectral features extractor: statistical moments (centroid, spread, skewness, kurtosis), spectral flatness, spectral flux and an onset detection function based on rectified, whitened spectral flux.
Signal processing routine. Call this function for each sample to perform signal analysis.
- Parameters
-
| [in] | x | Pointer to the instance |
| [out] | outs | Pointer to an array of seven doubles, containing the algorithm outputs. Array members represent the following information respectively:
- Spectral centroid,
- Spectral spread,
- Spectral skewness,
- Spectral kurtosis,
- Spectral flatness,
- Spectral flux,
- Onset detection function (rectified and whitened spectral flux).
|
| [in] | in | Input sample |
- Returns
- 1 if output available (analysis window full), 0 otherwise
Destroys a spectral features extractor.
- Parameters
-
| [in] | x | Pointer to the instance to destroy |
Instantiates a spectral features extractor.
- Parameters
-
| [in] | size | Size of the analysis window, in samples |
- Returns
- Pointer to the new instance
Sets the upper frequency bound for spectral analysis. Spectral bins above this frequency are ignored in the audio descriptors computation.
- Parameters
-
| [in] | x | Pointer to the instance |
| [in] | f | Maximum analyzed frequency, in Hz |
Sets the lower frequency bound for spectral analysis. Spectral bins below this frequency are ignored in the audio descriptors computation.
- Parameters
-
| [in] | x | Pointer to the instance |
| [in] | f | Minimum analyzed frequency, in Hz |
Sets the analysis window overlapping ratio. Accepted values go from 0.0 to 1.0, with 0.0 meaning no overlap and 1.0 meaning total overlap.
- Parameters
-
| [in] | x | Pointer to the instance |
| [in] | f | Overlap ratio [0.0, 1.0] |