About digital sound. Digital sound


Free Download Mp4Gain
picture

About digital sound. Digital sound

digital sound

Recently, the capabilities of multimedia equipment have grown significantly, but for some reason this area has not received enough attention.

Digital sound

The average user suffers from a lack of information and is forced to learn only from his own experience and mistakes. With this article we will try to eliminate this annoying misunderstanding. This article is aimed at a common user and aims to help you understand the theoretical and practical foundations of digital sound, to identify the basic possibilities and techniques of its use.

What exactly do we know about the sound capabilities of a computer, other than the fact that our home computer has a sound card and two speakers? Unfortunately, probably due to insufficient literature or for some other reason, but the user, in most cases, is unfamiliar with anything other than the built-in Windows audio input / output mixer and recorder. The only use of a sound card that a common user finds is to play sound in games and listen to a collection of audio. And after all, even the simplest sound card installed in almost every computer can do much more: it opens up wide opportunities for everyone who loves and is interested in music and sound, and for those who want to create your own music, a sound card. it can become an omnipotent tool. To find out what the computer can do in the field of sound, you just need to take an interest, and you will be presented with opportunities that, perhaps, you did not even know about. And all this is not as difficult as it might seem at first glance.

Some facts and concepts that are difficult to do without:

According to the theory of the Fourier mathematician, a sound wave can be represented as a spectrum of frequencies included in it.

About digital audio (digital audio)

The frequency components of the spectrum are sinusoidal oscillations (so-called pure tones), each of which has its own amplitude and frequency. Therefore, any vibration, even the most complex shape (for example, a human voice), can be represented as the sum of the simplest sinusoidal vibrations of certain frequencies and amplitudes. And vice versa, generating different vibrations and superimposing them on each other (mixing, mixing), you can get different sounds.

Note: The hearing aid / human brain is capable of distinguishing between frequency components of 20 Hz and ~ 20 kHz (upper limit may vary based on age and other factors). Also, the lower limit fluctuates a lot depending on the intensity of the sound.

Digitization of sound and its storage on a digital carrier

“Normal” analog sound is represented on analog equipment by a continuous electrical signal. The computer operates with data in digital form. This means that the sound on the computer is also represented in digital form. How does the analog to digital conversion work?

Digital sound is a way of representing an electrical signal using discrete numerical values ​​of its amplitude. Let’s say we have a good quality analog audio track (by saying “good quality” we will assume a silent recording that contains spectral components from the entire audible frequency range, roughly 20 Hz to 20 KHz) and we want to “feed” it into a computer. (that is, digitize) without loss of quality. How to achieve it and how does digitization occur? A sound wave is a kind of complex function, the dependence of the amplitude of a sound wave on time. It would seem that since it is a function, you can write it to a computer “as is,” that is, describe the mathematical form of the function and store it in the computer’s memory. However, this is practically impossible, since sound vibrations cannot be represented by an analytical formula (like y = x2, for example). There is only one way left: to describe the function by storing its discrete values ​​at certain points. In other words, at each moment you can measure the value of the amplitude of the signal and write it down as numbers. However, this method also has its drawbacks, as we cannot record the amplitude values ​​of the signal with infinite precision and we have to round them.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

ADVANTAGES AND DISADVANTAGES OF DIGITAL SOUND

ADVANTAGES AND DISADVANTAGES OF DIGITAL SOUND

DIGITAL SOUND

Digital sound opens up truly endless possibilities. If the previous radio and sound studios were located on several tens of square meters, they can now be replaced by a good computer, which, in terms of capabilities, exceeds ten of those studios combined, and at a cost many times cheaper than one.

Digital sound

This removes many financial barriers and makes sound recording more accessible to both the professional and the amateur. Modern software lets you do what you want with sound. Previously, various sound effects were achieved with the help of ingenious devices that did not always live up to technical thinking or were simply handcrafted devices. Today, the most complex and hitherto unimaginable effects are achieved by pressing a couple of buttons. Of course,

From the point of view of an ordinary user, there are many benefits: the compactness of modern storage media allows you to transfer all disks and records to a digital representation and store them for many years on a small three-inch hard disk or a dozen or two CDs; you can use special software and thoroughly “clean” old records from reels and discs, removing noise and crackle from their sound; You can also not only correct the sound, but also beautify it, add richness, volume, restore frequencies. The Internet also comes to the rescue of the audio hobbyist: the network allows people to share music, listen to hundreds of thousands of different Internet radio stations and show their sonic creativity to the public, all that is needed is a computer and the Internet.

