LTX Audio Sync Trigger (S42)
Turn a soundtrack into a motion curve your video actually dances to
- audio
- motion_scale_curve
- transient_mask
LTX 2.3 generates video and audio together, but the audio is baked in at generation time - you can't easily tell it "here's a beat map, move to it." S42_LTXAudioSyncTrigger is the pack's workaround: it analyzes an audio track and converts it into two things that can drive generation - a per-frame motion curve and a transient mask. Feed the curve into a scheduling node, and your video's motion can swell and snap in time with the music instead of floating in its own world.
The mechanism is honest audio DSP: no model, no VRAM, no magic. Just an energy envelope turned into numbers.
How it works
It mixes the audio to mono, then chops it into per-frame energy values - each video frame gets the RMS energy of its slice of audio (frame length = sample rate ÷ fps). That envelope is normalized, scaled by (1 + sensitivity), and resampled to exactly video_frames values. The result is motion_scale_curve: a list of floats, roughly 0 to 1, one per frame, where drums and hits spike.
transient_mask is a stricter version: frames whose energy clears (1 - sensitivity) get flagged 1, everything else 0. It's your "hits only" map - useful for syncing cuts or flash effects to actual transients rather than the whole curve.
Inputs
audio- the track to analyze.video_frames- how many values the curve should have. Default 120. This is the trap: if the curve is going to feed an LTX 2.3 pipeline, remember LTX only accepts frame counts that are 8n+1 (9, 17, 25 … 121, 257, 513). Set this to 121, 257, etc. - not 120.fps- 24 default, must match your video's frame rate or the envelope slices land wrong.sensitivity- 0–1. Higher makes the curve react to more of the track (and makes the mask flag more frames as transients); lower only lets the big beats through.
Outputs
motion_scale_curve(FLOAT) - the per-frame energy curve. Wire it into nodes that accept a float list/curve: motion-scale scheduling, CutFlow's own audio-reactive nodes, or anything keyframed on a list.transient_mask(MASK) - the hit map. Note it's a 1-D per-frame tensor, not a spatial mask, so some mask-hungry downstream nodes will squint at it. Feed it to something that understands "one value per frame."
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. Requires torchaudio for nothing here (it's pure torch + audio dict math) - the AUDIO input is the standard ComfyUI type any audio loader gives you.
Gotchas
The 8n+1 frame-count trap is the #1 thing to remember, because this node's video_frames slider happily accepts 120 and LTX will then reject it. Also: the curve is normalized to its own peak, so a quiet, low-energy track still peaks at 1.0 - the shape is relative. And resampling a long track down to 121 frames will smooth away fast transients, so for beat-accurate work keep the segment short (this pairs naturally with the pack's VideoSegmentPrep).
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | Audio track to analyze. | |
| video_frames | INT | 1201–1000 | — |
| fps | INT | 248–120 | — |
| sensitivity | FLOAT | 0.500–1 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| motion_scale_curve | FLOAT | — |
| transient_mask | MASK | — |