Nodes/Audio General/Audio Pitch (Sample Rate)
ComfyUI Node

Audio Pitch (Sample Rate)

The pitch shift that's really just a lie about the sample rate

By niknah·Created about a year ago·Updated 19 days ago· 5
Audio Pitch (Sample Rate)
  • audio
  • audio
change1.00

This node is one tiny trick dressed up as a utility: it changes the pitch of an audio clip by lying about its sample rate. No resampling, no filtering, no DSP at all. You feed it an AUDIO, give it a change value, and it takes the same waveform and relabels it as if it were recorded faster or slower. When ComfyUI plays that audio back at the real rate - or writes it into a file or video mux - you hear the pitch shift. It's the quickest, cheapest pitch change in Audio General (niknah's audio-general-ComfyUI pack), and it's honest about what it trades away: the length changes too.

How it works

An AUDIO in ComfyUI is really two things: a waveform (the samples) and a sample_rate number that says how many samples equal one second. Audio Sample Rate only touches the second one. Set change to 1.1 and it stamps the file as running at 110% of its real rate - same samples, same waveform, new label. A track labeled faster plays faster: higher pitch, shorter duration. That's why the tooltip says "less than 1.0 for a lower pitch, more than 1.0 for a higher pitch."

The audio equivalent of this is varispeed or tape-speed shifting - the old "chipmunk the tape" effect. Because it never touches the samples, it's instant on any length of audio, uses almost no compute, and produces zero phase-vocoder artifacts. You can't say that about the pack's other pitch node.

The input

Just two things and only one you set: audio and change (default 1.0, step 0.01). It's a multiplier, not a fixed semitone count. 0.89-ish drops things roughly a whole tone; 1.5 starts sounding chipmunk; 0.5 is a full octave down and the clip plays twice as long. There's no output beyond the relabeled AUDIO - wire it wherever audio goes.

Install

Same as every node in the pack - ComfyUI Manager, search "Audio General", install; or:

cd ComfyUI/custom_nodes
git clone https://github.com/niknah/audio-general-ComfyUI

Restart ComfyUI and you're set. The pack's real dependencies are torchaudio, librosa, torch-time-stretch, and audiostretchy. No models, no downloads, CPU-only. This node in particular needs nothing extra because it doesn't even use torchaudio.

Where people get burned

The trap is forgetting the duration change. Shift a voiceover up a fourth with this node and it's also ~25% shorter - which will desync it from your video, and the "fix" is a mystery until you remember the tape-speed thing. The rule of thumb: if length doesn't matter (music beds, one-off chipmunk gags, rough previews), use this - it's free. If timing matters, use Audio Pitch (torchaudio) instead, which preserves length. That's the whole decision between the two siblings, and it's worth making consciously before you wire either one in.

CategoryAudio

Inputs (2)

NameTypeDefaultDescription
audioAUDIO
changeFLOAT1.00Less than 1.0 for a lower pitch. More than 1.0 for a higher pitch

Outputs (1)

NameTypeDescription
audioAUDIO