Skip to content

API Reference


API Reference / BpmAnalyzerEventMap

Type Alias: BpmAnalyzerEventMap

ts
type BpmAnalyzerEventMap = {
  bpm: BpmCandidates;
  bpmStable: BpmCandidates;
  analyzerReset: void;
  analyzeChunk: Float32Array;
  validPeak: {
     threshold: Threshold;
     index: number;
  };
  error: {
     message: string;
     error: Error;
  };
};

Defined in: core/types.ts:33

Type-safe event listener map for BPM analyzer events

Properties

PropertyTypeDescriptionDefined in
bpmBpmCandidatesEmitted continuously during BPM analysis with current tempo candidatescore/types.ts:35
bpmStableBpmCandidatesEmitted when BPM detection has stabilized with high confidencecore/types.ts:37
analyzerResetvoidEmitted when the analyzer state has been resetcore/types.ts:39
analyzeChunkFloat32ArrayEmitted in debug mode when analyzing audio chunkscore/types.ts:41
validPeak{ threshold: Threshold; index: number; }Emitted in debug mode when a valid peak is detectedcore/types.ts:43
validPeak.thresholdThreshold-core/types.ts:43
validPeak.indexnumber-core/types.ts:43
error{ message: string; error: Error; }Emitted when an error occurs during processingcore/types.ts:45
error.messagestring-core/types.ts:45
error.errorError-core/types.ts:45

Released under the Apache License 2.0