Digital audio encoding


Free Download Mp4Gain
picture

Digital audio encoding

Digital audio encoding

PC-based audio coding is based on the process of converting air vibrations into electrical current fluctuations and the subsequent sampling of an analog electrical signal.

DIGITAL AUDIO ENCODING

The encoding and reproduction of audio information is carried out using special programs. The quality of reproduction of the encoded sound depends on the sampling frequency and its resolution (sound encoding depth – the number of levels).

Digital audio is an analog audio signal represented by discrete numerical values ​​of its amplitude.

Sound digitization is a technology with a divided time step and subsequent recording of the values ​​obtained in numerical form. Another name for digitizing audio is analog to digital audio conversion, which includes the following operations:

Bandwidth limiting is done by using a low pass filter to suppress spectral components that are more than half the sample rate.

Time sampling, that is, replacing a continuous analog signal with a sequence of its values ​​at discrete moments of time: samples.

Level quantization is the replacement of the signal’s reference value with the closest value of a set of fixed values: quantization levels.

Encoding or digitization, as a result of which the value of each quantized sample is represented as a number corresponding to the ordinal number of the quantization level.

This is done as follows: a continuous analog signal is “cut” into sections with a sample rate, a discrete digital signal is obtained, which goes through the quantization process with a certain bit depth, and is then encoded, that is, it is replaced by a sequence of code symbols. To record sound in a 20-20,000 Hz frequency band, a sampling frequency of 44.1 and higher is required (today there are ADCs and DACs with a sampling frequency of 192 and even 384 kHz). To obtain a high-quality recording, 16-bit is sufficient, however, to expand the dynamic range and improve the quality of the sound recording, 24 (less often 32) bits are used.

Sound coding methods (of course an electrical signal coming from a microphone) are based on the fact that, theoretically, any complex sound can be decomposed into a sequence of simpler harmonic signals of different frequencies, each of which it is a sinusoid, called the spectrum of the original signal. The task of encoding sound, like any other analog signal, is to represent it in the form of another analog or digital signal, which is more convenient for its transmission or storage in each specific case. Real sound sources have a limited spectrum width, therefore, for encoding, transformation methods are used that transform the original signal into one, the spectrum of which is more suitable for transmission on the selected channel. Representing an analog signal as another analog signal is commonly referred to as modulation and digitally as encoding. This division is very arbitrary. An analog signal can be represented as a harmonic signal (that is, a sinusoid), the parameters of which change depending on the value of the original signal. In the event that the amplitude of the sinusoid changes with a change in the original signal, it is amplitude modulation (AM). If, depending on the value of the original signal, the frequency or phase of the sinusoid changes, we are dealing with frequency modulation (FM) or phase modulation (PM). Amplitude and frequency modulation, for example, is widely used to transmit sound by radio. These types of modulation, of course, are not the decomposition of the original signal into harmonics. The development of digital technology and the use of computer processing and information storage has led to the widespread use of pulse encoding or modulation methods. Such types of modulation are, for example, pulse code modulation, in which the value of the original signal at regular intervals is represented in code form. The vast majority of “computer sound” is precisely the recording of the binary code of the received signal in short equal time intervals, determined by the sampling frequency. For storage and transmission through communication channels, this signal is usually compressed (reducing the volume by discarding unnecessary or insignificant information). In addition to pulse code modulation, other types of digital modulation (pulse width, pulse frequency, etc.) are also used to encode sound.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Audio encoding.

Audio encoding.

AUDIO ENCODING

Digital audio is an analog audio signal represented by discrete numerical values ​​of its amplitude.

audio encodig

Sound digitization is a technology with a divided time step and subsequent recording of the values ​​obtained in numerical form.

Another name for digitizing audio is analog to digital audio conversion.

Sound digitization involves two processes:

sample (sample) a signal over time
amplitude quantification process.
Meanwhile, there is no need to worry about it. ”

Discretization of time.

Meanwhile, there is no need to worry about it. ”

