Expand description
§ferraus-analysis
Reusable audio analysis. Every public function takes an AudioBuffer and returns a
serde-serialisable struct, so other crates (mastering, stretch, delay sync,
transcription, scores) reuse exactly the numbers the analyze commands print.
Loudness values that cannot be measured are -inf in Rust and null in JSON.
Re-exports§
pub use chords::detect_chords;pub use chords::ChordOptions;pub use chords::ChordResult;pub use chords::ChordSegment;pub use compare::compare;pub use compare::similarity;pub use compare::CompareOptions;pub use compare::CompareReport;pub use compare::SimilarityReport;pub use levels::detect_clipping;pub use levels::detect_silence;pub use levels::stats;pub use levels::ClippingReport;pub use levels::SilenceReport;pub use levels::StatsReport;pub use loudness::loudness;pub use loudness::loudness_with;pub use loudness::true_peak;pub use loudness::LoudnessReport;pub use loudness::LoudnessTimeline;pub use mastering::mastering_analysis;pub use mastering::DynamicsReport;pub use mastering::MasteredHeuristic;pub use mastering::MasteringAnalysis;pub use problems::diagnose;pub use problems::Problem;pub use problems::ProblemsReport;pub use problems::Severity;pub use spectrum::BandLevel;pub use spectrum::Resolution;pub use spectrum::SpectrumReport;pub use spectrum::ToneBalance;pub use stereo::stereo_analysis;pub use stereo::StereoReport;pub use tempo::detect_tempo;pub use tempo::TempoOptions;pub use tempo::TempoResult;
Modules§
- chords
- Chord recognition (best-effort): peak-picked STFT chroma, harmonic-aware chord templates (maj, min, 7, maj7, min7, dim, sus4, sus2), a bass-note cue for root choice and slash chords, and Viterbi smoothing with a chord-change penalty.
- compare
- Null-test comparison (
compare a b) and perceptual similarity (analyze similarity). - levels
- Level-based analyses: silence regions, clipping runs, and per-channel amplitude statistics with an optional dB histogram.
- loudness
- EBU R128 / ITU-R BS.1770-4 loudness, implemented from the standard: K-weighting biquads derived for any sample rate, 400 ms momentary and 3 s short-term windows on a 100 ms grid, absolute (-70 LUFS) and relative (-10 LU) gating for integrated loudness, loudness range (EBU Tech 3342, 10th–95th percentile of gated short-term values), and true peak by polyphase oversampling.
- mastering
- Measurements the mastering crate decides from: dynamics (crest factor, PLR, transient
density, loudness sections), the “already mastered” heuristic, and a one-call
mastering_analysisthat bundles loudness, tonal balance, dynamics, stereo, problems, and tempo. - problems
- Diagnostics (
analyze problems): each detector returns aProblemwith a severity, a plain-language explanation, and a suggested fix that is a runnable command orfxstage string. - spectrum
- Long-term average spectrum (Welch), fractional-octave band levels, per-bin spectra, spectral descriptors, and tonal balance against a reference spectrum or curve.
- stereo
- Stereo image metrics: L/R correlation (broadband and low band), mid/side balance, width and correlation per band, and a mono-compatibility score.
- tempo
- Tempo and beat tracking.
- util
- Shared DSP helpers: windows, STFT, Welch spectra, biquads, mel filterbanks, FFT cross-correlation, and small statistics. Public so sibling crates can reuse them.
Structs§
- Audio
Buffer - Planar
f32audio: oneVec<f32>per channel, all the same length.
Functions§
- ops
- Ops this crate contributes to the command registry:
analyze tempo|loudness|silence| spectrum|clipping|chords|similarity|problems|stats|stereoandcompare.