FLAC, WAV, MP3, DSD, ALAC … What audio format should I use?

You probably know the famous MP3 audio format. There’s even a good chance that you only use it on a daily basis. But did you know that it is possible to take your music to the next level thanks to other audio formats? If the terms FLAC, DSD, sample rate, or even lossless don’t mean anything to you, then you’ve come to the right place. Designed specifically for newbies, this guide tells you everything you need to know about the basics of digital audio.

soundwave

FLAC, DSD, ALAC … Listening to a debate between audiophiles can seem difficult when you do not know this universe and the many acronyms that refer to it. But if you try the adventure, you will not regret it. Say goodbye to your boring and lifeless MP3s and hello to quality music. Trust us, your ears will thank you!

Sample Rate and Bit Depth: The Basics of Digital Music

Before knocking you out (we promise we won’t hit too hard) with barbaric acronyms in every way, let’s first focus on two essential notions of modern audio, namely sampling rate and bit depth. These two elements give an idea of ​​the recording precision of a song.

but depth

As you know, computers run on bits, which are sets of 0 and 1. During a passage in the studio, music produced by an artist must be digitized, therefore transformed into 0 and 1 in order to be recorded on CD or transmitted to through transmission services. This is where the sampling rate and bit depth come into play.

Take the example of a CD. Our beloved empanadas are recorded in 16-bit / 44.1 kHz. The 44.1 kHz sampling rate means that the music produced by our musician is analyzed 44,100 times per second by studio recording devices. As for the bit depth, it gives an indication of the number of information recorded during this same period. The greater the depth, the more information will be encoded at the end.

However, CD quality is not the best in the world, even if it far exceeds MP3. Thus, we find 24-bit / 192 kHz recordings. The DSD goes even further with a frequency that rises to several MHz. But for simplicity, just remember that the higher the values ​​described above, the more accurate the recording will be in your sound reproduction.

Lossy formats: MP3, AAC, OGG

In general, there are two types of formats in the audio world: lossy, lossy in English, and lossy, or lossless. If you want the best audio quality, stay away from compressed formats.

The best known of all is MP3. True dinosaur in the audio world, this type of file was developed at a time when the capacities of our hard drives were determined in MB and not in TB. Therefore, we had to compress the recordings as much as possible, even if that meant putting quality aside.

It is true that MP3 encoded music weighs only a few megabytes. But the applied algorithm is very aggressive, it simply cuts the frequencies considered inaudible by the human ear. In fact, MP3 loses many audible parts. To get an idea, click the link below, you will hear these famous truncated parts. The pieces seem flat, devoid of life. Listening can even become unpleasant after several tens of minutes. Suffice it to say that, apart from its small size, MP3 is no longer really interesting in our time if we are looking for quality music.

To make things better, Apple, meanwhile, released another audio format, AAC, for advanced audio encoding. This is also a lossy format which therefore loses details during data compression. However, the algorithm used is more efficient, cutting fewer important frequencies, at least on paper. In absolute terms, the difference from MP3 is not necessarily stark and the debate has been raging for years in the audiophile environment to find out if the AAC format is really better than MP3.

Finally, there is also the OGG Vorbis, another lossy compressed format. Like AAC, it is supposed to work better than MP3. This is the type of file Spotify uses. Her interest is to enable efficient transmission while reducing quality. However, the songs encoded in this format are not fabulous. The ideal is really to become lossless.

Some of the most popular digital audio formats.

Main audio formats without loss of quality.

 

WAVE (.wav) – This is the most common uncompressed audio file format. When you rip audio from a music CD on your computer, this will be the format you get. It takes up a lot of space (1411 KB of information per second on 4400 Hz / 16 bits of stereo music), but reproduces the sounds in a quiet way. In terms of quality and amount of information, it resembles the AIFF (.aif) format, which is mainly part of the Mac world. Suitable for audio files and those that record music.

FLAC (.flac) – Free Lossless Audio Codec: It is an open source codec that is often used to store music CDs on the computer without loss of quality. While .wav offers uncompressed audio, .flacs are called “lossless c compressed”. However, compression is minimal and the vast majority of people do not notice differences between a Wave file and a FLAC file. However, they take up less space than WAV files. This is possible because they use a variable amount of compression as needed. This means that, in the case of very complex and rich music parts, it uses encodings that are equal to WAV files (1411 Kb / s data). However, in the case of the “simpler” parts, the number of bits used to represent them will be smaller. It is suitable for demanding ears who also want to save some space on their hard drives.

