pub struct DownbeatTerms {
pub scores: [f32; 4],
pub best: u32,
pub held: u32,
pub effect_raw: f32,
pub null_share: f32,
pub effect_corrected: f32,
pub beats_seen: u32,
pub locked: bool,
pub fold_beat: u32,
pub grid_bar_phase: f32,
}Expand description
A read-only decomposition of what the estimator currently believes (Plan 0068’s instrument).
The 1 Hz diagnostic column publishes the outcome — locked or not, and one confidence number — which is why “the accent feature is weak”, “eight bars is the wrong window” and “the confidence measure under-reports” are three stories that fit the same reading. This is the decomposition that tells them apart.
Diagnostics only. It is not a grammar variable, not on the C ABI, and
nothing on the analysis path reads it — DownbeatTracker::terms recomputes
the fold from state that already exists rather than caching it, so the
estimator behaves identically whether or not anyone is looking. The two
exceptions are Self::fold_beat and Self::grid_bar_phase, which
process stores because they are its input and nothing downstream retains
them; the store is unconditional and branchless, so it is as invisible to the
estimate as the recomputation is.
Fields§
§scores: [f32; 4]Mean accent per candidate beat-1 alignment — the fold’s own output.
best: u32The alignment the fold currently favours (first argmax of scores).
held: u32The alignment actually held, which lags best by the hysteresis.
effect_raw: f32Between-group share of accent variance, before the noise correction.
The share four groups would explain by chance alone at this history
length — what effect_raw is discounted by.
effect_corrected: f32What the gate compares: effect_raw corrected for null_share.
beats_seen: u32Accents recorded, against MIN_BEATS and saturating at ACCENT_HISTORY.
locked: boolWhether these terms publish — the evidence floor and the gate.
fold_beat: u32The counter the fold buckets by, as of the most recent
DownbeatTracker::process — the grid’s beat count,
and beat_index only while the grid warms up (ADR-0109). Self::scores, Self::best and Self::held are all
indexed in this counter’s space, and it is reported here because
nothing downstream retains it: the shell’s log had no way to name the
quantity its own alignment columns were expressed in, which is what let
the two drift apart while every column stayed plausible.
grid_bar_phase: f32Where that counter sits across the bar, [0, 1), ungated — no
alignment is subtracted, because the question this exists to answer is
where the grid is, not where the estimator thinks beat 1 is.
Honest only once the grid is running. Before that the fold is handed the
tempo tracker’s onset-reset phase, so a warmup row’s reading is not a
grid reading; bpm marks the handover.
Trait Implementations§
Source§impl Clone for DownbeatTerms
impl Clone for DownbeatTerms
Source§fn clone(&self) -> DownbeatTerms
fn clone(&self) -> DownbeatTerms
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 DownbeatTerms
impl Debug for DownbeatTerms
Source§impl Default for DownbeatTerms
impl Default for DownbeatTerms
Source§fn default() -> DownbeatTerms
fn default() -> DownbeatTerms
Source§impl PartialEq for DownbeatTerms
impl PartialEq for DownbeatTerms
Source§fn eq(&self, other: &DownbeatTerms) -> bool
fn eq(&self, other: &DownbeatTerms) -> bool
self and other values to be equal, and is used by ==.