The time sampling process is the process of obtaining the values ​​of the signal that is being converted, with a certain time step: the sampling step. The number of measurements of the magnitude of the signal, carried out in one second, is called the sampling frequency or the sampling rate, or sampling frequency (from the English “sampling” – “sampling”). The lower the sampling step, the higher the sampling frequency and the more accurate representation of the signal that we will obtain.

This is confirmed by Kotelnikov’s theorem (in foreign literature it is found as Shannon’s theorem, Shannon). According to him, an analog signal with a limited spectrum can be accurately described by a discrete sequence of values ​​of its amplitude, if these values ​​are taken with a frequency that is at least twice the highest frequency in the spectrum of the signal. That is, an analog signal in which the highest spectrum frequency is F m can be accurately represented by a sequence of discrete amplitude values ​​if F d> 2F m is satisfied for the sampling frequency F d.

In practice, this means that for the digitized signal to contain information on the full audible frequency range of the original analog signal (0 – 20 kHz), it is necessary that the selected sample rate be at least 40 kHz. The number of amplitude measurements per second is called the sampling rate (if the sampling step is constant).

The main difficulty of digitization is the inability to record the measured signal values ​​with perfect precision.

Analog to digital converters (ADC).

Meanwhile, there is no need to worry about it. ”

The above process of digitizing sound is done using analog-to-digital converters (ADCs).

This transformation includes the following operations:

Bandwidth limiting is done by a low pass filter to suppress spectral components that are more than half the sample rate.
Discretization in time, that is, substitution of a continuous analog signal with a sequence of its values ​​at discrete moments in time: samples. This problem is solved by using a special circuit at the input of the ADC – a sample and hold device.
Level quantization is the replacement of the signal’s reference value with the closest value of a set of fixed values: quantization levels.
Encoding or digitization, as a result of which the value of each quantized sample is represented as a number corresponding to the ordinal number of the quantization level.
This is done as follows: a continuous analog signal is “cut” into sections with a sample rate, a discrete digital signal is obtained, which goes through a quantization process with a certain bit depth, and is then encoded, that is, it is replaced by a sequence of code symbols. To record sound in a frequency band of 20-20,000 Hz, a sampling frequency of 44.1 and higher is required (today there are ADCs and DACs with a sampling frequency of 192 and even 384 kHz). To obtain a high-quality recording, 16 bits are sufficient, however, to expand the dynamic range and improve the quality of sound recording, 24 (less often 32) bits are used.

Meanwhile, there is no need to worry about it. ”

Encoding methods.

Frequency modulation.

Sound coding methods (of course we mean the electrical signal coming from the microphone) are based on the fact that, in theory, any complex sound can be broken down into a sequence of the simplest harmonic signals of different frequencies, each one of which is a sinusoid, called the original signal spectrum. The task of encoding sound, like any other analog signal, is to represent it in the form of another analog or digital signal, more convenient for its transmission or storage in each specific case.

Audio encoding and processing.

Audio encoding and processing.

MP3 audio encoding process

Parameters that affect digital sound quality Minimum and maximum sound quality.

Audio encoding and processing

My grandfather was listening to a gramophone. My father’s youth turned to music coming from the speaker of a reel-to-reel tape recorder. The heyday and decline of cassette recorders fell upon my youth. My son is growing up in the age of digital audio. To keep up to date and give my son a good “sound”, I decided to find out what determines the quality of the digital audio signal reproduction.

I talked to my music loving friends. He did an information search on the Internet. As a result, I came to the conclusion that high-quality sound can be achieved in the digital age by choosing the right 7 basic elements of modern music centers:

the format in which the music is recorded;
player;
digital to analog converter;
amplifier;
acoustics;
cables;
food.

Below I will share my observations and conclusions on achieving high quality sound recordings in digital formats.

Lyrical digression, experts don’t need to read.

In a nutshell, I will explain where digital sound comes from. During the recording process, the microphone converts mechanical vibrations (the sound itself) into an analog electrical signal. An analog signal is, in the most general case, similar to a sinusoid that has been familiar to all of us since high school. In the age of analog sound, it was this signal that was recorded on various media and then played back.

With the development of microprocessor technology, it became possible to record and store audio information in digital formats. These formats are obtained through an analog-to-digital conversion (ADC) process.

