Digital Sound and Sample Rate


Free Download Mp4Gain
picture

Digital Sound and Sample Rate

Sample Rate

Given the wide availability of inexpensive digital audio equipment, we invite you to take a closer look at digital audio.

Sample Rate

Acoustic sound is a continuous process in time and in amplitude, that is, the air pressure changes smoothly with time and does not jump from one value to another. Acoustic sound can be converted into an electrical signal using a microphone that, depending on the change in air pressure, changes the electrical voltage it generates at the output. After the conversion of an acoustic sound into an electrical signal, continuity is maintained in time and in amplitude: the signal voltage changes in the same way that the air pressure changes, which is why this sound is called analog. We can record an electrical signal on magnetic tape and convert it back to sound using a loudspeaker that functions as a “reverse microphone”: it moves air in response to changes in voltage. Respectively,

Despite the fact that the analog electrical signal has regularly served humanity for decades, over time some of its representatives (of humanity) became clear that the analog signal and magnetic recording are not the best ways to transmit and store audio information, since both during transmission and during storage occur. unavoidable losses, i.e. sound degradation. At the same time, the transmission and storage of data on computers that operate exclusively on digital data can be done without any loss. The only question is how to convert analog audio to digital and vice versa.

To solve the first problem, there are special devices known as analog-to-digital converters (ADCs). These devices are capable of converting a continuous analog signal into a sequence of separate numbers, that is, making it discrete (English discrete – separate, consisting of separate parts). The conversion takes place as follows: the device measures the amplitude of the analog signal many times per second and outputs the measurement results in the form of numbers.

Analog signal
Sampling
Sampled signal
As seen in the figure, the measurement result is not an exact analog of a continuous electrical signal. How much does digital sound compare to analog? Obviously, this correspondence will be more complete the more often the measurements are made and the more accurate they are. The frequency at which measurements are taken is called the sample rate. And the precision of amplitude measurements is indicated by the number of bits used to represent the measurement result. This parameter is called the bit depth.

Sampling rate
So, the conversion of an analog signal to digital consists of two stages: sampling in time and quantization in amplitude. Time sampling means that the signal is represented by a number of its samples (samples) taken at regular intervals. For example, when we say that the sample rate is 44.1 kHz, it means that the signal is measured 44,100 times per second (in MO, the more intelligible term “sample rate” is usually used, however, “sample rate “is more correct.).

The main issue in the first stage of converting an analog to digital signal (digitizing) is to choose the sampling frequency of the analog signal. As already mentioned, the higher the frequency, the closer the digital signal is to the analog. However, in proportion to the increase in frequency, the following increases: a) the intensity of the digital data stream and the bandwidth capabilities of the interfaces are not unlimited, especially if several channels are recorded / played simultaneously; b) the computational load of digital effects processors and their computational capabilities are also limited; c) the amount of memory required to store the digital signal. Obviously a compromise is needed.

The choice of the sampling frequency affects the frequency range of the received digital sound or the maximum frequency of an analog signal, correctly represented in digital. The range of frequencies a person hears is believed to be 20 to 20,000 Hz. According to the well-known Nyquist theorem, in order for an analog (continuous in time) signal to be accurately reconstructed from its samples, the sampling frequency it must be at least twice the maximum audio frequency. An audio frequency equal to half the sampling frequency is called the Nyquist frequency and is the maximum frequency that a given digital system can store and reproduce correctly. Thus, if the real analog signal that we are going to digitize contains frequency components from 0 Hz to 20 kHz.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Sample rate and bit depth

Sample rate and bit depth

Sample Rate Bit Depth

When describing digital recording devices, two fundamental concepts are used: sample rate and bit depth. In this article, we will see what it is.

Sample Rate, Bit Depth

Sampling rate
The sample rate is the rate at which the logger captures samples of the input signal. When recording sound in digital form, in fact, individual samples or, in other words, the sound intensity values ​​are recorded at separate points in time.

The sample rate for recording devices is usually the following standard values: 44.1 kHz; 48 kHz and 96 kHz. The higher the sample rate, the more samples will be taken in 1 second and the better the digital sound quality we will get as a result.

What is the meaning of these numbers? They mean the number of times the recorder reads the sound intensity of the input signal per second. The sample rate is measured in kilohertz (kHz), 1 kHz = 1000 samples per second.

For example, if the recording is carried out at a sampling frequency of 48 kHz, this means that the sound recorder measures and records the sound intensity value 48,000 times per second.

This amount may seem unimaginably huge, but a phenomenon called the Nyquist frequency is worth remembering here. The Nyquist frequency is named after the person who first discovered it. Defines the highest sound frequency that can be recorded at a given sample rate.

In short, the maximum tone that can be digitally fed is about half the sample rate.

Therefore, when recording at a sampling frequency of 48 kHz, the maximum audio frequency that can be recorded is 24 kHz. This is sufficient, considering that the human ear hears frequencies on average from 20 Hz to 20 kHz.

