Interface: VisualizerFrame
Defined in: packages/player/src/visualizer.ts:133
One decoded frame, ready to paint.
Properties
bands
readonly bands: Float32Array;
Defined in: packages/player/src/visualizer.ts:139
Log-spaced bands in [0, 1], asymmetrically smoothed. This is what a bar
visualiser wants: paint the values directly and the "bounce" is already
there, with no client-side animation.
capturedAt
readonly capturedAt: number;
Defined in: packages/player/src/visualizer.ts:178
Date.now()-comparable timestamp taken natively at capture.
dropped
readonly dropped: number;
Defined in: packages/player/src/visualizer.ts:184
Frames the native sampler skipped since the previous one because this
listener had not finished with the last. Steadily non-zero means the
painting is too slow for the requested fps.
gainDb
readonly gainDb: number;
Defined in: packages/player/src/visualizer.ts:174
Auto-gain currently applied, in dB, or 0 when
VisualizerOptions.autoGain is off. Exposed because a display that
silently rescales itself should be able to say so.
magnitudes
readonly magnitudes: Float32Array;
Defined in: packages/player/src/visualizer.ts:150
Per-bin linear magnitudes, where 1.0 is a full-scale sinusoid.
Length is fftSize / 2 + 1; bin k is centred on k * sampleRate / fftSize Hz.
Handed through from native untouched — no dB mapping, no smoothing, no copy — so a caller doing its own analysis (mel, Bark, chroma, peak picking) starts from the real numbers rather than from this module's opinions.
peak?
readonly optional peak?: number;
Defined in: packages/player/src/visualizer.ts:166
Peak absolute sample in [0, 1]. undefined without waveform.
peaks
readonly peaks: Float32Array;
Defined in: packages/player/src/visualizer.ts:159
Per-band peak-hold caps in [0, 1], one per bands entry.
Each rises instantly to a new high-water mark, hangs, then falls under gravity — the little floating markers above the bars in a classic spectrum analyser. Always present; computing them is a handful of arithmetic per band, so there is no reason to make it opt-in.
rms?
readonly optional rms?: number;
Defined in: packages/player/src/visualizer.ts:168
RMS of the samples in [0, 1]. undefined without waveform.
sampleRate
readonly sampleRate: number;
Defined in: packages/player/src/visualizer.ts:176
Sample rate of the visualised audio, in Hz.
waveform?
readonly optional waveform?: Float32Array<ArrayBufferLike>;
Defined in: packages/player/src/visualizer.ts:164
Mono time-domain samples in [-1, 1], or undefined unless
VisualizerOptions.waveform was set. fftSize values, unwindowed.