Of course, digital technology also has its drawbacks. Many people noticed that the analog sound was heard with more life. And this is not just a tribute to the past: the digitization process introduces a certain error in the sound, in addition, various digital amplifiers introduce the so-called “transistor noise” and other specific distortions. There is no precise definition of the term “transistor noise”, but we can say that they are chaotic oscillations in the high frequency region. Although the human hearing aid is capable of perceiving frequencies up to 20 kHz, it appears that the human brain picks up higher frequencies. And it is on a subconscious level that a person still feels analog sound cleaner than digital.

“Normal” analog sound is represented on analog equipment as a continuous electrical signal. The computer operates with data in digital form. This means that the sound on the computer is also represented in digital form.

Digital sound is a way of representing an electrical signal by means of discrete numerical values ​​of its amplitude; Signal digitization involves two processes: a sampling process (sampling) and a quantization process. The sampling process is the process of obtaining the values ​​of the converted signal values ​​at specific intervals. Digitization is fixing the amplitude of the signal at regular intervals and recording the amplitude values ​​obtained in the form of rounded digital values ​​(since the amplitude values ​​are continuous, it is not possible to record the exact value of the amplitude of the signal to a finite number, so we resort to rounding). The recorded signal amplitude values ​​are called samples. Obviously, the more often we take amplitude measurements (the higher the sampling frequency) and the less we round the obtained values ​​(more quantization levels), the more accurate the digital representation of the signal that we will obtain will be. The digitized signal can be saved as a set of successive amplitude values.

Quantization is the process of replacing the actual values ​​of the signal with approximate values ​​with some precision.

Sound processing should be understood as various transformations of sound information to change some characteristics of sound. Sound processing includes methods for creating various sound effects, filtering, as well as methods for cleaning the sound of unwanted noise, changing the timbre, etc. This whole huge set of transformations ultimately boils down to the following basic types:

1. Amplitude transformations. They are carried out on the amplitude of the signal and lead to its amplification / attenuation or change according to some law in certain parts of the signal;

2. Frequency conversions. They are performed on the frequency components of sound: the signal is presented in the form of a frequency spectrum at regular intervals, the necessary frequency components are processed, for example, filtering and inverse “folding” of the signal from the spectrum to the wave;

Digital sound encoding

Digital sound encoding

Digital audio

The development of methods for encoding audio information as well as moving images (animation and video recordings) occurred with a delay relative to the types of information discussed above.

Digital Audio

A computer is a digital device, that is, an electronic device in which a discrete signal is the operating signal. Today’s computers operate on discrete signals that carry binary values, conventionally designated as “yes” and “no” (at the electrical level: 0 volts and V volts, for some non-zero value of V). With a one-step binary signal, you can transfer information about one of two positions: 0 (“yes”) or 1 (“no”). Using N binary signals in one step, you can transfer information about one of 2 N positions (2 N is the number of combinations of zeros and ones for N signals). The interaction of all the blocks that make up a computer occurs through the exchange and processing of one or more binary signals simultaneously. They are all control codes as well as the information that is processed itself, everything is represented on the computer in the form of numbers. For this reason, audio signals in digital equipment are also represented as numbers.

So how can you describe an analog audio signal in digital form? A real audio signal is a complex waveform, a certain complex dependence of the amplitude of a sound wave in time. In Fig. 2 shows a graph of a real sound wave.

For computer processing, an analog signal must somehow be converted to a sequence of binary numbers. Let’s proceed as follows. We will measure the voltage at regular intervals and write the obtained values ​​into the computer memory. This process is called sampling (or digitization).

Converting an analog audio signal to digital is called analog-to-digital conversion or digitizing. The process of this transformation consists of:

carry out measurements of the amplitude of an analog signal with a certain time interval: sampling,

subsequent recording of the amplitude values ​​obtained in numerical form – quantification.

The time sampling process is the process of obtaining the instantaneous values ​​of an analog signal converted into a specific time step, called a sampling step.

The higher the sample rate (that is, the number of samples per second) and the more digits assigned to each sample, the more accurately the sound will be represented. But this also increases the size of the sound file. Therefore, depending on the nature of the sound, the requirements for its quality and the amount of memory occupied, some compromise values ​​are chosen.

