(deforum) Amplitude to String
Turn an amplitude series into readable text so you can see what the music did
- amplitude
- STRING
Audio-reactive Deforum is one big black box: audio goes in, a hundred-frame animation comes out, and you often can't tell whether the amplitude you extracted even looks right until the whole thing has rendered. (deforum) Amplitude to String is the debug window into that box. It takes any AMPLITUDE series and outputs the raw values as a STRING you can view on a text node. That's the entire job, and it's genuinely useful for the five minutes before every big render where you check "is my beat data actually shaped like the song?"
How it works
There's no processing at all - the node stringifies the amplitude series it's given and returns it. The one notable implementation detail is that it forces re-evaluation on every run (IS_CHANGED returns NaN), so it always reflects the current amplitude even if ComfyUI would normally cache the node's output. That matters in a loop: without it, the debug text could go stale after the first frame. With it, wire the node into a (deforum) Show Text-style display and it live-updates as the series changes.
The output format is the raw Python string of the series, so you'll see something like 0 0.2 / 1 0.45 / ... - index plus value, which is exactly the shape you need to sanity-check: are the spikes where the kicks are? Is the range 0–1 or 0–100 (the classic scale confusion that ruins Amplitude to Schedule mappings)? Is the series the right length for your frame count?
The inputs and outputs
amplitude- requiredAMPLITUDEinput.STRING- the single output: the text form of the series, ready for any text display node.
When it's worth it
This node pays for itself in the "trust but verify" moments of building an audio workflow. Three specific uses: checking the numeric range before you pick a math expression in Amplitude to Schedule; confirming a beat detector actually returned beats and not an empty or degenerate series; and debugging why two amplitude sources (say envelope vs. spectral) behave so differently - stringify both side by side and the difference is obvious in two lines. It's also a decent poor-man's save: you can copy the string into a text file as a record of what drove a render.
Installing it
Part of Deforum Nodes (XmYx). ComfyUI Manager → "Deforum Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/XmYx/deforum-comfy-nodes.git
First boot runs install.py (pandas, librosa, opencv-contrib-python, moviepy, numpy<2.0.0, deforum-studio). Python 3.10 per the README.
Where people get burned
The only real trap is expecting the string to be a usable schedule. It's not - it's a debug dump of raw values, and pasting it into a schedule field won't work because it's not in 0:(val), 1:(val) format. If you need that format, use Amplitude to Schedule's STRING output instead. For everything else, this node is the honest, boring tool you'll be glad you had when the animation comes out wrong and you need to see the data.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| amplitude | AMPLITUDE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |