Expand description
φ_audio: perceptual descriptors of the normalized standard-phrase render.
Computed on Hann-windowed frames (2048 samples, 50% hop) of the mono
render. Every field is finite by construction (renders are vetted first).
Deliberately compact — 15 dims, and every one of them named in
AudioFeatures::NAMES rather than counted here, so this line cannot go
stale again. The taste model is a mixture of linear experts, and
interpretable axes (“bright”, “noisy”, “slow attack”, “long tail”) are the
point.
§Why these coordinates and not the obvious ones
The model downstream is linear in φ, so the axis a feature lives on decides what preferences are expressible at all.
- Frequency features are logarithmic, not linear in Hz. Brightness and
pitch perception are octave-based. On a linear-Hz axis normalized by
Nyquist, moving a patch from 200 Hz to 400 Hz — a full octave, an
enormous audible change — shifts the coordinate by 0.009, while
8 k → 16 k shifts it by 0.36. A linear model in that coordinate cannot
represent “I like my basses a shade brighter”: the entire usable range is
swallowed by the bright tail of the pool.
log_axisputs centroid, rolloff and zero-crossing rate on a shared octaves-above-20 Hz scale, normalized to[0, 1]at Nyquist so the vector stays sample-rate agnostic. - Heavy tails are logged.
crestspans 1 to 40+ andtail_ratiospans three orders of magnitude; standardizing either raw hands the model a coordinate whose z-score is a near-constant for most of the pool and +4 for a handful of outliers. - The attack crossing is interpolated, not floored. Quantizing the
90 %-of-peak crossing to the analysis-window index makes
attack_sexactly zero for every patch whose first window is already at peak — i.e. most percussive patches — turning a continuous axis into a zero-inflated spike. A fine hop plus sub-window interpolation keeps it continuous, andln(attack + 5 ms)keeps the fast end resolved.
Structs§
- Audio
Features - Named perceptual descriptors.
to_vecorder matchesAudioFeatures::NAMES.
Functions§
- audio_
features - Extract
AudioFeaturesfrom a (normalized) render. - log_
axis - Map a frequency to octaves above 20 Hz, normalized so Nyquist is 1.0.