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
| Property | Type | Description | Defined in |
|---|---|---|---|
bpm | BpmCandidates | Emitted continuously during BPM analysis with current tempo candidates | core/types.ts:35 |
bpmStable | BpmCandidates | Emitted when BPM detection has stabilized with high confidence | core/types.ts:37 |
analyzerReset | void | Emitted when the analyzer state has been reset | core/types.ts:39 |
analyzeChunk | Float32Array | Emitted in debug mode when analyzing audio chunks | core/types.ts:41 |
validPeak | { threshold: Threshold; index: number; } | Emitted in debug mode when a valid peak is detected | core/types.ts:43 |
validPeak.threshold | Threshold | - | core/types.ts:43 |
validPeak.index | number | - | core/types.ts:43 |
error | { message: string; error: Error; } | Emitted when an error occurs during processing | core/types.ts:45 |
error.message | string | - | core/types.ts:45 |
error.error | Error | - | core/types.ts:45 |