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, the tempo range and the detector
DetectorTempo detector, for real-time analysis and for whole files.
TempogramModeHolds a caller to the tempogram's measured settings. extension is for a browser extension listening to a tab: it reads exactly as a bare detector: 'tempogram' does, 90 to 180 BPM with no lowpass, and refuses any option that would leave those settings. A tempo over about 179 BPM reads at half.
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