Conversion of analog sound to digital sound

 

Digital sounds and analog sound

With the advance of science and technology, both the transmission and recording of analog sounds and images have undergone major changes in recent years. The introduction of digital techniques allows you to do many more things, with greater advantages and more versatility than with analog technology.

Many of the devices that we know today as digital, first receive or capture the signals in analogue form and then convert them into digital signals. This is the case, for example, of CD and DVD players, the modem used by computers for the reception / transmission of data, digital cameras and video cameras, mobile or cell phones, etc.

To perform the conversion, these devices use, as an intermediate element, a device called analog-digital converter or ADC (Analogic to Digital Converter), which first receives the electrical signals in the form of an analog sine wave (such as the one provided by the microphone) and It then converts them into digital signals, encoded in binary numerical values, that is, in “zeros” and “ones” (0 – 1).

1. Sound or acoustic wave (voice, music, effects, etc.). 2. Microphone 3. Analog sine wave that is <obtained after the microphone converts the sounds into audio-frequency electrical signals. 4. ADC (Analogic to Digital Converter – Digital Analog Converter). 5. Digital signal formed by zeros and <ones (0 – 1), obtained after the analog signal is processed by the ADC. 6. Output of the <digitized audio signal, ready to be recorded.

In digital cameras and video cameras, as well as in scanners, there is a sensor called CCD (Charge Coupled Device) or, failing that, a CMOS sensor (Complementary Metal Oxide Semiconductor – Semiconductor complementary metal oxide ), which are responsible for converting the images they receive into analog electrical signals.

In that case, as with the microphone, an ADC is responsible for converting those analog signals into digital image signals, so that they can be stored as such in a videotape, on the device’s memory card, or in any other Digital storage device, for later viewing.

The reverse conversion, from digital to analog, is strictly necessary, because the analog sound is the only audible, that is, the only one that recognizes our sense of hearing. Similarly, the analog electrical impulses are the only ones capable of moving the cone of a loudspeaker or loudspeaker to reproduce the original sounds again, which cannot be done by the electrical impulses of “1” and “0” of the binary or digital code. Therefore, to make the coding of the digital sounds audible by the loudspeaker (s), it is necessary to convert them back into analog electrical signals, with their corresponding variations in voltages or voltages.

Normalize audio: Normalization and normalizer

Normalization – Normalize audio

Normalization is an atypical dynamic process, very different from compression, limitation, expansion or noise reduction:

It does not reduce the relative dynamic range of the audio signal.
It is not applied in “real time”, or at the moment, but it is a process that is carried out “a posteriori”, on the previously recorded material.
The normalizer is a device that falls into the category of dynamics processors.

Analyze the target signal, detect its highest volume peak and increase its gain to the maximum level possible without distorting.
With the same proportion the level of the rest of the signal increases.
The signal, in general, will sound with a greater volume.

It is very unpleasant to have a playlist with mp3 files playing at different volumes. However, it is possible to normalize (equalize) the volume of our mp3s.

Loudness normalizer

You can use the Loudness Normalizer to obtain a specific loudness.

Increasing the loudness to a specific value may cause clipping. To solve it, a peak limiter can be part of the process. The Loudness Normalizer increases the loudness and limits the peaks of the signal at the same time if necessary, to obtain the desired loudness.

This process takes place in several stages, first an analysis and then the final rendering.

What is an audio compressor?

When we talk about compression we also talk about dynamic range. Recall that the dynamic range is the difference in amplitude between the lowest and highest part of a signal. In the compression process, basically and technically it consists in decreasing the dynamic range of a signal.

These are the most common controls or points to control in an audio compressor:

Threshold: This is the point from which the compressor will start working. Any signal that exceeds this point will be compressed.

Ratio: This is the reason for the compression that will be applied to the signal that exceeds the threshold. We see it and find it as 2: 1, 4: 1, etc. The first number means the number of input decibels that exceed the threshold, and the second number the output decibels. In other words, for “X” number of decibels that exceed the threshold, “Y” number of decibels will be output.

