PCM audio encoding


Free Download Mp4Gain
picture

PCM audio encoding

pcm

Pulse Code Modulation PCM is short for Pulse Code Modulation.

PCM AUDIO ENCODING

Pulse code modulation is one of the encoding methods of digital communication. The main process is to sample the voice, image and other analog signals at regular intervals to discretize them, and at the same time, the sampled value is rounded and quantized according to the hierarchical unit, and the sampled value is represented by a set. of binary codes value.

Principles of speech coding
Anyone with any electronic background knows that the audio signal collected by the sensor is an analog quantity, and what we use in the actual transmission process is a digital quantity. And this involves the process of converting from analog to digital. And the digitization of analog signals must go through three processes, namely sampling, quantization and encoding, to realize the pulse code modulation (PCM, pulse code modulation) technology of voice digitization.

Convert analog signal to digital signal
Sampling
Sampling is the process of extracting sample values ​​from an analog signal at a frequency twice or more of its signal bandwidth and changing it to a discrete sampled signal on the time axis.

Sampling rate (sample): The number of samples per second extracted from a continuous signal to form a discrete signal, expressed in Hertz (Hz).

Example: For example,
the sample rate of the audio signal is 8000 Hz.
It can be understood that the curve of the voltage change with time corresponding to the sampling in the above figure is 1 second, so the following 1 2 3 … 10 must have 1-8000 points, that is, 1 second is divided into 8000 parts, and taken out in turn The voltage value corresponding to the time of 8000 points.

quantizing
Although the sampled signal is a discrete signal on the time axis, it is still an analog signal and its sampled value is within a certain range of values ​​and can have an infinite number of values. Obviously, it is impossible to give a group of digital code to correspond to an infinite number of samples one by one. To express the sample value by a digital code, the “rounding” method must be used to “round up” the sample value by degree, so that the sample value within a certain range of values can be changed from an infinite number of values. to a finite number of values. This process is called quantization.

Compared to the sampled signal before quantization, the quantized sampled signal is, of course, distorted and is no longer an analog signal. This quantization distortion appears as noise when the analog signal is restored at the receiving end and is called quantization noise. The size of the quantization noise depends on how you “round” the sample value.

Sampling bits: refers to the number of bits used to describe the digital signal.
8 bits (8 bits) represent 2 raised to the 8th power = 256, and 16 bits (16 bits) represent 2 raised to the 16th power = 65536; the higher the sampling number, the higher the precision.

The number of samples is indicated here to describe the minimum separation between analog signals.
Assuming our sampling number is 8 and the range of the analog signal is 2, 0, then the minimum interval between digital signals is 2/2^8 = 2/256 = 1/128;
similarly, the sample number is 16, so the minimum interval between digital signals is 2/256/256=1/(128*256)

For example
, the voltage range collected by the audio sensor is 0-3.3V, and the sampling number is 8bit (bit)
, that is, we take 3.3V/ 2^8 = 0.0128 as quantization precision.
We divide 3.3v into 0.0128 as the Y-axis step, as shown in Figure 3, 1 2 … 8 becomes 0 0.0128 0.0256 … 3.3 V. By
For example, the voltage value of a sample point is 1.652V (128 * 0.128 and 129 * 0.128) we round it to 1.65V which corresponds to a quantization level of 128.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Audio Coding Format Part 2

Audio Coding Format Part 2

audio encoding

In 1950, Bell Labs applied for a patent on Differential Pulse Code Modulation (DPCM). In 1973, P. Cummiskey, Nikil S. Jayant, and James L. Flanagan of Bell Labs introduced Adaptive DPCM (ADPCM).

AUDIO ENCODING

Perceptual coding was first used for linear predictive coding (LPC) speech coding compression. The original concept of LPC dates back to the work of Fumitada Itakura (Nagoya University) and Saito Saito (Telegraph and Telephone in Japan) in 1966. In the 1970s, Bishnu S. Atal and Manfred R. Schroeder of Bell Labs developed a form of adaptive predictive coding (APC) called LPC, a perceptual coding algorithm that exploited the masking properties of the human ear, and later in 1980 The Code Excited Linear Prediction (CELP) algorithm appeared in the early 1990s , which achieved remarkable compression rates at the time. Perceptual coding is used by modern audio compression formats like MP3 and AAC.

