API Reference
API Reference
Functions
| Function | Description |
|---|---|
| getBiquadFilter | Creates a biquad lowpass filter for audio processing. |
| analyzeFullBuffer | Analyzes a complete audio buffer to detect the BPM (tempo) synchronously. |
| createRealtimeBpmAnalyzer | Creates a real-time BPM analyzer for live audio streams. |
Classes
| Class | Description |
|---|---|
| BpmAnalyzer | Real-time BPM analyzer with typed event listeners. |
| RealTimeBpmAnalyzer | Core analyzer class for real-time BPM detection. |
Type Aliases
| Type Alias | Description |
|---|---|
| Threshold | Threshold value for peak detection (0.0 to 1.0) |
| Peaks | Array of peak positions in audio samples |
| PeaksAndThreshold | Peaks with their associated threshold |
| BpmCandidates | BPM analysis results with tempo candidates |
| Interval | Interval between beats |
| Group | Tempo group with occurrence count |
| Tempo | Detected tempo with confidence metrics |
| RealTimeBpmAnalyzerParameters | Configuration options for the real-time BPM analyzer |
| RealTimeBpmAnalyzerOptions | Internal analyzer options with required fields |
| BiquadFilterOptions | Configuration options for biquad filter creation |
Events
| Type Alias | Description |
|---|---|
| ProcessorOutputEvent | Events emitted by the BPM analyzer processor (Processor → Main Thread) |
| ProcessorInputEvent | Control events sent to the processor (Main Thread → Processor) |
| ProcessorInputMessage | MessagePort message wrapper for processor input events |
| BpmAnalyzerEventMap | Type-safe event listener map for BPM analyzer events |