Compression audio encoding Part 3


Free Download Mp4Gain
picture

Compression audio encoding Part 3

Audio  Compression

I often hear what is called Hi-Res Audio. The sampling frequency is said to be 96 kHz or 192 kHz, which is over 48 kHz, the number of quantization bits is 24 bits, and the limit (high range) of human hearing is about 20 kHz, but it expresses frequencies higher than that. It will be. It is the same bit rate as the image from a long time ago. .. ..
By the way, it seems that dogs can hear up to 60 kHz and cats up to about 64 kHz.

Hi-res audio example
Sampling frequency Number of quantization bits Number of channels bit rate Frequency that can be expressed
192 kHz twenty-four 2 9.216 kbps 96 kHz
192 kHz 16 2 6,144 kbps 96 kHz
96 kHz twenty-four 2 4.608 kbps 48 kHz
96 kHz 16 2 3,072 kbps 48 kHz
48 kHz twenty-four 2 2,304 kbps 24 kHz
Considering the limit of human hearing (about 20 kHz), according to the sampling theorem, 48 kHz or 44.1 kHz is a sufficient frequency, but what about all of them? .. ..
In my case, I cannot distinguish the high resolution range, but it should be able to reproduce the discarded frequency at 48 kHz to 96 kHz, and when the number of quantization bits is in the 24-bit range, the sound pressure (dB) is a bit. Feels like I’m going up (?) (It’s just a story from my ears).
I’d like to make a comparison if I get the chance, but I don’t think I can tell by ear without a proper regenerator (like an expensive analog amp).

Is it time for cats and dogs to get verified in the acoustic industry? .. ..


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Compression audio encoding Part 2

Compression audio encoding Part 2

audio compression

16-bit monaural PCM bit rate (for audio) (example)

Sampling frequency Number of quantization bits Number of channels bit rate Comments
32 kHz 16 1 512 kbps Super Wide Band
24 kHz 16 1 384 kbps
16 kHz 16 1 256 kbps Broadband
8 kHz 16 1 128 kbps Narrowband

Sampling rate
If you check the web, there are explanations like the sampling required to convert analog waveforms to digital conversion. For example, it shows how many samples of an audio signal input from a microphone are taken per second and digitized. The larger the sample, the greater the range that can be recorded. When an analog waveform is digitized, the frequency that can be expressed is half the sampling frequency (sampling theorem). For example, with a sampling frequency of 48 kHz, it can be expressed up to 24 kHz. At 8 kHz (narrow band) and 16 kHz (wide band), which are often used for audio, you can only hear up to 4 kHz and 8 kHz, respectively. The higher the sample rate, the higher the bit rate.

Sampling theorem
It is a very simple explanation, but it can express up to half the sample rate. When sampling a signal, if the interval is small, it can be restored close to the original signal, but if it is too thick, it cannot be restored (I would like to write a little more detail when I talk about signal processing or other time ).

44.1 kHz
Why is there a poorly separated rate of 44.1? .. ..
Isn’t the technician deliberately wearing an annoying watch to prevent music CDs from being easily copied? I heard something like that. When I searched, it seems this happened (?) Due to the convenience of an old PCM recorder. In this age, it is difficult to know what 44.1 kHz is in development. The 44.1 kHz ↔ 48 kHz sampling conversion is a headache. For example, USB audio (USB audio device class) exchanges data at 1 ms intervals. In the case of 48kHz, the data is 48 samples, but when considering 44.1kHz, it will be 44 samples (x9) and 45 samples (x1) in 10ms. If a sample of 45 samples is misled (tentatively), it will be 44.0kHz. I think it’s more like that with voice and music, and the human ear is mostly misleading (just my personal opinion).
However, the objective evaluation method will soon come to an end. For example, you can clearly see that you were fooled by a sine wave (sine wave) (maybe you are unexpectedly on the market).

Number of quantization bits
Sampling had to take a value in the direction of time (discretization), but quantization had to take a value in the direction of amplitude. The range that is possible to display the volume of the sound, which is heard often, “dynamic range 96 dB” means that the number of quantization bits is 16 bits and the music signal is played in the range of 0 to 65535 I can do it. The number of quantization bits is also called the bit depth or bit depth.

