ns-ui

Spectrogram ASCII Bands

A scrolling spectrogram in monospace ink — a real 512-point FFT grouped into log-spaced bands, each with its own adaptive noise floor so quiet bands stay dark and only the actual harmonic structure prints as bright glyph runs.

Use when Pick spectrogram-ascii-bands when the subject is the frequency content of a signal over time — a scrolling time-vs-pitch field where steady formants read as horizontal ribbons and a sweep as a diagonal, driven by a real FFT off an AnalyserNode or a sample provider. Pick waveform-ascii-scrub instead when the subject is amplitude over time with a draggable playhead, and sparkline-ascii when a single scalar series just needs a compact inline trend.

Install

npx shadcn add https://design.helpmarq.com/r/spectrogram-ascii-bands.json
View source and playground

Room mic — channel A

16 kHz · 512-pt FFT · 32 log bands · 50 ms hop

Time runs right to left; the newest column is at the right edge.

Props

PropTypeDefaultDescription
source?AnalyserNode | ((out: Float32Array) => void)Where samples come from: a live `AnalyserNode`, or a provider that fills the passed Float32Array with the newest 512 time-domain samples. Omitted ⇒ the built-in deterministic synthetic signal.
cellSize?numberRow height in px; the field is (32 + 2) rows tall. Default 16.
label?stringAccessible name for the focusable readout region.
className?string