Attack: It is the time it takes for the signal to compress after having exceeded the threshold. We see it and find it commonly expressed in milliseconds (ms).

Release: How soon the compressor stops working after the signal falls below the threshold.

Knee: This is a parameter that subtly modifies the compressor threshold. A low setting (Hard knee or 0) means that the compressor will act only from the set threshold. A high setting (Soft knee) will allow the compressor to act gradually from before the signal reaches the threshold. In this way, the threshold can be treated as a range and not as a specific point. As the signal approaches the threshold compression increases. When it exceeds it, it continues to increase until the entire compression ratio is applied.

DIFFERENCES BETWEEN NORMALIZE AND MASTERIZE

The process and the differences between normalizing and mastering are often confused. Although it may seem to be the same, it is not.

Mastering can be of crucial importance according to which processes, for example: in musical matters, there are mastering engineers who are dedicated exclusively to that.

That does not mean that we cannot learn or acquire the necessary knowledge to be able to properly use some processing effect or some plugin in an appropriate way to be able to get more out of our audio file.

But you have to keep in mind that this audio processing helps your audio montage, song … sound with more punch, more strength, more energy, have more life.

Is mastering compressed or limited?

Rather those two processes and some more are done.

volume booster

Its mission is to maintain the same volume amplitude throughout the audio file, that is, it compresses when it has to compress and limits when it has to limit.

I’m going to give a rough example of what manual mastering would be like.

Can you still imagine the sound technician who detects when the signal volume is too high (the singer gets too close to the microphone, shouts …) and lowers the fader. Or the opposite case, when it detects the low volume (the singer moves too far from the microphone, does not speak with enough force …) and raises the fader. Always trying to maintain the same volume amplitude.

I’m going to give you a homemade definition: “lower what is high and raise what is low“.

As before it was an invented example, to do the job of processing the sound we regulate the different parameters available to the “processor” (Mastering is also called “processing” since in the past a device called “processor” was used which comes from “dynamics processor”). These parameters are:

The threshold (threshold): fundamental characteristic of the compressor that represents the point or level from which if the volume of the sound exceeds or lowers it, the dynamics processor is put into operation.

Ratio (Attenuation or Gain Ratio): Defines the amount of attenuation or gain that is applied to the signal. At noise gates the attenuation can be preset so that it really is a mute.

Attack time: This is the time it takes for the signal to attenuate, limit, mute or amplify. In general, slower times work best at low frequencies and fast ones at high frequencies. When processing a signal containing all frequencies, a compromise situation is forced.

To maximize the energy of the signals, particularly in broadcasting applications, there are multiband compressors that divide the spectrum into several bands and apply different times to each.

Release time: It is the opposite of the attack time, that is, the time it takes to go from the state where the processing is running to rest. They are usually longer times than those of attack.

Hold (maintenance time): Specifies the minimum time that processing will take place.

Stereo link (stereo link): With dynamics processors in general when used to process a two-channel (stereo) signal, it is necessary to link the processing action of both channels to happen on both at the same time. Otherwise, the sound image will be confusing and changing from the center to one side or the other.

Automatic: This function allows you to control any of the parameters listed automatically depending on the characteristics of the signal.

By pass (deactivation): Activating it allows you to hear the unprocessed signal, while if it is not activated you hear the processed signal.

Normalization is a process by which the highest peak is sought and reduced or increased (dB) as adjusted. Never pass the 0dB in normalization or mastering, because then it would be itching “clipping”.

What is a codec? Audio and video compression

 

Check our codecs and containers guide to not confuse you anymore. Learn what formats suit you.

Has it happened to you that you download a video file and then you can’t use it on your player? Or that you finally finish editing your video clip and it takes years to upload to the Internet? You might think it’s a problem with your file. You are not in error, only that the question is more specific: it is the codec and container you are using.