Bitrate
In communication, it indicates how many bits of data are transferred per hour and is generally expressed in bps (bit / s) of how many bits are transferred (processed) per second. If it is small, the size when saving as a file is small and there is space on the transmission line for communication. For example, when an audio (1 channel) is compressed to 1/3, the 3 channel audio can be sent at the same bit rate. Excuse the old story, but considering from the age of analog communication (analog mobile phone), digitization + compression will be able to support multiple calls with the same radio wave.

compressing using audio encoding

When compressing using audio encoding (AAC, MP3, etc.), the compression rate is determined by the bit rate at the time of encoding.

Audio Compression

Specifically, if you set a low bitrate, the compression rate will be high and the file size when saved will be small, but what is the bitrate for the original sound source (PCM) without compression in the first place?

If you save it as PCM, the sound quality of the original sound will be obtained, but it can be a little inconvenient to save it without worrying about the file size. Also, depending on the application, I think the original sound size has enough memory capacity and the communication speed is correct. Therefore, I would like to write about the sample rate and bit rate that are often heard in digital audio.

The bit rate of digital audio is determined by the sample rate, the number of bits assigned to a sample (number of quantization bits), and the number of channels (stereo, monaural, etc.).

PCM bit rate (uncompressed) = sample rate x number of quantization bits x number of channels
As I wrote a bit last time, file containers like wav and mp4 format have this information as the header, so the application can see the header and play it. The compression rate of the encoding is determined by the bit rate specified at the time of encoding for this PCM (uncompressed) bit rate.
For example, as many of you know about music CDs, with 44.1 kHz stereo, this is the next bit rate.

Music CD bit rate: 44100Hz x 16bit x 2ch (stereo) = 1411.2kbps
When encoding this with MP3, AAC, etc., you will naturally specify a bitrate less than 1,411.2 kbps. For example, when encoding at 256 kbps, the compression rate is approximately 18% and the file size is 1/5 or less, assuming the original sound is 100%.

Encode 256 kbps music CDs: 256 kbps / 1,411.2 kbps = approximately 18%
Generally, the sample rates of audio devices actually connected to a PC are 48 kHz and 44.1 kHz for music, 16 kHz and 8 kHz for voice, such as microphones and headphones, and 32 kHz, 24 kHz, 22.05 kHz, etc.

The bit rate of PCM (uncompressed sound source) with 16-bit quantization bits is as follows.

Stereo (for music) PCM 16-bit bit rate (example)
Sampling frequency Number of quantization bits Number of channels bit rate Comments
48 kHz 16 2 1,536 kbps
44.1 kHz 16 2 1,411.2 kbps Music CD
32 kHz 16 2 1,024 kbps
24 kHz 16 2 768 kbps
22.05 kHz 16 2 705.6 kbps

Methods of compression and compression of audio signals Part 3

Methods of compression and compression of audio signals Part 3

Audio Compression

The most popular compression format today is MP3.

The MP3 (MPEG Layer 3) format was developed, after several intermediate formats, by the Fraunhofer Institute in Germany. Actually, the .MP3 format relies on fooling the human ear. After some research, it turned out that human hearing tends to adapt to the appearance of new sounds, which is expressed in an increase in the hearing threshold. Therefore, some sounds are capable of masking (that is, making them subjectively inaudible) others. So in this format, some of the sounds that, according to the corresponding theory, are made inaudible, are simply removed from the general sound. The resulting “semi-finished product” is then encoded using the Hoffman method. Be sure to note that in the MP3 format, programs that compress the sound of the original are not standardized, that is, each competent programmer can implement their own compression scheme. And only the decoders obey the standards, which leads to the fact that the quality of MP3 playback does not always depend on the player that plays this file. Due to the different abilities and predilections of implementers of various encoders, some of them are better at handling symphonic music, some at rock and metal, some at rap and rave, etc.

JointStereo, which is one of the features of MP3, means that instead of encoding stereo as two independent channels, it encodes the call. center channel and the difference from the original stereo channels. Many stereo channel audio components are the same, and encoding them on the common channel allows you to free up additional bandwidth for more detailed encoding of the difference, leading to improved quality.

