Skip to main content

estimate_scale

Function estimate_scale 

Source
pub fn estimate_scale(
    hpcp: &[f32],
    assumes_12tet: bool,
    min_score: f32,
) -> Result<ScaleEstimate, AudioError>
Expand description

Propose a scale/mode for a 12-bin HPCP.

  • hpcp: pitch-class profile (≥ 12 bins; bin 0 = C).
  • assumes_12tet: caller-declared assumption; false ⇒ Unknown.
  • min_score: diatonic-coverage acceptance threshold (e.g. 0.9). Below it, present-but-non-diatonic energy is reported as Other.

§Errors