TimeStretch

TimeStretch (clip, float "tempo", float "rate", float "pitch")

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

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

$Date: 2005/10/03 16:31:31 $