Perhaps they are somewhat strange terms, but they are gaining more and more publicity due to the growing online video and audiovisual production community. So if you plan to start your career as a youtuber, take into account the information, because if you end up with a final video with a weight of 1 GB it will not be fun to wait for it to upload…

In this guide we will explain what each of these elements consists of and how they work. We will talk about both: video and audio.

What is a codec?

Those who are dedicated to video editing know very well that storage space can be a problem. It is better to have the material you record in its original format, but most of the time this implies a considerable amount of GB of space. For example, if you record an hour of content with a high-definition camera you may need … up to 410 GB! This is complicated to keep it, much more if you want to transmit to other media. It is here that the subject gets interesting.

The term codec refers to the process of compression and decompression of video or audio. It is a tool that encodes the video through algorithms and converts it into information. This way you can decrease the file size.

The choice of codec depends on different factors. You should take into account mainly the means of reproduction for the final product. However, coding is not enough for reproduction, it is also necessary to “package” the information to be able to present it. We are talking about containers.

What are those containers?

Suppose you just finished editing a video. The final file contains both images and audio, so you need a way to display it just as you prepared it. This “package” is basically what many refer to when they talk about the format of a file. Then, a container can accept different codecs, while players can use certain containers. For example, the VLC player accepts almost all containers.

Lossless and lossless codecs (lossy and lossless)

There are different types of compression, as we will see later. However, all of them can be divided into two categories: with or without loss. Loss of what? Quality. For example, in the case of audio files, it is not the same to listen to a song in FLAC (Free Lossless Audio Codec) format to one in MP3 (MPEG Audio Layer III). The first is coded in such a way that almost no information is lost at the time of compression, that is, fidelity is maintained.

The same goes for the video. When you want to save storage space, files with loss are compressed, that is, lossy. This makes them much easier to manage. However, it is inevitable to deal with the loss of data and, therefore, fidelity of the image or audio. On the other hand, when you want to maintain the highest possible quality and you have no problem of space, compressors are used without loss or lossless. Again, it all depends on the purpose of your file.

How MP3 files work

The MP3 movement is one of the most incredible phenomena that the music industry has ever seen. Unlike other similar phenomena, such as the introduction of cassette tape or CD, MP3 technology did not start with the industry, but with a huge audience of music lovers on the Internet. The digital MP3 music format has had, and will continue to have a great impact on how people collect, listen and distribute the music.

If you have wondered how MP3 files work, or simply want to know what uses can be given, read on. This article will give some features of this popular sound format.

MP3 format

If you know something about how CD’s work, then you know how they store music. A CD stores a song in the form of digital information. The data on a CD uses a decompressed high resolution format. This is what happens when a CD is created:

The music is sampled (fractionated) 44,100 times per second. Each of these parts has a size of 16 bits.
Pieces of these fractions or “samples” are taken from the left and right channels in a stereo system.
With a simple formula we realize how great a single song can be.

Fractions * bits * channels = X bits per second

In our case it would be 44,100 for 16 bits per 2 channels, which would give us 1,411,200 bits per second. 1.4 million bits per second equals 176,000 bytes per second. If the average of a song is 3 minutes, then the average of a song on a CD is 32 million bytes of space. That is a lot of space for a song, and it is especially great if we consider that we are downloading music with a 56K Modem, which will take us a few hours.

The MP3 format is a compression system for music. This format allows you to reduce the number of bytes in a song without damaging the sound quality. The goal of the MP3 format is to compress a CD quality song without letting you see the difference. With MP3, a 32 MB song from a CD, compresses up to 3 MB. This allows you to download a song in minutes instead of hours, and store hundreds of songs on your computer’s hard drive.

Compression and quality

Is it possible to compress a song without damaging the quality? To perform this compression, the use of algorithms is needed, in the same way that we use them to compress other formats, such as graphics, text files, applications, etc. A very popular algorithm for compressing sound is the “perceptual noise shaping” technique. This algorithm uses characteristics of the human ear such as:

