pub struct AudioFeatures {Show 15 fields
pub centroid_mean: f64,
pub centroid_std: f64,
pub rolloff_mean: f64,
pub flatness_mean: f64,
pub flux_mean: f64,
pub zcr_mean: f64,
pub rms_mean: f64,
pub rms_std: f64,
pub crest: f64,
pub attack_s: f64,
pub tail_ratio: f64,
pub bass_fraction: f64,
pub held_centroid_std: f64,
pub high_ratio: f64,
pub chord_flatness_delta: f64,
}Expand description
Named perceptual descriptors. to_vec order matches AudioFeatures::NAMES.
Fields§
§centroid_mean: f64Mean spectral centroid on the log_axis (octaves above 20 Hz,
1.0 = Nyquist) — brightness.
centroid_std: f64Std of the log-axis centroid over frames — timbral movement, in octaves, so a wobble means the same thing at any register.
rolloff_mean: f64Mean 85% spectral rolloff on the log_axis.
flatness_mean: f64Mean spectral flatness (0 tonal … 1 noisy).
flux_mean: f64Mean spectral flux — how fast the spectrum changes.
zcr_mean: f64Zero-crossing rate as an equivalent frequency, on the log_axis.
rms_mean: f64Mean frame RMS of the normalized render.
rms_std: f64Std of frame RMS — dynamics/movement.
crest: f64ln crest factor: ln(peak / whole-phrase RMS). Logged because the
raw factor is heavy-tailed (1 … 40+).
attack_s: f64ln(attack + 5 ms) of the first note (onset → 90% of that note’s peak
RMS, interpolated between envelope hops).
tail_ratio: f64ln tail level: RMS of the final 300 ms relative to whole-phrase RMS —
captures release length and delay/reverb tails. Logged: the raw ratio
spans three orders of magnitude.
bass_fraction: f64Low-band energy fraction (below ~250 Hz) — weight/sub character.
held_centroid_std: f64Std of the log-axis centroid over frames of the held note’s gate-on
span only. centroid_std over the whole phrase conflates note-to-note
register jumps with genuine timbral motion; this coordinate is
register-constant by construction, so it is the axis on which “a filter
sweeping at 0.4 Hz” and “a static patch” are different patches at all.
0.0 when the phrase has no held span long enough to measure.
high_ratio: f64ln RMS of the highest note’s gate-on span relative to the held
note’s — does the patch speak in the upper register, or does its
filter choke it? 0.0 when the phrase has no note meaningfully above
its first.
chord_flatness_delta: f64Mean spectral flatness over the chord note’s gate-on span minus the held note’s — intermodulation and mud when voices stack. 0.0 when the phrase has no chord note.
Implementations§
Source§impl AudioFeatures
impl AudioFeatures
Sourcepub const NAMES: [&'static str; 15]
pub const NAMES: [&'static str; 15]
Feature names in to_vec order.
§The :p2 stimulus tag
Every audio feature is a measurement of the standard phrase, so a
stimulus change changes what each value means even when the formula is
untouched — a slow pad’s rms_mean under a phrase that never lets it
open is a different quantity from the same field under one that does.
The observation log stores raw φ by name, and
FitSet::build
projects old logs onto the current names: same name ⇒ same coordinate.
Tagging the names with the stimulus generation is therefore the
migration mechanism itself — votes recorded under the v1 phrase keep
their (stimulus-independent) structural coordinates and have their
old-stimulus audio coordinates honestly imputed as “no evidence”,
instead of being silently mixed into a standardizer they were never
commensurable with. Bump the tag whenever
PhraseSpec::default changes audibly.
Sourcepub fn to_vec(&self) -> Vec<f64>
pub fn to_vec(&self) -> Vec<f64>
Flatten to a vector in Self::NAMES order.
Trait Implementations§
Source§impl Clone for AudioFeatures
impl Clone for AudioFeatures
Source§fn clone(&self) -> AudioFeatures
fn clone(&self) -> AudioFeatures
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AudioFeatures
impl Debug for AudioFeatures
Source§impl<'de> Deserialize<'de> for AudioFeatures
impl<'de> Deserialize<'de> for AudioFeatures
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for AudioFeatures
impl PartialEq for AudioFeatures
Source§fn eq(&self, other: &AudioFeatures) -> bool
fn eq(&self, other: &AudioFeatures) -> bool
self and other values to be equal, and is used by ==.