Basics of digital sound Digital

Sound is a vibration, a wave, produced by all the elements of our environment, like glass when it slams (and collides with another), like the door when you knock with your knuckles to knock ... And the speakers are electromechanical systems that generate a vibration based on an electric current and with which we are able to imitate the sound of nature, to imitate that wave generated by the physical elements of our environment. 

At the end of the nineteenth century Edison invented the phonograph, which was able to transfer those vibrations that travel in the air (sound) to a cylinder and then reproduce them again. The recording consisted of vibrating the air by vibrating a recording needle that marked that same wave on a layer of aluminum surrounding the cylinder. Then, moving the cylinder with a reading needle, it vibrated as it passed through the groove that had previously been engraved. This vibration is what the listener ended up feeling. 



Basics of digital sound Digital

And basically, that's how a vinyl record works, which popularized the transfer of the second half of the 20th century. 

This way of recording music is known as analog (as opposed to digital). 

Analog sound 

The sound in the real world is analog, the sound wave has infinite values, infinite details. When this sound wave travels in a groove on a cylinder or record, that groove also has infinite values ​​and details. 

The sound hadn't been recorded for many years by putting a singer in front of a phonograph. As the industry progressed, it "electrified" the process. Now the singer or instrument generated their waves in front of a microphone, which converted those vibrations of the air into an electric wave, which traveled through a cable until it reached an audio device, where it amplified, filtered, mixed with the sound of other microphones… and eventually it would travel (electrically) to a tape recorder, like a record, and generate a groove that picked up that vibration. 



Basics of digital sound Digital

Analog sound wasn't just stored in grooves. The use of magnetic tapes, which came to the domestic market as "cassettes", also became popular. Here, instead of a groove, we had a ribbon with magnetic particles that were oriented according to a magnet (head) indicated to them. Then, to listen to that music, it was enough for the magnet (head) to do the opposite process, letting itself be guided by the magnetic field of the particles of the tape.

And it was also used to transmit sound via cable (telephone) or radio, first the AM and then, more sophisticated, the FM which is still used regularly today. 

Analog audio problem

Just as analog sound is capable of gathering infinite values ​​and details, it is also infinitely alterable by any external element.

Thus, when the sound travels in the form of an electrical signal through the cable, from the microphone that picked it up, it is altered by the electromagnetic interference in the room, generated by other devices (amplifiers, lights, electrical cables ...) as well as by the electrical resistance of the cable itself. 

When it reaches the receiving device that processes it, it is also affected by the interference itself and by the equipment itself. 

When engraving by making a groove, it is altered by the material and its strength, the material of the needle, its previous use, etc. Once recorded, the record is altered by touching it with your hands, playing it, touching the needle, the environment, the humidity, the heat… everything is altering that recording and therefore that sound.


If we talk about magnetic tapes, the alteration of information is very simple: the magnetic fields of speakers, cables or sunlight, cause the alteration of the information, as well as the humidity of the environment in which it is stored. 

In the case of radio transmission, exposure to any interference and changes in sound is much higher, which is why it is the medium that offers the least quality and is the most sensitive. 


Not to mention the last step in the chain: the team reads it, amplifies it, sends it to the speakers and the speakers themselves. 

For this reason, quality analog music requires very expensive, high-quality equipment to try to minimize (only minimize, not eliminate) all of these negative effects. For example shielded cables to try to reduce electrical interference, gold-plated connectors or special cables to reduce resistance, very expensive and high quality materials ...

The other big problem is copies: if you copy the content, the copied content is no longer the same as the original, it has partially deteriorated. If that copy is made another copy, it deteriorates more and more. This was very easy to see when copying VHS tapes.

Digital sound: resolution

In the digital world there are no infinite grays, there is only black and white, yes or no, 1 or 0, with no intermediate possibilities. This minimal unit of information is known as bit [b]. This has a number of problems and a number of benefits. 

Since the real world has more than 2 sounds, two colors, two letters… it is necessary to put more bits together and thus represent more possibilities. 


If we have 2 bits we can store 4 values:

  • 00 (0)
  • 01 (1)
  • 10 (2)
  • 11 (3)

If we have 3 bits it would be 8 values, 4 bits 16 values… and so on. The usual practice is to use groups of 8 bits, which are called bytes [B].

When a sound signal is digitized, the wave is sampled to see its value at a specific time and that value is converted into a number (the closest number). Lugo is resampled and the next value is stored and so on. This function is performed by a device known as a digital to analog converter (ADC). 


