ComfyUI Node

∿ WAV Curve

Drive your animation from an actual audio file

By alt-key-projectΒ·Created 3 years agoΒ·Updated 2 years agoΒ· 114
∿ WAV Curve
  • frame_counter
  • FLOAT
  • INT
β—„wav_pathaudio.wavβ–Ί
β—„scale1.00β–Ί

Every other curve in this pack is generated from math. WAV Curve [Dream] is the one that reads your actual soundtrack. Point it at an uncompressed .wav file and it hands you a float that rises and falls with the loudness of the audio - feed that into a zoom, a rotation, or a prompt weight and your animation starts dancing to the music. The "Alt Key Project" is a music channel, so this node was built by someone who genuinely needed visuals to lock to audio, and it shows: it's the pack's party trick.

The mechanism is worth understanding because it's not a literal waveform playback. The node loads the file with scipy, collapses stereo down to one channel, and then chops the audio into time buckets - roughly length_in_seconds Γ— fps Γ— 3 of them. For each bucket it sums the absolute sample values, so what you get is an envelope of "how loud right now," normalized so the loudest moment is 1.0. The output at any frame is that envelope value scaled by scale. So it tracks energy and rhythm, not actual sound waves - which is exactly what you want for animation, since the raw waveform would just be noise.

The inputs that matter

  • frame_counter - required, like every Dream curve. It supplies both the current time and the framerate used for bucketing.
  • wav_path - the path to a PCM/uncompressed WAV file (default audio.wav). MP3 and compressed formats won't read; convert with ffmpeg or Audacity first.
  • scale - multiplies the output. Leave at 1 for a 0-to-1 envelope; push past 1 to exaggerate the motion.

Outputs are FLOAT and INT, same value with one rounded. The FLOAT is the one you wire into anything that moves.

Installing it

Install the pack via ComfyUI Manager - search "Dream Project Animation Nodes" - or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/alt-key-project/comfyui-dream-project.git
cd comfyui-dream-project
pip install -r requirements.txt

Restart ComfyUI. Dependencies include scipy (that's the WAV reader), and the pack pins numpy<2.0, which may rearrange your environment on install.

Common issues

Two things bite people here. First, the file must be an uncompressed WAV - the node silently returns (0.0, 0) if the path is missing or unreadable, which reads as "my curve is dead" rather than "my file is wrong." Check the path, and convert anything compressed. Second, the WAV data is cached (up to four files), so if you replace the audio between runs you may see the old envelope until you restart ComfyUI. And the pack-wide caveat: the README declares it unmaintained, author moved to comfyui-dream-video-batches. For a scipy read + bucket + normalize, that doesn't matter - it works fine on current ComfyUI.

Category✨ Dream/πŸŽ₯ animation/πŸ“ˆ curves

Inputs (3)

NameTypeDefaultDescription
frame_counterFRAME_COUNTERβ€”
wav_pathSTRINGaudio.wavβ€”
scaleFLOAT1.00β€”

Outputs (2)

NameTypeDescription
FLOATFLOATβ€”
INTINTβ€”