OptionalkeyKey context held across the whole span. Omit it to have the key searched for over time with keyTimelineFromNotes, which is what lets a piece that modulates be analysed against the key actually in force.
Taken in whatever form the caller holds a key, and kept whole: the region built from it carries the spelling and the scale form it was named with, so an Ab minor stated here is an Ab minor in the result.
OptionaltsA single time signature held across the whole span, as sugar for a
one-element meters; defaults to 4/4. Giving both is an input error.
OptionalmetersThe meter as it changes over the span. Bar lines, downbeats and metric weight all follow the signature in force at the beat in question, so a piece that changes meter is not read in the one it opened in.
OptionalpickupLength of the pickup in beats, when the piece starts with one.
The first downbeat is beat 0 whatever precedes it, so an upbeat is written at negative beats — a one-beat pickup in 4/4 sounds at beat -1. Declaring its length rejects a note that starts before the pickup does; leave it unset to accept any finite onset.
OptionalsegmentationWhere chord boundaries may fall; defaults to 'dynamic'.
OptionalharmonicExpected chord length in beats; defaults to the length of the opening bar.
Under 'grid' segmentation this is the exact window length. Under
'dynamic' it is a prior: the longer a chord is expected to last, the more
evidence a change needs before the search will place one.
OptionalminResolution the 'dynamic' search looks for changes at, in beats; defaults
to one main pulse of the meter — a quarter in 4/4, a dotted quarter in 6/8.
Lower it to catch changes on off-beats, at the cost of proportionally more
work. Values above harmonicRhythm are clamped to it, and the option is
ignored under 'grid' segmentation.
The search reads it as a resolution rather than as an exact slot length: it
rounds down to a whole division of the meter's pulse, so 0.6 in 4/4 is
read in half-beats. That keeps every pulse of the meter, and the bar lines
with them, on the grid whatever resolution is asked for, and with them every
change a coarser setting found. A resolution coarser than one pulse is
therefore read as one pulse rather than stepping over the beats a change is
heard on.
OptionaltotalEnd of the analyzed span in beats; defaults to the end of the last note.
OptionalbudgetUpper bound on the work this call may do — note counts, windows, and candidate counts are each checked against it before anything is allocated.
Raise it to analyse a piece larger than the default allows; the default is DEFAULT_GENERATION_BUDGET, chosen so a runaway input fails fast rather than blocking the thread.
Options controlling chordTimelineFromNotes.