← back to chapter

warp-math · stretching time without bending pitch

The triptych, audible. raw: the wobbly source drifts off the metronome. varispeed (chapter 07's engine): beats lock, key changes. granular (this chapter): beats lock, key does not — the same per-segment rates, sampled as grains instead of played as tape speed. The default source is a synthetic arpeggio so the pitch difference is unmissable; drop in real audio + its .beats map for the full effect.

1. beats file (required)

Or click (16 beats wandering 100 → 120 → 150 → 120 BPM; rates 1.2, 1.0, 0.8, 1.0 against the 120 BPM grid).

no beats loaded

2. audio file (optional)

Without it, a synthetic arpeggio (one tone per file beat, C4 E4 G4 C5) stands in — tones, not clicks, because you cannot hear varispeed detune a click.

no audio loaded · arpeggio mode

output: s · source s(p): s
the grain schedule: grainSchedule(), first rows from output 0.5 s

The source-delta column is RULE (grain advance) live: consecutive grains advance the source by outputHop × rate — the last column recovers the local rate. Shrink the grain to hear warble, grow it to hear smearing; at 50% overlap the Hann windows sum to exactly 1 (COLA).

outputSecsourceSec = s(p)ΔsourceΔsource / hop = rate