Be sure to mention the variable bit rate or VBR. This means that the encoder changes the compression ratio on the fly, depending on the nature of the sound. This approach results in a reduction in the final file size or, if quality requirements increase, the same file size produces better sound.

MP3 Pro – Introduced in 2001, the MP3 Pro codec was developed by Coding Technologies in association with Thomson Multimedia. It is MP3 based and as a result it turned out to be fully MP3 backward compatible and only partially forward compatible. It uses SBR (Spectral Band Replication) technology, so the codec provides good quality at low bit rates. However, the encoding quality at medium to high bit rates is inferior to almost all other codecs. As a result, MP3 Pro is used more for streaming on the Internet and demonstrating snippets of new musical compositions.

The MPEG-4 audio standard does not require a single or small set of highly efficient compression schemes, but rather a complex set to perform a wide range of operations, from low-quality speech coding to high-quality music and audio synthesis.

The MPEG-4 family of audio coding algorithms ranges from low quality voice (up to 2 kbps) to high quality audio (64 kbps per channel and higher).

RAW – Yes, it is not just the image format in which some digital cameras write photographs. In fact, RAW is the so-called. “Pure digitization”, which does not contain a title and contains only a sequence of samples of a sound wave. Typically, the scan is stored in 16-bit format.

Shorten is one of the first lossless codecs to appear. For a long time the project “slept sweetly.” However, in 2007, it began to develop again.

TTA (True Audio) – Finally about the most interesting. TTA is being developed by a team of our compatriots. And, I must say, the result of their work is impressive. All in order.

The codec is still quite young, but despite this it contains all the necessary features. We won’t list them again, we’ll just note that the format only lacks support for streaming audio over the network.

The format is open, as well as the source codes of the encoder program. There are compiled versions for Mac and Linux. There should be no compatibility issues during playback either, because there are already plugins for all popular players, as well as DirectShow filters for Windows Media Player. There is a plugin for Adobe Audition, which is important for musicians. For the past 4 years, hardware support has even appeared on players!

WAV – This is the primary audio format for many, many digital audio playback systems and is used as a standard audio file format on personal computers.

Compression and compression methods for audio signals Part 2

Compression and compression methods for audio signals Part 2

audio compression

FLAC is a member of the Xiph.Org codec family. By the way, it also includes the well-known ogg vorbis, one of the best lossy music compression algorithms. As a container for audio data, of course, OGG (files with the extension .ogg) and another open source container – Matroska (files with the extension .mka) are used.

It should be noted right away that both the FLAC format and algorithm are fully open. They are not patented, so they can be used completely free of charge in any program. This is the reason for the wide support for FLAC in players – any serious gamer has a plugin for FLAC. In addition, there are hardware mp3 players that support the FLAC codec.

The FLAC encoder is compiled for most platforms in use, so there should be no compatibility issues on alternative Windows operating systems.

FLAC supports tags in its own “FlacTags” format. There is the ability to encode multi-channel audio, a great advantage over Monkey’s Audio. The format supports any sample rate in the range of 1 Hz (!) To 65,535 Hz. Audio bit depth from 4 (!) To 32 bits.

FLAC is believed to be the most efficient use of system resources when decoding (playing) audio compared to other lossless codecs. Unfortunately, this is achieved at the expense of a significant increase in encoding (compression) time.

The FLAC website is regularly updated and new versions of the codec are released. Overall, FLAC is without a doubt the leader in terms of development activity. This may make it the main format in the future. Well, let’s see …

FLAC is the best option for storing high quality music.

MIDI (Musical Instrument Digital Interface) is a standard for hardware and software that allows you to play (and record) music by executing / recording special commands, as well as the format of the files that contain those commands. The playback device or program is called a MIDI synthesizer (sequencer) and is actually an automatic musical instrument.

Unlike other formats, it does not store the digitized sound, but sets of commands (played notes, links to played instruments, variable sound parameter values) that can be played differently depending on the playback device. The convenience of the MIDI format as a data representation format enables devices that produce automatic arrangements according to given chords, as well as 3D sound visualization applications. Additionally, these files tend to be orders of magnitude smaller than digitized audio of comparable quality.