Depending on the number of bits we have, we will get a lower or higher resolution in the digitization. For example, if we use 2 bits we could record 3 different levels (0 to 3). The more bits we have, the more different levels we can have and the more true it will be. 

Let's assume an analog sound wave lasting 1 second.

Basics of digital sound Digital

We digitize this wave with a resolution of 2 bits and take 11 samples in one second. This means that at most we can use 4 different values. 

Basics of digital sound Digital

This will be stored as a sequence of 11 numbers (11 samples were made) of 2 bits each. 

Basics of digital sound Digital

When we turn that information into a wave, we will have to work with the information we have stored. As you can see, it doesn't look much like the original. 

Basics of digital sound Digital

However, if we repeat the digitizing process with 4 bits, each sample could have one of 16 possible values, which makes the wave more similar to the original.

Basics of digital sound Digital
Basics of digital sound Digital
Basics of digital sound Digital

The price to pay for this higher resolution is the space taken up in the storage. With 4 bits we occupy twice as much as with 2 bits. And it will increase as we add more bits. 

Digital sound: the sampling rate.

The analog-to-digital converter takes a sample of the wave at a specific time and converts it to a number. But storing music is necessary to take samples of the wave over time. 

As for the resolution, if we take a few samples we will use little data but the final wave will be very different from the original. If we take a lot of samples, the wave will look more like the original but it will take up more space.

Shannon's theorem says that we must take at least two samples in each wave of the highest frequency that we want to digitize. If we want to digitize a frequency of 1.000 Hz, we must at least sample twice, at 2.000 Hz (or 2 kHz). 

Digital sound: what resolution and frequency do we choose?

If we want perfect quality, that is, that we memorize a sound identical to the analog curve, since the analog curve has infinite different levels and infinite details, we need to use an infinite resolution. Also, we would have to sample infinitely many times in one second. It's impossible. Furthermore, there would not be enough space on all hard drives on planet earth to store a second of sound. 

The logical thing would be to look for the sufficient value, i.e. the minimum value of resolution and sampling rate that makes the sound good enough that the human ear cannot distinguish it. Putting more does not contribute to anything, it just takes up space and bandwidth in its transmission.

In the late 70s and early 80s, the standard was set for the CD (compact disc), the first mass digital audio system. At that time, it was determined that the proper resolution for high quality would be 16 bits (65.536 different values). However, in studios and in some digital files that are marketed, we can achieve resolutions of 24 or 32 bits. 

Regarding the frequency, it is considered that the human ear (of a young person who hears very well) is able to hear from 20 Hz to 20.000 Hz (20 kHz) so we should sample at least twice the speed to comply. When the CD was defined it was agreed that the correct thing to do was to sample at 44,1 kHz. Of course it can be sampled at a higher frequency, such as 48kHz, 96kHz, 192kHz ... 

So, the standard of a CD is to assume a value between 65.536 possible (16 bits, note that in the example we used 4 bits which assumes only 16 combinations) and 44.100 times per second.

The benefits of digital sound

Although we have seen that digital sound can never have the theoretical quality of analog sound, it is enough to cross the threshold of what is perceptible to the human ear to be able to have equal quality in practice.

The great advantage of digital sound is that, unlike analog, it is not sensitive to environmental conditions and does not deteriorate. 0 cannot be converted to 1 or 1 to 0 unless we encounter enormous interference. Additionally, digital systems usually have error detection measures, so that if the player detects that a sound has arrived incorrectly, it may request that it be read again. 

Therefore, information can travel through a cable without undergoing any alteration with simpler and cheaper materials than analog sound. No special connectors are required, only that the cable is capable of transmitting the expected data volume. 

On the other hand, you can make a copy exactly the same as the original. That is, if the original says 0011010 and the copy says 0011010, the copy and the original are perfectly the same. And so they can be copied from the copy of the copy of the copy to infinity without losing any quality. 

Therefore, the advantages of digital sound are the inalterability of information and the ability to copy without loss. Obviously if we cut a CD in half, scratch it or create a layer of mold, it will not be readable, neither zero nor one, but it will always be much more unalterable than the analog information. 

One of the points where a major difference is achieved is in over-the-air (radio) transmission which allows information to be sent without any alteration, unlike analogue media. 

Someone will say: but in DTT (digital television), for example, sometimes there are defects or the picture. This is because in DTT you cannot ask the broadcaster to send you the information that has arrived incorrectly and therefore you must use it even if it is not correct. But if a minimum of correct transmission is achieved, the image is the same as it was sent without any alteration. 

add a comment of Basics of digital sound Digital
Comment sent successfully! We will review it in the next few hours.