During the ADC, the analog signal (our high school sine wave) becomes a discrete one (in other words, it is cut into pieces). In the next stage, the discrete signal is quantized, that is, each resulting segment of the sinusoid is assigned a digital value. In the third step, the quantized signal is digitized, ie encoded in the form of a sequence of 0 and 1. With respect to digital sound recording, the information about the amplitude and frequency of the sound is digitized.

To record and store digital audio information, digital audio formats are used. The audio format is understood as a set of requirements for the digital representation of audio data.

When it comes to sound quality, digital formats are divided into 3 categories:

Formats without additional compression (CDDA, DSD, WAV, AIFF, etc.);
Lossless compressed formats (FLAC, WavPack, ADX, etc.);
Lossy compression formats (MP3, AAC, RealAudio, etc.).

High-quality sound is obtained when playing music saved in formats of the first and second category. In the formats of the third category, to reduce the amount of data, part of the information is deliberately excluded. For example, information about hidden frequencies.

Latent frequencies are those that are outside the range of perception of the average person: 20 Hz – 22 kHz. For audiophiles, this range is wider due to individual psychophysiological characteristics.

To complete your home audio library, you must select records saved in files with the following extensions:

* .wav, * .dff, * .dsf, * .aif, * .aiff are uncompressed sound files;
* .mp4, * .flac, * .ape, * .wma are the most common lossless compressed audio files.
From history. They say that the first experiments on the preservation of sound were carried out by the ancient Greeks. They tried to keep the sound in amphorae. It looked something like this: words were spoken into the amphora and it was quickly sealed. Unfortunately, none of those records have survived to this day.

Digital Audio – Quality Issues

Digital Audio – Quality Issues

Digital Audio Quality

Relatively recently, the concept of “multimedia” was included in our discourse, and now the computer is increasingly used as an entertainment center. Now the computer is forced to reproduce the sound that exists in it in the form of numbers.

Digital Audio Quality issues

Just as some connoisseurs of sound argue about the advantages of “tube” sound over “transistor” sound, there is an endless debate about which is better: digital or analog sound. Let’s try to figure it out.

For our ears, sound is air vibrations with a frequency of 20 Hz to 20 kHz, and the upper limit depends on age: in children it is 22-24 kHz, and in old age the perceived frequency decreases, up to 8 -12 kHz.

The frequencies of the indicated limits are perceived as vibrations, higher, they are not perceived by a person.

However, not all the detection bandwidth is used with the same intensity, so speech is clearly perceived in the range of 500 to 3500 Hz. But for listening to music, this is not enough. Ideally, the reproduced sound should not differ from the sound field of the microphone. That is, the recording and playback equipment must not introduce distortions within the limits of human perception.

The sound we hear from the speaker is electromechanically converted to an electrical signal during recording; then there is the amplification and processing of the analog electrical signal; analog to digital conversion; digital signal processing; frequency correction; recording procedure.

After the digitized sound is stored and transmitted. During playback, digital signal processing occurs first; follows the conversion from digital to analog; analog signal processing and amplification; electromechanical conversion to sound vibrations.

All of these procedures introduce their own distortions. The process of recording and sound processing takes place, as a rule, on studio equipment, which performs much better than home audio equipment. Therefore, although there are distortions, they are significantly less than the distortions introduced by home equipment at the playback stage. With amateur sound recording, errors appear in the recording stages.

The electromechanical conversion produced by the studio microphone produces a very weak signal that needs amplification.

Even in the ideal conditions of a professional recording studio, due to acoustic noise, the dynamic range of recorded music can be narrower than that provided by 16-bit audio.

When recording from multiple microphones, the signal is necessarily processed: channel volume levels are selected, noise is filtered, etc. Furthermore, the dynamic range of the signal is reduced, which leads to a significant increase in noise. But without this procedure, it would sound unsatisfactory when playing back the recording on a home computer.

The sound path has its own distortions, which can be divided into three groups:

