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

    Type Alias MotifOccurrence

    One statement of a motif, addressed in the melody it was found in.

    The notes themselves are not repeated here: a statement is the motif's notes moved by transpose and stretched by timeRatio, and noteIndex addresses the original array for a caller that wants them exactly.

    type MotifOccurrence = {
        noteIndex: number;
        startBeat: number;
        endBeat: number;
        transpose: number;
        timeRatio: number;
    }
    Index
    noteIndex: number

    Index of the statement's first note among the sounding notes of the melody, in time order. Notes that never sound are dropped before the search, so this is not an index into the caller's array unless the caller's array has none.

    startBeat: number

    Onset of the statement's first note.

    endBeat: number

    End of the statement's last note, exclusive.

    transpose: number

    Semitones this statement stands above the motif's first statement.

    timeRatio: number

    How much this statement is stretched against the motif's first: 2 for a statement in doubled note values, 0.5 for one in halved values, 1 for one in the same values.