Assignment 3, Part 4: Sampling

A sampler plays back a recording whenever you play a note. Whatever you're able to record can be fed into a sampler, whether it's a flute note, a drum hit, or Homer Simpson shouting "Doh!" Since we have no recording equipment available for this class, you'll probably be relying on recordings made by other people. Many such recordings are available on the Internet, free for use. Others are not free for use. If you incorporate sound made by others into your own music, and then you publish your music — this includes putting an MP3 on your web site — you need to respect the copyrights of the people who recorded the sound. (Otherwise, lawyers may chase you.)

We refer to a recording (a sound file) that you put into a sampler as a sample. Once you load a sample into a sampler, you can map the sample to a range of keys (or just a single key) on the keyboard. That way you can have many different samples spread across the keyboard. This is useful for drum kits, where different keys play different drums. It's also the way to make multi-sampled instrument patches, such as a piano. Let's say you have a sample of middle C on a piano. If you play middle C, then of course you hear a middle C. But if you play the D above that, the sampler transposes the sample so that you hear a D. The problem is that if you transpose a sample too far from its original pitch, it sounds artificial. So sampler patches that try to reproduce the sound of a real instrument map one sample to a small range of keys surrounding its original pitch. On the best sampled pianos, a single sample might cover only one or two notes. Making a good multi-sampled instrument patch is very difficult and beyond the scope of this course.

