Time and pitch

Change speed without pitch and pitch without speed, and fit audio to a length.

On this page

Change speed without pitch and pitch without speed, and fit audio to a length.

audioStretch

Change the speed of audio without changing its pitch

audioStretch( audio, rate )
ArgumentTypeDefault
audioanyrequiredThe audio buffer.
ratedoublerequiredSpeed factor between 0.25 and 4. 1.25 is 25 percent faster and shorter, 0.8 is slower and longer.

Returns A new audio buffer.

audioFitTo

Change the length of audio to a number of seconds without changing its pitch

audioFitTo( audio, seconds )
ArgumentTypeDefault
audioanyrequiredThe audio buffer.
secondsdoublerequiredThe length to reach, in seconds. The change in speed should stay within about 25 percent for natural results.

Returns A new audio buffer of that length.

audioPitch

Change the pitch of audio without changing its length

audioPitch( audio, semitones )
ArgumentTypeDefault
audioanyrequiredThe audio buffer.
semitonesdoublerequiredUp (positive) or down (negative) in semitones, within 24. 12 is one octave.

Returns A new audio buffer.

Edit this page Download Markdown Last updated Oct 16, 2026, 11:59:46 AM Report an issue