The number of signal measurements taken in one second is called the sample rate or sample rate, or sample rate (from English “sampling”). Obviously, the smaller the sampling step, the higher the sampling frequency (that is, more often amplitude values) and therefore the more accurate representation of the signal we get.

The human ear does not notice the gradation of the received signal. Here the following analogy can be drawn. Each person watched movies in the cinema and before their eyes on the screen there was a continuous and fluid action: but, in fact, a filmstrip is a series of still and discrete images that move at a high speed of 24 frames per second . Since human eyes are characterized by a certain inertia, they are easy to fool, which the filmmakers use extremely cleverly. Our ears are also somewhat imperfect and can be tricked in this way, representing a continuous analog signal as a sequence of rapidly changing instantaneous voltage values. But unlike a film strip, changing the “sound frame” happens thousands of times faster.

Now, to record each individual amplitude value, it must be rounded to the nearest quantization level. This process is called amplitude quantization. In more formal terms, amplitude quantization is the process of replacing the actual (measured) values ​​of the signal’s amplitude with values ​​that approximate with some precision. Each of the 2 N possible levels is called the quantization level, and the distance between the two closest quantization levels is called the quantization step. Quantization of signal values ​​introduces additional interference into the signal spectrum, called quantization noise or division noise … Quantization noise (error) refers to the signal that makes the difference between the signals reconstructed original and digital audio tracks. This difference results from the rounding of the measured signal values.

How digital sound works (Part 3)

How digital sound works (Part 3)

Digital Sound

Frequency

DIGITAL SOUND

Having finished with bit depth, it’s time to move on to frequency. It is the frequency that sets the entire range of sounds that can be recorded, while the bit depth only affects the volume and dynamic range. Frequency determines how many of these 16-bit numbers, which we talked about earlier, can be recorded in one second of audio recording (per channel).

Here everything is relatively simple. Humans hear sounds ranging from 20 hertz to 20 kilohertz (20,000 hertz). 1 hertz means that the wave oscillates from maximum to minimum for one second, 20 hertz – 20 vibrations.

Sound with a frequency of less than 20 Hertz is infrasonic and dangerous to health. People do not hear sound above 20 kilohertz, these waves are too fast for the ears to pick up. Of course, many people imagine that they already hear perfectly all frequencies and even above 20 kilohertz, but in fact, most of the people who read this text hardly hear sounds with a frequency of more than 17-19 kilohertz, especially If you abuse MP3 players.

Music is in the midrange, between 25 hertz and 10 kilohertz. The .WAV format, which is used on audio discs, records sound up to 22.05 kilohertz per channel. This is due to the fact that recording equipment does not have ideal sensitivity and decreases as it approaches the upper end of the range. Therefore, this upper limit is taken as a number of 22.05 kilohertz, so that up to 20 kilohertz the sensitivity is maximum.

A typical nonsense that audiophiles spread about frequency is that they claim that the higher the frequency, the more accurate a sinusoid can be built. The more accurate the sine wave, the better the sound, so it is better to listen to music with a frequency of up to 192 kilohertz. This makes sense?

To be honest, here we are faced with a banal ignorance of mathematics. The fact is that if we know the maximum frequency of the wave, ideally we can reproduce its shape using the Nyquist-Shannon theorem, also known as Kotelnikov’s theorem, which states that the verification frequency of a specific value must be twice the wave peak frequency. … That is, for 20 kilohertz we can use a sample rate of 40 kilohertz and we can reproduce the ideal waveform based on this.

You can find the proof of this theorem yourself, if you need it. I will just say that it is tested and that in itself it has nothing to do with sound or any technical aspect of sound recording. It is just a fundamental law of the universe.

For whatever reason, audiophiles don’t perceive this. In his understanding, a sound wave manages to make incomprehensible eddies back and forth or up and down in the shortest period of time between samples and therefore must be constantly captured so as not to lose information. In fact, the waves are purely physically incapable of this.

Since actual audio recordings use 22.05 kHz, .WAV files use an actual sample rate of 44.1 kHz per channel. This is done so that the listener, using their equipment, can accurately construct exactly the waveform that was received during recording. This has nothing to do with sampling errors, you need to recreate the sinusoid and just for this.

The question may arise, what to do if the ADC gave an error during recording and showed the wrong number that corresponds to the actual pressure value at that time. We will talk about this in the next section.

6. ADC, DAC and amplifiers

