From analog to digital and vice versa


Free Download Mp4Gain
picture

From analog to digital and vice versa

Analog-to-digital

Today, almost 99% of sound recording, sound reproduction studio equipment, and music synthesizers are digital devices.

Everyone knows that even a typical home CD player uses a digital-to-analog converter and that music on CDs is written in 16-bit numbers. However, both the original sound and musical material (voice, classical musical instruments, electric guitars, etc.) and the sound output of your music center are analog signals, not digital signals. Therefore, for today’s recording industry, the key is to convert analog signals to digital and convert digital data to analog audio signals. Let’s try to find out how these transformations take place. The analog signal represents is a continuous process in time and amplitude, and its digital representation is a sequence or series of numbers that consists of a finite number of bits. The conversion of an analog signal to digital consists of two stages: time sampling and amplitude quantization. Time sampling means that the signal is represented by a series of its samples taken at regular intervals. For example, when we say that the sample rate is 44.1 kHz, it means that the signal is measured 44100 times per second. The main problem in the first stage of converting an analog to digital signal (digitization) is choosing the sampling frequency of the analog process. The answer is given by the well-known Nyquist theorem, which states that for an analog signal (continuous in time) occupying the frequency range 0 Hz to F Hz to be reconstructed with absolute precision from its samples, the frequency of The sample rate must be at least twice the maximum audio frequency F. Therefore, if the actual analog signal that we are going to convert to digital format contains frequency components from 0 Hz to 20 kHz, then the sampling frequency of that signal it should not be less than 40 kHz. Let’s take a closer look at what happens to an analog signal and its spectrum when sampled.

During sampling, the frequency spectrum changes significantly. The original analog signal tends to have a spectrum mainly concentrated in the frequency band from 20 Hz to about 20 kHz, since the usual pickups and microphones from which it is taken have about this frequency response. In addition, the signal often contains interference with frequencies of up to several hundred kilohertz. These are various “vans” difficult to remove from computer equipment, industrial and electrical appliances, trams, trolleybuses, etc. After sampling, the signal is a sequential time series of very narrow pulses with different amplitudes and with a very wide spectrum of up to several megahertz (a mathematical fact: the narrower the pulse, the broader its spectrum). Therefore, in general, the spectrum of such a pulse sequence expands to the same several megahertz. Therefore, the spectrum of the sampled signal is much broader than the spectrum of the original analog signal. Let’s take a closer look at how this new broad spectrum is set up. There are two important processes. First, the “convolution” of the entire original spectrum of the analog signal extending from approximately 20 Hz to several hundred kilohertz within the frequency band from 0 Hz to half the sampling frequency.

Convolution means that all components of the original analog signal, with frequencies above half the sample rate (and this is mostly inaudible noise)) fall in the frequency range audible to the human ear from 20 Hz to ” Average sampling frequency “Hz, ie Inaudible interference becomes audible and therefore the signal-to-noise ratio may deteriorate. All of this seems very unusual, not to say that it even contradicts common sense! It turns out that there is a sampling of high-frequency signals with frequency components that are significantly higher than not just half the sample rate, but also the sample rate itself. At first glance, this even contradicts the Nyquist theorem mentioned above. But let’s look at Fig. 4. It shows the process of sampling a high-frequency sinusoidal signal at more than two times less than its sampling frequency.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

How is analog audio converted to digital?

How is analog audio converted to digital?

Analog-to-Digital

Sound is a complex analog signal. To analyze such signals a technique widely used in electronics is used. Using the Fourier transform, a complex signal is converted into a harmonic series, consisting of sinusoids with different frequencies and amplitudes. But in practice the signal we are dealing with is of course very different from the sinusoidal one.

Analog to Digital

Musicians call the first harmonic in this spectrum the fundamental tone, and harmonics with higher frequencies are called harmonics. The main tone determines the pitch and the harmonics give it a certain color, creating the timbre of a voice or musical instrument.

To study the spectra of audio signals, complex and expensive instruments are used – spectrum analyzers.

With the help of such devices, it can be established that some musical instruments, such as a violin, have a relatively uniform spectrum and some wind spectra with pronounced maxima and minima, called formants.

There are no terms that directly describe the coloration of the timbre of a human voice or musical instruments, so it is necessary to resort to various metaphors such as “deep timbre”, “hard timbre”, “metallic” sound or even “transistor”.

Digital information processing methods were attempted many times in connection with sound recording, but the first serious results were achieved in the early 1980s, coinciding with the rapid development of computers and the success of the microminiaturization of radio components. The use of digital sound processing techniques has opened up exciting new possibilities.

To process sound on a computer, it must first be converted to a digital, encoded format. An analog signal is encoded by devices called analog-to-digital converters (ADCs). The main method of encoding an analog signal is pulse code modulation, which consists of three operations: sampling, quantizing, and encoding.

We will not go into coding theory now, especially since it is quite complex and requires higher math skills. It is important for us to understand that the quality of the digitized sound and the resulting file size depend on the sample rate and bit depth.

The sample rate is the frequency at which the characteristics of an audio signal are measured. It follows from Kotelnikov’s sampling theorem that to obtain an undistorted digital signal, the sampling frequency must be at least twice the highest frequency of the encoded signal. Therefore, when encoding an audio signal, the sample rate must be at least 40 kHz. In digital communication systems, the sampling frequency is 32 kHz, in laser CD players and consumer digital tape recorders – 44.1 kHz. In digital studio equipment, the sample rate is even higher: 48 kHz.

The bit depth of the recorded sound is the number of memory bits that are allocated to record each value of the amplitude of the sound signal at the time of its measurement. Modern sound cards use 8 or 16 bits of memory per dimension, and higher quality 32-bit cards are available. The higher the bit depth, the higher the quality of the digitized sound.

As already mentioned, the size of an audio file depends on the sample rate and bit depth of the sound. So with a sample rate of 44 kHz and a sound depth of 16 bits, one minute of sound requires a file size of 5.3 MB and with a sample rate of 11 kHz and 8 bits, 660 Kb.

It is clear that such a waste of disk space turned out to be unacceptable, and special algorithms and formats were created for cheaper storage of audio files.

When comparing different compression formats, the parameter “sound quality at a certain bit rate” is often used.

Bit rate is a parameter that indicates how much disk space is used to store 1 second of music. For example, a bit rate of 128 Kbps means that a three-minute song will occupy about 2.8 MB.

In principle, all programs for encoding audio (also called encoders) use algorithms of two types: for lossless audio compression and for lossy compression.

Lossless compression algorithms, in fact, are well-known archivers for PC users, specially modified to work with an audio stream. When playing sound on the fly, the archive is decompressed from the archive.