Home  >  Article  >  What file is pcm

What file is pcm

青灯夜游
青灯夜游Original
2023-03-10 16:52:4517045browse

pcm is a multimedia audio file that is widely used for material preservation and music appreciation; PCM files can be read and played at the same time, without the need to read out the entire file and then play it back, so that it can be done You can listen without downloading. PCM is called pulse code modulation. The sound data in PCM is not compressed. It is standard digital audio data converted from analog signals through sampling, quantization, and encoding.

What file is pcm

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

1. Noun analysis

PCM (Pulse Code Modulation) is also called pulse code modulation. The sound data in PCM is not compressed. It is simulated The signal is converted into standard digital audio data after sampling, quantization, and encoding. Please refer to the following figure to understand the sampling conversion method:

What file is pcm

##Audio sampling includes the following major elements:

1. Sampling rate

The sampling rate represents the number of digital snapshots of the audio signal per second. This rate determines the frequency range of the audio file. The higher the sampling rate, the closer the shape of the digital waveform is to the original analog waveform. A low sample rate limits the frequency range that can be recorded, which can result in a recording that poorly represents the original sound. According to the Nyquist sampling theorem, in order to reproduce a given frequency, the sampling rate must be at least twice that frequency. For example, a typical CD record has a sampling rate of 44,100 samples per second, so it can reproduce frequencies up to 22,050 Hz, which is just above the human hearing limit of 20,000 Hz.

What file is pcm

A in the picture is a low-sampling-rate audio signal, whose effect has distorted the original sound wave, while B is a high-sampling-rate audio signal that completely reproduces the original sound wave. Signal.

The commonly used sampling rates for digital audio are as follows:

What file is pcm

2. Bit depth

The bit depth determines the dynamic range . When sampling a sound wave, assign each sample an amplitude value that is closest to the amplitude of the original sound wave. Higher bit depth provides more possible amplitude values, resulting in greater dynamic range, lower noise floor, and higher fidelity.

What file is pcm

The higher the bit depth, the greater the dynamic range provided.

2. PCM

In the above noun analysis, we should have a certain understanding and understanding of PCM. Below we will explain more about PCM.

PCM files have streaming media characteristics and are one of the encoding methods for digital communication.

PCM files are widely used for material storage and music appreciation. They are used in CDs, DVDs and our common WAV files. PCM files can be read and played at the same time, without the need to read out the entire file. Then play it back, so you can listen without downloading.

1. PCM audio data storage method

If it is a mono file, the sampling data is stored in order of time. If it is a monophonic audio file, the sampled data is stored in order of time (it may also be stored in LRLRLR mode, but the data of the other channel is 0).

If it is two-channel, it is usually stored in the LRLRLR format. The storage is also related to the big and small end of the machine.

The storage method of PCM is little endian mode. The storage Data data is arranged as shown in the figure below:

What file is pcm

2. PCM audio data parameters

The parameters of PCM audio data are described in the following way:

44100HZ 16bit stereo: 每秒钟有 44100 次采样, 采样数据用 16 位(2 字节)记录, 双声道(立体声)
22050HZ 8bit  mono: 每秒钟有 22050 次采样, 采样数据用 8 位(1 字节)记录, 单声道
48000HZ 32bit 51ch: 每秒钟有 48000 次采样, 采样数据用 32 位(4 字节浮点型)记录, 5.1 声道

44100Hz 指的是采样率,它的意思是每秒取样 44100 次。采样率越大,存储数字音频所占的空间就越大。

16bit 指的是采样精度,意思是原始模拟信号被采样后,每一个采样点在计算机中用 16 位(两个字节)来表示。采样精度越高越能精细地表示模拟信号的差异。

Stereo 指的是声道数,也即采样时用到的麦克风的数量,麦克风越多就越能还原真实的采样环境(当然麦克风的放置位置也是有规定的)。

3. PCM文件格式简介

 PCM文件:模拟音频信号经模数转换(A/D变换)直接形成的二进制序列,该文件没有附加的文件头和文件结束标志。Windows的Convert工具可以把PCM音频格式的文件转换成Microsoft的WAV格式的文件。    

 将音频数字化,其实就是将声音数字化。最常见的方式是透过脉冲编码调制PCM(Pulse Code Modulation) 。运作原理如下:首先我们考虑声音经过麦克风,转换成一连串电压变化的信号,如下图所示。这张图的横座标为秒,纵座标为电压大小。要将这样的信号转为 PCM 格式的方法,是使用三个参数来表示声音,它们是:声道数、采样位数和采样频率。

