Name
Tempo -- adjust tempo without changing pitch (WSOLA alg.)
Synopsis
tempo [-q] [-m|-s|-l] factor [segment [search [overlap]]]
Function
Change the audio playback speed but not its pitch. This effect uses the WSOLA algorithm. The audio is chopped up into segments which are then shifted in the time domain and overlapped (crossfaded) at points where their waveforms are most similar as determined by measurement of "least squares".

By default, linear searches are used to find the best overlapping points. If the optional -q parameter is given, tree searches are used instead. This makes the effect work more quickly, but the result may not sound as good. However, if you must improve the processing speed, this generally reduces the sound quality less than reducing the search or overlap values.

The -m option is used to optimize default values of segment, search and overlap for music processing.

The -s option is used to optimize default values of segment, search and overlap for speech processing.

The -l option is used to optimize default values of segment, search and overlap for "linear" processing that tends to cause more noticeable distortion but may be useful when factor is close to 1.

If -m, -s, or -l is specified, the default value of segment will be calculated based on factor, while default search and overlap values are based on segment. Any values you provide still override these default values.

factor gives the ratio of new tempo to the old tempo, so e.g. 1.1 speeds up the tempo by 10%, and 0.9 slows it down by 10%.

The optional segment parameter selects the algorithm's segment size in milliseconds. If no other flags are specified, the default value is 82 and is typically suited to making small changes to the tempo of music. For larger changes (e.g. a factor of 2), 41 ms may give a better result. The -m, -s, and -l flags will cause the segment default to be automatically adjusted based on factor. For example using -s (for speech) with a tempo of 1.25 will calculate a default segment value of 32.

The optional search parameter gives the audio length in milliseconds over which the algorithm will search for overlapping points. If no other flags are specified, the default value is 14.68. Larger values use more processing time and may or may not produce better results. A practical maximum is half the value of segment. Search can be reduced to cut processing time at the risk of degrading output quality. The -m, -s, and -l flags will cause the search default to be automatically adjusted based on segment.

The optional overlap parameter gives the segment overlap length in milliseconds. Default value is 12, but -m, -s, or -l flags automatically adjust overlap based on segment size. Increasing overlap increases processing time and may increase quality. A practical maximum for overlap is the value of search, with overlap typically being (at least) a little smaller than search.

See also speed for an effect that changes tempo and pitch together, pitch and bend for effects that change pitch only, and stretch for an effect that changes tempo using a different algorithm.


Show TOC