Audio digitization: how it works


Free Download Mp4Gain
picture

Audio digitization: how it works

Audio digitization

 

How to translate sound into 0s and 1s without soul? . Let’s take a look at familiar devices: how computer sound, video, MP3s, streaming and streaming work, various algorithms, and more.

Audio digitalization

 

a bit of physics
Sounds are vibrations in the air. Like waves in the water, in the air. Air pressure enters the ear, which has sensitive parts that can subtly sense vibrations in the air. These vibrations are perceived by people as sounds. There is no sound in outer space because there is no air.

frequency. The faster the vibration, the weaker the sound we perceive. A person perceives vibrations that range between 20 and 20,000 vibrations per second. In other words, this is called the oscillation frequency: Hertz. That is, the range we hear is from 20 Hz to 20 kHz.

By comparison, dogs hear frequencies from 40 Hz to 60 kHz, so humans don’t perceive a dog’s whistle, but dogs can hear it. The sound of a dog whistle is only in the 23-54 kHz range.

amplitude. The stronger the vibration, the stronger the sound and vice versa. You can think of this as the height of the waves on the surface of the pond: there may be small ripples (soft sounds) or there may be large powerful waves.
Divide the sound into segments.

 

 

Now let’s do this: We divide the second part into 4 parts and find the magnitude value for each part:

 

We measure the state of the quadratic wave in one second. This is called sampling.

We measured the magnitude of each of the four points and, in relative terms, we got four numbers: +30, -50, -50 and -60. In theory, if we were to pass current and apply these four voltages to the speaker, we would be able to reproduce the same sound. But there are several problems:

• Since we only measure in four places, all oscillation is lost.
• We ended up with a very distorted sound compared to the original.

Sampling at a rate of 4 is too little for the sound. To get at least intelligible speech, one second must be divided into 8,000 segments, and for music, 41,000 segments are usually sufficient.

Let’s increase the sample rate: cut the sound into smaller parts in the same unit of time:

 

Measurements are now more accurate and the resulting sound is more natural.

convert to number
After dividing the sound into small segments and measuring the amplitude value of each segment, we can record it in table form:

Time ⠀⠀⠀⠀⠀ Amplitude

0.01 seconds. ⠀⠀⠀⠀ 5

0.02 seconds. ⠀⠀⠀⠀ 7

0.03 seconds. ⠀⠀⠀⠀ 10

If we divide the whole sound into equal segments, then the time cannot be written, since we know how it changes, it is enough to write the amplitude value on a line:

5 7 10 … −21


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

The digitization of sound

With the diffusion of “liquid music”, knowing the processes and characteristics that characterize the transformation of sound into digital form is crucial to evaluate the formats and characteristics of audio files. In particular, when this transformation process is combined with compression and signal loss as occurs in almost all compressed formats.

digitization

… A determining factor in the fidelity of a signal is the limitation of the frequency band that it is capable of reproducing; for example, low frequencies are a problem for microphones and speakers, while high frequencies are a problem for analog circuits that set a limit on the highest frequency that can pass through them. A partial solution to these problems can be obtained by means of the numerical transformation, that is to say digital, of the waveforms that make up a sound signal.

Digitization
This does not increase the limits imposed by the reduced bandwidth determined by current transducer technology, but allows, within certain limits, the reconstruction of a clean digital signal from a deteriorated one, thus canceling aging, and above all it allows Use it countless times without increasing the noise level. But the greatest guarantee that a digital signal gives is to be able to make as many copies of it as you want and operate on it during the editing, filtering and modification phases with absolute precision without loss of quality.
So let’s look at … what happens inside a sampler. Also in this case the sound wave is received by a microphone that transduces it into an electrical signal that is sent to a low pass filter (LPF1); later it is sampled by an S&H circuit (Sample & Hold) and sent to the analog / digital converter (ADC) that transforms it into numerical values, that is, it digitizes it; a microprocessor (CPU) is responsible for storing it in memory (RAM).
During playback, the microprocessor reads the data resident in memory and sends it to a digital / analog converter (DAC) and later to a closing circuit (Sample & Hold); finally they reach a low pass filter (LPF2) and then a speaker. A digital signal is always discrete and not continuous, that is, it cannot assume the entire range of values ​​between a minimum and a maximum, values ​​that instead always identify two steps, that is, they jump without continuity between two points in space.
The activity carried out in this system is marked by a kind of internal clock (clock), which determines at what moments the system changes state, that is, at what time an event occurs that therefore cannot be in no time like common analog systems but only those dictated by the clock.
Therefore, the signal transformed into numeric cannot continuously assume all possible values, but only those that the system is capable of encoding. We will now examine again, but in more detail, the path made by the signal within a digital system. The analog signal from the microphone reaches the low pass filter (LPF1) which is used to remove all frequencies from the signal itself that are too high for the system at your disposal. Shannon’s theorem guarantees that in the sampling operation there is no loss of information if the sampling frequency Fc is at least twice the highest frequency present in the signal to be sampled.
It can also be said that the sampling frequency must be one octave higher than the highest frequency to be sampled, a frequency that does not refer to the fundamental (note that is played), but to the highest frequency present in the harmonic spectrum . At this point, the Sample & Hold circuit, in most cases included in the ADC, performs the sampling.
In practice, the system clock makes sure that every 1 / Fc second this circuit takes many pictures, taken at strictly regular intervals, called sampling periods (Tc = 1 / Fc). Of course, the more often the samples are recorded, or the better the higher the sampling frequency Fc, the more faithful the subsequent reproduction of the signal will be (Shannon’s theorem).

ALIASING
If the LPF1 low-pass filter is not placed in front of the S&H circuit, one could run into the phenomenon of aliasing or kinking, that is, the introduction of non-harmonic partials into the sample, generating noise and dissonant ring modulator effects. For example, suppose you have to sample a splash plate and you have chosen Fc = 50 kHz as the sample rate.
With these assumptions theoretically, we will be able to sample all harmonics within 25 kHz.