Nodes/RyanOnTheInside/Flex Audio Pitch Shift βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
ComfyUI Node

Flex Audio Pitch Shift βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜

Pitch-bending audio that reacts to itself

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Flex Audio Pitch Shift βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
  • audio
  • opt_feature
  • AUDIO
β—„strength1.00β–Ί
β—„feature_threshold0.00β–Ί
β—„feature_paramβ–Ύβ–Ί
β—„feature_moderelativeβ–Ί
β—„target_fps3β–Ί
β—„n_steps6.0β–Ί

A pitch shifter that doesn't have to sit at one fixed setting for the whole clip. Feed it audio, tell it how many semitones to shift by, and - if you want - hand it a Feature (this pack's reactive per-frame signal, sourced from audio energy, motion, MIDI, whatever) so the pitch shift itself rises and falls dynamically instead of staying flat. Without a feature connected it just behaves like a normal, static pitch shifter.

What it's actually doing

n_steps sets the base shift in semitones (0–12, default 6 - a full half-octave up). The audio gets analyzed in chunks at target_fps (default 3), which is the rate the node re-evaluates the shift amount at - low by design, because pitch shifting doesn't need frame-accurate resolution the way a video effect does; a handful of updates per second is plenty to sound smooth without wasting compute re-processing audio dozens of times a second.

If you plug in opt_feature, it can modulate n_steps - that's the only thing feature_param is allowed to point at here, since pitch shift amount is really the only meaningful knob on this node. feature_mode decides how: relative (default) lets the feature push the shift up and down around your base n_steps value, absolute recomputes the shift straight from the feature's value each step instead. feature_threshold gates when the feature is allowed to have any effect at all - set it above 0 if you only want the modulation to kick in once the feature crosses a minimum level, useful for ignoring quiet/idle stretches. strength is the overall dial on how hard the feature is allowed to push, independent of the threshold.

Inputs and outputs that matter

  • audio - the clip you're shifting.
  • n_steps - base pitch shift in semitones.
  • opt_feature (optional) - the reactive signal, if you want the shift to move over time instead of staying fixed.
  • target_fps - how often the shift is recalculated; leave it low unless you have a reason to bump it.

Output is a single AUDIO, ready to chain into whatever plays or saves it, or into another Flex audio node for a second reactive pass.

How to install it

Via ComfyUI Manager, search "RyanOnTheInside." Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside
cd ComfyUI_RyanOnTheInside
pip install -r requirements.txt

then restart. Audio processing across this pack leans on librosa, so make sure pip install -r requirements.txt actually completes cleanly - librosa pulls in its own numeric/audio-decoding dependencies and is the most likely thing to fail quietly on an unusual Python environment.

Common issues & troubleshooting

Pitch shift sounds robotic or artifacty at large n_steps. That's inherent to real-time-style pitch shifting, not a bug - large shifts (toward 12 semitones) stress any pitch-shift algorithm and introduce audible warble. If you need a clean shift, keep it modest; if you need a big one, accept the character it brings.

Modulation feels sluggish or choppy. Check target_fps first. Too low and the shift updates in visible/audible steps rather than smoothly; too high wastes processing for no perceptual gain since pitch changes aren't something ears track at video frame rates anyway. 3–10 is a reasonable range to experiment in.

No modulation happening at all despite a connected feature. Confirm feature_param is actually set (it only has one option, n_steps, but ComfyUI still requires the field to be selected) and that feature_threshold isn't set high enough to be silently gating out your feature's whole range.

librosa install failures. If the manual pip install -r requirements.txt step errors out, it's almost always librosa's own dependency chain (numba, soundfile) hitting a version conflict with something else already in your ComfyUI environment - worth isolating in a fresh virtualenv if you're not already using one.

CategoryRyanOnTheInside/FlexFeatures/Targets/Audio

Inputs (8)

NameTypeDefaultDescription
strengthFLOAT1.000–1Overall strength of the effect (0.0 to 1.0)
feature_thresholdFLOAT0.000–1Minimum feature value to apply the effect (0.0 to 1.0)
feature_paramCOMBOParameter to be modulated by the feature
feature_modeCOMBOrelativeHow the feature modulates the parameter ('relative' or 'absolute')
audioAUDIOInput audio to be processed
target_fpsFLOAT31–60Target frames per second for processing (1.0 to 60.0 fps)
n_stepsFLOAT6.00–12Amount of pitch shift in semitones (0.0 to 12.0)
opt_featureoptFEATUREOptional feature input for parameter modulation

Outputs (1)

NameTypeDescription
AUDIOAUDIOβ€”