Sampling — Key Spanning & Sample Instruments

We already know how to build a synthesiser. To begin building a sampler instrument, we can keep much of that architecture and simply replace the oscillator with audio stored in a buffer.

Akai S1100
SYNTH
Oscillator
→
ADSR → Filter → LFO
→
Output
SAMPLER
Audio Buffer
→
ADSR → Filter → LFO
→
Output
The important idea: we are not starting again. The modulation, envelopes, filters and signal flow we already learned still apply. We have changed the sound source. This is also a useful way to understand the historical bridge from early computer synthesis to instruments such as the Fairlight CMI.

1. Give the sample a root note

Our built-in bass and chord examples are both rooted at C2. That is its root note: when C2 is played, the buffer is read at its original speed — 1×.

Drag the START and END markers directly on the waveform to choose the playback region. Reverse reads that selected region backwards.

Root noteC2
Played note—
Semitones from root—
Playback rate—
Duration—

2. Map one sample across a keyboard

Click the keys. Every note plays the same loaded recording. We change pitch by changing only the rate at which the buffer is read.

playback rate = 2(semitones from root ÷ 12)

One octave above the root is +12 semitones: 2×. One octave below is −12 semitones: 0.5×.

C0 → C5
—
—

3. Hear the problem

Simple sample transposition changes pitch and time together. Play progressively higher notes and the sample becomes shorter and brighter — eventually producing the familiar “chipmunk” effect. Play lower notes and it becomes longer and darker.

higher pitch = faster reading = shorter duration
lower pitch = slower reading = longer duration
This is not a fault in the sampler. It follows directly from manipulating the read speed of a fixed sequence of samples. At 2× speed we consume the stored samples twice as quickly, so the sound lasts half as long.

Try the bass first, then load the C2 chord. The sampler treats the complete chord exactly like any other buffer: the whole recorded object is transposed together. Try C1 → C2 → C3 → C4 → C5. The octave relationship is simple, but the identity of the original recording becomes increasingly transformed.

4. Why samplers use keygroups and multisamples

Stretching one recording across an entire keyboard quickly becomes unrealistic. A practical sampler can use several recordings, each covering a smaller range of notes.

Low sample
C0–B1
C2 sample
C2–B2
C3 sample
C3–B3
C4 sample
C4–C5

The exact zones are an illustration. Real instruments choose sample positions and keygroups according to the source and available memory.

Old sampler workflow: memory was precious, so there was always a compromise. More samples across the keyboard could sound more natural, but consumed more RAM. Fewer samples saved memory but required more extreme key spanning.

5. We are beginning to make an instrument

Once a sample responds to musical notes, we can treat it much like the oscillator section of our earlier synthesiser.

KEY / MIDI NOTE
choose playback ratio
→
BUFFER
read the sample
→
ADSR → Filter → LFO → Output

Later we can add velocity, envelopes, filtering, modulation, looping and polyphony. The fundamental architecture is already familiar.

Next problem: what if we want to change pitch without changing duration — or change duration without changing pitch? Simple resampling cannot separate them. That takes us to time stretching and pitch shifting.