Psychoacoustics in mp3 compression


Free Download Mp4Gain
picture

Psychoacoustics is the science that deals with perceived sound rather than physical sound. In addition to its interest in pure research in the field of perception physiology and psychology, this science is especially relevant in our time where reproduction, transmission and manipulation of sounds by electronic means has become a reality. that permeate ever larger parts of our lives.

How mp3 filesd works, masking

You have to realize that audio information is extremely cumbersome. Let’s try to get an idea with an example:

Examples of how much space some information holds on the hard drive:

-A large book of 5 million characters (about the size of the Bible) in ASCII format (1 byte per character, only in text format) takes 5,000,000 bytes (about 4.8 MB)

-Great color photography, let’s say 1280×1024 pixel resolution of 16 million colors (ie 24 bits per pixel) pcupa 3932160 bytes (about 3.75 MB)

-1 minute of music In order not to suppress any audible sound, we need to test at 44.1 kHz, in stereo and with a dynamic range of at least 16 bits per minute. Sample. It has 10584000 bytes (about 10 MB)

That is, a minute of normal quality music occupies about twice the hard disk space than the Bible occupies!

mp3 masking

Of course, it is possible to compress information by losing quality, and that is exactly what happens in most cases. Here is a table with the specific guide quality parameters for some audio media. Note especially the case of the phone whose bandwidth is sufficient to transmit voice with reasonable intelligibility but completely insufficient for music transfer.

In fact, the voice remains understandable, although distorted if the range of the spectrum into which the formants fall, which is within 5 kHz, is retained.

Therefore, it is seen that it is important to develop coding techniques that allow the information to be compressed, reducing the space it occupies, but without losing the sound quality. Compression algorithms like ZIP are extremely effective at compressing text files, and they are lossless algorithms: the original file can be completely restored by inverting the algorithm. However, the zipper does not work well on audio files.

At this point, psychoacoustics intervenes.

The idea is basically that if we can identify in the audio signal the least notable components, we can simply remove them from the signal, reducing the size of the corresponding file without the signal apparently losing quality. Thus, the popular MP3 format was born.

But be careful: you have noticed that the algorithm explicitly foresees that the compressed signal will lose information this time. Once the irrelevant psychoacoustic components have been identified and removed, they disappear from the file and there is no way to recover them. This explains why it is not advisable to use MP3 compression twice in a row, or to unpack and compress again, that is why a level 6 compression does not match two level 3 compression. In this connection, however, it should be remembered that there are also lossless audio compression formats such as FLAC. However, they achieve lower compression rates than MP3.

Psychoacoustics, through the concept of critical tapes, allows us to understand and utilize in our favor the principal responsible for the excellent compression efficiency of MP3: masking.

masking

On many sides of the wave physics section, we have emphasized the importance of the superposition principle and applied it to case studies. We insist that this is a very useful working hypothesis, a very important approach, both because it fits very well in many experimental situations and because its application opens the door to a wide range of results and capital mathematics techniques. significance for all physics and especially for wave physics.

In the case of sounds, we could summarize the principle as follows:

At a point in space where two simultaneous sounds arrive, the resulting sound is given by the (algebraic) sum of the two event sounds.
The principle is very intuitive, at least for not too intense sounds, because we know that the sound is nothing more than a small pressure variation, and it is therefore natural that two simultaneous pressure variations at one point determine a pressure variation given by the sum of thaw.
The beauty of the superposition principle is that it can also be used “backwards”: given a sound, it can be broken down to the sum of several elemental sounds. For example, Fourier analysis makes great use of this property.

In a way, our ear performs an analysis of the spectrum of the sounds it receives (the mechanism is illustrated in the physiology of the auditory system. Therefore, we may ask ourselves:

Given a sound that is the sum of the sounds of two components, will our ears always know how to break it down and discern its components?
The answer is negative in many cases. E.g:

-When two simultaneous sounds have very similar tones (see rhythms).
– when one of the two sounds is much louder than the other (simultaneous masking).
-When a very loud sound precedes a weaker sound (temporary forward masking)
-When a very loud sound follows a slightly weaker sound (temporary masking backwards)

In all these cases, there is a form of masking. The ear due to its structure cannot break down the general sound received into its physical components and perceives only one (as in cases 2, 3 and 4) or perceives a sound with completely different properties (as in the case of heartbeat). The origin of the phenomenon is explained by studying the physiology of the auditory system, and in particular through the concept of critical ties. Below we give more examples.

Simultaneous masking

Ordinary experience tells us that it is more difficult to hear sound clearly in the presence of background noise. This data is evident from daily experience, but if you think about it, they constitute an obvious violation of the superposition principle, that is, evidence that the principle does not apply to perceived sounds.

Here are two examples: First, a stronger pure sound masks a weaker sound included in the same critical band (between 400 and 510 Hz). In the second, white noise is much more effective at protecting pure sound. In fact, masking is achieved even if white noise is filtered so as not to contain spectral components in the same critical band of pure sound.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Author: R. Arias

R. Arias is the author of this article and has extensive experience for more than 30 years as a recording engineer and audio specialist, as well as more than 20 years of experience creating algorithms related to audio and video. Linkedin