These three analyses convert a recording into the input representations that acoustic machine learning models expect. MFCC gives a compact cepstral description of the spectral envelope, Log-Mel Spectrogram gives the mel-band time-frequency matrix that convolutional audio models are trained on, and Spectral Contrast describes how strongly peaks stand out from valleys within octave sub-bands — a direct measure of tonality against broadband background.
All three are available as a time-axis analysis and as a vs. RPM analysis, so the same descriptor can be tracked over a run-up.
MFCC and Log-Mel share the mel filter bank; MFCC adds the discrete cosine transform at the end. Spectral Contrast skips the mel stage and works on the linear magnitude spectrum with DC and Nyquist bins removed.
The mel scale compresses frequency in a way that approximates the resolution of hearing:
NMels triangular filters are laid out with equal spacing on the mel axis between
FMin and FMax. Each triangle rises linearly from its lower edge to its centre
and falls back to its upper edge, and is scaled to unit area so that wide high-frequency filters
do not accumulate more energy than narrow low-frequency ones:
Each frame is transformed to a power spectrum, integrated by the mel filter bank into
NMels band energies Em, converted to a logarithmic scale and finally
decorrelated by an orthonormal DCT-II. The first NMfcc coefficients are kept:
Coefficient c₀ reflects the overall level of the frame, the low coefficients describe the
coarse shape of the spectral envelope and the higher ones describe increasingly fine detail.
The result is displayed as a colormap with the coefficient index on one axis and time
(or speed) on the other.
Dynamic coefficients capture how the envelope moves. They are computed by the classical regression
formula over a window of DeltaWidth frames on each side, with edge frames repeated at the
boundaries:
DeltaOrder = 1 adds a ΔMFCC colormap, DeltaOrder = 2 additionally adds a
ΔΔMFCC colormap (the same operator applied to ΔMFCC). A linear ramp in a coefficient
therefore produces a constant Δ, and a constant coefficient produces Δ = 0.
| Parameter | Default | Notes |
|---|---|---|
NMfcc | 13 | Number of cepstral coefficients kept |
NMels | 64 | Mel filters; forced to be at least NMfcc |
FFTSize | 1024 (vs. Time) / 4096 (vs. RPM) | Block length in samples |
Overlap | 50 (%) | vs. Time only |
Window | Hanning | Applied before the FFT |
FMin / FMax | 0 / fs∕2 Hz | Frequency range covered by the filter bank |
DeltaOrder | 2 | 0 = MFCC only, 1 = +Δ, 2 = +Δ and ΔΔ |
DeltaWidth | 2 | Regression half-width in frames |
RpmStep | 50 rpm | vs. RPM only |
SlopeMode | AutoDetect | vs. RPM only: AutoDetect / Runup / Rundown / All |
This analysis is deliberately parameterized in milliseconds rather than in FFT points,
because pretrained acoustic models specify their input that way. The frame length is
FrameMs, the hop is HopMs, both converted to samples at the current sample rate.
Each frame is windowed at its true length and then zero-padded to the next power of two before the
FFT, which is the usual convention for this class of model:
The default set — 25 ms frames, 10 ms hop, 64 mel bands from 125 Hz to 7500 Hz — is the layout used by the widely deployed VGGish-style front end, so the exported matrix can be handed to such a model without resampling the feature grid.
LogMode | Mapping | Use |
|---|---|---|
dB (default) | 10 · log₁₀( max(E, 10−10) ) | Display and reporting — readable decibel values |
ln | ln( E + 0.01 ) | Model input — the training-domain scaling of VGGish-style front ends |
The colormap axis is labelled with the mel band centre frequencies in Hz, and the value unit
follows the selected mode (dB or ln).
| Parameter | Default | Notes |
|---|---|---|
NMels | 64 | Number of mel bands |
FrameMs | 25 ms | vs. Time only |
HopMs | 10 ms | vs. Time only |
FMin | 125 Hz | Lower edge of the filter bank |
FMax | 7500 Hz | Upper edge; clipped to fs∕2 |
LogMode | dB | dB or ln |
Window | Hanning | Applied to the frame before zero padding |
FFTSize | 4096 | vs. RPM only — block length taken at each RPM step |
RpmStep | 50 rpm | vs. RPM only |
SlopeMode | AutoDetect | vs. RPM only |
The spectrum is divided into octave sub-bands starting at ContrastFMin. With
ContrastBands = B the band edges are
which yields B + 1 sub-bands (the lowest one covers everything below
ContrastFMin). Each sub-band is labelled by the geometric mean of its edges; for the lowest
band the lower edge is taken as ContrastFMin∕2 so that the label stays finite.
Within each sub-band the power spectral lines are sorted. The mean of the top
ContrastAlpha fraction is the peak estimate, the mean of the bottom
ContrastAlpha fraction is the valley estimate, and the contrast is their level
difference:
A flat, noise-like sub-band gives a contrast near 0 dB. A single strong tone rising out of a quiet background gives a large contrast. Because the estimate is a quantile average rather than a single extreme line, it is far less sensitive to a stray spike than a plain peak-to-mean ratio.
| Parameter | Default | Notes |
|---|---|---|
SpectrumSize | 4096 | Block length in samples |
Overlap | 0.5 | vs. Time only; a value ≥ 1 is interpreted as a percentage |
Window | Hanning | Applied before the FFT |
ContrastFMin | 200 Hz | Lower edge of the first octave sub-band |
ContrastBands | 6 | Octave bands; the result has ContrastBands + 1 rows |
ContrastAlpha | 0.02 | Quantile fraction used for the peak and valley estimates |
RpmStep | 50 rpm | vs. RPM only |
SlopeMode | AutoDetect | vs. RPM only |
In the vs. Time form the analysis advances by a fixed hop along the recording and produces one column per block; the block centre defines the time stamp. In the vs. RPM form one block is taken at every crossing of an RPM step, so the horizontal axis is speed in rpm. Steps for which no complete block fits inside the recording are left empty rather than extrapolated.
LogMode = ln feeds pretrained audio
classifiers directly; MFCC feeds classical models and lightweight embedded classifiers.© 2026 Deepsona. All Rights Reserved.