Expand description
Scale / mode proposal from an HPCP (major / minor / other, with abstention).
For each candidate tonic we measure the fraction of HPCP energy that falls on the diatonic degrees of the major and of the natural-minor scale, and take the best fit. The result is a proposal, not a verdict.
§Abstention (hard epistemic rule)
The diatonic templates are 12-TET-specific, so an explicit assumes_12tet flag
is required. Outcomes:
- not 12-TET / not a 12-bin HPCP →
ScaleProposal::Unknown(abstain); - a near-flat HPCP (no tonal information) →
ScaleProposal::Unknown; - clear energy that fits major/minor at ≥
min_scorecoverage →ScaleProposal::Major/ScaleProposal::Minor; - clear energy that fits neither well →
ScaleProposal::Other(present but non-diatonic — e.g. chromatic / modal), never a forced label.
Zero-heap: fixed-size masks and scalar accumulation; no allocation.
Structs§
- Scale
Estimate - A scale proposal with its supporting tonic and coverage score.
Enums§
- Scale
Proposal - Proposed scale / mode.
Functions§
- estimate_
scale - Propose a scale/mode for a 12-bin HPCP.