Jump to content
Please note: You can easily log in to MPN using your Facebook account!

audio sampling


Recommended Posts

Hi, I'm new to the board. I do a fair amount of sampling with an Ensoniq ASR in my classroom. When you map a sample to a key, only the specified key plays back the original sample. All other keys play the sample back at higher/faster or lower/slower rates. I had a student ask why this is so, and my only answer was to guess that it had something to do with a multiplication of soundwave data to imitate higher and lower frequencies which would normally be associated with the pitch of each key. Why it is faster or slower I have no clue. Am I even close? I would appreciate it if someone could give an explanation of how synths have traditionally dealt with this, and how some devices, such as mp-3 players, are able to pitch shift without changing tempo?
mk
Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Well, if you're an educator, you probably know enough of what those of who learned it from Disney specials call "music math" to know that the difference between a given note and the same note an octave higher is that a string (for our purposes) is vibrating twice as fast at the higher note. An octave lower, the string vibrates half as fast. In between notes vibrate at rates spread between those two values according to the values defined by the equal temperament system (in modern western music, anyhow).

 

So, the note A above middle C is usually tuned these days so that a string reproducing that note vibrates 440 times in one second (440 cycles per second -- or Hertz [Hz], as CPS were renamed several decades ago so as to be more esoteric and harder to comprehend... oh, I mean to honor a father of wave theory, Heinrich Herz) and the A an octave above that vibrates 880 times a second; the A one octave down from A-440 vibrates at 220 Hz.

 

 

Okay. We've primed the pumps, here.

 

Say we have a recording of a string vibrating at 440. If we slow down that recording to half speed, the vibrations go to 220 -- an octave down.

 

(This was easier in the old days, when everyone had had the experience of pulling the plug on a record player and hearing the pitch dive bomb in frequency as the record slowed down.)

 

Well, it turns out that the frequency of our sample rate (the number of times we test the analog signal to find its amplitude value) is roughly analagous (for our purposes) to the speed of a tape recorder, phono, etc.

 

If we slow down the sample rate of playback, say playing something that was recorded with (aprx) 44,100 samples per second (remember cycles-per-second are now called Hz -- so we say the sample rate is 44.1 kHz (kilohertz, ie, thousand cps) down to 22.05 kHz -- that sound is now one octave lower -- and the sample takes twice as long to play back.

 

Since the early days of keyboard samplers like the old Emu Emulator I, this has been the simplest way of getting a different pitch from a sampled tone. Speed up playback, slow down playback -- by ratios that relate directly to the equal tempered scale.

 

 

Okay, the fly in the gravy...

 

Because, in the real world, playing a given note on a given instrument involves a lot of variables, simply changing the sampling rate -- particularly by a wide amount -- can produce unintended effects.

 

Just like the 30's film The Wizard of Oz used sped up voices to create the high-pitched Munchkin chorus, producing that odd, otherworldly effect we now call the "Munchkin effect," a simple playback rate change often produces unwanted artifacts, a process known as "munchkinizing."

 

But how come, I hear you ask, my Alesis QS8 wavetable synthesizer -- which I know uses samples of a real grand piano, among other things, sounds more or less like a regular piano across the range from bottom to treble?

 

That's because a lot of sample-based instruments use what is called "multi-sampling" -- which typically combines multiple samples overlapping up and down the keyboard (and often different samples for loud, soft, and in between, in better sample sets).

 

OK... are we done? I think so. Now I'm going to post this and see three or four much better explanations...

 

Ah, well. The pain of being a would-be know-it-all...

Link to comment
Share on other sites

That takes care of part 1. Now, as to part 2 -- how you can change speed without changing pitch -- there are several ways of dealing with this.

 

To speed up, cycles are removed to have fewer cycles per second and to shorten the length of the sample. Slowing down is more difficult, because you need to create material where none was there to make something longer than it was originally. Typically, this involves duplicating portions of the signal, and crossfading them with existing signals.

Link to comment
Share on other sites

Hey, thanks for the info. Just so I am sure I understand, it sounds like the sample rate is treated as a reference clock for sample data playback and the pitch variation is controlled by varying the sample playback rate, rather than actually changing the wave table created by the raw pitch data. It would involve a lot of number crunching, but do you think future solutions will involve actually reinterpreting the raw sample data? It sounds like there must be a pretty severe loss of fidelity in the current method. Thanks again. mk
mk
Link to comment
Share on other sites

As Craig points out, loss of fidelity (phasing) is an issue, however, todays computing power can do it rather flawlessly if you record at a longer word length (24 bit or more) and higher sampling frequency. This seems to be the case here. I have done half speed with no audible (or visual) ills.

 

The ASR is simply a low power tool and it will not do as fine a job as a high powered stand- alone workstation.

Bill Roberts Precision Mastering

-----------Since 1975-----------

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...