» AviSynth is a powerful video FrameServer for Win32.

AviSynth Links:
»Learn to script
»Discussion fora
»Project page
»External filters

» You can add pages to this website immediately. No login required.
Edit this document

» AboutAviSynth




( Diese Seite in flag-germany.gif Deutsch )

TimeStretch(clip clip [, float tempo, float rate, float pitch])

TimeStretch allows changing the sound tempo, pitch and playback rate parameters independently from each other, i.e.:

  • Sound tempo can be increased or decreased while maintaining the original pitch.
  • Sound pitch can be increased or decreased while maintaining the original tempo.
  • Change playback rate that affects both tempo and pitch at the same time.
  • Choose any combination of tempo/pitch/rate.


All parameters are percentages, and defaults to 100. If tempo is 200 it will play twice as fast - if it is 50, it will play at half the speed. Adjusting "Rate" is equivalent to using AssumeSampleRate and ResampleAudio, but at very high quality.


This is NOT a sampleexact plugin. If you use it, slight inaccuracies might occur. Since we are dealing with float values rounding errors might occur - especially on large samples. In general however inaccuracies should not exceed a few milliseconds for movielength samples.

In case anyone wonders, all parameters of the SoundTouch library are at their best settings, and SEQUENCE_MS, SEEKWINDOW_MS and OVERLAP_MS are at their default values. For more information see the readme at the [Soundtouch site]. SoundTouch is used in float sample mode. These settings might however be exposed in a later version.


TimeStretch(pitch = 200) 

This will raise the pitch one octave, while preserving the length of the original sample.


This will change the tempo from Film speed to PAL speed without changing the pitch.


This function uses:

SoundTouch library Copyright (c) Olli Parviainen 2002-2003



v2.55 Initial Release

SourceForge Logo


Edit this document | View document history
Document last modified Wed, 19 Jan 2005 06:52:08