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

    Type Alias PhraseOptions

    Options for phrasesFromTimeline.

    type PhraseOptions = {
        ts?: MeterLike;
        meters?: MeterLike;
        key?: KeyContext;
        totalBeats?: number;
        expectedPhraseBeats?: number;
        minPhraseBeats?: number;
        restBeats?: number;
        longNoteBeats?: number;
        hypermeter?: Hypermeter;
        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 and hypermetric downbeats follow the signature in force at the beat in question, so a piece that changes metre is cut at its own bar lines; the length defaults below are lengths rather than positions, and each is taken once from the meter the span opens in.

    4/4 throughout
    

    Key context for cadence detection: one key for the whole span, or the key in force at a given beat. Omit it to have the key searched for over time, so a piece that modulates has each cadence read in the key it arrives in.

    the key inferred from the notes over time
    
    totalBeats?: number

    End of the analysed span in beats; defaults to the end of the last note or timeline segment.

    the end of the input
    
    expectedPhraseBeats?: number

    Length a phrase is expected to run, in beats; defaults to one hyperbar.

    This is a prior, not a rule: a boundary is placed where the evidence puts it, and this decides how much evidence an irregular length has to carry before it is preferred to a regular one. Set it to two hyperbars for music whose phrases are periods.

    one hyperbar of the opening meter
    
    minPhraseBeats?: number

    Shortest phrase that may be reported, in beats; defaults to one bar of the opening meter.

    one bar of the opening meter
    
    restBeats?: number

    Silence at least this long divides phrases; defaults to half a bar of the opening meter.

    half a bar of the opening meter
    
    longNoteBeats?: number

    A note held at least this long reads as an arrival and closes a phrase; defaults to one bar of the opening meter.

    one bar of the opening meter
    
    hypermeter?: Hypermeter

    A hypermeter already computed for this piece, to be used instead of inferring one. Pass it when the caller has already asked for the grouping, or to impose a grouping the search would not have chosen.

    inferred from the notes and the cadences found
    
    budget?: number

    Upper bound on the work this call may do.