APE Monkey’s Audio is one of the most powerful and popular lossless multimedia compression algorithms for audio files.
The lossless format, that is without data loss, ensures that the original sound quality is maintained in smaller files than compressed sample formats (such as WAV).
The format used is “.ape”, Monkey’s Audio allows compression of a WAVin mono source and also the opposite procedure, ie mono decoding for other formats such as WAV or MP3

ALAC Apple Lossless Audio Codec: Similar to FLAC, which always uses maximum compression. The quality is good on average, but the format is not as effective as FLAC in terms of weight. Not all players support it, so if your life is not exclusively dedicated to Apple and its products, it’s not a recommended format. Other important but less popular lossless audio formats are Monkey’s Audio (.ape) and OptimFROG (.ofr).

AIFF Audio Interchange File Format is a standard file format used to store audio recordings on a personal computer. The format was developed by the Apple computer based on Electronic Arts electronic exchange format and is often used on Apple Macintosh systems, which is why it is also called Apple Interchange File Format.
The audio data in the AIFF file is not compressed, so the file tends to be much larger than other formats, both lost and lost, such as ALE or MP3. One minute sound records approx. 10 MB of data, this is because it is a format created for sharing, although it is also used for editing.
However, there are compressed formats, called AIFFC (AIFF compressed), that can reduce the file size by a third (AIFF3) or a sixth (AIFF6), but this results in a great loss of quality, so there is virtually no use.

The most important sound quality formats in loss quality.

MP3 (.mp3) or MPEG-1 or MPEG-2 Audio Layer III – is the best known compressed audio standard. It was the forerunner of the category (it was published as an international standard in 1998) and is still the most widely used. Minifying a WAV file to MP3 makes it up to 90% easier for MB. The quality varies depending on the bit rate, ranging from 32 to 320 Kbit information for every second of music. The default is 128 Kb / s. At 320 the performance is pretty good.

AAC (.aac) – Advanced audio coding. It’s an Apple standard that iTunes uses by default when importing music. It works like MP3, and with the same bit rate, it takes the same space. The difference is in the way compression is handled. In simple words, “music” sums up another way. According to many people it sounds better than MP3. Especially suitable for those who use iPhone and iPod to listen to music.

WMA (.wma) – This is a proprietary format from Microsoft and is considered Redmund’s response to MP3. Its incompatibility with the iPod makes it very uncomfortable. Incidentally, although most players support MP3, WMA does not. Basically, unless your music world starts and ends with Windows Media Player, it’s a generally discouraged format. It is not compatible with Mac and iTunes.

 

OGG VORBIS: It is an open source or free format, which means that it does not require any license to be implemented in an audio player (the details are irrelevant for us users). The quality is comparable to MP3, perhaps a little higher. A noble and well-made creation, but not widespread enough to justify its massive use. In light of all this, therefore, recording music in WAV and broadcasting it in MP3 or AAC is the most reasonable option. In this way, you will have quality when you need it and the guarantee of usability of music wherever you are.

Audio formats

Audio formats

Compression

Compressions are systems for reducing the file size by using different types of algorithms and / or encodings.

compressed audio

There are two types of compression: lossless (compression), which compresses the file without deleting information. Decompression can therefore exactly return the original and lossy (lossy) compression, eliminating redundant parts that are considered irrelevant or irrelevant and the decompression does not return to the original.
It is clear that the first system preserves the integrity of the original, but less compressed, while the second implies a loss of quality, but compresses much more, in proportion to the degree of loss one is willing to accept. Let’s look at a few examples.

Lossless compression

Lossless compression is based on reducing the redundancy typical of human production.

