Hiyve Components - v1.0.0
    Preparing search index...

    Magnitude spectra of a signal at arbitrary positions.

    One FFT and window are built per analyser and reused for every read, so reading many positions of a long take is cheap.

    Index

    Constructors

    Properties

    binHz: number

    Frequency spacing between neighbouring bins

    sampleRate: number
    windowSize: number

    Accessors

    • get binCount(): number

      Number of bins in a spectrum (windowSize / 2 + 1)

      Returns number

    Methods

    • The average of the spectra starting at several times — a steadier read than one window, e.g. a few reads just after an attack.

      Parameters

      • samples: Float32Array
      • timesMs: readonly number[]

      Returns Float32Array

    • The frequency of a bin

      Parameters

      • bin: number

      Returns number

    • The magnitude spectrum of the window starting at startFrame. Samples past the end of the signal read as silence.

      Parameters

      • samples: Float32Array
      • startFrame: number

      Returns Float32Array

    • The magnitude spectrum of the window starting at a time in milliseconds

      Parameters

      • samples: Float32Array
      • timeMs: number

      Returns Float32Array