Skip to content

API Reference


API Reference / AnalyzerOptions

Type Alias: AnalyzerOptions ​

ts
type AnalyzerOptions = {
  engine?: EngineOption;
  tempoRange?: TempoRange;
  processorUrl?: string | URL;
  liveInput?: MediaStreamTrack;
  debug?: boolean;
};

Defined in: contract/types.ts:121

Options for the realtime analyzer. createRealtimeBpmAnalyzer checks them before it loads the processor: for an invalid value, the promise it returns rejects with a RangeError or a TypeError. It takes these keys only: any other own key, a typo included, rejects with a TypeError that names it, whatever its value.

Properties ​

PropertyModifierTypeDescriptionDefined in
engine?readonlyEngineOptionDefault tempogram. peaks puts a fixed lowpass inside analyzer.input; the tempogram takes the full band.contract/types.ts:125
tempoRange?readonlyTempoRange-contract/types.ts:126
processorUrl?readonlystring | URLURL of the processor file, for pages and extensions whose CSP refuses blob:. Default: an inlined blob:.contract/types.ts:128
liveInput?readonlyMediaStreamTrackThe track behind a MediaStream source. The analyzer follows its clock, counts lost input as silence, and moves to listening with reason audio-lost while input is being lost.contract/types.ts:133
debug?readonlybooleanEmit debug events. Default false.contract/types.ts:135