Monkey’s Audio is a popular lossless digital audio encoding format. Distributed for free along with open source and a suite of encoding and playback software, as well as plugins for popular players. Monkey’s audio files use the following extensions: .ape to store audio and .apl to store metadata. Despite being open source, Monkey’s Audio is not free, as its license imposes significant restrictions on its use.

Audio files compressed with the Monkey audio codec have the extension ‘APE’; As you can see, the monkeys are present not only in the logo or the name (from English monkey: monkey, primate).

The average bit rate in an audio file is 600 to 700 kbps; compare with 128 kbps in MP3. Average compression is 40-50%, depending on the genre of music: if classical or jazz pieces are compressed in the best way, then compositions in the style of trash-metal or something similar “electronic noise” will show the worst result. . For codecs with acceptable quality loss, compression is approximately 80%.

There are four levels of compression. Maximum compression may seem like the only correct solution, although the compression time is quite long. However, you must also take into account the resource consumption of the system that plays the file; for the most compressed file, it is relatively high.

The .APE format provides tag support for searching for songs in your music collection. Another advantage is the verification of the integrity of the file during decoding. Recovery of original compressed .APE wav files is supported.

Monkey’s Audio has a graphical interface for Windows, in other words, a convenient window program to manage the encoding process. The rest of the codecs require the use of the command line or third-party interfaces.

Compression and compression methods of audio signals

Compression and compression methods of audio signals (types, differences, use)

Audio Compression

Basics of the analog-to-digital conversion principle, sound conversion and compression method, existing sound storage formats. Programs to convert and process sound and audio files. Application of these programs in linguistic research.

Bit rate is the amount of information per unit of time. In general, the bit rate is the number of bits that we spend encoding a sound with a duration of 1 second.

Analog-to-digital converter (ADC): A device that converts an input analog signal into a binary code (digital signal). The reverse conversion is done using a DAC (digital-to-analog converter, DAC). Typically, an ADC is an electronic device that converts voltage into a binary digital code. However, some non-electronic devices with digital output must also be classified as ADCs, such as some types of angle-to-code converters. The simplest one-bit binary ADC is a comparator.

The circuit to convert an audio signal from analog to digital:

Sampling is the transformation of continuous images and sound into a set of discrete values ​​in the form of codes.

Quantization is the process of aligning a set of musical notes to a grid.

Compression (compression) of audio data is a process of lowering the bit rate by reducing the statistical and psychoacoustic redundancy of a digital audio signal.

The underlying idea behind all lossy audio compression techniques is to neglect the subtle details of the original sound that are beyond the reach of the human ear.

Codec (CoDec) is an abbreviation for compressor and decompressor. Basically, a codec is a collection of files, drivers, and libraries required to package a video or audio file into a compressed format and play the compressed file.

Formats:

AAC (Advanced Audio Coding) is an audio file format with less quality loss when encoding than MP3 of the same size. The format also allows you to compress without losing the quality of the source (ALAC AAC profile).

AAC (Advanced Audio Coding) was originally created as a successor to MP3 with improved encoding quality. The AAC format, officially known as ISO / IEC 13818-7, was released in 1997 as the new seventh part of the MPEG-2 family. There is also the AAC format known as MPEG-4

Apple AIFF: This file type is standard for Apple Macintosh systems and sound processing systems built on top of it. Apple AIFF stands for Audio Interchange File Format, an audio interchange file format, it is somewhat similar to WAV. Its peculiarity is that it allows you to place additional information along with the sound wave, in particular WaveTable samples (examples of the instrument sound together with synthesizer parameters), which improves the quality of the final result. Although today Apple computers are capable of playing files of almost any format, including MP3.

FLAC (Free Lossless Audio Codec) is a popular free codec for audio compression. Unlike lossy Ogg Vorbis, MP3 and AAC codecs, it does not remove any information from the audio stream and is suitable for both daily listening and archiving of audio collection. Today, the FLAC format is compatible with many audio applications.