Bit depth
When talking about digital recording devices, you can often hear the words “16-bit”, “24-bit”, and so on. Some mean the number of information units with which the value of each sample obtained from the digital recording can be represented.

The higher the value of this number, the more accurately you can record the value of each sample and the higher the sound quality you will get as a result.

Do not think that the greater the number of bits, that is, the greater the bit depth, the greater the intensity value that can be set. Here is meant representation precision.

Modern recorders are typically 24-bit wide. It should be noted that recording with a large bit depth takes up a lot of space on the storage device, but this is not so important, because modern media has a huge volume and is becoming more and more affordable.

The sample rate: looking for the best sound

When it comes to digital music and sound effects, the sample rate plays an important role. This applies to both CDs and file formats like MP3 and network players. The values ​​specified for the height or frequency of the removal rate differ significantly from each other. An important reference value is 44.1 kHz. We explain why this is so.

Sample rate

What is sampling frequency about

For a guitar voice or riff to be stored on a CD or hard drive, the sound must be digitized. To do this, samples of the analog signal are taken at constant time intervals (discrete time). These are used to convert the recorded information into a code.

Raumfeld connector
Raumfeld connector

If the signal is digital, such as MP3, it can also be converted back to an analog signal, such as fluctuating current intensity, to make the membrane of a speaker sound. The frequency of these samples or samples is indicated by the sampling frequency. In general, the more samples there are, the more detailed the sound can be digitally reproduced.

A CD accepts signals that have been digitized with a sampling frequency of 44,100 Hz or 44.1 kHz. That corresponds to 44,100 samples per second. Of course, this frequency was not determined by chance. Such a resolution takes into account the maximum audible audio frequency of about 20 kHz and an important rule of data processing: the Nyquist-Shannon theorem. From this it can be deduced that the sampling frequency must be at least twice as high as the highest frequency of the signal to be digitized. So if the highest tones we can hear vibrate at 20 kHz, according to this theorem, the sample rate must be at least 40 kHz in order to digitize and decode all the tones correctly. Otherwise, the digitized signal can only be incorrectly converted to analog.

44.1 kHz is not the end of the story

The sampling frequency development did not stop at 44.1 kHz. Modern data carriers and transmission methods now make it possible to process significantly larger amounts of data. Lossless formats like FLAC or high resolution multi-channel standards exceed this value many times over.

Dolby TrueHD, for example, supports very high sample rates. Thus, significantly finer digitized signals can be processed. Additionally, audio masters can use better reconstruction and anti-aliasing filters.

Sample rate isn’t the only measure – bit depth

While the sample rate describes the frequency of the samples, the bit depth indicates how many bits are used per sample. In other words, the bit depth tells you how accurate or how high the resolution is for each individual sample. The amplitude or dynamic range of the analog signal at the time of the sample is determined. So the area between the weakest and strongest sound pressure level. On a CD, each sample is 16-bit deep, although this value is also exceeded by modern digital standards. Dolby TrueHD reaches 24 bits.

The Raumfeld connector brings out what is digitally possible
The raumfeld connector supports a sampling rate of 192 kHz.

▶ Hardly anyone makes bits sound as good as the Raumfeld plug. Because it plays high-resolution formats up to 96 kHz and 24-bit. An integrated high-end converter from Cirrus Logic converts digital data into analog. The Raumfeld connector has a powerful WLAN module for wireless data transmission. Thanks to Google Cast, multi-room speakers can also be conveniently controlled via the connector. If you connect the network player to a conventional system via Cinch or Toslink, it will be integrated into the local network.

Conclusion: sample rate as a bargaining chip for digital sound formats
The sampling rate indicates how often signals are sampled from an analog signal for digitization.
The Nyquist-Shannon theorem states that for the digitization to be true to the original, the sample rate must be at least twice the highest analog frequency.
CDs support sample rates up to 44.1 kHz. Modern formats, on the other hand, can reproduce 96 kHz and more.
Bit depth indicates how individual samples are resolved and influences the digitized dynamic range.
While CD samples have a 16-bit resolution, Dolby TrueHD, for example, reaches 24-bit.

Sample rate (Hz and kHz), resolution (bits), and bit rate (kBit / s) for music and audio

Because it always leads to misunderstandings, today there is a short explanation of the most important key figures for music and audio files. These basically apply to all uncompressed formats (WAV and AIFF). I’ll also go into the bitrate of compressed formats like MP3, WMV, and OGG below.

Sample Rates

Basic knowledge: An audio file stores a number at very short intervals that represents the level of the audio signal. During playback, the contour is calculated from this sequence of numbers.

Audio Sample Rate

An audio file can have multiple channels. Mono (one channel), stereo (2 channels), and 5.1 and 7.1 (Surround) are common. Each channel provides the information from one of the speakers and is a separate audio signal. That means we can split a stereo file and save it into two mono files.