human perception
For example, in a book dedicated to experimental music, the phrase “experimental music” is repeated many times with 19 characters. At this point, simply replace it with a symbol that is normally not included in the text, e.g. ‘# 1 #’ to reduce a term from 19 characters to one of 3 and store 16 characters for each occurrence. Actually we have to say “for every occurrence after the first”, because in order to unpack the text, we also have to create an index of the substitutions in which it is written in this case
# 1 # = “experimental music”.
Obviously, many other words or phrases are repeated several times in the book, and each of them can be replaced by a symbol such as # 2 #, # 3 #, …, # n #, where n is a progressive number, which ultimately makes significant savings.
The Lempel-Ziv (LZ) algorithm uses a similar system, the derivatives of which underlie many modern lossless compression programs, including the well-known ZIP.
In fact, the ancestor of many lossless encoders is the so-called Huffman coding. It is a redundancy elimination system that was developed in 1952 by the researcher of the same name, then an MIT student. His algorithm solves the problem of encoding a series of strings (string = any character set) as compactly as possible, taking into account the frequency with which strings occur: the most common is assigned the shortest symbol in to maximize compression. Here is a good example dealing with Huffman coding issues.

Another type of lossless compression, which is always based on reducing redundancy, is the so-called Run Length Encoding (RLE), which works in a very simple way. Suppose we have the following string of 20 characters
ABBBBBBBBBCDEEEEFGGG

By applying the RLE it will
A 9BCD * * * 4EF 3G

for a total of 13 characters with a saving of 35%.
In practice, a code consisting of the character and the number of repetitions was inserted instead of the repeated characters. The asterisk indicates that the following is the number of repetitions and is not part of the chain (this is of course the basic principle; the details of the coding may vary).
Of course, this system is not productive with text, but it is the case with images where long stripes of the same color are fairly common.

Lossy compression

Lossy compression is based on the elimination of the information components that are considered to be more or less irrelevant depending on the compression level required. At low compression levels, only the really irrelevant details are removed, while at higher levels, the sensitive details are also removed.
An example that is not audio is the encoding of JPEG images, in which nuances are eliminated by assigning neighboring pixel groups the same color if their difference is less than a value that is proportional to the degree of compression. On this page you can see the effect of the size reduction and the corresponding loss of quality when increasing the compression levels.

Further information on compression on Wikipedia (free, community-created encyclopedia) can be found here in English. Wikipedia also exists in Italian, but the content is smaller.
First class compressed audio formats
Lossless (lossless)
These formats work similarly to zip. You compress the content without removing anything. At the time of listening, it is necessary to perform a decompression and to return to the original in one of the linear formats already shown.
Since it is lossless compression, the comparison between these codecs is not made in

Digital Music: A Quick Guide to Having the Best Lossless Files

Digital Music: A Quick Guide to Having the Best Lossless Files

Digital Music

Surely changing our music from one side to the other, from an analog format to a digital one or even music already stored in digital format on a compact disc towards one for use on mobile devices, would result in a loss of sound quality that would exceed convenience and comfort.

This has been the main vision of people who care about sound quality, since the concept of digital music files was born. A reference generated by the common use of highly compressed lossy formats such as MP3.

wHowever, it is an opinion that simply “cannot take any more water.” Yes, popular formats like MP3 and AAC sacrifice some quality to keep file sizes small, but the emergence of lossless digital audio formats that are capable of preserving every piece of information from a CD recording means that a ripped file It may sound indistinguishable from the original.

You may still be wondering why you should spend precious time ripping up your CD collection. It’s all about convenience: a lossless digital music collection saves shelf space, is easy to move and to back up; for larger collections, it also makes locating individual songs and albums much easier and faster. You can also access a digital music library from multiple sources simultaneously, for example, from multiple network music players located in different rooms in your home.

Additionally, thanks to higher quality file acquisitions with popular streaming and download sites like B&W Society of Sound, higher quality music files can now be accessed as part of a subscription-based model without taking up space valuable on shelves – or even the attic – with physical means.

On the hardware side, storage devices like NAS and external hard drives offer huge amounts of space at ever lower prices. And with increasingly better and less expensive, widely available high-quality DACs, computers now offer excellent reproduction and can be easily connected to your existing hi-fi system, either wired or wireless.

When streaming or ripping discs, the file format option may seem complicated by too many options. This is what we think of the main formats that can be the salvation of true audio enthusiasts:

FLAC

Free Lossless Audio Codec is a popular choice for many audiophiles. Like MP3 and AAC, FLAC is compressed to keep file sizes relatively small, but unlike those formats, it is lossless and therefore – in theory – indistinguishable from the quality of a CD. In theory. Audio from CD converted to FLAC will typically shrink about 50 percent from its original size; a typical three-minute song on a CD will take up 30-40MB of space, while a ripped FLAC version of that song results in 15-20MB.