What file is pcm

  • 采样频率:即取样频率,指每秒钟取得声音样本的次数。采样频率越高,声音的质量也就越好,声音的还原也就越真实,但同时它占的资源比较多。由于人耳的分辨率很有限,太高的频率并不能分辨出来。在16位声卡中有22KHz、44KHz等几级,其中,22KHz相当于普通FM广播的音质,44KHz已相当于CD音质了,目前的常用采样频率都不超过48KHz。 

  • 采样位数:即采样值或取样值(就是将采样样本幅度量化)。它是用来衡量声音波动变化的一个参数,也可以说是声卡的分辨率。它的数值越大,分辨率也就越高,所发出声音的能力越强。

  • 声道数:很好理解,有单声道和立体声之分,单声道的声音只能使用一个喇叭发声(有的也处理成两个喇叭输出同一个声道的声音),立体声的PCM 可以使两个喇叭都发声(一般左右声道有分工) ,更能感受到空间效果。 

下面再用图解来看看采样位数和采样频率的概念。让我们来看看这几幅图。图中的黑色曲线表示的是PCM 文件录制的自然界的声波,红色曲线表示的是PCM 文件输出的声波,横坐标便是采样频率;纵坐标便是采样位数。这几幅图中的格子从左到右,逐渐加密,先是加大横坐标的密度,然后加大纵坐标的密度。显然,当横坐标的单位越小即两个采样时刻的间隔越小,则越有利于保持原始声音的真实情况,换句话说,采样的频率越大则音质越有保证;同理,当纵坐标的单位越小则越有利于音质的提高,即采样的位数越大越好。

What file is pcm

在计算机中采样位数一般有8位和16位之分,但有一点请大家注意,8位不是说把纵坐标分成8份,而是分成2的8次方即256份; 同理16位是把纵坐标分成2的16次方65536份; 而采样频率一般有11025HZ(11KHz),22050HZ(22KHz)、44100Hz(44KHz)三种。

What file is pcm

那么,现在我们就可以得到PCM文件所占容量的公式:存储量 = (采样频率*采样位数*声道)*时间/8(单位:字节数).

 例如,数字激光唱盘(CD-DA,红皮书标准)的标准采样频率为44.lkHz,采样数位为16位,立体声(2声道),可以几乎无失真地播出频率高达22kHz的声音,这也是人类所能听到的最高频率声音。激光唱盘一分钟音乐需要的存储量为:     

(44.1*1000*l6*2)*60/8=10,584,000(字节)=10.584MBytes

这个数值就是PCM声音文件在硬盘中所占磁盘空间的存储量。

 计算机音频文件的格式决定了其声音的品质,日常生活中电话、收音机等均为模拟音频信号,即不存在采样频率和采样位数的概念,我们可以这样比较一下:

  • 44KHz,16BIT的声音称作:CD音质;

  • 22KHz、16Bit的声音效果近似于立体声(FM Stereo)广播,称作:广播音质;

  • 11kHz、8Bit的声音,称作:电话音质。 

微软的WAV文件就是PCM编码的一种。

Extended Knowledge: Other File Types Related to PCM Files

##.SMIAppleDisk Image FileSelf-Mounting Disk Image.AC3Various DevelopersAudio FileAudio Codec 3 File.DVRoxioVideo FileDigital Video File.YUVWinXMedia SoftwareVideo FileYUV Video File.MJP2Open SourceVideo FileMotion JPEG 2000 Video.MP4VMoving Picture Experts GroupVideo FileMPEG-4 Video File.MP4Moving Picture Experts GroupVideo FileMPEG-4 Video File##.IVF.IFV.3GPPFor more related knowledge, please visit
Extension File Types Developer File Category File Type Description
Intel Corporation Video File Indeo Video Format File
Intel Corporation Video File Indeo Video Format File
Various Developers Video File 3GPP Media File
FAQ

column!

The above is the detailed content of What file is pcm. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn