Sampling & Digital
May 11, 2000 - by Claude Borne
Learn about sampling technique and avoid digital traps:
Sampling is the digitalization process of an acoustic signal. It works by sample picking, i.e. some sound signal parts. Like in cinema, in which the illusion of movement is produced by photos working at fixed rate, the acoustic pressure of the signal is measured within regular ranges. The difference with cinema lies in the sampling rate : while 24 images per second are enough for movement illusion, digital sampling requires a higher rate for continuous sound illusion. That rate is called sampling frequency, in Hertz. The sound is accurately digitalized only with a sampling rate twice as its own frequency. Basically, any digital sample must be digitalized at 40 kHz (40000 values per second) since the human ear gets acoustic frequencies from 20 Hz to 20 kHz. On compact disk, the sampling frequency is 44.1 kHz.
an analog wave ...converted to digital!
Besides frequency, another factor influences the quality of digital sampling : resolution. Measured by bits (the basic measure for computers), the resolution tells how many values are needed to represent the measure of a sample. For instance, an 8 bit code gives 256 values for a sample, whereas a 16 bits code gives more than 65000 values. A 20 bits resolution (more than 20 million values) is needed for the audio signal to be compliant with the human ear specifications. The new Audio DVD norm requires 24 bits code, this is the future audio norm.
Sampling frequency defines the band width of a digitalized signal, while resolution influences the recording dynamic.
On sampling machine recording only one note of an instrument does not allow to play the other notes by merely modifying the playing speed of the sample (here a sample is the complete recording of a note, i.e. a "sound extract" from the instrument). The instrument timbre indeed depends on the pitch of the note played. Thus you need to pick several samples from a single instrument with various pitch and assign those samples to the differents notes of the keyboard. Velocity (the strengh you play a note on) also influences the timbre. The sampling of several different velocities is required to get a good quality. This is called multisampling. It is also useful to assign a set of percussion sounds on the different notes of the keyboard.
Whereas the synthetiser got oscillators which produce the sounds, a sampler plays the digital recording of the sound. Unless it is very long, that sound must end at some time. The problem is solved using looping which enables to repeat a sample part any time, thus giving the impression of infinite sound. The sound is played between a start point and an end point defined by the user.
Sound shaping on a sampler
Time stretching is a widespread technique on samplers and let you change the lenght of a sample without changing its pitch. For instance, when you've got a rythm loop adequate for your music but its tempo does not fit, the sampler will change the intitial tempo (and its lenght) without modifying the initial pitch. The flaws of this process can be used to create a rather different sound than the original one.
Pitch shifting is a process that changes the initial pitch of the sample without changing its lenght, for instance when you adjust a musical phrase without changing its tempo.
Re-sampling let you directly record the sampler output, getting the result after many digital internal treatments.
|Working with digital
It is usually said that digital data (sound, video and so on...) don't alter. This is partly false and there are rules to avoid data loss:
First thing to do is to choose your hardware carefully. Each analog/digital or digital/analog conversion implies sound alteration, so you must check that your work is ok on digital stages. Thus check that each machine in which the sound transits has got digital inputs and outputs. This ensures that the sound won't be modified by multiple conversions. Sound will be released the same as it was at beginning, while in anolog devices each plug and each extra meter of cable induces loss of sound quality. Anyway, check that digital input and outputs formats are the same. For instance a device with a 20 bits/48 kHz input may have a 16 bits/44 kHz output. In this case the sound will become less precise altough you still work with digital data. Thus check that any of your hardware is linked by the same I/O formats to ensure a high quality of sound. Meanwhile some devices suggest a better quality of working treatment than the input alows (For example, a 20 bits input while the hardware works with 24 bits). Why that ? Let imagine that your sound be applied to multi-effects treatment. Each of these effects need some internal treatments in the machine. As we work with digital data, let assume that an effect requires a ratio : the device must perform an approximation because it works with round numbers only. Let imagine that it should work on 8 similar effects : after several approximations, sound will be altered even digital one. Working with a higher resolution is like processing with float numbers : precision is higher. Then the sound should be less altered by effects and more faithful.
Here are some tips useful for computer based work.
Keep in mind that a computer may crash sometimes : it freezes and you can't save your work from your software anymore. Save as often as possible if you don't want to loose hours of work. Then remember that a hard disk is not completely safe. When the hard disk fails you may loose months of work. You should make a backup of your important files on another storage stuff so that you can restore your work in case you have any problem... The cheapest and one of the safiest way to backup your data consist in burning it on a writable CD ROM if you own a CD burner; It is even the easiest way to do with very big files. This process must not be taken easy because it is long, slow , tiresome work, and so on. But it is very useful in case of failure. Apart a hardware failure, a severe crash may also destroy your files, a virus might destroy your work, a wrong manipulation too... In companies, backup is done everyday. You can usually do it only every 2 weeks or month or every six month, depending on the time you are spendind on your computer. Anyway when a failure happens, usually when you are in hurry, you may get a nervous breakdown!
Last but not least, be careful on the file format you are using while saving your work. Check out that the format you use is the same quality than the one you used for recording, that there is no destructive compression, like mpeg 3 which alters the sound in order to save on the file size. If you don't know whether the compression is destructive, let suppose it is and so don't use this format. As an example, let's say you record in stereo 16 bits/44.1 kHz : don't choose any mono 8 bits/ 22 kHz format, which give you the impression of bad tuned radio reception :-) . Again, avoid 'exotic' or third party formats (which can be used by only one software) in order to work with your resulting files easily within other softwares.
To read this text, as well as many informations (like an excellent article about midi), feel free to visit my (french only) web page.
Translated by Vincent Renaud
Become a member now!
It free and fast and it'd allow you to post news, ads, messages in the forums, change your language/time setting...