Audio compression


Free Download Mp4Gain
picture

Audio compression

Audio Compression

Well-established data compression methods such as RLE, statistical and dictionary methods can be used to compress lossless audio files, but the result is highly dependent on the specific audio data. Some sounds will compress well with RLE, but poorly with statistical algorithms. Statistical compression is more suitable for other sounds, but with a dictionary approach, on the contrary, expansion can occur. Here is a brief overview of the effectiveness of these three methods for compressing audio files.

Audio Compression

RLE works well with sounds that contain long series of repeating sound chunks – samples. With 8-bit sampling, this can happen quite often. Remember that the voltage difference between two 8-bit samples n and n – 1 is approximately 4 mV. A few seconds of homogeneous music, in which the sound wave changes by less than 4 mV, will generate a sequence of thousands of identical samples. With 16-bit sampling, obviously long repeats are less common and therefore the RLE algorithm will be less efficient.

Statistical methods assign variable length codes to audio samples according to their frequency. With 8-bit sampling, there are only 256 different samples, so the samples can be distributed evenly in a large audio file. A file of this type cannot be compressed well with the Huffman method. With 16-bit sampling, more than 65,000 sound bites are allowed. In this case, some samples may be more common and others less common. With a strong probability skew, good results can be achieved with the help of arithmetic coding.

Dictionary-based methods assume that some phrases will appear frequently throughout the file. This occurs in a text file in which individual words or sequences of them are repeated many times. However, the sound is an analog signal and the values ​​of the specific generated samples are highly dependent on the operation of the ADC. For example, with 8-bit sampling, an 8 mV waveform becomes a numeric sample of 2, but a nearby wave of, say 7.6 mV or 8.5 mV, can be converted to a different number. For this reason, voice snippets that contain overlapping phrases and sound the same to us may differ slightly when digitized. Then they will enter the dictionary in the form of different phrases, which will not give the expected compression. Therefore, dictionary methods are not very suitable for audio compression.

You can achieve better results in lossy audio compression by developing compression techniques that take into account the perception of sound. They remove the part of the data that remains inaudible to the audience. It is like compressing images, discarding information invisible to the eye. In both cases, we assume that the original information (image or sound) is analog, that is, part of the information has already been lost during quantization and digitization. Allowing a little more loss with care will not affect the quality of the uncompressed sound reproduction, which will not differ much from the original. We will briefly describe two approaches called silence suppression and compaction.

The idea behind silence suppression is to treat small samples as if they were not there (i.e. they are zero). Such a zeroing will generate a series of zeros, so the method of suppressing pauses is, in fact, a variant of RLE adapted to audio compression. This method is based on the peculiarity of sound perception, which consists of the tolerance of the human ear to rule out barely audible sounds. Audio files containing long stretches of quiet sound will be better compressed using the silence suppression method than files full of loud sounds. This method requires the participation of the user, who will control the parameters that establish the loudness threshold for the samples. This requires two more parameters, which are not necessarily controlled by the user. One parameter is used to determine the shortest sequences of silent samples, usually 2 or 3. And the second sets the smallest number of consecutive strong samples, when silence or pause occurs. For example, 15 silent samples can be followed by 2 strong and then 13 silent,

Consolidation is based on the property that the ear better distinguishes changes in the amplitude of soft sounds than loud sounds. A typical ADC for computer sound cards uses a linear conversion to convert the voltage into a numerical form. If the amplitude a became n, then the amplitude 2 a will become 2 n.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

What is an audio compressor

You’ve certainly heard of compression before: you know it’s an essential effect for mixing, but at the same time, don’t you necessarily master every setting of your plugins?

This is normal: it is a somewhat complex subject. And if you don’t know exactly what effect each parameter has on the sound, you risk damaging your mixes rather than improving them.

Therefore, I advise you to take a few minutes to see what the different settings of your compressors correspond to, so that you can adjust them yourself: in fact, whether you use a compressor for mastering or an analog audio compressor, the settings they are generally still the same!

 

