Brief Introduction to PCM File Format

Source: Internet
Author: User

Brief Introduction to PCM File Format

PCM file: the analog audio signal is directly formed by Analog-to-analog conversion (A/D conversion ).Binary SequenceThe file does not have an additional file header and end mark. Windows convert can convert PCM audio files to Microsoft wav files.
To digitize audio is actually to digitize sound. The most common method is to modulated PCM (Pulse Code Modulation) through pulse coding ). The operating principle is as follows: first, we consider converting the sound into a series of voltage-Changing Signals through the microphone, as shown in. The horizontal coordinates of this figure are seconds and the vertical coordinates are the voltage values. To convert this signal to the PCM format, three records are used to represent the sound. They are:Channels,Digit NumberAndSampling frequency.


Sample frequency:That is, the sampling frequency, which refers to the number of times the sound sample is obtained per second. The higher the sampling frequency, the better the sound quality, and the more authentic the sound is. However, at the same time, it occupies more resources than the others. Because the resolution of human ears is very limited, it cannot be determined at a too high frequency. Among the 16-bit sound cards, there are several levels including 22 kHz and 44 kHz. Among them, 22 kHz is equivalent to the sound quality of common fmbroadcast, and 44 kHz is equivalent to the CD sound quality, the frequency of frequently used samples does not exceed 48 khz.
Digit Number:That is, the sample value or sample value (that is, quantize the sample amplitude ). It is used to measure the number of audio fluctuations, or the resolution of the sound card. The larger the value, the higher the resolution, and the stronger the sound.
Channels:It is very easy to understand. There are single-channel and stereo sound. Single-channel sound can only be voiced using one speaker (some can also be processed into two speakers to output the same sound ), the PCM of the stereo sound can make both speakers speak (generally there is a division of work in the left and right channels), and the space effect can be better felt.

The following illustration shows the concept of the number of digits and frequency of samples. Let's take a look at these images. The black curve in the figure represents the natural sound waves recorded by the PCM file, the red curve represents the sound waves output by the PCM file, the horizontal coordinate is the sample frequency, and the ordinate coordinate is the number of samples. The grids in these images are gradually encrypted from left to right. First, the density of the horizontal coordinates is increased, and then the density of the vertical coordinates is increased. Obviously, the smaller the unit of the abscissa, that is, the smaller the interval between the two sample moments, the more favorable it is to keep the original sound true. In other words, the larger the sampling frequency, the more stable the sound quality. Similarly, the smaller the ordinate unit, the more favorable the sound quality. That is, the larger the number of samples, the better.


In a computer, there are usually eight and 16 digits in the sample number. However, please note that the eight digits do not mean dividing the ordinate coordinates into eight portions, but dividing them into the 8th power of 2, that is, 256 portions; likewise, 16-bit means to divide the ordinate values into 65536 portions at the power of 16. The sample frequency is generally 11025Hz (11 kHz), 22050Hz (22 kHz), and 44100Hz (44 kHz) three.


Now we can get the formula for the capacity occupied by PCM files: storage volume = (sample frequency * number of samples * channels) * time/8 (unit: number of bytes ).
For example, the standard sampling frequency of Digital Laser recording disks (CD-DA, Redbook standard) is 44. the lkhz, 16-bit serial number, stereo sound (2 channels), capable of broadcasting sound at a frequency of up to 22 kHz almost without distortion, which is also the most frequently heard by humans. The storage capacity required for one-minute laser recording is:

(44.1*1000 * L6 * 2) * 60/8 = 10,584,000 (bytes) = 10.584mbytes. This value is the storage space occupied by PCM audio files on the hard disk.
The format of computer audio files determines the quality of sound. in daily life, telephones, radios, and so on are analog audio signals. That is, there is no concept of sample frequency and number of digits, we can compare the following:
  • 44 kHz, 16 bit sound is called CD sound quality;
  • The sound effects of 22 kHz and 16 bits are similar to those of stereo broadcast (FM stereo). They are called Broadcast sound quality;
  • 11 kHz, 8 bit sound, called telephone sound quality.
Microsoft's WAV file is a type of PCM encoding. I will introduce it in detail later.

Brief Introduction to PCM File Format

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.