Photographing Sound (Part 1)
The Art of Sampling
Part 1: The Art Of Sampling. Keyboard programmer Paul Wiffen offers valuable advice on squeezing the most out of your sampler.
Session programmer Paul Wiffen lays the foundations for better sampling by looking at how sound is made up, how sounds are 'captured' and how to overcome some of the drawbacks inherent in sampling as an imitative technique.
The arrival of sampling as a technique for producing sound can be compared to the arrival of photography as a technique for producing pictures. Superficially, it is more lifelike and because of this fact it may seem at first that synthesis in its purest form cannot compete, in the same way that painting once seemed doomed by the arrival of photography. But it suffers from similar drawbacks. For a good photograph, you need a good subject.
When I was first asked to demonstrate a sampling keyboard, I decided very quickly that the normal way I prepared demonstrations - sitting at home armed only with a jack lead and an amp - was not going to work.
I had to go out looking for good sounds. I had to buy a microphone (horror of horrors - surely that's the recording engineer's job, for God's sake?), get a phono-to-jack for taking sounds from records and Compact Disc. And that was only the start of it... Slowly the horrible truth dawned on me! Sampling is recording, only worse. In recording you play back sounds exactly as you recorded them. With sampling you are trying to do much more, play back much faster and slower, combine sounds, imitate playing techniques and so forth.
So where to start in this unfamiliar territory? The first thing is that it is helpful to have an understanding of the medium in which you are working.
Sound, as you probably know, is composed of vibrations in the air. The higher the pitch, the faster the vibration. And the more violent the vibrations, the louder the sound. But this is only the tip of the iceberg. Any complex waveform can be interpreted as lots of simple waveforms - sine-waves - at different frequencies and volumes. Actually working out which ones is a job for mathematicians with their Fast Fourier Transforms - but before you go throwing this article aside in disgust, we don't need to get into all that. All we need to know is that the different frequencies exist.
In a musically pitched note, the frequencies will probably contain a fundamental as the loudest (or one of the loudest) sinewave component, and a series of harmonics which are integer multiples (2, 3, 4, 5 times faster etc) of that fundamental. Now the higher the pitch, the faster the oscillations (or vibrations) which create it. This means more energy is dissipated in making up that frequency and so generally speaking - unless resonance effects, such as guitar feedback, are present - in naturally occurring sounds the higher frequencies are at much lower levels in the sound. This doesn't mean though that they are unimportant. The human ear (if not irreparably damaged by too many Motorhead gigs) is capable of hearing frequencies of up to 20 kHz present at relatively low levels in a sound. If these high frequencies are lost, then the sound seems dull or muffled (as if heard through a wall or some other medium which blankets out the higher frequencies). This is perhaps the greatest pitfall in sampling, and we will need to be constantly on guard against losing the top end of our samples.
So how does sampling attempt to 'capture' these vibrations? Basically, the energy present in vibrations is analysed a certain number of times a second. The accuracy of the sampling depends on two factors: how accurate the analysis is, and how many times a second this analysis is taken. 8-bit analysis - that is breaking the dynamic range into 256 different levels - is the minimum resolution in current use on sampling machines. This basic standard was introduced as long ago as 1978 on the original Fairlight CMI whose sampling capabilities have long been surpassed (although many of its programming techniques still remain unique). Nowadays, the move is towards 12-bit resolution (which gives 4,096 different levels), with 16-bit (65,536) still only available at the top (country house plus) end of the market. Obviously the finer the resolution,the more accurate a reproduction the sample gives.
The other factor involved is how often a sample is taken. A sample rate of 50kHz, which until recently has only been available on the Synclavier, means that a sample is recorded 50,000 times a second or once every 20 microseconds. More common rates at the lower end of the market are between 20kHz and 30kHz. There is a theorem, named after a gentleman called Nyquist (who thought a lot about such things) that the maximum frequency which can be sampled is half the sample rate. In other words, sampling at 30kHz, you cannot record anything higher than 15kHz. This is because you need at least one positive reading and one negative reading (ie. at least two wave samples in each wavelength) before you can hope to detect any frequency. Now this is the theoretical limit. In practice, you cannot accurately sample the uppermost 2kHz (between 13kHz and 15kHz in our example) because of an effect known as aliasing.
The easiest way to understand aliasing is to go back to another visual comparison - wagon wheels or aircraft propellors appearing to go backwards in films. This is, in fact, a form of visual aliasing. When the wheels are going almost twice as fast as the speed of the film being projected, they appear to be moving backwards. In the same way, frequencies higher than the theoretical maximum appear to be lower frequencies in playback, giving rise to undesirable and often rapidly varying frequencies in the audible range. This problem is overcome by using our anti-aliasing filter, which is usually set at somewhat less than the theoretical sample bandwidth available (half the sample rate if you remember) and this simply cuts out any frequencies which are likely to cause problems before the sampling takes place.
The latest hardware update for the Ensoniq Mirage is just such an anti-aliasing filter which allows the sample rate to be increased to 50kHz giving much better sample fidelity. If you are currently struggling to get decent samples out of your Mirage, then I suggest that this £149 add-on is your next purchase. It is this I suspect which makes the factory preset samples significantly better than anything you can record on the machine yourself, and probably will be far more use than the advice which follows.
Of course, when you play a sample back at lower than the original pitch, aliasing effects will start to creep in again. Also, when you hear things played back more slowly, approximations which fooled you at higher speed now start to sound somewhat hollow (as vital harmonics have been incompletely recorded). This is, however, an effect which many people like, so it shouldn't be regarded as unusable, just inaccurate.
This does touch on a point which it is worth making about sampling. Although it is by nature an imitative process, it does not follow that any sound which does not come back out of your sampling machine 100% indistinguishable from the original is unusable. Many artists, such as Peter Gabriel and The Art Of Noise, have made great use of what are theoretically 'bad' samples, because the rather limited sampling capability of an instrument like the Fairlight does stamp sounds with a character that doesn't come with better specification samplers like the Synclavier.
As with traditional synthesis, the world of music would be a poorer place if accurate imitation of naturally occurring sounds were everyone's sole criteria for electronic instruments. Dont forget that the grand piano, which short-sighted keyboard players seem to regard as the most useful instrument to sample, was once considered to be but a poor and insufficient imitation of the harpsichord. Take a tip from Justin Hayward of The Moody Blues, who won't let Patrick Moraz use his Kurzweil for the strings on 'Nights In White Satin'. Why not? Simply because he prefers the 'character' of the old Mellotron. So always listen to your samples before you wipe them from memory for not being close enough to the original. If they stand up as interesting sounds in their own right, then use them! Imitation is the sincerest form of flattery.
Having said this, the fact still remains that for many people, sampling does represent a way to access a lot of different sounds from a few instruments, especially live. One of the most common gigs for a programmer like myself nowadays, is sampling sounds from multitrack tapes so that the band on stage can make a sound something like the record. Here the only standard which applies of course (except for the odd improvements which we like to think we can make) is getting as close to the original as you can. This is where all the tricks of the trade: looping, filtering, multi-sampling etc, all become vital to achieve the end in view by hook or by crook. And make no mistake, this is often how you do it.
The whole process is made much easier if you get the samples into your machine in the best possible condition. Now this is very unlikely if you are sampling direct from a fallible musician. It is much better to have your sound source in some recorded form ready to sample. Then levels don't change (try getting any musician to play the same thing over and over again in an identical manner - they are psychologically incapable of doing it!), and squeaks and rattles don't appear on the all-important take. If you are recording the sample yourself, use the best quality microphone you can lay your hands on. It makes no difference if your machine can accurately sample at 25kHz (only the local dogs will benefit, of course) if your Tandy microphone is only sensitive to frequencies below 10kHz. The old principle of the 'weakest link in the chain' is of paramount importance here. Every stage of the sample/recording process must have a good, wide bandwidth, as the result will always be as poor as the least faithful step in the process.
For these reasons you should use the highest fidelity available for recording. Obviously, the Sony PCM-F1 digital processor is the ideal, but if budgets are limited, pick the best available alternative. Do not use that old Philips portable which your Gran has been using for the last ten years (certainly not without cleaning the heads!) or your Dad's dictaphone just because they are a convenient size. If size is a determining factor - for sampling those mountain goats, or the subterranean sewer rats - then try and lay your hands on a Professional Walkman,or get a long lead to feed back to a portable reel-to-reel machine like a Uher Report.
If you want to 'pinch'sounds from a record, try and get access to a Compact Disc version. Not only will it be better quality (they actually sample at 48kHz, 16-bit), but on many CD players it is possible to loop the section of the track you want to sample, making other preparations that much easier. The new Sony CDP 502ES is superb for doing just that.
Once you have your sample in this easy-to-use form, boost the higher frequencies (above 10kHz or so) by any means you have available. Obviously, the EQ on a mixing desk channel is the ideal device for this, but even turning up the treble on your amp can help. This will help keep that top end brightness which we discovered was so easy to lose earlier. Take care not to overdo it though or you may bring on the aliasing effect we talked about before. If you begin to hear unwanted frequencies appearing in your sample on playback, try winding the treble off a little. This technique of boosting the top end is generally known as pre-emphasis and if used correctly can make all the difference between a dull version of the original and a pretty authentic translation into your sampler. Overdoing it can be disastrous though (or creative if you like really weird sounds) so experiment to find the right level of top end boost. There is no hard and fast rule; it varies from sound to sound.
Very slight, but deliberate, clipping of the sample can actually restore some of the high frequencies which would otherwise be lost. But again this amount varies from sound to sound and, more importantly, from machine to machine. The Emulator 2, for example, seems to thrive on Sample Overload (the error message which shows on its LCD) as long as you don't overdo it, whilst on the Mirage the slightest clipping produces harsh, nasty noises. Again, experimentation is the order of the day, and don't let the manufacturers' well-intentioned warnings frighten you into re-sampling without at least listening to the result. The final judgement in sampling must always rest with the ears!
Sampling thresholds are provided on many machines to allow you to catch the beginning of the sound you want with the need for an expert trigger finger. But they should be used judiciously. You can actually lose the front attack of the sound (of course, you may want to do this, in the manner of an artificial gate effect - good for sharp drum sounds) if you set the trigger threshold too high. This might be particularly disastrous on bowed sounds (such as cello), where the front is vital to the authenticity, or on sounds which build up slowly.
Set the threshold as low as possible so it doesn't trigger on events previous to the required one. Or better still, use the lowest possible threshold together with a deft 'sample arm' just before the event in question. And don't feel you have to get the sample on the first go. No prizes for first takes in this business. Just keep your ears open for that tell-tale organ envelope (instant full level) which tells you that you have inadvertently truncated the attack of your sound.
Of course, it is very tempting to add a bit of reverb to that snare before you sample it, or chorus that string sound to fill it out. Not that there is anything intrinsically wrong with this, but you should look before you leap. Don't forget, once sampled with effect, you can't get the basic sound back again (unless that tuba player lives in the same flat as you!). Reverb (and any other effect which 'lengthens' a sound) will also eat up more of the precious memory in the machine, leaving you less room to put other sounds on the same disk.
So, if memory is short (and let's face it, we haven't all got a Synclavier with two Winchester hard disks have we?), then restrict the reverb to playback only. It can often mush up the sound undesirably when playing your sample polyphonically anyway if added at source.
Chorusing and flanging can often be done by de-tuning samples after the fact, which allows the precise amount of effect to be altered (or even removed) with the benefit of hindsight (you learn a lot about hindsight when sampling). So keep your options open in this way.
On the other hand, if you know that the effect you have is just the job and you can spare the memory (or the reverb cutting short gives you that authentic gated Phil Collins sound), then why not make up another disk with the effects on. There is nothing to match that feeling when you play the know-all critic your monster sounds, he eyes you suspiciously and asks, "What are you playing that through?" and you reply with a cross between innocence and superiority: "Nothing!".
On some machines now, it is possible to vary the sample rate which you use to record your sound. This, of course, allows you to use your machine's memory more sparingly, but it does take a little thought and care to apportion the available capacity wisely. Think how many sounds you need to fit on a disk and allocate bytes accordingly. Listen to each sound carefully and see what the top end dictates. Whilst you are wasting your time trying to sample a cymbal at a 16kHz rate, equally, you are throwing away precious RAM using a 42kHz rate on a bass drum. If the sound has got a lot of top end,you'll need the faster rate to pick it up. In the cheaper machines, memory is limited, so don't throw it away for nothing.
Also, you will do well to think ahead to the replay stage. Many machines have a maximum replay rate which means that you cannot play back faster than a certain frequency. The closer your sampling rate is to this, the more restricted becomes your note replay above the sampled pitch. If you sample a sound at 50kHz and this is also your maximum replay speed, then you cannot get even a quarter tone higher in pitch. So if you want to play it an octave higher you may have to compromise with a lower sample rate and accept the reduced bandwidth. Your only other alternative may be multi-sampling (to be discussed in a future article).
When sampling sounds from a mixed down record, you will find that this technique is most successful if the required sounds are in isolation in the mix at that point and there is a bit of breathing space before and after. It is no use sampling the greatest snare sound in the history of modern recording, if there is a string sound sustaining behind it! In replay, it will sound distinctly odd. Of course, VCAs can be used to mute sounds which sustain behind percussive ones, but all in all you would do better to avoid such problems if at all possible. Drum fills or intros are generally good sampling points.
Avoid sampling from other samples. Tempting though this is, it's like recording sound-on-sound. Each time you do it you lose signal and gain an increase in noise levels. Wait for the manufacturers to implement the digital sample transfer format via MIDI (as now available on the Prophet 2000) and then you can nick samples with no deterioration in quality whatsoever (good this digital lark, isn't it?). Anyway, who wants to sound the same as everyone else!
Even though I don't advise sampling straight from instrument into sampler, keep the machine to hand while you have got access to the musician or tape that produces the sound. There is nothing more frustrating than getting a good sample and then discovering you need the original sound to be played a quarter tone higher to achieve the required range, or that you also need a trumpet note, say, with the tongueing at the front for legato passages. Unless it's unavoidable, always try and load your potential samples back into the machine at the same session as recording them. I have been present at several large and expensive recording sessions where nobody thought to record a bottom F on the trombone, the end result being a sample which played the whole of the required riff except for the final bass note! Plan ahead...
Hopefully, the ground covered in this article should have helped you get your sounds into your sampler in the best possible shape. Now you can send the musicians home! Next time, we will look at the joys (and perils) of looping the loop, how not to get lost in the maze of multi-sampling (or if your machine doesn't multi-sample, how an overdub facility can be made to work in the same way) and perhaps, most creative of all, how to use the analogue parameters that some keyboard samplers now give you to tailor your imitative samples and create splendid new sounds out of everyday noises. Till then, use your ears to guide you and experiment!