M8 Docs   Time Stretching

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!

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:

  • 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.
None of these algorithms are perfect and it depends on the sound source and your musical goal which one suits best.

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.
The tail is important so there will be a perfect transition to the next head ie. without any sudden audio difference = clicks.

You don't have to take the head/tail into account when calculating stretch factors, the stretch factor you set will be applied to the entire audio section.
So when you set a stretch factor of 200% then the entire result will be 200% of the entire source. As the head and tail sections are not stretched this means that the body section will be stretched a bit more than 200% so that the total result is exactly 200% of the source.

Note that 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.

Also note that 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 head / 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.

Table Of Contents