6.3 Time Stretching
Introduction
In order to understand the issue of time stretching, let us take the example of a signal whose duration does not fit the time slot that is allocated to its application. Think about a speaker that has already recorded 33 seconds of speech, but whose contribution to a commercial may not be longer than 30 seconds. If he does not want to record his text again, the sound engineer may artificially contract his speech by 10%. With the term “time stretching” we mean the contraction or expansion of the duration of an audio signal. We have studied in 6.2 a method that alters the duration of a sound, the variable speed replay, but it has the drawback of simultaneously transposing the sound. The Harmonizer could be used to transpose the sound in the opposite direction and the combination of both methods leads to a time-stretching algorithm.
The main task of time-stretching algorithms is to shorten or lengthen a sound file of M samples to a new particular length M′ = α · M, where α is the scaling factor. For performing time stretching algorithms the sound file has to be available in a stored form on a storage medium like a sampler, DAT or a hard disc. Time stretching of a sequence of audio samples is demonstrated in Figure 6.4. The original signal is shown in the upper plot. The middle plot shows a sequence which is shortened by a scaling factor α = 0.5 and the lower plot shows stretching by a scaling factor α = 2.
Figure 6.4 Time stretching with scaling factor ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access