Reason has two samplers, the NN-19 and NN-XT. The NN-19 is the simpler one, and that's what we'll use in this assignment. What we'll do is find two sound files and, if necessary, trim them using a sound editor. Then we'll make a sampler patch that maps one of the samples to one half of the keyboard and the other sample to the other half.

  1. First we have to find some sound files. There are two easy sources: the Internet and commercial CDs. (But please take seriously my copyright warning above if your use of these sounds becomes more than an exercise for school.)

    So get on the Net, and poke around for sounds at the following sites (and any other sites you discover).

    These sites all work differently, but in general, when you click on a sound, it will open a QuickTime player window that lets you play the sound. If you want to download the sound, you have to do something else. In Safari, right-click (click with the right mouse button) on the sound link, and choose Download Linked File from the menu that appears. Save it to the Desktop so that you can find it later.

    Some web sites, such as SoundSnap, use Flash to play sounds, and they provide a download button.

    Don't bother downloading files in Windows Media (.wma) or RealAudio (.ram) format. We can't easily convert those into a form that Reason likes. Wave (.wav) and AIFF (.aif), are best; MP3 files must be converted first to Wave or AIFF, using Audacity (see below).

    Here's how to grab some sound from an audio CD (a process known as ripping) in Mac OS X.

    1. Insert your CD into the right side of the iMac (CD label facing you).

      When the CD icon appears, iTunes automatically launches. Gee, that's nice, but it's not what we want, so quit iTunes. (You can use iTunes to listen to the CD if you need to decide which track to rip.)

    2. Open the CD icon, and drag a track to the Desktop. The ripping begins. Depending on how long your CD track is, this may take a while. When it's done, the file you created, which is in AIFF format, contains the sound that was in the CD track.
    3. You might want to rename the file.

    NOTE: In some circumstances, the "AIFF" files you think you're getting are really AIFC files, which Reason won't open. You get an AIFC file if you drag a CD track to the Desktop or if you save an "AIFF" file in Audacity (see below). You need to save these files as WAVE (.wav) in Audacity before you can open them in a Reason sampler.

    DO THIS: Create at least two sound files, either by downloading them or ripping them from a CD.

  2. Now launch Audacity, which is in the same menu as Digital Performer and Reason. Audacity is a sound editor; it displays a waveform for a sound file and lets you do some kinds of editing. We'll use it to extract bits of sound from the files you downloaded or ripped, and to convert between sound file formats, if necessary.

    1. NOTE: Currently you may see several error message alerts while Audacity opens. Just press the OK button each time.
    2. Open one of your sound files in Audacity.

      Try using the Fiile > Open command (or drag the sound file icon onto the Audacity icon in the Dock).

      Don't double-click the file; that opens it in iTunes.

    3. Drag across the waveform display to select portions of audio that interest you. Press the space bar to play a selection.
    4. Use the Edit > Trim command to remove all audio outside of the selected region. Another way to erase audio is to make a selection and press the delete key.
    5. Use the File > Export command, and save the file with a different name, so that you don't overwrite your original file. It's good to use WAV format, as Reason seems to like that best.
    6. In Audacity, if you use File > Save , you will actually be saving an Audacity project file. You might do this if you want to edit your soundfile again in a later work session. The Audacity project file will have a .aup extension.
    7. If you have a long file and want to take a small section of it, I recommend a different procedure. Select roughly the part you want, choose File > Export Selection as WAV , and give a name for the new file. Afterwards, you can trim this new file more carefully. The editing will go more quickly, because there is much less sound data in the file.

    DO THIS: Convert, if necessary, and trim at least two sound files.

  3. Create a "part 4" folder in the Finder, and move your sound files into it. When it comes time to save your Reason song file, save it in this folder. The idea is that you want the Reason file and the sound files to live in the same folder. Otherwise, Reason may not be able to find your sound files.
  4. Launch Reason, and create a new rack with a Mixer and one NN-19 device. Check that the NN-19 outputs are patched into mixer channels, and that the mixer main output is patched into the hardware device.
  5. Click the Browse Sample button (not the Browse Patch button), and navigate to the folder that contains your two sound files.

    Open one of your files. Reason creates a key map — an arrangement of samples across the keyboard. Since you've opened only one file, your key map has just one key zone — a range of keys to which a sample is assigned. This key zone spans the entire keyboard (MIDI note numbers 0 through 127). Play the keyboard to hear your sample.

    When you play middle C, the sample plays back at its original pitch. When you play other notes, the sampler transposes the sample. The key that plays the sample at its original pitch is called the root key. This key is shaded on the keyboard display in NN-19. You can change the root key by Apple-clicking on a different key or by turning the Root Key knob just below the keyboard.

    Note that the kind of transposition used in samplers does not preserve the duration of a sample. For example, when you transpose down an octave, the sample lasts twice as long (just like in a variable-speed tape recorder). This has implications for the tempo of drum pattern samples.
  6. When a sampler plays a sound that sustains, like a flute, it's not playing a sample that lasts as long as the note. Instead, a portion of the sample following the attack loops repeatedly until the note ends. The goal is to make this looping sound as seamless as possible, and it's often very difficult to do well. You need a sound editor that provides good loop-editing facilities.

    Drum loops, on the other hand are relatively easy to make, as long as you trim the sound file carefully in a sound editor. You want to make the sound last a whole number of beats. For example, if you have about five beats worth of drumming, you might trim the sound file so that it ends right before the beginning of the fifth beat. The sound editor doesn't know about the beats: use your ears.

    Even if your sample is not a drum pattern, try turning on looping. Spin the Loop knob beneath the keyboard display until it reads FW, indicating a forward loop. Unless your sound file contains loop points, the entire sample will loop. You don't have to leave the loop on if you don't like it.

  7. Right-click anywhere on the NN-19, and choose the Split Key Zone command from the menu that appears. This divides the keyboard in half, creating a new key zone above the existing one.

    You can change the boundary between key zones by dragging the handle in the key zone strip. The handle separates the zones.

    The new key zone does not yet contain a sample. This key zone should be selected already. (The right-most portion of the key zone strip should be a lighter shade of blue, as in the picture above.) If you deselected the key zone by accident, select it again by clicking in the key zone strip above the right half of the keyboard.

    Click the Browse Sample button, and load your other sample into the new key zone. Adjust the root key and loop parameters as before. For each key zone you create, make sure the root key is within that key zone, not within another key zone.

    You can adjust the tuning and loudness of each key zone. Select the key zone, and fiddle with the Tune and Level knobs.

    You'll notice that the NN-19 has many of the same synthesizer parameters as SubTractor. One that's different is Sample Start. Normally when NN-19 plays, it starts at the beginning of a sample. Turning up the Sample Start knob moves the starting point further into the sample. Since many sounds have a brief, noisy attack, moving the sample starting point past the attack can make the sample sound less aggressive and punchy.

    DO THIS: Create a multi-sampled patch using at least two samples, mapped to the keyboard in any way you like. Make sure that the root key for each sample lies within the key zone for that sample. Apple-click a key on the keyboard to set the root key. Adjust any of the other parameters to your taste.

  8. Save your patch settings as part of a Reason song file named "part 4" (File > Save), and copy this into your "assignment 3" folder on the Music Server.

    WARNING: Copy all of the sound files you used as part of the sample program into your "assignment 3" folder on the server. The sound files must be in the same folder as the part 4 Reason song file. Otherwise, the sampler program will not work for me!

    The song file contains only the parameters, like filter and envelope settings, as well as the key map information and references to the sound files. The song file does not contain the samples. That's why you need to keep the sound files together with the song file.

©2003, John Gibson