Time stretching and time compression differ from pitch shifting and both effects can be used together to correct pitch and time issues that might be present in audio samples and tracks that will be used later in a mix down session. Basically the term does what its name implies by lengthening or shortening a sample of audio in an effort to match the overall tempo of the audio material. This can be useful for correcting guitar, vocal or drum tracks that might be slightly out of synchronization with the other instruments in a given tempo on an audio project without effecting the overall pitch and progression of notes from any mono source audio.
In the case of a drum track there might be a natural swing to the tempo of the material and yet certain beats may be out of tempo with the rest of the audio material. In this case a small selection of the entire sample can be selected and then moved slightly forward or backward in the tempo range in order to correct the offending beat. This can be done without changing the pitch of the beat or note during correction and is useful in tempo correction without changing the original tone of the drum that was corrected.
In the case of a guitar track an audio engineer might have a perfectly tuned progression of notes and chords to work with but the length of the progression might be too short or too long due to tempo inaccuracy originating from the performer. In this case the pitch of the performance may be correct but the length of the samples are not so the audio engineer might select the entire sample and compress or stretch the sample to the point that it fits the overall tempo of the audio project. The same changes can be made to smaller sections of the audio sample if the surrounding material is correct but only a few measures of the source material are not.
This useful effect can also be applied to vocals to correct small tempo issues such as words or phrases that might need to fall on the beat but do not due to performer interpretation or mistakes. As long as these differences in tempo are small the resulting effect will be transparent to the listener because the time stretch or compression effect does not effect the frequency or the pitch of the original source audio material.
In the same respect to individual audio source tracks, instruments and vocal tracks the time stretch and compression effect can be used on all tracks in a mix down to lengthen or shorten the overall time of the source material without effecting the pitch or frequency. This is useful in commercials that are restricted to fifteen seconds or short audio presentations that are time sensitive and must be presented in the allotted time slot. This effect is best used in situations that call for small adjustments to time and tempo and is the most transparent in these situations. However, some D.J. and mix artists will use extreme examples of this effect in their performances.