Discrete Cosine Transform (DCT) by Nasir Ahmed, T. Developed by Natarajan and KR Rao in 1974, provides the basis for the Modified Discrete Cosine Transform (MDCT) used by modern audio compression formats such as MP3 and AAC. TCMD by JP Princen, A. W. Johnson, and AB Bradley in 1987, following earlier work by Princen and Bradley in 1986. MDCT is used by modern audio compression formats such as Dolby Digital, MP3, and Advanced Audio Coding (AAC).

list of lossy formats
general
Audio Coding Standard Basic Compression Algorithm abbreviation introduce Market Share (2019) Refer To
Modified Discrete Cosine Transform (MDCT) Dolby Digital (AC-3) AC3 1991 58%
ATRAC 1992 Unknown Adaptive Transformation Vocoding
MPEG layer 3 MP3 1993 49%
Advanced Audio Coding (MPEG-2/MPEG-4) CAA 1997 88%
Windows Media Audio WMA 1999 unknown
Ogg Vorbis Auger 2000 7%
Celtic Restricted Power Overlay Transformation 2011 does not apply
work work 2012 8%
digital to analog converter digital to analog converter 2015 unknown
Adaptive Differential Pulse Code Modulation (ADPCM) aptX / aptX-HD aptX 1989 unknown
DTS digital cinema system 1990 14%
Master of Quality Certification Quality Management Association 2014 unknown
Subband Coding (SBC) Audio Layer MPEG-1 II MP2 1993 unknown
musepack MPC 1997
talks
Further information: Speech coding
Linear Predictive Coding (LPC)
Adaptive Predictive Coding (APC)
Code Excited Linear Prediction (CELP)
Algebraic Code Excited Linear Prediction (ACELP)
Relaxation Code Excited Linear Prediction (RCELP)
Low latency CELP (LD-CELP)
Adaptive Multitariff (for GSM and 3GPP)
Codec2 (famous for lack of patent restrictions)
Speex (famous for lack of patent restrictions)
Modified Discrete Cosine Transform (MDCT)
AAC-LD
Constrained Energy Superposition Transformation (CELT)
Opus (mainly for real-time applications)

Audio encoding format

Audio encoding format

Audio Encoding

Encoding efficiency comparison of popular audio formats.

audio encoding

An audio coding format (or sometimes an audio compression format) is a content representation format used to store or transmit digital audio, such as in digital television, digital radio, and audio and video files. Examples of audio encoding formats include MP3, AAC, Vorbis, FLAC, and Opus. A specific software or hardware implementation capable of compressing and decompressing audio of a specific audio encoding format is called an audio codec; An example of an audio codec is LAME, which is one of several different codecs that implement audio encoding and decoding in MP3 audio encoding software formatting.

Certain audio encoding formats are defined by detailed technical specification documents known as Audio Encoding Specifications. Some of these specifications are written and approved as technical standards by standards bodies and are therefore called Audio Coding Standards. The term “standard” is also sometimes used for the fact that norms and formal standards.

Audio content encoded in a specific audio encoding format is usually encapsulated in a container format. So instead of raw AAC files, users often have .m4a audio files, which are MPEG-4 Part 14 containers that contain AAC-encoded audio. The container also contains metadata such as titles and other tags, and possibly an index for quick searches. One notable exception is MP3 files, which are raw audio encodings and do not have a container format. The de facto standard for adding metadata tags like title and artist to MP3s as ID3s is a hack that works by adding the tag to the MP3 and then relying on the MP3 player to recognize the snippets as malformed audio encoding, so skip the block. In a video with audio file, the encoded audio content is included with the video (in the video encoded format) within the media container format.

An audio encoding format does not specify all of the algorithms used by the codecs that implement the format. According to psychoacoustic models, an important part of how lossy audio compression works is to remove data in a way that humans cannot hear. The encoder implementer is free to choose which data to remove (depending on their psychoacoustic model).

