Home
RecentChanges

Search:

» AviSynth is a powerful video FrameServer for Win32.

AviSynth Links:
»Download
»Learn to script
»FAQ
»Manual
»Discussion fora
»Project page
»External filters
»FeedBack

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

» AboutAviSynth

 

Avisynth 
Logo

TimeStretch

( 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.

Parameters

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.

Notes

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.

Examples

TimeStretch(pitch = 200) 

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

TimeStretch(tempo=(100.0*25.0)/23.976)

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

Credits

This function uses:

SoundTouch library Copyright (c) Olli Parviainen 2002-2003

http://www.iki.fi/oparviai/soundtouch

Changelog:

v2.55 Initial Release

SourceForge Logo

 


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