There are certain sounds that the human ear cannot hear.
There are certain sounds that the human ear hears better than others.
Its there are two sounds playing at the same time, we can hear the one that is louder, and not the lowest.
Using factors like these, certain parts of the song can be eliminated without significantly damaging the quality of the song for the listener. When you have created the MP3 file, what you have is music with a quality close to that of a conventional CD. It doesn’t sound exactly the same because some things have been removed, but it’s very close.

Using the MP3 format

The MP3 movement – consisting of the MP3 format itself and the ability of websites to distribute it – have done several things in the music world:

It has made it easy for anyone to distribute music at a low cost, or even for free.
It has made accessing music simple and instant.
He has taught people to manipulate music on a computer.
One of the strengths of this format is the ability to edit, create and modify music files thanks to powerful computer software tools. Thanks to these tools, it is extremely easy for anyone:

Download an MP3 file from a website and play it instantly.
Transform or “rip” a song from a CD, to the MP3 format, and listen to it later.
Record a song yourself, convert it to MP3, and make it available to everyone on the Internet.
Convert MP3 files into CD files and make your own audio CD’s with MP3 files downloaded from the Internet.
Have thousands of hours of music stored on one or more hard drives.
Upload MP3 files to portable players and listen to them wherever you want.
To do all this, all you need is a computer with a sound card, speakers, an Internet connection, a CD / DVD player / recorder, and an MP3 player.

What it is and how to perform a volume normalization on your MP3

 

What it is and how to perform a volume normalization on your MP3

Have you ever heard the term audio normalization, without being sure of what it meant? As a lover of music and technology, I also encountered such a doubt many years ago. Basically, giving a short definition, it is about the standardization of the volume, or rather, of the audio spectrum with respect to other subjects, usually of the same disc.

And that, to put it more simply, is the equalization of the volume of the different tracks on a disc. The reasons are many, and usually if the tracks are extracted from the same job they already have the same volume and gain, but what happens if we want to make a mixtape? For example, we decided to make a compilation called The Best 100 Rock Songs in History. Surely have songs from The Beatles or The Rolling Stones, and therefore from different albums. Depending on the year, type of mastering, etc. etc., we can end up with a CD that contains many different volumes, something that can be annoying when listening. That is just one of the reasons to normalize our MP3 collection.

There are add-ons for players that allow us to normalize on the fly. In fact we can say that programs like Spotify already do this by means of the option to equalize volume of all the songs, however the application that I present below allows us to permanently normalize modifying MP3 files and many other formats, both audio and Of video..

This is Mp4Gain, which stands out for its simplicity of use and is presented under an interface that is ideal to understand exactly what a normalization is and see the before and after. When we open the application we find a window in which we have a grid, which will be populated when we add files or folders, and a keypad with various options.

How do we normalize? Simply change the gain through the specific menu for this.

By pressing OK the application will start working and save our files with the same gain, so it is ideal that before doing the first tests we make a backup. It must also be taken into account that it is an operation that can take time, something that depends on the speed of our processor, the number of issues to normalize and also the size and quality of them.

Digital Audio – Beginners guide

The Cost of a High Sampling Rate

Although it is true that high sampling rates produce better sound quality … that comes at a price.

That price translates into:

Higher processing load.
Less number of tracks.
Heavier audio files.
So you always give something in return. Professional studies can support higher sampling rates because they use better equipment.

But for most home studios, people often find that the standard 48 kHz configuration is the best.

Following…

4. Bit Depth

In order to understand what bit depth is, we first have to know what bits are.

A bit (or binary digit) is a single unit of binary code, with a value of 1 or 0.

The more bits, the more possible combinations. For example…

As you can see in the diagram below, 4 bits allow a total of 16 combinations.

4 bits

When used to encode information, each of these numbers is assigned a specific value.

As the number of bits increases, the possible values ​​grow exponentially.

