Spectral-shape descriptors. More...
#include <memory_resource>#include <nk/value/value.hpp>Go to the source code of this file.
Functions | |
| Value | nk::audio::spectralCentroid (const Value &x, const Value &f, std::pmr::memory_resource *mr=nullptr) |
| Spectral centroid — power-weighted mean frequency. | |
| Value | nk::audio::spectralSpread (const Value &x, const Value &f, std::pmr::memory_resource *mr=nullptr) |
| Spectral spread — power-weighted std around the centroid. | |
| Value | nk::audio::spectralRolloffPoint (const Value &x, const Value &f, double percentile=0.95, std::pmr::memory_resource *mr=nullptr) |
| Spectral rolloff frequency. | |
| Value | nk::audio::spectralDecrease (const Value &x, const Value &f, std::pmr::memory_resource *mr=nullptr) |
| Spectral decrease — slope-like measure relative to first bin. | |
| Value | nk::audio::spectralSlope (const Value &x, const Value &f, std::pmr::memory_resource *mr=nullptr) |
| Spectral slope — least-squares slope of (f, X). | |
| Value | nk::audio::spectralFlux (const Value &x, const Value &f, double p=2.0, std::pmr::memory_resource *mr=nullptr) |
| Spectral flux — p-norm of frame-to-frame spectrum differences. | |
| Value | nk::audio::spectralCrest (const Value &x, const Value &f, std::pmr::memory_resource *mr=nullptr) |
| Spectral crest — max(X) / mean(X) per frame. | |
| Value | nk::audio::spectralEntropy (const Value &x, const Value &f, std::pmr::memory_resource *mr=nullptr) |
| Spectral entropy — Shannon entropy of normalised spectrum. | |
| Value | nk::audio::spectralFlatness (const Value &x, const Value &f, std::pmr::memory_resource *mr=nullptr) |
| Spectral flatness — geomean(X) / mean(X). | |
| Value | nk::audio::spectralKurtosis (const Value &x, const Value &f, std::pmr::memory_resource *mr=nullptr) |
| Spectral kurtosis — X-weighted 4th central moment. | |
| Value | nk::audio::spectralSkewness (const Value &x, const Value &f, std::pmr::memory_resource *mr=nullptr) |
| Spectral skewness — X-weighted 3rd central moment. | |
Spectral-shape descriptors.
Two input forms (shared by every function in this header):
Throughout this header x / f follow that convention; only descriptor-specific extra arguments (percentile, p) are called out separately.
Definition in file shape_descriptors.hpp.