Skip to main content

Crate resonant_analysis

Crate resonant_analysis 

Source
Expand description

resonant-analysis — high-level audio analysis features.

Provides onset detection, beat tracking, pitch estimation, MFCCs, chroma features, and spectral descriptors. All algorithms build on the primitives in [resonant-fft] and [resonant-core].

§Quick start

use resonant_analysis::spectral;

let magnitudes = [0.1, 0.5, 1.0, 0.3];
let frequencies = [0.0, 500.0, 1000.0, 1500.0];

let centroid = spectral::spectral_centroid(&magnitudes, &frequencies).unwrap();
let flatness = spectral::spectral_flatness(&magnitudes).unwrap();

Re-exports§

pub use error::AnalysisError;
pub use key::KeyDetector;
pub use key::KeyEstimate;
pub use key::Mode;
pub use key::PitchClass;
pub use loudness::LoudnessAnalyser;
pub use lufs::ChannelConfig;
pub use lufs::LufsAnalyser;

Modules§

chroma
Chroma features — 12-bin pitch class profiles. Chroma features — 12-bin pitch class profiles.
error
Error types for audio analysis operations.
key
Key detection via Krumhansl-Schmuckler profiles. Key detection via Krumhansl-Schmuckler key profiles.
loudness
Loudness analysis: RMS, peak, and crest factor. Simple loudness analysis: RMS, peak, and crest factor.
lufs
LUFS measurement per ITU-R BS.1770-4. ITU-R BS.1770-4 integrated loudness (LUFS / LKFS) measurement.
mfcc
Mel-frequency cepstral coefficients (MFCCs). Mel-frequency cepstral coefficients (MFCCs).
onset
Onset detection via spectral flux and adaptive thresholding. Onset detection via spectral flux and adaptive thresholding.
pitch
Pitch estimation using the YIN algorithm. Pitch estimation using the YIN algorithm.
spectral
Spectral feature extraction: centroid, spread, flatness, rolloff. Spectral feature extraction: centroid, spread, flatness, rolloff.
tempo
Tempo estimation via autocorrelation of onset strength envelope. Tempo estimation via autocorrelation of the onset strength envelope.
time_stretch
Time-stretching and pitch-shifting via STFT phase vocoder. Time-stretching and pitch-shifting via STFT phase vocoder.