4 Bits = 16 possible values
8 Bits = 256 possible values
16 Bits = 16,536 possible values
24 Bits = 16,777,215 possible values
With the bit depth in the digital audio, each value is assigned a specific amplitude of the waveform.

The greater the bit depth, the greater the volume increase between high and low … and a greater dynamic range in the recording.

A good rule of thumb is: for every extra bit, the dynamic range increases by 6dB.

For example:

4 Bits = 24 dB
8 Bits = 48 dB
16 Bits = 96 dB
24 Bits = 144 dB
In the end, what this means is that… the greater the bit depth, the less noise.

Because by adding more processing margin (or headroom), the useful signal (at the high end of the spectrum) can be recorded higher above the background noise (at the low end of the spectrum).

small vs large bit depths

Following…

5. Quantization Noise

Impressive that a 24-bit recording can result in almost 17 million possible values, right?

However, that remains much less than the infinite number of possible values ​​that exist in an analog signal.

Therefore, in almost all samples, the actual value is somewhere between two possible values. The solution of the converter is simply to round it or “quantify” it to the nearest value.

The resulting distortion, known as quantization noise, takes place in 2 phases of the recording process:

at the beginning, during the A / D conversion, and
at the end, during mastering
With mastering, the sampling frequency / bit depth of the final track is usually reduced by converting to the final digital format (CD, mp3, etc.).

When that happens, some of the information is erased and “re-quantized”, generating more distortion in the sound.

The most frequent solution to deal with this problem is …

6. Dither

When reducing a 24-bit file to 16 bits, the screen is used to mask much of the resulting distortion …

Adding a low level of “random noise” to the audio signal.

As it can be difficult to visualize the concept in audio, to explain it, we usually turn to the popular analogy of the screen plot.

Is that how it works:

When a color photo is converted to black and white, a mathematical estimate is made to determine if each color pixel should be “quantized” in a black pixel, or a white one …

As is the case when digital audio samples are quantized.

As you can see in this picture, the “before” photo is pretty bad, right?

dither

But with the plot …

a small number of white pixels are randomly distributed in black parts, and …
a small number of black pixels are randomly distributed in white parts …
By adding that “random noise” to the image, the “after” photo looks much better. Well, the screen in the audio works very similarly.

Following…

7. Latency

The GREAT PROBLEM of current digital studies is the amount of latency that accumulates in the signal chain, especially with DAWs.

With all the calculations that are processed, the audio signal takes time to leave the system between a few milliseconds and a few DOCENAS of milliseconds.

Between 0-11 ms of latency – it is short enough, so a normal person does not notice it.
Between 11-22 ms – an annoying delay is heard which it is difficult to get used to.
More than 22 ms – there is so much delay that it is impossible to play or sing at tempo with the track.
In a normal digital signal chain there are usually 4 phases that contribute to the total latency:

A / D conversion
DAW Buffer
Delay of the Plugins
A / D conversion
The A / D and D / A conversion are the least harmful, contributing to total latency with less than 5 ms.

But nevertheless…

The DAW buffer and certain plugins (including compressors and virtual instruments) can add up to 20, 30 or 40 ms or

Beginner’s Guide to Digital Audio for Recording Music

62c-digital audio When recording at home began to become popular …

It happened for a simple reason:

The analog equipment of the past decades was being slowly but inexorably replaced …

For a new generation of audio interfaces and other digital equipment that was cheaper and easier to use.

And that trend has continued since then.

Today … digital audio is the standard in almost all studios, both professional and amateur.

However, surprisingly, there are few people who really understand what it is about.

So let’s see what it is about:

1. The Rise of the Digital Age

binary code Although digital audio is the standard in today’s music …

It has not always been that way.

Originally, music information only existed as sound waves in the air.

Then, as technology progressed, people discovered new ways to convert that information to other formats, including:

notes on a page
electrical signals inside a cable
radio waves in the atmosphere
relief on vinyl records
But in the end, with the rise of computers, digital audio ended up being the dominant format in the music production industry, since it allowed copying and transporting songs in a simple and free way.

