Onset Envelope Visualizer (S42)
The spectral-flux heatmap that shows where the hits actually land
- audio
- IMAGE
Editing a video to music works a lot better when you can see the beats instead of guessing at them by ear. S42_OnsetEnvelopeVisualizer turns an audio track into a single heatmap image where every column is a moment in time and bright bands show where the energy spikes - drum hits, bass drops, anything with a sharp onset. It's the debug friend of the pack's sync nodes: point it at a track, look at the picture, and you immediately know where the cuts should go.
It's in the Audio/Sync category of S42 CutFlow, and its job is visualization, not generation - it outputs an IMAGE, not audio. That makes it perfect for a monitor position on the graph while you tune other things.
How it works
The detection is spectral flux, the standard onset-detection approach. It STFTs the audio, then for each time step sums up only the positive changes in magnitude across all frequency bins. A snare hit causes a sudden jump in energy across many bins → a big flux value. A sustained pad changes slowly → near-zero flux. Those flux values are normalized, scaled by sensitivity, resampled to image_width columns, and repeated down image_height rows to make a 2D heatmap - colored red-to-warm where flux is high.
The result is deterministic: the same track always produces the same image, which is what you want from a debugging tool.
Inputs
audio- the track to visualize.image_width- 1024 default; more columns = more time resolution in the picture.image_height- 256 default; purely cosmetic (the rows are repeats of the same curve).sensitivity- 1.5 default, 0.1–5. Raise it to make faint transients visible; lower it to let only the big hits stand out.
Output
One IMAGE. Hang it off a preview node, save it, or feed it to a monitor. It's a single static frame for the whole track - not an animation.
Installing it
Standard S42 CutFlow install: ComfyUI Manager → search "S42 CutFlow", or git clone https://github.com/GeekyGhost/S42-CutFlow into ComfyUI/custom_nodes/, install requirements, restart. Pure torch STFT math, no models.
Gotchas
Three things to know. First, this is onset energy, not amplitude - a loud but steady drone won't light up, and a quiet click will. That's correct onset-detection behavior, just surprising if you expected a waveform. Second, sensitivity above 1.0 is deliberate headroom: flux is normalized to its own peak, so scaling past 1 clamps rather than increases, and you can end up with most of the strip saturated. Third, it's one picture of the whole track - if you have a 5-minute song, the resolution per beat gets low; feed it a trimmed segment for a detailed look.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | The audio track to visualize. | |
| image_width | INT | 1024256–4096 | — |
| image_height | INT | 25664–1024 | — |
| sensitivity | FLOAT | 1.50.1–5 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |