Nodes/ComfyUI-AudioScheduler/Normalized Amplitude Driven String
ComfyUI Node

Normalized Amplitude Driven String

Swap prompts to the beat — text scheduled by the music

By a1lazydog·Created 3 years ago·Updated 2 years ago· 112
Normalized Amplitude Driven String
  • normalized_amp
  • text
textRabbit Dog Cat One prompt per line
triggering_threshold0.60
looptrue
shufflefalse

This is the pack's marquee node, and the one that makes "the image changes with the music" actually happen. You give it a list of prompts (one per line) and a normalized amplitude curve, and it watches for the moments the curve crosses a threshold - every time the track gets loud enough, it advances to the next prompt. Output is a string in ComfyUI's standard prompt-schedule format: "frame": "prompt" pairs separated by commas. Feed that to a prompt scheduler downstream and each prompt lands on exactly the frame where the beat hit.

It's the "automating scene changes on audio cues" use case that drew people to this pack in the first place - the same music-video instinct you see across the audio-reactive ComfyUI scene, where a track drives prompt transitions, ControlNet strength, and IPAdapter switches between keyframes.

How it works

The node finds rising-edge keyframes: frames where the normalized amplitude crosses triggering_threshold going upward. Each crossing gets one prompt from your list, and the output pairs them as "frame": "prompt". So the schedule isn't every loud moment - it's every new rise through the threshold, which naturally gives you one trigger per beat or phrase rather than a stutter.

The inputs that matter

  • text (multiline) - one prompt per line. The default is literally "Rabbit / Dog / Cat / One prompt per line", which is a great example and a fine reminder that blank lines become empty prompts.
  • triggering_threshold (0–1, default 0.6) - how loud it has to get before advancing. Lower it to switch more often; raise it so only big hits advance.
  • loop (default true) - if there are more keyframes than prompts, cycle through the list instead of stopping.
  • shuffle (default false) - randomize the prompt order; with looping, it re-shuffles each pass, so the sequence is different every lap.

Output: text (STRING) - the schedule string.

Gotchas

The big one: if triggering_threshold is too high for your curve, the amplitude never crosses it, you get zero keyframes, and the output is an empty string. Check your normalized curve with NormalizedAmplitudeToGraph first and set the threshold where the beats actually land. Also keep in mind the output is a schedule, not a plain prompt - it only does something once a prompt-scheduler node downstream parses those "frame": "prompt" pairs, so don't expect it to be text you can read as-is. And if you enable shuffle, the node deliberately re-runs every time (it skips caching) so the randomness is fresh - expect it to recompute.

Install: ComfyUI Manager search ComfyUI-AudioScheduler, or git clone https://github.com/a1lazydog/ComfyUI-AudioScheduler into custom_nodes and restart. No models, CPU-only.

CategoryAudioScheduler/Amplitude

Inputs (5)

NameTypeDefaultDescription
textSTRINGRabbit Dog Cat One prompt per line
normalized_ampNORMALIZED_AMPLITUDE
triggering_thresholdFLOAT0.600–1
loopoptBOOLEANtrue
shuffleoptBOOLEANfalse

Outputs (1)

NameTypeDescription
textSTRING