> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sampler.meiji.industries/llms.txt
> Use this file to discover all available pages before exploring further.

# Time-Stretch A Loop To Tempo

> Match one source loop to the timing of the current session using Meiji Sampler's time-stretch engine.

# Time-stretch a loop to tempo

## What this recipe is for

Use this when a loop has the right vibe but the wrong length for the current session.

The goal is not mathematical perfection for its own sake. The goal is getting the loop to sit inside the groove.

## How time-stretch works

Meiji Sampler uses Signalsmith Stretch, a formant-preserving spectral stretcher, to change the duration of a loop without shifting its pitch. The stretch is applied as a pre-processing step. The result is cached so playback stays lightweight.

The supported stretch ratio range is `0.25x` to `4.0x` (quarter speed to quadruple speed). Ratios near `1.0x` (within about 1%) are treated as no-ops to avoid unnecessary processing.

## Steps

<Steps>
  <Step title="Establish session timing first">
    Record or confirm the loop that should define the groove. This is the timing reference that the stretched loop will match.
  </Step>

  <Step title="Load the loop you want to match">
    Assign the out-of-tempo sample to a channel.
  </Step>

  <Step title="Set the stretch source">
    In the mixer, navigate to the stretch source control for the channel. Select the channel whose timing you want to match. Meiji Sampler calculates the ratio automatically based on the two loops' lengths.
  </Step>

  <Step title="Listen and adjust">
    Play both channels together. The stretched loop should lock to the reference. If it drifts, check that the source loop length is accurate. Stretch quality depends on the input material being correctly trimmed.
  </Step>

  <Step title="Check the groove, not just the math">
    Small imperfections can still feel better than perfect alignment. Trust your ears over the numbers.
  </Step>
</Steps>

## Tips

* **Melodic and vocal material** stretches cleanly at moderate ratios. Extreme ratios (below `0.5x` or above `2.0x`) can introduce artifacts on any material.
* **Percussive loops** may sound softer at high stretch ratios because transients get spread. Consider using a separate unprocessed layer for attack.
* **Cached results** are stored on disk. Changing the stretch source or ratio regenerates the cache automatically. If you ever hear stale audio after an update, the cache invalidates itself on launch.
* **Channel Detail warms stretched audio.** After changing Loop values, dismiss Channel Detail, for example with `[ESC]`, to begin warming before playback. Sync changes wait one second before warmup starts and show `Stretching` beside the Sync control while the cache updates.
* **Transport waits for cold stretched audio.** If a cued loop or scene needs synced audio that is still warming, Meiji Sampler holds transport at `warming synced audio…` and starts once the stretched buffer is ready, so the first beat lands on time.

## What good looks like

You should hear the stretched loop land with the session rather than leaning ahead or dragging behind it.

## Related pages

* [Quantization And Swing](/guides/quantization-and-swing)
* [Effects And Parameters](/reference/effects-and-parameters)
* [Audio And Playback Problems](/troubleshooting/audio-and-playback)
* [Quantization And Swing: Project Tempo](/guides/quantization-and-swing#project-tempo)
