Detector class
Beats from the energy of each frame: a rise above the running average by a margin, and near the loudest recent energy (so a hi-hat between kicks is not one), no sooner than GAP after the last beat.
import { Detector } from '@dioramajs/audio/beat'. The sensitivity lowers both bars. Returns the strength 0..1 of a beat on this frame, 0 for none. Deterministic: the same frames give the same beats.
class DetectorMembers
| Name | Type | Description |
|---|---|---|
constructor | | |
reset | | Forgets the average, as after a pause or a seek. |
step | | Takes the energy of one frame |
Defined in packages/audio/src/beat.ts.