Hiyve Components - v1.0.0
    Preparing search index...
    • Find every moment a signal jumps clearly above its recent level.

      A simple energy detector: the signal is split into short windows, and a window counts as an onset when its level exceeds the median of the preceding windows by thresholdDb (and an absolute floor), with a minimum gap between onsets so one attack is not reported twice. It is meant for aligning clocks — matching clear attacks against MIDI note-ons — not for grading timing.

      Parameters

      • samples: Float32Array

        One channel of audio

      • sampleRate: number

        Samples per second

      • Optionaloptions: OnsetListOptions

      Returns number[]

      Onset times in milliseconds from the start of samples, ascending