Plot Waveform
The first node you reach for after loading audio
- audio
- IMAGE
Load an audio file and your first question is usually "did that actually load, and what did I get?" Plot Waveform answers it: it renders the raw amplitude of an AUDIO object over time as a matplotlib plot and hands you a normal ComfyUI IMAGE. It's the audio equivalent of the preview image node - a sanity check you'll wire in and out of every workflow you build with this pack.
How it works
It takes the waveform tensor, converts it to numpy, and plots amplitude against a real time axis - frame index divided by sample rate, so the x-axis is genuinely in seconds. One subplot per channel: mono gets a single plot, stereo gets two stacked, each labeled "Channel 1", "Channel 2", and so on. It's a line plot with linewidth=1, not a filled visualization, so it's a clean, honest picture of what the audio looks like.
The inputs are the usual quartet: audio (the AUDIO you want to plot), plus title (default "Waveform"), xlabel ("Time (s)"), and ylabel ("Amplitude"). The one with a real opinion is show_grid (default true) - a waveform without gridlines is just a squiggle, and the grid makes clipping, silence, and transients much easier to spot at a glance.
The output is an IMAGE tensor, so it plugs into Preview Image to see it, Save Image to keep it, or any image-processing node if you're doing something weird. It accepts AUDIO from any source - ComfyUI's built-in Load Audio, this pack's Load Audio From Path, or a video node's audio output - because the AUDIO type is the shared, standard format across the ecosystem.
The honest caveats
A waveform shows you that there's sound and roughly where, not what it sounds like. It can't tell you it's speech versus a sine wave - for that you want the Spectrogram node. And if your graph is about the sound itself rather than the picture of it, PreviewAudio is the node that actually lets you hear the thing; this one is for your eyes. Both are worth wiring in during development, and this one is the cheaper of the two to leave in permanently.
One practical note: since it's a matplotlib render of every sample, a very long file (say, an hour of audio) will produce a large plot and take a noticeable moment to rasterize. For casual checks on long files, crop or trim first.
Installing
Same as the rest of the pack - ComfyUI Manager search "comfyui-audio-processing", or:
cd ComfyUI/custom_nodes
git clone https://github.com/rhdunn/comfyui-audio-processing
Restart. It runs on matplotlib and numpy, both already in ComfyUI, so there are no extra dependencies and no model downloads. Two seconds of setup for a node you'll use constantly.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| titleopt | STRING | Waveform | — |
| xlabelopt | STRING | Time (s) | — |
| ylabelopt | STRING | Amplitude | — |
| show_gridopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |