Hiyve Components - v1.0.0
    Preparing search index...
    • How strongly a spectrum supports a note's harmonic series.

      For each of the first partials partials, the strongest bin within toleranceCents of the partial's frequency is taken; the weighted sum of those peaks is the evidence, reported relative to the spectrum's loudest bin so thresholds mean the same thing for soft and loud attacks.

      Parameters

      • spectrum: Float32Array

        Magnitude spectrum

      • binHz: number

        Frequency spacing of the bins

      • midi: number

        Note to test

      • options: Required<HarmonicOptions>

        Partials, tolerance, tuning

      • Optionalreference: number

        Loudest bin to normalise against; defaults to the spectrum's own maximum

      • floorSpectrum: Float32Array = spectrum

        The spectrum whose levels set each partial's local floor; defaults to spectrum. Pass the unsubtracted recording when spectrum is a residual — the floors are cached per spectrum, so the same recording is only measured once however often it is asked

      Returns HarmonicEvidence