spectrograph

spectrograph · hybrid · schema v1

SPECTROGRAPH — a real-time scrolling sonogram VIDEO generator. Takes ONE mono audio input and renders a log-binned spectrograph: FREQUENCY on the vertical axis (log scale, 20 Hz at the BOTTOM up to 20 kHz / Nyquist at the top), TIME scrolling horizontally with the NEWEST column at the RIGHT (older content slides off the left). Model: an AnalyserNode tap (1024-pt FFT, getFloatFrequencyData dBFS) on the input is log-binned into 128 perceptual rows per column spanning [20 Hz .. 20 kHz] (each row picks the nearest FFT bin to its target Hz, DC skipped); magnitudes are normalized over a -90 dBFS (quiet) .. -10 dBFS (loud) display window and written into a 256-wide circular column buffer that advances at most once per ~16 ms frame (steady scroll independent of how many outputs are patched). The binning + colormap math is the same algorithm WAVESCULPT uses for its spectrograph view (video_mode 2), lifted into a pure GPU-free core. TWO video outputs render the SAME binned dB plane through two different colormaps — both always live regardless of which the on-card preview shows. IO — IN (audio): the mono signal to analyse. COLOR OUT (mono-video): the blue→cyan→yellow→red HEAT colormap (loud = hot/red, quiet = dark blue/black) — the classic colored spectrogram. B/W OUT (mono-video): INVERTED grayscale — quiet = light/WHITE, loud = dark/BLACK — i.e. the classic PRINTED-SONOGRAM look (light page, dark traces). Controls — GAIN: a pre-analysis input trim (×0.25 .. ×4, LOG taper, unity at center) applied by a GainNode BEFORE the analyser, so you can boost a quiet source up into the -90..-10 dB display window (or tame a hot one) without changing the displayed dynamic range. GAIN is MIDI / control-surface assignable (right-click → MIDI Learn) like every other knob. A card VIEW toggle (COLOR / B/W) just switches which output the on-card preview shows — it does not change either output. All patching is via the card's yellow drill-down PATCH PANEL (top-left / top-right affordances → INPUT / OUTPUT) — no side jacks. It is a `domain: audio` module that exposes VIDEO outputs through the audio→video texture bridge (the SYNESTHESIA / WAVESCULPT cross-domain pattern), so you patch COLOR / B/W OUT straight into any video module or the video OUTPUT. Usage: drop it on any audio bus to SEE the spectral content of a synth / drum / mix in real time — patch COLOR into the video OUTPUT for the colored sonogram, or B/W for the printed-paper look; feed it from a SCALER / mixer to pick which signal you scope.

A real-time scrolling spectrograph (sonogram) — it turns any audio signal into a video image of its frequency content over time. The mono input is FFT-analysed and rendered as a log-binned plot: frequency runs up the vertical axis (20 Hz at the bottom to 20 kHz at the top, log scale), time scrolls horizontally with the newest column on the RIGHT, and the loudness at each frequency sets each pixel's brightness/color. It produces the SAME spectrograph as two simultaneous video outputs over two colormaps — a COLOR heat ramp (blue→cyan→yellow→red, loud = hot) and an INVERTED B/W (quiet = white, loud = black, the classic printed-sonogram look). The card shows a live preview with a button to flip the preview between the two looks (preview only — both outputs are always live). Patch COLOR or B/W into VIDEO OUT or any video module. GAIN trims the input level into the analyser's display window.

the faceplate

spectrographinaudiocolormono-videobwmono-videoaudiocvgatepitch
1 inputs · 2 outputs · 1 params

inputs

idcablewhat it does
inaudioThe mono audio signal to analyse — its frequency content is FFT-analysed and drawn as the scrolling spectrograph. Patch any audio source here (a synth voice, a mix, a drum bus).
audio signal

outputs

idcablewhat it does
colormono-videoThe spectrograph rendered with the COLOR heat ramp — quiet = dark blue, getting louder through cyan → yellow → red. A mono-video output; patch it into VIDEO OUT or any video module for a vivid, colorful sonogram.
mono video stream
bwmono-videoThe SAME spectrograph rendered as INVERTED grayscale — quiet = white, loud = black — the classic printed-sonogram look (light page, dark traces). A mono-video output, drawn from the same FFT plane as COLOR, so the two are time-aligned.
mono video stream

params

idlabelrangedefaultcurve
gainGain0.25..41log

controls

controlwhat it does
GainPre-analysis input trim (0.25..4, log, default 1) — boosts a quiet source up into the −90..−10 dB display window so its traces are visible (or tames a hot one). Applied before the FFT tap; it shapes the IMAGE contrast, not the audio (there's no audio output).

source

spectrograph.ts on GitHub.

Generated from packages/web/src/lib/{audio,video}/module-registry.ts · repo