Lossless audio encoding formats reduce the total data needed to represent the sound, but can decode it back to its original uncompressed form. Lossy audio coding formats also reduce the bit resolution of the sound in addition to compression, resulting in much less data, but at the cost of irrecoverable loss of information.

Consumer audio is often compressed using lossy audio codecs because smaller sizes are easier to distribute. The most widely used audio coding formats are MP3 and Advanced Audio Coding (AAC), both of which are lossy formats based on modified discrete cosine transform (MDCT) and perceptual coding algorithms.

Lossless audio encoding formats like FLAC and Apple Lossless are sometimes available, but at the cost of larger files.

Uncompressed audio formats such as pulse code modulation (PCM or .wav) are also sometimes used. PCM is the standard format for Compact Disc Digital Audio (CDDA), and after the introduction of MP3, lossy compression eventually became the standard.

Digital audio encoding: data reduction

Mp3 encoding

Since the introduction of the compact disc audio (CD) and the advent of digital audio tape (DAT), digital technology has become increasingly popular in the audio industry. Both CD and DAT use pulse code modulation (PCM) as a basic digitizing process. This technology translates the original analog audio signal into the digital world through sampling, quantization, and encoding. Since PCM does not use data reduction, excellent sound quality is achieved, but is purchased at the cost of high memory requirements. In PCM, a CD can contain a maximum of 80 minutes of audio data.

Mp3 Encoding

Why reduce the audio data?

The high memory requirements of PCM, in particular, made direct use of this technology in multimedia or digital radio systems ineffective, time-consuming or impossible. These systems require a radical thinning of the audio signals. The reasons for this are insufficient broadcast transmission capabilities, the limited transfer rate of current bus systems (PCI, IDE, SCSI) and, above all, the still lack of storage space. Not only is there a shortage of hard drive space, but the main memory in today’s PC systems also offers insufficient reserves to allow sensible work with PCM audio data. If you consider that a 6-minute piece of music in PCM requires up to 60 Mbytes of memory (WAV file), it is easy to imagine that streaming this piece, for example over the Internet, is not profitable. not to mention classic works that last several hours. The result would be extremely long download times.

On the other hand, digital technology has unbeatable advantages over analog technology. Very good sound quality, immunity to interference and relatively easy technical manageability were reasons enough for several research institutions to develop more and more methods in recent years that allow to reduce the storage requirements of digital audio signals and, therefore, its use in new areas such as digital broadcasting. The main objective was to maintain sound quality, using the CD as a reference. The result is a whole series of codecs, some of which save a considerable amount of data. At the moment, the MP3 codec, developed by Motion Pictures Expert Group (MPEG), which is widely used on the Internet, is probably the best known, but also MPEG 2, AC-3,

The amount of memory required by a digital audio signal is primarily determined by the bit rate and the sample rate. Both parameters can be adjusted while encoding the signal. The next section examines the effects of changing the sample rate and bit rate when processing signals.

According to Shannon’s sampling theorem, sampling must take place with at least twice the maximum frequency of the function to be discretized. In the audio range, where 20 kHz is the upper limit, at least 40 kHz is required. The CD uses 44.1 kHz to avoid aliasing effects. Sampling can be used to reduce the data. Lowering the sampling rate results in fewer samples that need to be stored. Needless to say, this dramatically reduces the storage requirement. Unfortunately, this tactic has one major drawback. If you reduce the sampling rate, you can easily conflict with the sampling theorem. If you wanted to sample an audio signal with the full frequency range (20Hz – 20kHz) with, for example, only 20kHz, extreme alias distortion would occur. Playing music would be completely impossible. However, sampling is sometimes a way to reduce the data rate. If, for example, only speech intelligibility is desired without high-quality music reproduction, the 20 kHz frequency range is unnecessary. 3 kHz is sufficient as the upper limit frequency. Here the audio signal can be band limited to 3 kHz with the help of a low pass filter and the sample rate can be reduced to a minimum of 6 kHz. One possible use of such low sample rates would be telephone applications, for example. Here, the audio signal can be band limited to 3 kHz