Skip to main content

DownbeatTerms

Struct DownbeatTerms 

Source
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: u32

The alignment the fold currently favours (first argmax of scores).

§held: u32

The alignment actually held, which lags best by the hysteresis.

§effect_raw: f32

Between-group share of accent variance, before the noise correction.

§null_share: f32

The share four groups would explain by chance alone at this history length — what effect_raw is discounted by.

§effect_corrected: f32

What the gate compares: effect_raw corrected for null_share.

§beats_seen: u32

Accents recorded, against MIN_BEATS and saturating at ACCENT_HISTORY.

§locked: bool

Whether these terms publish — the evidence floor and the gate.

§fold_beat: u32

The 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: f32

Where 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

Source§

fn clone(&self) -> DownbeatTerms

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DownbeatTerms

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DownbeatTerms

Source§

fn default() -> DownbeatTerms

Returns the “default value” for a type. Read more
Source§

impl PartialEq for DownbeatTerms

Source§

fn eq(&self, other: &DownbeatTerms) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for DownbeatTerms

Source§

impl StructuralPartialEq for DownbeatTerms

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,