Time Stretching
Last Edited: Dec 23, 2023
What Is Time Stretching?
Time stretching is a digital process that alters the perceived passage of time in an audio signal without modifying its spectral characteristics, such as changing its pitch. Implementing generalized time stretching is difficult to achieve without introducing the audible artifacts. However, antiques can be acceptable or helpful in some musical contexts. This is because they add additional spectral interest when stretching ratios are large. This process is also known as time compression or expansion. Time stretching is a tool that you will find in just about any DAW. It is primarily a simple, functional tool, an excellent option to get your drum loops in time with the grid. With it, you can also change the tempo of the track in a DJ set. Moreover, you can use it to create some exciting mangled sounds. You can also implement it on most of the audio material (vocals, synths, drums, FX, you name it).
Phase Vocoder & Time Domain
Time stretching is usually based on complex algorithms such as phase vocoder or time domain. These algorithms try to "guess," through frequency analysis, the need to eliminate or interpolate specific samples. Once you know the tempo of the original audio, it is fairly easy to adjust the tempo to the new tempo track. It is helpful to remember that it's always better to increase the tempo of an audio file than to decrease it. This is because, in the first example, the computer will eliminate some samples. The second example will have to generate new models through the interpolation process.
Time Stretching Algorithms
Algorithms for time stretching have been studied since Gabor's (1946) early work on granular synthesis. Granular synthesis works by dividing the audio stream into granules, which are snippets of audio, for example, 100 ms in length. To time expand the audio, it repeats specific granules; to time compress the audio, it removes some granules from the stream. The crossfading between the granule's boundaries helps to minimize artifacts. However, the artifacts introduced by such a scheme are not noticeable for all but very small stretching factors. Rabiner and Schafer (1978) developed a time domain technique called time domain harmonic scaling (TDHS).
Firstly, they estimated the fundamental frequency of an audio segment using autocorrelation or other means. Then, they copied the input audio to an output audio buffer using the overlap-add mechanism to time stretch the audio. This varies the relative rates of traversal through the input and output buffers so that one can time-stretch the audio. Traversal through the input audio is constrained to keep the pitch of the estimated fundamental frequency synchronous. This technique, also called pitch synchronous overlap-add (PSOLA), was created by Moulines and Laroche (1995). Verhelst and Roelands (1993) developed an alternative scheme.
MASTER MUSIC PRODUCTION
Expert-led courses designed to take you from fundamentals to finished tracks.