And the device that made all that possible was … the digital converter.

Let’s see how they work …

2. Digital Converters

In recording studios there are 2 types of digital converters:

Those that are an independent device, which are normally seen in more advanced studies, or …
Those that are integrated into the audio interfaces, which are usually seen in home studios.
To convert the audio to binary code, they take tens of thousands of samples (samples) per second to make an “approximate” image of the analog waveform.

The image is not accurate because in the intervals between samples, the converter basically has to guess what is happening.

Digital waveform

As you can see in the diagram, in which:

the red line is the analog signal, and …
the black line is the conversion …
The results are not perfect, but they are good enough to generate excellent sound quality.

How excellent? That depends largely on …

3. Sample Rate

Check out this image:

sample rate diagram

As you can see…

When taking more samples per second, the highest sampling rate:

Collect more real information,
Go less to the estimate, and
It generates a much more accurate image of the analog signal.
Logically, the end result is … better sound quality.

Let’s talk about specific data:

Normal sampling frequencies in professional audio range around:

44.1 kHz (audio CD)
48 kHz
88.2 kHz
96 kHz
192 kHz
The minimum of 44.1kHz is due to a mathematical principle known as …

The Nyquist-Shannon Sampling Theorem

To record digital audio accurately, converters have to capture the entire human listening spectrum, which is between 20Hz – 20kHz.

According to the Nyquist-Shannon Sampling Theorem …

To capture a specific frequency, at least 2 samples are needed for each cycle … to measure both the upper and lower points of the sound wave.

That means that recording frequencies of up to 20kHz require a sampling rate of 40kHz or more, which explains why the audio CDs are just above that minimum, at 44.1kHz.

What is an audio compressor.

In the field of professional sound, a compressor is an electronic sound processor designed to reduce the dynamic range of the signal without noticing its presence too much. This task is done by reducing the system gain, when the signal exceeds a certain threshold.

Traditionally, compressors have been electronic equipment with one or two rack units, but software versions of them have appeared for some years.

A compressor acts in such a way that it attenuates the electrical signal by a certain amount (normally measured in decibels) and from a certain input level. The objective is to ensure that the resulting dynamic excursion is lower than the original, to protect certain equipment against possible signal peaks or, if it is a saturated sound, to try to hide the error.

Reasons to compress a signal

-Control the energy of the signal: The human ear is very sensitive, so the compression must be smooth and subtle so as not to capture it. This type of compression is used when there is a signal in which the intensity varies, so it is compressed to achieve a more constant signal within the values ​​assigned to it.

-Control the peak level of the signal: Often the equipment is limited, so the amplifiers can saturate and therefore be damaged. In this case the compression is used to control the signal and thus protect the equipment.

-Reduce the dynamic range of the signal: By attenuating the peaks of a signal, we reduce its dynamic range. Many devices are limited by the peaks, and this allows the RMS level of the signal to be raised.

Compressor Uses

In the field of music, its use ranges from applications for musical recordings to live sound. For example, it is often used to add more glued to the sound, an effect that is achieved by compressing the signal to subsequently apply a gain to the output of the device, which usually conceals possible interpretation failures by the artist, at least as Dynamic control refers. A compressor is highly recommended (and with certain musical styles, indispensable) for when using an electric bass. The slapping effect (hitting the strings with the finger) produces extremely high output peaks (20 dB or 10 times more than normal), which at low output levels generate distortion, and at high volumes (as in recitals) they can cause serious damage to the amplifier, and even the speaker (an excess of “excursion” can cause the speaker to tear from its suspension). Even in the (theoretical) case of a musical system with an infinite dynamic range, the difference, auditory speaking, using or not the compressor is imperceptible. Its use is also very frequent in voices, since not all singers use the appropriate technique so the signal level varies constantly.

-It is widely used in broadcasting, to improve the speaker’s diction.
-Compress during mastering improves the sound definition of the final mix.
-To protect the equipment (speakers).