The sample rate (Hertz) indicates how often the audio level is recorded and saved in one second. A specification of 44,100 Hz (44.1 kHz) means that 44,100 values ​​are stored for one second of music. Typical sample rates are 44.1 kHz (music CD), 48.0 kHz (film), and 96 kHz (recording studio).

The resolution (bit) indicates how much memory is used for that sample value. For example, 16 bits (2 to the power of 16) allow a scale of 65,536 values ​​for each individual sample value. If we have a lot of memory for a value, we can process the signal more precisely. Typical settings are 16-bit (music CD) or 24-bit or 32-bit in the studio.

Bit rate (kBit / s) is often confused with resolution. Represents the “bandwidth” of the audio file, that is, the amount of data that is processed in one second. For uncompressed formats like WAV and AIFF, you can easily calculate the bit rate by multiplying the above three values:

Bit rate = channels x sample rate x resolution

Example:

A WAV file in CD quality has the following bit rate:
2 channels x 16 bits x 44.1 kHz = 1411.2 kBit / s

The bit rate for compressed formats (MP3, OGG, WMV, AAC, etc.)
Unfortunately, this formula does not work with MP3 and other compressed formats because the signal is packaged to save space. The encoder reduces the bandwidth of the data to a desired bit rate and tries to obtain the best possible quality within this frame. The bit rate can be constant (CBR mode) or variable (VBR mode). A variable bit rate often makes sense if the audio signal is highly varied (for example, a movie or radio playback).

Sample rate, a clear explanation about what the sample rate is

Let’s proceed in order and start from the sampling frequency, defined as the number of times per second in which our AD converter will measure the electrical signal placed at its input: it is measured in Herz (Hz).

Obviously, the greater the number of “photographs” that we take of our electrical signal in one second, the greater its fidelity to the “original” sound wave. At the same time, obviously, our converter will be obliged to spend a greater amount of “energy” (faster information processing speed, greater storage space, etc.) which therefore translates into a different quality of components and obviously at a higher cost.

La tasa de muestreo

Sampling rate

On the left an analog wave (a sine wave) in the time / amplitude domain and an image of Vincent Van Gogh’s “Starry Night” which, for our teaching purposes, we intend to be very high resolution. On the right, a quick reconstruction of the same sampled analog waveform and the same photograph reproduced with a much smaller number of pixels.

Well, if it were that simple, there wouldn’t be a bit of fun. Let’s go back to the diagram of the AD converter at the end of the previous article. Surely you have noticed that the first block through which our signal passes is the so-called “Anti-aliasing filter”, nothing less than a low pass filter.

Coooooooooooosaaaaaaaaaaaaaaaaaa !? Do we want to faithfully reproduce our signal in the digital domain and the first thing we do is pass it through a filter to change its frequency component (remove all components above a certain frequency)?

Yes my dear … you need to share a minimum (but I swear, a minimum) of signal theory to tell you a bit about the “Nyquist-Shannon Sampling Theorem” (for the “fetishists” – no offense, for course …. I am also part of it: of the mathematical treatment, take a look at the related Wikipedia page where you can find a good perspective), based on which, to sample an analog signal without loss of information (that is, to be able to re-enter it – then convert it DA – into the analog domain without “noticeable” differences compared to the original signal) it is necessary that the number of samples taken per second (the sampling frequency) is at least twice the maximum present frequency into the signal to be sampled, Therefore, it is worth introducing frequencies in the digital signal that do not exist in the original analog signal (the calls, and hence the filter name, alias frequencies).
The aliasing phenomenon occurs because we do not have enough samples to describe the trend of the higher frequencies, which are therefore translated into the digital signal as lower frequencies, although nonexistent in the original signal. See this beautiful image always taken from the omniscient Wikipedia. In red the sinusoid sampled at intervals not sufficient to reconstruct it, and in blue the frequency alias (lower) that originates from the points we have taken.

La tasa de muestreo

Sampling rate

As we already know, the human ear is sensitive, at most (at an early age and in good hearing health), to frequencies around 20 KHz; In theory, our anti-aliasing filter should be set at 40,000 Hz and that should be our sample rate, but since it is practically impossible to build a filter with such a steep slope in analog, we opted for a filter with less steep slope and so both leaves the signal to sample frequencies slightly higher than 20,000 Hz (which we don’t hear, but there are), sampling at a slightly higher frequency. Therefore, the minimum sample rate used is equal to 44,100 samples per second.

Obviously, technological development and, nevertheless, the opinion and experience of many professionals (which I personally share very modestly) have in any case led to the awareness that, having set the minimum limit of 44,100 Hz (we will see later, it is the sampling frequency of the files that make up an audio CD), sampling at higher frequencies certainly leads to better results both from the point of view of signal manipulation (passing through a plug-in, the sum of two or more signals within a DAW, etc.) and from a listening point of view.

Later we will return to the topic, we will develop it further and we will begin to understand the logic with which the converter assigns a value in “machine language” to the different samples taken during the sampling phase.