What is an audio compressor?

It is mainly an effect, as well as equalizers, reverbs, distortions, etc. It can take the form of an add-on or an external effects module.

In general, and although there are many possible ways to use a compressor, you can reduce the dynamic range of a recording or a complete mix. That is, reduce the gap between the loudest and weakest sounds on the track.

Hence the name, moreover: a compressor compresses the sound.An example of an external stereo compressor, the ART Pro Audio VLA II
For example, if we have a voice track with a significant level variation between the words, we can level the sound by attenuating the loudest parts.

Here is an example in pictures:

Ejemplo de compresión

Compression example

In the image above, there is no compression: the signal (the singer’s voice, for example) alternates between significant peaks and less strong elements.

In the image below, compression was used to attenuate these spikes. In fact, they are now at a level closer to the rest of the recording. The dynamic range has therefore been reduced.

Compression threshold

The Threshold parameter is particularly important for successful compression.

It is simply the level in decibels (dBFS) from which the compressor begins to operate; in other words, it attenuates the signal.

For example, if your recording reaches a maximum of -12 dBFS and you set its threshold to -6 dBFS, the signal will not be compressed. In fact, the threshold is higher than the signal (-6 dBFS> -12 dBFS). Conversely, if you set it to -20 dBFS, the portion of the signal above this threshold can be compressed.

The audio compressor, what is it for?

If there is an instrument in the audio field that says everything and the opposite of everything, and whose very function may be almost incomprehensible to novices, this is the compressor.

compression

What is it and especially what is a compressor for?

Let’s try to get some clarity. A compressor is an instrument, analog or digital, hardware or software, that allows to intervene in the dynamics of the audio; The way it intervenes is regulated by a series of parameters that modify its operation.
In general, the use of a compressor aims to reduce the dynamic extension of the audio on which it acts, to subsequently increase its volume.
Let’s take any audio track as a reference.

 

What is meant by dynamics of an audio track?

The dynamics of an audio track defines the amplitude of the variation, in terms of volume, of the track itself: in practice, the difference between the maximum and minimum volume.
Let’s take an example.
Considering that we are in the digital environment, the volume of an audio track could vary, for example, between -50 dB (light background noise) and -5 dB (high volume): the dynamics (that is, the difference between the minimum value and the highest peak (highest) in this case would be 45 dB.
Track compression can reduce high peaks, for example by reducing them to -10 dB, with a decrease in overall dynamics to 40 dB: therefore, the dynamic spread decreases, i.e. by attenuating signal levels higher, we have limited the difference in volume of the same with the lower.
But why would you want to reduce the dynamics of a track?
Basically, because I lowered the highest peaks, I could now increase the overall volume of the entire track, causing audible sounds to be heard that were previously too low (or too hidden by too loud sounds).

How a compressor works

The compressor generally works on the basis of some user defined parameters:

– threshold: generally expressed in dB, it sets the volume level from which you want the compressor to start operating.
For example, by setting a threshold of -10 dB, the compressor will act on all sounds that exceed this threshold in volume.

– compression ratio (ratio): Sets how much the signal beyond the threshold should be compressed.
The ratio is expressed as a ratio: for example, a 2: 1 ratio means that a signal that exceeded the 10 dB threshold, after compression, will only exceed it by 5 dB.
That is, a 2: 1 ratio tells the compressor to reduce the signal overshoot beyond the threshold to 1/2.
When using very high compression ratios (over 10: 1), we are talking about limitation (and the compressor can be defined as a limiter), which is extreme compression that practically doesn’t allow anything or almost to cross the threshold.
When, on the other hand, we use an inverse compression ratio (for example, 1: 3), we talk about expander instead of compressor: the expander has an opposite action, that is, it tries to increase the dynamics of an audio track reducing the volume of the signals below a certain threshold. For example, an expander can be used as a noise reduction, zeroing signals below a very low threshold (that is, effectively eliminating background noise).