Linear and compressed PCM
PCM ( Pulse Coded Modulation) is a technique where an audio signal is sampled linearly. The resultant samples are then converted into a digital value representing the amplitude of that signal at a known point in time. Each sample is then stored in a binary representation of that component of the audio.
In applications where the sampling frequency is fixed and no compression is used to shrink the amount of data needed to store the sounds is called Linear PCM. This results in an uncompressed binary representation of the analog signal. The ultimate size of the data to be stored is determined by the Data Rate. The data rate is determined by the following:
Data Rate = fs*bit size
Where fs is again the sampling frequency and the word size is the resolution to which the amplitude of the analog signal is measured. This is shown graphically below.
For example, CD audio is sampled at 44.1 kHz and the resolution is measured with 16 bit accuracy. Thus CD audio has the following data rate:
Data Rate = 44.1kHz * 16-bit = 705.6kbps
In this case all samples are equal in length. However, at this data rate, large amounts of flash memory would be needed for any significant amount of recording time. The amount of data space needed, as well as the quality of signal, is far above most appliance requirements.
In order to lower the memory size, as well as the necessary fidelity of the audio signal, the sampling rate may be reduced or the word length shortened to a point where the fidelity is sufficient and the amount of memory usage is maximized. This is called Adaptive PCM or ADPCM.
The advantages of ADPCM compared to Linear PCM is that the memory requirements are less and it is less computationally challenging than more advanced methods, such as when using a perceptual coder. The drawbacks however are that critical data can be lost in the compression, and thus lowering the sound quality of the audio, as well as introducing noise into the system. This method is commonly used and may be acceptable in many cases.
In cases where speech, music, or higher fidelity tones are used, a more effective and efficient method called perceptual coding is used. The most commonly known method of perceptual coding is the MP3 format.