1. Linear distortions are caused by the amplitude-frequency characteristic of the sound path and are a change in the ratio of the amplitudes and phases of various frequency components. Frequencies that were originally missing from the signal do not appear.

2. Non-linear distortion: a change in the shape of the original signal, which leads to the appearance of frequencies that are absent in the incoming signal, but depend on it.

3. Interference: the appearance of strange frequencies in the sound path that are not associated with the useful signal. Interference appears, for example, by electromagnetic interference, penetration into the sound path of the frequency of the supply voltage, etc.

However, all these distortions occur only in analog circuits (hence speculation about the frequency response of a digital output makes specialists smile). But don’t forget about the superficial defects of CDs, DVDs, and other optical storage media that store sound, leading to data loss.

The digitization of the signal is also associated with a lot of distortion, but first let’s look at the difference between analog and digital signals.

In an analog signal, the voltage changes smoothly over time, the signal is continuous. The digital signal is discrete, its value changes instantly. Furthermore, discretion is manifested in both frequency and amplitude region. Any change in signal value is sampled, and as a result, the values ​​are rounded to the nearest whole number.

Audio encoding: secrets revealed

Audio encoding: secrets revealed

audio encoding

Audio settings for video capture and transmission.
As people directly related to the AV sphere, we constantly talk about audio coding and audio codecs, but what is it?

Audio Encoding

An audio codec is essentially a device or algorithm that can encode and decode a digital audio signal.

In practice, the audio waves that are transmitted over the air are continuous analog signals. The signals are converted to digital format by a device called an analog-to-digital converter (ADC), and the reverse conversion device is called a digital-to-analog converter (DAC). The codec is located between these two functions and it is it that allows you to adjust some important parameters for the successful capture, recording and transmission of an audio signal: codec algorithm, sample rate, bit depth and data transfer rate.

The three most popular audio codecs are Pulse-Code Modulation (PCM), MP3, and Advanced Audio Coding (AAC). The choice of codec determines the compression rate and the recording quality. PCM is a codec used by computers, CDs, digital phones, and sometimes SACD. The source of the PCM signal is sampled at regular intervals, and each sample is the digital magnitude of the analog signal. PCM is the simplest option for digitizing an analog signal.

With the correct parameters, this digitized signal can be completely converted back to analog without any loss. Unfortunately, this codec, which provides almost complete identity with the original audio, is not very cheap, which results in large files, and these files are not suitable for streaming. We recommend using PCM to record digital images for your sources or when doing audio post-processing.

Fortunately, we always have the option of choosing a different codec that can compress digital data (compared to PCM) based on some helpful observations on the behavior of sound waves. But in this case, you have to make a compromise: all alternative algorithms are associated with “losses”, since it is impossible to completely restore the original signal, but nevertheless the result is so good that most users will not be able to notice the difference.

MP3 is an audio encoding format that uses a digital data compression algorithm that allows you to save the audio signal in smaller files. The MP3 codec is the most used by users to record and store music files. We recommend using MP3 to stream audio content as it requires less network bandwidth.

AAC is a newer audio encoding algorithm that is the successor to MP3. AAC has become the standard for MPEG-2 and MPEG-4 formats. In fact, this is also a digital data compression codec, but with less quality loss than MP3, when encoded with the same bit rate. We recommend using this codec for online streaming.

Sampling frequency (kHz, kHz)
Sample rate (or sample rate): the frequency with which the signal is digitized, stored, processed, or converted from analog to digital. Time sampling means that the signal is represented by a number of its samples (samples) taken at regular intervals.

Measured in hertz (Hz, Hz) or kilohertz (kHz, kHz,) 1 kHz equals 1000 Hz. For example, 44100 samples per second can be labeled 44100 Hz or 44.1 kHz. The selected sample rate will determine the maximum playback frequency and, as follows from Kotelnikov’s theorem, to fully restore the original signal, the sample rate must be twice the highest frequency in the signal spectrum.

As you know, the human ear can pick up frequencies between 20 Hz and 20 kHz. Given these parameters and the values ​​shown in the table below, you can understand why 44.1 kHz was chosen as the sampling frequency for CD and is still considered a very good frequency for recording.