@libraz/libcantus - v1.1.0
    Preparing search index...

    Type Alias KeyTimelineOptions

    Options shared by the key-region entry points.

    type KeyTimelineOptions = {
        ts?: MeterLike;
        meters?: MeterLike;
        expectedKeyBeats?: number;
        minKeyBeats?: number;
        totalBeats?: number;
        profile?: KeyProfileName | KeyProfilePair;
        budget?: number;
    }
    Index

    A 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.

    4/4

    meters?: MeterLike

    The meter as it changes over the span. Bar lines, downbeats and the metric accents the search discounts a modulation by 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.

    4/4 throughout
    
    expectedKeyBeats?: number

    Expected length of one key area in beats; defaults to four bars of the opening meter.

    This is a prior, not a window: the longer a key is expected to hold, the more evidence a modulation needs before the search will report one. Keys change far more slowly than chords do, which is why the default is measured in bars rather than beats.

    four bars of the opening meter
    
    minKeyBeats?: number

    Shortest key area the search may report, in beats; defaults to one bar of the opening meter. Values above expectedKeyBeats are clamped to it.

    one bar of the opening meter
    
    totalBeats?: number

    End of the analyzed span in beats; defaults to the end of the last note or chord segment.

    the end of the input
    

    Key profile the regions are scored against; defaults to 'krumhansl'. Same meaning as the option of the same name on the key detectors.

    Every entry point reports confidence as the correlation between a region's pitch-class distribution and this profile, so the option is what that number is measured against. Which keys detectModulations reports is settled by how each chord reads in a key rather than by a pitch-class profile, so there the profile scores the answer without choosing it.

    'krumhansl'

    budget?: number

    Upper bound on the work this call may do.