By Jim Aikin
Electronic Musician, December 2003
What would you like to sound like today? No matter what you answer, your wish can come true — and more easily than you may expect. The magic tool is a type of musical instrument called a sampler. Samplers are a mainstay in just about every type of music production, from hip-hop to film soundtracks. A musician with a sampler and a few good CD-ROMs containing professional sound libraries can lay down ultrarealistic drum, bass, and guitar tracks or simulate a full symphony orchestra. If you're new to the idea of sampling, this column will put you on the fast track.
In a sampler, digital recordings of actual sounds can be played from a MIDI keyboard (or from a sequencer into which MIDI notes have been recorded). When you press a key, the recording assigned to that key plays back. A sampler can hold many recordings at once and give you instant access to all of them. For example, an entire drum kit might be laid out with a different drum sound (kick, snare, and so on) assigned to each key.
Originally, digital samplers were hardware-based instruments. Models like the Roland S-50 and the later S-770 were found in many studios. These days, new hardware instruments such as the Roland MC-909, which combines sampling with other musical functions, are widely used (see Fig. 1). But in the past few years, software samplers have taken over a large segment of the market. Many software samplers can run as standalone programs and as plug-ins in a host sequencer.
Though there are some important differences between hardware and software samplers, they're more alike than they are dissimilar. Except where noted, the concepts I'll discuss in this column apply equally to both.
Samplers use the type of digital recording that is used on CDs. I'm not aware of any samplers that can play back MP3 or other consumer-type digital audio, because the fidelity of those formats isn't high enough to meet musicians' production needs.
The two most important specs in sampling are sampling rate and bit resolution. Most samplers can record at the CD-standard sampling rate of 44.1 kHz (44,100 hertz, or cycles per second), and many can sample at higher rates. Similarly, CD-standard 16-bit resolution is the minimum for recording, and many samplers can record 24-bit audio, which provides better fidelity. Though many professionals prefer to use software samplers because of their 24-bit, 96 kHz sampling, a fast computer is required, as is extensive hard-disk space for storing samples. For many musical purposes, 16-bit, 44.1 kHz sampling is all you'll need.
Before individual samples (recordings) can be played by a sampler, they have to be loaded from “permanent” storage (such as a hard drive or CD-ROM) into the sampler's internal RAM. The amount of memory in the sampler is therefore a crucial spec. Early samplers typically had less than 1 MB of memory, but today most units can be expanded to 128 MB or more. As a rule of thumb, one minute of monaural, 16-bit, 44.1 kHz audio occupies just over 5 MB of memory (see the sidebar “RAM and Sampling Time” for more information).
Some software samplers sidestep the RAM requirements by streaming long samples from the computer's hard drive in real time. If you're using a software sampler, you can assign many gigabytes of samples to the keyboard at once. However, the software sampler has to store the first part of each sample in RAM in order to be able to respond instantly when you play the keyboard, so you'll still need plenty of memory.
Using a hardware sampler's memory efficiently can be a challenge. You might need to create custom presets containing only the samples needed for a given project, or you might have to shorten long samples, convert stereo samples to mono, and so on. Software samplers avoid many of these concerns.
LOOP THE LOOP
Instead of playing a sample once and then stopping, a sampler can be set up so that the sample assigned to a given MIDI key will continue to play over and over for as long as you hold the key down. This is called looping. In fact, looping is so common that there's a special term for not looping: samples that play once and stop are said to be in one-shot mode.
The first generation of samplers used looping as a way to expand their very limited memory. You could record a 1-second segment of a violin section holding a sustained note, for example, and then loop the sample. When the sample was played from the keyboard, the loop would create the illusion that the violin section was sustaining its tone for as long as you might need it musically.
For this trick to work, the loop-start and loop-end points need to match sonically (see Fig. 2). Otherwise, the loop sounds bumpy rather than smooth because there is a discontinuity in the sound each time the loop starts over. Most samplers are equipped with an array of tools for creating smooth loops. With crossfade looping, for instance, the end of the loop is crossfaded with the beginning, thus smoothing out the transition. Your sampler may also have a command for finding zero-crossings, which are points where the sample has (momentarily) zero energy. Placing the loop-start and loop-end points at zero-crossings doesn't guarantee smooth loops, but it can help.
Now that samplers have enough memory to play long samples without looping, the technique of sample looping is more often used for playing phrase loops, such as drum beats and bass riffs. For this type of usage, different tools are needed. Crossfade-looping a drum loop would sound pretty bad, because the sound of the drum on the first beat would get smeared. Instead, you need a way to time-stretch the loop so that it plays at the same tempo as your song. Samplers offer various ways to do time stretching, but they're beyond the scope of this column.
With a sampler, you can assign a different sample to each key on the MIDI keyboard. There are several reasons for creating such a keyboard layout. One was mentioned above: assigning a different drum sound to each key gives you a complete drum kit at your fingertips. But there are times when assigning similar sounds to adjacent keys can be extremely useful.
If you assign only one sample to a range of keys, the sampler will automatically transpose it up or down in half steps as needed. Consider the violin-section sample discussed earlier. Assign it to an octave or two of keys, and you can play whole chords with only one sample. Each key will play the sample at a different pitch. The sampler does this, essentially, by speeding up the playback or by slowing it down.
The trouble is that when a sample is transposed up or down more than a few half steps, it doesn't sound realistic. The thin, tweezy character of a sound that has been transposed upward is often called munchkinization, after the Munchkins in the movie The Wizard of Oz. The way to avoid munchkinization is to record the violin section (or whatever sound you want to play on the keyboard) playing a new note every few half steps up and down the scale, and then assign the sampled notes to the keyboard. This method of assigning samples to the keyboard is called multisampling.
Let's say I record my violin section playing a sustained note every major third — for example, the notes A, C#, and E# in every octave starting with the A just below middle C. After loading these recordings into the sampler and creating smooth loops for all of them (not an easy job), I assign the first A sample to a keyboard zone containing the notes G, A?, A, and B? below middle C. The next sample, the C#, is assigned to the zone containing the notes B, C, C#, and D. A typical multisample layout is shown in Fig. 2.
Each key zone has at least three parameters: low key, high key, and root key. With the first zone described in this example, the low key is G and the high key is B?. The root key is the key that, when played, will cause the sample to play back at its original pitch. In this case, the root key is A.
With the multisample set up this way, each sample needs to be transposed down no more than a whole step and up no more than a half step. We can play chords without fear of munchkinization. Sadly, though, that doesn't mean the sampled violin section will sound perfect. Many other types of sonic artifacts can destroy the orchestral illusion.
For starters, when we play a scale using our violin multisample, there will be transitions (sometimes called multisample split points) in which the sound changes abruptly from one sample to the next. Play a B?, and you'll hear sample 1. Play a B, and you'll hear sample 2. If sample 1 and sample 2 sound markedly different from one another — and they'll never match perfectly — a scale will sound stiff and awkward. Getting the samples in a multisample to match is so difficult that even professional sound designers struggle with it.
Another multisampling technique is Velocity cross-switching. A Velocity-cross-switched multisample can respond to a keyboard performance in a more realistic way. We might sample a snare drum six or eight times, for instance, at various loudness levels (since a drum doesn't sound the same when struck lightly as when struck hard), assign the samples to a single key or key zone, and give each sample its own Velocity range. The first sample would respond to MIDI notes with Velocities of 1 through 32, the second to notes with Velocities of 33 through 48, and so on.
ROLL YOUR OWN
Usually, when you first turn a sampler on, it won't make any sound at all. To play music with it, you have to load or create one or more samples. There are two ways to get sounds into a sampler: by loading them from permanent storage and by doing your own recordings. The latter process is called, naturally, sampling. The exact procedures differ from one sampler to another; consult your owner's manual for specifics.
Ironically, most software-based samplers don't have any facilities for recording new samples. You'll need to capture the sound onto your computer's hard drive using another piece of software, such as an audio editor or a multitrack recorder. Once the audio file is on the drive, you'll be able to load it into the sampler. Most hardware samplers, however, can make their own recordings, usually from a mic, line, or digital input on the front or rear panel.
As with any type of digital recording, you want to get the input (the sound to be recorded) as hot as possible short of distortion. Your sampler will have input metering with which you can check the level of the signal. You may need to preallocate a certain amount of memory to the recording process before you start.
After the sample is recorded, the sampler will probably ask you what root key you'd like to assign it to. It will then assign the sample to the keyboard, ready to be played. But before you can use it musically, you'll want to trim off (truncate) the start and end of the sample. A properly truncated sample won't use any more precious memory than it actually needs.
After truncating the sample, you'll need to save either the sample itself or the preset, which may contain numerous samples and other types of data, to permanent storage. Unlike a synthesizer, a sampler can't store its sounds in a battery-backed RAM buffer for instant availability: The sounds have to be stored on a floppy disk (if they're extremely short) or to an internal or external hard disk.
A sampler can be a wonderful musical tool. If you use sound-library CDs, though, there's some risk that your sampled music will sound a lot like everyone else's. To make music that's truly your own, you'll need to explore the features of your sampler and learn to use them creatively. Once you get started, you'll find there's no end to the possibilities!
has been sampling strange household noises since he brought home that brand-new Akai S900 (750 KB of RAM, floppy drive storage only) back in 1987.
RAM and Sampling Time
This table shows how much sampling time you will get from various amounts of RAM at various common sampling rates and data resolutions. To calculate the amount of time in your sampler, use the following formula: Multiply the number of bytes in each sample word (a 16-bit word uses two bytes, a 24-bit word three bytes) by the number of channels (one channel for mono, two for stereo) by the sampling rate in hertz (44,100 for 44.1 kHz recording, for example). Divide this number into the total amount of memory in bytes (for instance, 8,000,000 for 8 MB of RAM).
RAM Amount (MB)
Sample Word Size (bits)
Sampling Rate (kHz)
Approximate Recording Time (seconds)