
What is an audio file format?

MP3
When it comes to downloading music, the MP3 audio file format used to reign supreme.
In fact, this format is so synonymous with mobile music solutions that “MP3 players” are now the common format for audio playback devices.
However, for various reasons, it is less prominent these days. However, it continues. Understanding MP3 files can also help us understand other formats more easily, so we’ll start there.
An MP3 file is a lossy audio file, which means that it discards data that our ears cannot hear. Almost everyone has a hearing range between 2oHz and 20kHz. The upper limit actually decreases with age, but generally speaking, it’s a lie within the range of every noise you hear. Since we know that other frequencies are redundant, MP3 discards all frequencies outside this range.
To save more space, MP3 files use some more tricks. Audio engineers use noise modeling algorithms based on the psychoacoustic effects of the human ear and brain to remove parts of music that we shouldn’t be hearing. For example, the brain cannot distinguish between two frequencies that are next to each other. Also, adult ears have difficulty recognizing the direction of high-frequency sounds. It also starts to lose sensitivity above 16kHz. Also, loud sounds can mask quieter sounds. All of these can be removed, with little noticeable difference in final audience.
Basically, MP3 files remove frequencies that we can’t hear and frequencies that we can hear individually, but not because of how they’re combined in a particular song.
MP3 divides the track into 576 sample frames and uses the Fast Fourier Transform (FFT) to obtain frequency data from these frames. The frequency data is then analyzed to see if there is any opportunity to apply compression rules based on human hearing as described above. If so, these parts are rounded down (quantized) to reduce the bitrate, which helps save space. Data on how to restore each frame to its full sonic representation is stored in a 32-bit header.
The bitrate determines the maximum file size allowed per frame. The more aggressive the compression, the more likely the algorithm will remove things that are audible. Also, this type of filtering and cutting is not perfect, and quantization can leave artifacts that some people may hear. This lossy psychoacoustic compression is followed by lossless Huffman encoding compression similar to .zip files to save even more space.




