Time stretching a sound is changing the length / tempo of a sound without changing its pitch.|
It's like stretching "Time to party" to "Tttiiimmmeee tttooo pppaaarrrtttyyy":
Play original sound
Play stretched sound
By first time stretching a sound eg by factor 2 and then playing the sound an octave higher the result will have the same tempo as the original but pitch will be an octave up.
That's called pitch shifting. It's changing the pitch without changing the tempo.
Time stretching and pitch shifting are closely related.
Play pitch shifted sound
Time stretching is a very useful musical tool for example to mix samples that originally have a different tempo or pitch.
In MuLab time stretching is done using Audio Sequences:
An audio sequence is much like a MIDI sequence but the note events play a section of a sample. They're called Sample Events.
Each sample event can be time stretched and pitch shifted independently.
Upon importing a sample as an audio sequence, MuLab will analyze the sample so to detect the transients.
A transient is a sudden increase in volume, eg a kick or snare drum hit.
Or the T in "Time", the T in "To", the P in "Party".
When time stretching a sound it is important that the transients are not stretched too as that give a more blurry result.
After detecting the transients in the sample MuLab generates an audio sequence with a separate sample event for each transient section.
Note that eventhough the transient detector does a good job, it is not always perfect, and depending on the type of sound you're stretching you might want to finetune the transient markers in order to optimize the stretch result.
One of the strengths of MuLab's audio sequences is that they're not limited to traditional stretching of a single sample.
Sample events can play any sample with any stretch and pitch factor.
This gives a rich creative palette for creating all kinds of sample-based audio patterns!
|Granular vs Spectral Stretching|
Time stretching a sound is a difficult art.
There are several different algorithms and each of them has its advantages and disadvantages.
MuLab 8 features 2 stretch algorithms:
None of these algorithms are perfect and it depends on the sound source and your musical goal which one suits best.
- Granular Stretching gives a more raw sound and is cheap on the cpu.
- Spectral Stretching gives a much smoother sound, sometimes maybe a bit chorussy, and it is more heavy on the cpu.
Both stretch modes also have a Head and Tail property:
The Head and Tail sections are not stretched and allow to neatly preserve the transients.
Only the body section is effectively stretched.
In spectral stretch mode the head is defined by the algorithm itself and is around 25 ms.
The tail is important so there will be a perfect transition to the next head ie. without any sudden audio difference = clicks.
When combining spectral stretching and a tail section there can be some phasing effects or volume fluctuation just before the the tail as the part just before the tail is crossfaded with the original audio so to ensure seamless transition to the tail itself. To avoid this you can experiment with changing the tail size, or use granular stretching.
|Spectral Stretch: Post End Audio|
Eventhough sample events are independent of each other, great care has been taken so that adjacent sample events play as seamless as possible.
But it also depends on the type of audio and that's why in spectral mode there is the "Post End Mode" option that can be used to finetune stretched audio sequences.
"Post End Mode" defines what is the expected audio after the stretched sample region.
By default it's set to "Silence". When it's set to "Next Audio" there will be some "pre-echo-smearing" from the audio that comes after the end of the played sample section into the end of that sample event.
That guarantees a seamless transition between adjacent continuous sample events. Due to the smearing it's often unwanted on drumloops etc.
Practically: If you have a sliced sample sequence and you hear little clicks between some events, try setting Post End to Next Audio for the relevant events.
The spectral stretcher also includes a spectral filter:
This filter can do soft to steep lowpass, highpass and band filters.
The Balance parameter controls the balance between the left section (Low+Highpass) and the right section (Bandpass/stop).
The Bandpass/stop section has a slope curve control and if you set that eg. to a multi-cycle sine you get a multi-peak bandpass.
See this video: M8.1 Spectral Filter
- When applying spectral stretching on a very short sample section, the stretched sound may sound less good because the stretcher has not enough source material.
To avoid this you can experiment with decreasing the tail size, or use granular stretching.
- Playing samples at high pitches while using spectral stretching can be CPU intense. In fact if you play a stretched sample at an octave higher it uses twice the CPU.
That's because the note key pitching is applied after the stretching.