Skip to content

API Reference


API Reference / TempoRange

Type Alias: TempoRange ​

ts
type TempoRange = {
  min: number;
  max: number;
};

Defined in: core/types.ts:150

Tempo range, in BPM, that every detected tempo is folded into by doubling or halving.

Remarks ​

The detector cannot tell a tempo from its double or half from peak intervals alone, so it reports the octave that lands inside this range. The default, 90–180, reads an 85 BPM hip-hop track as 170; a 70–140 range reads it as 85. max must be at least twice min, so that every tempo has an octave inside the range. Keep the expected tempo away from the bounds: folding happens before rounding, so a tempo sitting on an edge splits its votes between the two octaves.

Properties ​

PropertyModifierTypeDescriptionDefined in
minreadonlynumberLowest tempo reported, in BPM (default: 90)core/types.ts:152
maxreadonlynumberHighest tempo reported, in BPM (default: 180)core/types.ts:154