The notes to read, in any order. Notes that never sound are dropped.
Optionalmeter: MeterLike
A single time signature, or the piece's meter map; defaults to 4/4 throughout.
Analysis options; see HypermeterOptions.
The grouping, its downbeats, a confidence, and a rationale.
Infer how a piece's bars group into hyperbars.
Groupings of 2, 3, 4, 6, and 8 bars are tried at every phase, and each reading is scored on two counts: how much more harmonic change lands on the bars it calls group heads than on the bars between them, and how many of the hyperbar ends it predicts are closed by one of the cadences it is given. Where cadences are given they settle the phase, since a hyperbar is what a cadence ends; the harmony then chooses among the phases they agree with. The commonest groupings are believed a little more readily than the rare ones, which settles ties without letting a prior overrule the music.
The meter is read at the beat in question rather than at the start, so a piece that changes metre keeps being cut at its own bar lines. Bar 0 is the first full bar however much pickup precedes it, so an upbeat is bar -1 and is never taken for a hypermetric downbeat. Whether there is an upbeat at all is decided the way the rest of the analysis decides it: a note a millibeat early is playing the downbeat, not anticipating it.