Skip to content

API Reference


API Reference ​

Functions ​

FunctionDescription
getBiquadFilterCreates a biquad lowpass filter for audio processing.
analyzeFullBufferAnalyzes a complete audio buffer to detect the BPM (tempo) synchronously.
createRealtimeBpmAnalyzerCreates a real-time BPM analyzer for live audio streams.

Classes ​

ClassDescription
BpmAnalyzerReal-time BPM analyzer with typed event listeners.
RealTimeBpmAnalyzerCore analyzer class for real-time BPM detection.

Type Aliases ​

Type AliasDescription
ThresholdThreshold value for peak detection (0.0 to 1.0)
PeaksArray of peak positions in audio samples
BpmCandidatesBPM analysis results with tempo candidates
BpmProgressProgress toward the first BPM result of the realtime analyzer
TempoDetected tempo with confidence metrics
TempoRangeTempo range, in BPM, that every detected tempo is folded into by doubling or halving.
AnalyzeFullBufferOptionsOptions for analyzeFullBuffer: lowpass filter settings plus the tempo range
RealTimeBpmAnalyzerParametersConfiguration options for the real-time BPM analyzer
CreateRealtimeBpmAnalyzerOptionsOptions accepted by createRealtimeBpmAnalyzer: the analyzer parameters plus where to load the worklet from.
BiquadFilterOptionsConfiguration options for biquad filter creation

Events ​

Type AliasDescription
ProcessorOutputEventEvents emitted by the BPM analyzer processor (Processor → Main Thread)
ProcessorInputEventControl events sent to the processor (Main Thread → Processor)
BpmAnalyzerEventMapType-safe event listener map for BPM analyzer events