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

    Type Alias RhythmAnalysis

    How a line places its onsets against the meter.

    type RhythmAnalysis = {
        startBeat: number;
        endBeat: number;
        bars: number;
        onsets: number;
        onsetDensity: number;
        barOnsets: number[];
        onsetLevels: number[];
        barPositions: BarPositionProfile[];
        interOnsetShares: number[];
        restRatio: number;
        syncopation: number;
        offGridRatio: number;
        rationale: string;
    }
    Index
    startBeat: number

    First beat of the analysed span.

    endBeat: number

    End of the analysed span, exclusive.

    bars: number

    The span's length in bars, counted across any meter changes it crosses.

    onsets: number

    Onsets read, folding onsets within 0.05 beat of one another into one.

    onsetDensity: number

    Onsets per bar; 0 for a span with no bars.

    barOnsets: number[]

    Onsets per bar of the span, one entry per bar including a part bar at either end.

    onsetLevels: number[]

    Onset mass by rhythmic level, indexed 0–5: 0 off the first pulse subdivision, 1 on it, 2–5 on a main pulse (metricWeight plus 2). Sums to 1.

    barPositions: BarPositionProfile[]

    Onset placement within the bar, one profile per time signature the span reads under.

    interOnsetShares: number[]

    Inter-onset-interval mass, binned to RHYTHM_IOI_BINS; sums to 1.

    restRatio: number

    Share of the span during which nothing sounds.

    syncopation: number

    Longuet-Higgins & Lee syncopation, in [0, 1].

    offGridRatio: number

    Share of onsets further than 1/32 beat from the nearest grid slot.

    rationale: string

    Why the line reads as it does.