FLAC supports metadata (artist and song information can be embedded in the file and artwork can be referenced by the file) and will be played on a wide variety of software and hardware. Crucially for many, it is currently not compatible with Apple products like iTunes or the iPhone.

However, there are downsides to FLAC from an audiophile perspective and a lot of that comes during encoding and decompressing the file for playback. Because FLAC is unzipped on the fly, the sound quality is highly dependent on the software you are using to do that. Therefore, although it is theoretically lossless, there are still barriers to overcome when listening to the music contained in FLAC.

Apple Lossless

As you might guess from the name, Apple Lossless Audio Codec (or ALAC) was developed by Apple and works with company products like iTunes, iPod and iPhone (as well as supported by a number of other computers and players on software); If you are an avid user of the Apple team, it will be very attractive to you. However, like FLAC, this format is compressed, and files ripped from a CD are typically around 40-60 percent of their original size. Furthermore, ALAC suffers from the same decoding problems as FLAC.

AIFF

AIFF is a lossless format, but also without compression. While this means that it takes up as much space as the source file when ripping from a CD, it also avoids any compression issues, making it the ideal file for people who are concerned about sound quality.

Encoding digital audio with a loseless format?

Compressing a digital audio with loss is to reduce the size of an audio file.

Codecs are used to reduce the size of the files. Some of the operations that codecs can perform to reduce file sizes are as follows:

Reduce the bit rate of the original sound so that the audio takes up less space.
Remove sounds at frequencies that are not noticeable by the human ear.
Elimination of redundancies of the audio signal.
They can reduce the number of existing channels by transforming a surround sound to Stereo.
Reduce the number of bits per sample.
Etc.
Note: The compression process of an audio is extremely complex. In addition, each codec applies different methodologies to compress the size of an audio.

Obviously during the compression process there will be a loss in audio quality. The higher the weight reduction of the compressed file, the higher the loss of quality.

UTILITIES THAT YOU HAVE TO COMPRESS AN AUDIO

Obviously compressing an audio has certain utilities. Some of them are as detailed below:

The space needed to store the songs on our hard drive will be much smaller. Although hard drives are cheap and their storage capacity is large, it is not feasible and / or practical to store all of our songs without loss.
We can pass the audio files to third parties in a much more convenient and fast way. After compressing a music song we can pass it by email or other means without any problem.
It seems that the trend in the very near future will be to consume video and audio via streaming. Therefore the compression of video and audio is very important. If we offer a web service in which we provide streaming audio, it is essential to compress the audio to save bandwidth and so that customers can play it at home without problems.

Select the compressed audio file format

There are numerous types of compressed file format with loss. Some of the most popular are the following:

.mp3
.ogg
.wma
.m4a
.aac
Depending on the needs, it may be useful to select one format or another.

However in my case I recommend using the mp3 or ogg file format. The reasons are as follows:

The .mp3 files do not stand out for providing the best audio quality. However, the .mp3 format is the most universally extended.
Any music player is capable of playing the .mp3 file format. You cannot say the same of the other file formats.
Everyone is able to play audio in .mp3 format. Even people with little knowledge technologically speaking.
If someone does not want to use the .mp3 format because they think the quality is not enough, or because it is a proprietary format, I recommend using .ogg. In the following link you can find the advantages and disadvantages of the .ogg files with respect to the .mp3 files.
Select the audio compression codec (encoder)

Once the file format is selected we must be aware of the codec that we will use to perform the audio compression.

In the case that we want to compress in the .mp3 file format there are the following codecs:

FHC: It’s the first codec that existed. At present this codec has become obsolete. Its compression time is very high and does not support variable bit rate.

Xing: It is the fastest encoder and allows you to obtain files with a variable bit rate (VBR). However, the quality level offered by this type of encoder is lower than Blade and Lame.

Blade: Until Lame’s appearance was the best option. It is slightly slower than Xing, but the quality levels obtained are much better. Currently this host has a problem and it does not support variable bit rates.

Lame: It is available under the GNU license and is also the best host available today. It supports variable bit rates, is fast and the quality obtained is better than in the rest of the encoders.