API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceBeatDetectorOptions
@codexo/exojs-audio-fx / audio / stable
15
props
0
methods
0
events
Import
import { BeatDetectorOptions } from '@codexo/exojs-audio-fx'Properties15
acfIntervalHops?: numberHops between successive autocorrelation (tempogram) recomputations. Default 15 (~160 ms at 48 kHz with the default 512-sample hop). Lower values react faster to tempo changes at the cost of more CPU.
barPulseHalfLife?: numberHalf-life in seconds for the BeatDetector.barPulse envelope. Default 0.3 - slower than beat pulse for downbeat-emphasized visuals.
emitProvisionalBeats?: booleanWhen true (default), early low-confidence beats are emitted tagged status: 'provisional' (then promoted to 'locked') for snappy visual reactivity. Set false to suppress provisional beats entirely - onBeat then fires only for 'locked' beats, matching the pre-provisional behaviour.
enableTimeSignatureDetection?: booleanWhen true (default), the worklet runs parallel 3/4 and 4/4 posteriors and switches active time signature via hysteresis. Set false to lock to 4/4.
fastTempoWindowSec?: numberShort tempogram window (seconds) that reacts quickly to a genuine tempo change. Default 2.5. The tracked tempo follows this FAST window only when it disagrees with stableTempoWindowSec consistently over several analysis hops, so a real DJ drift is tracked without making a steady tempo nervous.
fftSize?: numberFFT size for onset detection. Default 2048.
hopSize?: numberHop size in samples between successive FFTs. Default 512.
justBeatWindow?: numberTime window in seconds for BeatDetector.justBeat. Default 0.03 - true for the visual frame(s) within 30ms of a beat onset.
maxBpm?: numberMaximum detectable BPM. Default 300.
melBands?: numberNumber of mel filterbank bands. Default 24.
minBpm?: numberMinimum detectable BPM. Default 50.
minSettlingMs?: numberMinimum warm-up (ms) before the first beat may be emitted. Default 400. The detector starts hunting a tempo once this much analysis history exists instead of waiting a full slowest-tempo period, so early BeatInfo beats (tagged status: 'provisional') arrive with low latency for visual reactivity. A beat is promoted to status: 'locked' only once the tempo grid is trustworthy (full analysis window + sustained on-grid tracking). Replaces the former settlingMs (default 1500).
pulseHalfLife?: numberHalf-life in seconds for the BeatDetector.pulse envelope. Default 0.15 - pulse halves every 150ms after each beat.
source?: BeatDetectorSourceOptional initial source. Equivalent to constructing then assigning detector.source = value; provided for ergonomic one-shot construction. The setter remains usable for runtime source switches.
stableTempoWindowSec?: numberLong tempogram window (seconds) that holds the tempo grid steady against noise and octave ambiguity. Default 8. Should be ≥ fastTempoWindowSec and large enough to hold ≳ 2 periods of the slowest tempo; it also sizes the internal flux ring buffer.
Source