Sample looping (perfect loops, sustain loops, long loops)
What it is#
Two very different things: looping a short cycle so a sampled note sustains forever, and using long loops (drum breaks, guitar riffs) as building blocks that must stay in time with the song. The loop is what separates a usable sample from a recording — Psibelius's definition of a good one: "No clicks, loop easily, correct pitch, and volume", which is why good samples were traded and ripped rather than re-made (sample-ripping; source: s-tw024-sample-ripping-debate).
How to do it#
Tools and traps by tracker (sources: s-protracker-23d-help, s-ft2-manual, s-openmpt-manual-samples, s-openmpt-manual-compatible-playback): ProTracker sets loops with Repeat and Replen and has X-Fade ("mix with itself, backwards. Handy for looping samples that are hard to loop"); FT2's sample editor X-Fade takes a range across the first loop point and Minimise cuts everything after the loop; OpenMPT adds sustain loops (played until note-off, then the normal loop), bidi loops, a Crossfade dialog, click-hunting spin buttons, Trim around Loop Points, and the ProTracker one-shot loop rule — a loop starting at 0 plays the whole sample once and then loops, which other MOD players do not emulate, so "always trim samples … or not start the sample loop at 0". IT-compatible players do not retrigger a channel that has already stopped — a very short one-shot hi-hat that must be retriggered needs "a silent loop at the end". ST3 keeps its loop begin/end per sample alongside C4Spd, the frequency played at C-4 — the tuning half of a loop, since a mistuned loop is a wrong-length loop — and its global "volume 0 opt." switch stops looped notes that have gone silent, which is why a silent looped sample can still be eating a channel (source: s-st3-manual).
Sustaining a note#
- Forward loops need the same amplitude at both ends; ping-pong loops are kinder to imperfect material but wrong for samples with built-in vibrato. Pulse's perfect-loop method: (on a GUS, turn the loop off and reload so the whole waveform is present) choose forward or ping-pong, make an initial guess that respects any visible repeating shape, play the sample much higher than you will use it and hold
+/-on a loop boundary to find the region of least clicking, then adjust a byte at a time (ping-pong loops usually need both ends moved, forward loops one); drop an octave and repeat until you reach the playing pitch (source: s-it-hints). Clicks at the start or end of a sample: loop the first 50–100 bytes and pre-loop-cut withAlt-B, likewiseAlt-Lat the end (Onix4MAN, same source). - For trackers without ping-pong loops, build one by hand: append the reversed loop segment to the sample and loop over both (source: s-tw084-perfect-samples-the-piano).
- High piano notes decay into near-sine tone and loop easily; low notes on good instruments evolve for a long time and resist looping (same source).
- Sustain loops (IT): loop only while the key is held; on note-off (
===) playback continues into the rest of the sample — the "finger off the string" sound; ideally under 1/20 s long so the release timing is tight (instrument-envelopes).
Long loops in time#
- Record riffs against a click so the loop is at a tempo; split samples over 64 K at the up-beats; place the loop on rows 00, 16, 32, 48 to re-sync it every beat, add a kick every 4 or 8 rows and fine-tune the song tempo until they agree; fix a slightly long loop with
SDxdelay orOxxoffset, a short one with a tight loop at its end (source: s-tw025-loops-and-extended-samples). - Tune a beat loop to
C-5at the song's BPM;C-6plays it at double speed for transitions (s-tw075-it-percussion-tips). - Make the loop in the tracker (Zinc, 1997): build a one-pattern drum loop in impulse-tracker, save, restart IT with the WAV driver and write a WAV — an original breakbeat already at the song's tempo. A ping-pong loop can hide a badly edited drum loop; for "instant flava", bounce a loop to cassette and resample it (source: s-tw096-studio-tracking-tips; see sample-ripping for why he bothered).
- Loop and riff etiquette (1995–96): Shawn — drum loops are "perfectly legal — they're used in professional productions", guitar riffs too, "hopefully played by whoever is making the tune"; what he rejects is a passage copied off a band's CD used as a major part of the tune; credit what you borrow (source: s-tw041-interview-shawnm). zalt — sampled guitar chords and fingerpicking are acceptable "but not too much, and if that isn't the main thing in the tune"; "neato chordloops" over awkward bass, drums and leads are not (source: s-tw040-interview-zalt). smeghead on why: a decent guitar sound "unless you've got 1000k of pre-made guitar riffs" is very hard, and master-of-darkness adds that guitars in modules are looped samples good only for chords (source: s-tw029-faces-in-the-crowd-smeghead). The wider argument is on sample-ripping and realism-in-tracked-music.
LSDj: the loop points are a pattern command#
The Game Boy's kit samples loop too, and LSDj is unusual in letting the pattern move the loop while the sample plays (source: s-lsdj-manual).
- The kit instrument's LOOP is three-way:
OFFdoes not loop,ONloops and starts playing from OFFSET,ATKloops the sample but starts playing from the beginning — so ATK keeps the attack and repeats the body, the shape a sustaining instrument needs. OFFSET is the loop start (or, with LOOP off, a plain sample-offset) and LEN the length. Sxyon a kit instrument "changes the loop points. The first digit modulates the offset value; the second digit modulates the loop length. (1–7= increase,9–F= decrease.)" — the manual's own note is that "used creatively, this command can be very useful for creating a wide range of percussive and timbral effects". Walking the loop length down over a few rows turns any sampled tail into a pitched buzz; walking the offset along it granulates (retrigger, wavetable-programming).
The budget behind all of it: 3FA0 bytes per kit at 11,468 Hz, so a loop measured in time is measured in tens of milliseconds, and the sample must be lowpassed at 5,734 Hz and faded at both ends before it ever gets there (source: s-little-scale-lsdj-kits; chip-samples).
Tips & pitfalls#
- A loop is not done until it is done at the playing pitch. Pulse's method deliberately finds the loop an octave or more high, where clicks are easiest to hear, then works down (source: s-it-hints).
- Ping-pong hides bad material but breaks recorded modulation. Any sample with its own vibrato, tremolo or room tail will play that modulation backwards (source: s-it-hints).
- Do not start a loop at byte 0 in a MOD. ProTracker's one-shot rule plays the whole sample once first; other players do not emulate it, so the module sounds different everywhere else (source: s-openmpt-manual-compatible-playback).
- A silent looped note still costs a channel unless the tracker's zero-volume optimisation is on (source: s-st3-manual).
Related#
sample-offset · instrument-envelopes · multisampling · chip-samples · recording-samples · sample-ripping
Sources#
s-tw025-loops-and-extended-samples · s-tw084-perfect-samples-the-piano · s-tw075-it-percussion-tips · s-protracker-23d-help · s-ft2-manual · s-openmpt-manual-samples · s-openmpt-manual-compatible-playback · s-tw024-sample-ripping-debate · s-tw096-studio-tracking-tips · s-tw041-interview-shawnm · s-tw040-interview-zalt · s-tw029-faces-in-the-crowd-smeghead · s-st3-manual · s-lsdj-manual · s-little-scale-lsdj-kits · s-it-hints · s-it-manual