Nodes/ComfyTV/Audio Time / Pitch
ComfyUI Node

Audio Time / Pitch

Audio Time / Pitch — speed it up, pitch it down, or run it backwards

By jtydhr88·Created 3 months ago·Updated about 15 hours ago· 725
Audio Time / Pitch
  • audio
  • video
  • audio
  • fx_spec
force_run_token0
project_id
parent_output_id0
modespeed
tempo1.00
semitones0.0

The Swiss Army knife of the audio suite: time-stretch, pitch-shift, and reverse, all in one stage. The mode combo decides which operation you're doing, and the two dials - tempo (0.25–4×) and semitones (−24 to +24) - apply depending on the mode. Five modes:

  • speed - plain time-stretch via FFmpeg's atempo: changes duration, pitch moves with it, like playing a tape faster or slower. Tempo 2.0 = half the length, everything an octave higher.
  • pitch - pitch-shift without changing speed: resample with asetrate then correct the tempo back with atempo, the classic cheap-but-effective trick. Semitones is your knob; the math handles the rest.
  • pitch_hq - high-quality pitch-shift through a phase vocoder (the pack's own staffpad_pv implementation), with the semitone resolution you'd expect (0.5-step increments, so you can do those imperfect detunes).
  • stretch_hq - phase-vocoder time-stretch: change duration without changing pitch. This is the "make a 30s track fit a 45s scene without turning into chipmunks" mode.
  • reverse - flip it backwards. Entirely. areverse and done.

Input is audio or video; outputs are audio plus an fx_spec for FX Chain stacking. Same hidden-input plumbing as every stage - leave force_run_token / project_id / parent_output_id alone.

The HQ modes and the cheap modes have a real quality gap, and it's worth knowing which you're on. The plain speed/pitch modes are instant FFmpeg filters - fine for loops, SFX, and quick tweaks - but beyond roughly ±30% they start to get warbly. The pitch_hq/stretch_hq modes run a phase vocoder (the same idea behind most pitch plugins) and hold up much better on music and voice, at the cost of being slower and doing real compute. Where people get burned: both HQ modes error out if you give them nothing to do - pitch_hq with semitones at 0 and stretch_hq with tempo at 1.0 throw explicit "nothing to do" errors. So set a value before you Run. And remember speed and pitch are different things: changing tempo in speed mode also changes pitch, which is half of why generated music always benefits from a touch of pitch after a speed change - the algorithm corrects what the first pass bent.

Install is the pack-wide story: ComfyUI Manager search "ComfyTV", or git clone https://github.com/jtydhr88/ComfyTV into custom_nodes/, then a full backend restart (Desktop/macOS: clone by absolute path into the running instance). Zero extra pip dependencies - the FFmpeg modes use stock filters, the HQ modes use numpy/torch already in ComfyUI. No model downloads.

CategoryComfyTV/AudioFX

Inputs (8)

NameTypeDefaultDescription
force_run_tokenINT00–2147483647Internal — bumped on Run to invalidate ComfyUI's input cache.
project_idSTRINGInternal — populated by the projectStore on the frontend.
parent_output_idINT00–2147483647Internal — lineage parent set by spawn handlers on the frontend.
modeCOMBOspeed5 options: speed, pitch, pitch_hq, stretch_hq, reverse
tempoFLOAT1.000.25–4
semitonesFLOAT0.0-24–24
audiooptCOMFYTV_AUDIO
videooptCOMFYTV_VIDEO

Outputs (2)

NameTypeDescription
audioCOMFYTV_AUDIO
fx_specCOMFYTV_FXSPEC