In general, reading thematic forums and sites, I get the impression that ADCs and DACs are a kind of mystical devices for audiophiles. In fact, in fact, this is just a chain of resistors connected in a special order. As in any electrical device, in ADCs and DACs, the voltage is constantly oscillating back and forth, thanks to quantum mechanics, and it is impossible to do anything with this process. The main question is whether these measurement errors have any meaning.

As we remember, the value given by the ADC is pressure. In turn, a person’s sensitivity to pressure is a difficult subject, especially considering that it changes according to conditions. But overall, it’s pretty obvious that humans don’t have the sensitivity to distinguish all 65,536 possible stops in dynamic range. If we talk about sensitivity in decibels, then people do not consciously feel the difference of 0.2 decibels, but they perceive unconsciously. A difference of 0.1 decibels is considered indistinguishable, neither consciously nor unconsciously.

How digital sound works (Part 2)

How digital sound works (Part 2)

Digital Sound

What is sound?

DIGITAL SOUND

If we talk about sound, then it is actually a wave that is transmitted through a certain physical medium, in our case it is air. This wave is almost impossible to visualize, since it is three-dimensional and propagates in all directions with a fairly complex geometry. To display a wave graphically, a sine wave is usually drawn. It is important to understand here that a sine wave is NOT a wave, it is just a sine wave. It shows the state of a wave at a certain point in space at a certain moment in time and nothing else. We see only part of the wave that passed through this point at any one time. However, this is more than enough to fix the properties of the wave, such as its frequency.

24nnoeb.jpg

The same value that is shown in the sine wave, in the physical sense, is the pressure that the sound wave exerts on a microphone or a person’s ears. This pressure is measured in micropascals, and it is very important to understand that any sound, and also music, are oscillations of a wave with a certain frequency (in the case of music, with a changing frequency), but not a value of separate pressure taken at a given time. It’s just that air pressure is not sound and does not carry any sound information to the human brain. When the pressure fluctuates from one value to another, say with a frequency of 15 kilohertz, it creates a high-pitched, “screeching” sound. The specific pressure value during such fluctuations determines the volume: the higher the pressure, the greater the volume. When the pressure is too high

Therefore, I repeat, the pressure value at a given moment does not contain any information about the sound, and if there is no oscillation, any value corresponds to silence.

3. What are decibels?

After we discover the physical nature of sound (I hope), it’s time to talk about something as mystical as decibels. Decibels are “just” a unit of measurement for something, the same as megabytes and others, to put it simply.

The problem for many people is that decibels are not a constant unit of measurement, and the unit in which each step grows exponentially compared to the previous one. That is, suppose we have 1 decibel of something. Then we got 2 decibels. If you decompose these two decibels and represent them in the form of a ruler measuring centimeters, it turns out that the first decibel occupies only one centimeter, while the second occupies two whole centimeters, so the total value will be 3 centimeters. This is because the second decibel has grown exponentially compared to the first. If you add a third decibel, then it will already take 4 centimeters on this ruler and the total value will be 7 centimeters. (This is just an example to show exponential growth,

If you are far from engineering, then you may be wondering why such a unit of measure is needed. The answer to this question is beyond the scope of this post, and if anyone is interested, I suggest they watch this video:

I’ll keep talking about sound. In our case, we can use decibels for volume and nothing else. That is, 0 decibels for us will correspond to absolute silence (empty), while, let’s say, 140 decibels literally kill; this is such a loud sound. The main thing to remember is that even though we are measuring volume in decibels, this unit continues to grow exponentially. A sound with a volume of 140 decibels is not 140 times louder than a 1 decibel sound, but millions of times (8,912,655 times, to be precise).

Also, some may wonder what negative decibels are, like -40 decibels, etc. So this is the same, it’s just that in many audio devices, engineers take a certain value, say 80 decibels, for the “standard” volume value, and from it they measure a lower volume and a larger one. The default value itself is 0 decibels on the local system of this device. In some cases, 0 decibels is generally the maximum volume and the sound is measured exclusively downwards on such equipment.

We will not use these negative decibels, and for us, absolute silence will always be 0 decibels.

4. Bit depth

Now that we’ve cleared up or remembered all the basics of the basics, it’s time to move on to how digital audio is recorded. Sound is recorded by a microphone, a device that captures the vibrations of a sound wave and converts it into an electric current, the voltage of which fluctuates in proportion to the vibrations of the sound wave, so that its sinusoid is the same.