Skip to main content

Module scale

Module scale 

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

Zero-heap: fixed-size masks and scalar accumulation; no allocation.

Structs§

ScaleEstimate
A scale proposal with its supporting tonic and coverage score.

Enums§

ScaleProposal
Proposed scale / mode.

Functions§

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