Hiyve Components - v1.0.0
    Preparing search index...
    • Find the first moment a signal rises clearly above its own noise floor.

      Intended for a calibration note played after a short silence: the noise floor is measured over the leading windows, and the onset is the first window whose level exceeds it by thresholdDb.

      Parameters

      • samples: Float32Array

        One channel of audio

      • sampleRate: number

        Samples per second

      • Optionaloptions: OnsetDetectionOptions

      Returns number | null

      Onset time in milliseconds from the start of samples, or null if nothing exceeds the threshold