Coding of audio information. Preparation for the Unified State Exam

1.What computer device models human thinking?
-CPU

2. Actions on initial information (facts) in accordance with certain rules are
-data processing

3.Select a rule from the proposed messages
-when multiplying simple fractions, their numerators and denominators are multiplied

4. For whom is the following message most likely to be informative: “A program is an algorithm written in a programming language”?
-novice programmer

5.Where is the currently running program and the data it processes stored?
- in RAM

6.Which computer device carries out the sound sampling process?
-sound card

7. The information content of a message received by a person is determined
-availability of new knowledge and clarity

8.Instead of ellipses, insert the appropriate concepts: “The directory contains information about... stored in...”
A) files, external memory

9.Specify the command(s), when executed, the selected fragment is transferred to the clipboard
B) cut and copy

10.Which of the following actions relate to text formatting?
-setting the leveling mode

11.Application software includes:
B) text editors

12.Operating system is
- a set of programs that organize the control of the computer and its interaction with the user

13.Suggested commands
5Make drive A current.
2Create TOWN directory
3Create a STREET directory
1Create the Home.txt file
4Enter the created directory
Arrange the numbered commands so that an algorithm is obtained that creates a file on an empty floppy disk with the full name A:\TOWN\STREET\Home.txt
B) 5,2,3,1

14. To store text, 84000 bits are required. How many pages will this text take if the page contains 30 lines of 70 characters per line? To encode text, an encoding table consisting of 256 characters is used.
84000/(log(256)/log(2))/30/70 = 5

15.The book consists of 64 pages. Each page has 256 characters. How much information is contained in a book if it uses a 32-character alphabet?
A) 81920 bytes B) 40 KB C) 10 KB D) 16 KB E) 64 KB
64*256*(log(32)/log(2)) /8/1024 = 10

16. How many characters does a message written using a 16-character alphabet contain if its volume is 1/16 of a Megabyte?
(1/16)*1024*1024*8/(log(16)/log(2)) = 131072

17. How much memory does a graphic image take if its size is 40x60 and a 32-bit binary code is used to encode the pixel color.
A) 2400 bytes B) 2100 bytes C) 960 bytes D) 9600 bytes E) 12000 bytes
40*60*32/8 = 9600

18.Text takes up 0.25 KB of memory. How many characters does this text contain if a 256 character encoding table is used?
0.25*1024*8/(log(256)/log(2)) = 256

19.How many bits of information are contained in a quarter-kilobyte message?
1/4*1024*8 = 2048

Principles of audio digitization

Digital audio is an analog audio signal represented by discrete numerical values ​​of its amplitude.

Audio digitization- technology of divided time step and subsequent recording of the obtained values ​​in numerical form.
Another name for audio digitization is analog-to-digital conversion sound.

Audio digitization involves two processes:

  • the process of sampling (sampling) a signal over time
  • amplitude quantization process.

Time sampling

Time sampling process - the process of obtaining the values ​​of a signal that is converted, with a certain time step - sampling step. The number of signal magnitude measurements carried out in one second is called sampling rate or sampling rate, or sampling rate(from the English “sampling” - “sampling”). The smaller the sampling step, the higher the sampling frequency and the more accurate representation of the signal we will receive.
This is confirmed by Kotelnikov’s theorem (in foreign literature it is found as Shannon’s theorem, Shannon). According to it, an analog signal with a limited spectrum can be accurately described by a discrete sequence of values ​​of its amplitude if these values ​​are taken with a frequency that is at least twice the highest frequency of the signal spectrum. That is, an analog signal in which the highest frequency of the spectrum is equal to F m can be accurately represented by a sequence of discrete amplitude values ​​if the sampling frequency F d holds: F d >2F m .
In practice, this means that in order for the digitized signal to contain information about the entire range of audible frequencies of the original analog signal (0 - 20 kHz), it is necessary that the selected sampling frequency be at least 40 kHz. The number of amplitude measurements per second is called sampling rate(if the sampling step is constant).
The main difficulty with digitization is the inability to record measured signal values ​​with perfect accuracy.

Linear (uniform) amplitude quantization

Let us allocate N bits to record one value of the signal amplitude in the computer memory. This means that with one N-bit word you can describe 2 N different positions. Let the amplitude of the digitized signal range from -1 to 1 of some conventional units. Let's imagine this range of amplitude changes - the dynamic range of the signal - in the form of 2 N -1 equal intervals, dividing it into 2 N levels - quanta. Now, to record each individual amplitude value, it must be rounded to the nearest quantization level. This process is called amplitude quantization. Amplitude quantization – the process of replacing real signal amplitude values ​​with values ​​approximated with some accuracy. Each of the 2N possible levels is called a quantization level, and the distance between the two nearest quantization levels is called a quantization step. If the amplitude scale is divided linearly into levels, quantization is called linear (homogeneous).
The rounding accuracy depends on the selected number (2 N) of quantization levels, which in turn depends on the number of bits (N) allocated to record the amplitude value. The number N is called quantization bit depth(meaning the number of digits, that is, bits, in each word), and the numbers obtained as a result of rounding the amplitude values ​​are counts or samples(from the English “sample” - “measurement”). It is assumed that quantization errors resulting from 16-bit quantization remain almost unnoticeable to the listener. This method of signal digitization - sampling the signal in time in combination with the homogeneous quantization method - is called pulse code modulation, PCM(English: Pulse Code Modulation - PCM).
The digitized signal in the form of a set of successive amplitude values ​​can already be stored in the computer memory. In the case where absolute amplitude values ​​are recorded, such recording format called PCM(Pulse Code Modulation). The standard audio compact disc (CD-DA), used since the early 1980s, stores information in PCM format with a sampling frequency of 44.1 kHz and a quantization bit depth of 16 bits.

Other digitization methods

Analog-to-digital converters (ADCs)

The above-described audio digitization process is performed by analog-to-digital converters (ADCs).
This conversion includes the following operations:

  1. Bandwidth limitation is performed using a low-pass filter to suppress spectral components whose frequency exceeds half the sampling frequency.
  2. Sampling in time, that is, replacing a continuous analog signal with a sequence of its values ​​at discrete moments in time - samples. This problem is solved by using a special circuit at the input of the ADC - a sample-and-hold device.
  3. Level quantization is the replacement of a signal sample value with the closest value from a set of fixed values ​​- quantization levels.
  4. Coding or digitization, as a result of which the value of each quantized sample is represented as a number corresponding to the serial number of the quantization level.

This is done as follows: a continuous analog signal is “cut” into sections, with a sampling frequency, a digital discrete signal is obtained, which goes through a quantization process with a certain bit depth, and then is encoded, that is, replaced by a sequence of code symbols. To record sound in the frequency range of 20-20,000 Hz, a sampling frequency of 44.1 and higher is required (currently, ADCs and DACs with sampling frequencies of 192 and even 384 kHz have appeared). To obtain a high-quality recording, 16 bits is sufficient, but to expand the dynamic range and improve the quality of sound recordings, 24 (less often 32) bits are used.

Encoding digitized audio before recording it onto media

There are many different ways to store digital audio. Digitized sound is a set of signal amplitude values ​​taken at certain intervals.

Terminology

  • encoder - a program (or device) that implements a specific data encoding algorithm (for example, an archiver, or an MP 3 encoder), which takes source information as input and returns encoded information in a specific format as output.
  • decoder - a program (or device) that implements the reverse conversion of an encoded signal into a decoded one.
  • codec (from the English “codec” - “Coder / Decoder”) - a software or hardware unit designed for encoding/decoding data.

The most common codecs

  • MP3 – MPEG-1 Layer 3
  • OGG – Ogg Vorbis
  • WMA – Windows Media Audio
  • MPC - MusePack
  • AAC – MPEG-2/4 AAC (Advanced Audio Coding)
    • MPEG-2 AAC standard
    • MPEG-4 AAC standard

Some audio digitization formats in comparison

Main article: Comparison of audio formats

Format name Quantization, bit Sampling frequency, kHz Number of channels Amount of data flow from disk, kbit/s Compression/packing ratio
16 44,1 2 1411,2 1:1 without loss
Dolby Digital (AC3) 16-24 48 6 up to 640 ~12:1 with losses
DTS 20-24 48; 96 up to 8 before 1536 ~3:1 with losses
DVD-Audio 16; 20; 24 44,1; 48; 88,2; 96 6 6912 2:1 without loss
DVD-Audio 16; 20; 24 176,4; 192 2 4608 2:1 without loss
MP3 floating up to 48 2 up to 320 ~11:1 with losses
A.A.C. floating up to 96 up to 48 up to 529 with losses
AAC+ (SBR) floating up to 48 2 up to 320 with losses
Ogg Vorbis up to 32 up to 192 up to 255 up to 1000 with losses
WMA up to 24 up to 96 up to 8 up to 768 2:1, lossless version available

Full cycle of sound conversion: from digitization to consumer playback

Full cycle of sound conversion: from digitization to playback

Target. Understand the process of converting sound information, master the concepts necessary to calculate the volume of sound information. Learn to solve problems on a topic.

Goal-motivation. Preparation for the Unified State Exam.

Lesson Plan

1. View a presentation on the topic with comments from the teacher. Annex 1

Presentation material: Coding of audio information.

Since the early 90s, personal computers have been able to work with audio information. Every computer that has a sound card, microphone and speakers can record, save and play audio information.

The process of converting sound waves into binary code in computer memory:

The process of reproducing audio information stored in computer memory:

Sound is a sound wave with continuously changing amplitude and frequency. The greater the amplitude, the louder it is for a person; the higher the frequency of the signal, the higher the tone. Computer software now allows a continuous audio signal to be converted into a sequence of electrical pulses that can be represented in binary form. In the process of encoding a continuous audio signal, it is time sampling . A continuous sound wave is divided into separate small temporary sections, and for each such section a certain amplitude value is set.

Thus, the continuous dependence of the signal amplitude on time A(t) is replaced by a discrete sequence of volume levels. On the graph, this looks like replacing a smooth curve with a sequence of “steps”. Each “step” is assigned a sound volume level value, its code (1, 2, 3, etc.

Further). Sound volume levels can be considered as a set of possible states; accordingly, the more volume levels are allocated during the encoding process, the more information the value of each level will carry and the better the sound will be.

Audio adapter ( sound card) is a special device connected to a computer, designed to convert electrical vibrations of audio frequency into a numerical binary code when inputting sound and for the reverse conversion (from a numerical code into electrical vibrations) when playing sound.

In the process of recording sound, the audio adapter measures the amplitude of the electric current with a certain period and enters the binary code of the resulting value into the register. Then the resulting code from the register is rewritten into the computer's RAM. The quality of computer sound is determined by the characteristics of the audio adapter:

  • Sampling frequency
  • Bit depth (sound depth).

Time sampling rate

This is the number of measurements of the input signal in 1 second. Frequency is measured in Hertz (Hz). One measurement per second corresponds to a frequency of 1 Hz. 1000 measurements in 1 second – 1 kilohertz (kHz). Typical sampling rates of audio adapters:

11 kHz, 22 kHz, 44.1 kHz, etc.

Register width (sound depth) is the number of bits in the audio adapter register that specifies the number of possible sound levels.

The bit depth determines the accuracy of the input signal measurement. The larger the bit depth, the smaller the error of each individual conversion of the electrical signal value into a number and back. If the bit depth is 8 (16), then when measuring the input signal, 2 8 = 256 (2 16 = 65536) different values ​​can be obtained. Obviously, a 16-bit audio adapter encodes and reproduces sound more accurately than an 8-bit one. Modern sound cards provide 16-bit audio encoding depth. The number of different signal levels (states for a given encoding) can be calculated using the formula:

N = 2 I = 2 16 = 65536, where I is the sound depth.

Thus, modern sound cards can provide encoding of 65536 signal levels. Each audio signal amplitude value is assigned a 16-bit code. When binary coding a continuous audio signal, it is replaced by a sequence of discrete signal levels. The quality of encoding depends on the number of signal level measurements per unit time, that is sampling rates. The more measurements are made in 1 second (the higher the sampling frequency, the more accurate the binary coding procedure.

Sound file - a file that stores audio information in numeric binary form.

2. Repeat the units of measurement of information

1 byte = 8 bits

1 KB = 2 10 bytes = 1024 bytes

1 MB = 2 10 KB = 1024 KB

1 GB = 2 10 MB = 1024 MB

1 TB = 2 10 GB = 1024 GB

1 PB = 2 10 TB = 1024 TB

3. Reinforce the material learned by watching a presentation or textbook

4. Problem solving

Textbook, showing the solution at the presentation.

Task 1. Determine the information volume of a stereo audio file with a sound duration of 1 second with high sound quality (16 bits, 48 ​​kHz).

Task (independently). Textbook, showing the solution at the presentation.
Determine the information volume of a digital audio file with a sound duration of 10 seconds at a sampling frequency of 22.05 kHz and a resolution of 8 bits.

5. Consolidation. Solving problems at home, independently in the next lesson

Determine the amount of memory to store a digital audio file whose playing time is two minutes at a sampling frequency of 44.1 kHz and a resolution of 16 bits.

The user has a memory capacity of 2.6 MB. It is necessary to record a digital audio file with a sound duration of 1 minute. What should the sampling frequency and bit depth be?

The amount of free memory on the disk is 5.25 MB, the bit depth of the sound card is 16. What is the duration of the sound of a digital audio file recorded with a sampling frequency of 22.05 kHz?

One minute of recording a digital audio file takes up 1.3 MB of disk space, and the sound card's bit capacity is 8. At what sampling rate is the sound recorded?

How much memory is required to store a high-quality digital audio file with a playing time of 3 minutes?

The digital audio file contains low-quality audio recording (the sound is dark and muffled). What is the duration of a file if its size is 650 KB?

Two minutes of recording a digital audio file takes up 5.05 MB of disk space. Sampling frequency - 22,050 Hz. What is the bit depth of the audio adapter?

The amount of free memory on the disk is 0.1 GB, the bit depth of the sound card is 16. What is the duration of the sound of a digital audio file recorded with a sampling frequency of 44,100 Hz?

Answers

No. 92. 124.8 seconds.

No. 93. 22.05 kHz.

No. 94. High sound quality is achieved with a sampling frequency of 44.1 kHz and an audio adapter bit depth of 16. The required memory size is 15.1 MB.

No. 95. The following parameters are typical for a gloomy and muffled sound: sampling frequency - 11 kHz, audio adapter bit depth - 8. The sound duration is 60.5 s.

No. 96. 16 bits.

No. 97. 20.3 minutes.

Literature

1. Textbook: Computer Science, problem book-workshop, volume 1, edited by I.G. Semakin, E.K. Henner)

2. Festival of pedagogical ideas “Open Lesson” Sound. Binary coding of audio information. Supryagina Elena Aleksandrovna, computer science teacher.

3. N. Ugrinovich. Computer science and information technology. 10-11 grades. Moscow. Binomial. Knowledge Laboratory 2003.

With varying amplitude and frequency. The higher the amplitude of the signal, the louder it is perceived by a person. The higher the frequency of the signal, the higher its tone.

Figure 1. Amplitude of sound wave vibrations

Sound wave frequency determined by the number of vibrations per second. This value is measured in hertz (Hz, Hz).

The human ear perceives sounds in the range from $20$ Hz to $20$ kHz, this range is called sound. The number of bits that are allocated to one sound signal is called audio coding depth. Modern sound cards provide $16-$, $32-$ or $64-$bit audio encoding depth. In the process of encoding audio information, a continuous signal is replaced discrete, that is, it is converted into a sequence of electrical pulses consisting of binary zeros and ones.

Audio sampling rate

One of the important characteristics of the audio encoding process is the sampling rate, which is the number of signal level measurements per $1$ second:

  • one measurement per second corresponds to a frequency of $1$ gigahertz (GHz);
  • $1000$ measurements per second corresponds to a frequency of $1$ kilohertz (kHz).

Definition 2

Audio sampling rate is the number of sound volume measurements in one second.

The number of measurements can be in the range from $8$ kHz to $48$ kHz, with the first value corresponding to the frequency of radio broadcasts, and the second to the sound quality of musical media.

Note 1

The higher the frequency and sampling depth of the audio, the higher quality the digitized audio will sound. The lowest quality of digitized sound, which corresponds to the quality of telephone communication, is obtained when the sampling frequency is 8000 times per second, the sampling depth is $8$ bits, which corresponds to recording one audio track (mono mode). The highest quality of digitized sound, which corresponds to the quality of an audio CD, is achieved when the sampling frequency is $48,000 times per second, the sampling depth is $16$ bits, which corresponds to recording two audio tracks (stereo mode).

Information volume of a sound file

It should be noted that the higher the quality of digital sound, the larger the information volume of the sound file.

Let's estimate the information volume of a mono audio file ($V$), this can be done using the formula:

$V = N \cdot f \cdot k$,

where $N$ is the total duration of the sound, expressed in seconds,

$f$ - sampling frequency (Hz),

$k$ - encoding depth (bits).

Example 1

For example, if the duration of the sound is $1$ minute and we have an average sound quality at which the sampling frequency is $24$ kHz and the encoding depth is $16$ bits, then:

$V=60 \cdot 24000 \cdot 16 \bit=23040000 \bit=2880000 \byte = 2812.5 \KB=2.75 \MB.$

When encoding stereo audio, the sampling process is performed separately and independently for the left and right channels, which, accordingly, doubles the size of the audio file compared to mono audio.

Example 2

For example, let's estimate the information volume of a digital stereo audio file, the sound duration of which is equal to $1$ second with average sound quality ($16$ bits, $24000$ measurements per second). To do this, multiply the encoding depth by the number of measurements per $1$ second and multiply by $2$ (stereo sound):

$V=16 \bit \cdot 24000 \cdot 2 = 768000 \bit = 96000 \byte = 93.75 \KB.$

Basic methods of encoding audio information

There are various methods for encoding audio information with binary code, among which there are two main directions: FM method And Wave-Table method.

FM method (Frequency Modulation) is based on the fact that theoretically any complex sound can be decomposed into a sequence of simple harmonic signals of different frequencies, each of which will represent a regular sinusoid, which means that it can be described by a code. The process of decomposing sound signals into harmonic series and their representation in the form of discrete digital signals occurs in special devices called “analog-to-digital converters” (ADC).

Figure 2. Converting an audio signal to a discrete signal

Figure 2a shows the audio signal at the ADC input, and Figure 2b shows the already converted discrete signal at the ADC output.

For reverse conversion when playing sound, which is presented in the form of a numerical code, digital-to-analog converters (DACs) are used. The sound conversion process is shown in Fig. 3. This encoding method does not provide good sound quality, but provides a compact code.

Figure 3. Converting a discrete signal into an audio signal

Figure 3a shows the discrete signal that we have at the DAC input, and Figure 3b shows the audio signal at the DAC output.

Table-wave method (Wave-Table) is based on the fact that pre-prepared tables store samples of the sounds of the surrounding world, musical instruments, etc. Numerical codes express the pitch, duration and intensity of the sound and other parameters characterizing the features of the sound. Since “real” sounds are used as samples, the quality of the sound obtained as a result of synthesis is very high and approaches the sound quality of real musical instruments.

Examples of audio file formats

Sound files come in several formats. The most popular of them are MIDI, WAV, MP3.

MIDI format(Musical Instrument Digital Interface) was originally intended to control musical instruments. Currently used in the field of electronic musical instruments and computer synthesis modules.

WAV audio file format(waveform) represents arbitrary sound as a digital representation of the original sound vibration or sound wave. All standard Windows sounds have a WAV extension.

MPZ format(MPEG-1 Audio Layer 3) is one of the digital formats for storing audio information. It provides higher encoding quality.

Test on the topic: “Computer structure”

Option 1

1. A common property of Babbage's machine, a modern computer and the human brain is the ability to process:

A) numerical information; B) audio information;

B) text information; D) graphic information.

2. Mass production of personal computers began in:

A) 40sgg;B) 80sgg;

B)50s;D) 90sgg.

A) the computer consists of separate modules connected to each other by a backbone;

B) a computer is a single, indivisible device;

B) the components of the computer system are irreplaceable;

D) the computer system is capable of matching for as long as desired

requirements of modern society and does not need modernization.

4. Specify the computer device that processes information:

B) monitor; D) keyboard.

5. Computer performance depends on:

A) type of monitor; B) supply voltage;

B) processor frequencies; D) the speed of pressing the keys.

6. Which device has a harmful effect on human health?

A) printer;IN)system unit;

B) monitor; D) keyboard.

7. When you turn off the computer, all information is erased:

A) on a floppy disk; B) on the hard drive;

B) onCD- ROMdisk; D) in RAM.

8. The smallest addressable element of RAM is:

A) machine word; B) byte;

B) register; D) file.

9. The properties of ROM are:

A) only reading information; B) rewriting information;

B) energy dependence; D) short-term storage of information.

10. Main purpose of the hard drive:

A)transfer information;

B) store data that is not always in RAM;

B) process information;

D) enter information.

11. In order for the processor to work with programs stored on the hard drive, it is necessary:

A) load them into RAM;

B) display them on the monitor screen;

B) load them into the processor;

D) open access.

12. Indicate devices that are not information input devices:

A) keyboard; B) monitor;

B) mouse; D) scanner.

13. Indicate a statement that characterizes a dot matrix printer:

A) high printing speed; B) silent operation;

B) high quality printing; D) the presence of a print head.

14. Keyboard - This:

15. The key completes entering the command:

A) Shift;IN) space;

B)Backspace;G) Enter.

16. Punctuation marks are printed:

A)with keyShift; B) with a keyAlt;

B) by simply pressing a key;G)with keyCtrl.

17. Speakers - This:

A) audio information processing device;

B) audio information output device;

B) audio information storage device;

D) audio information input device.

Option 2

1. The first computers were created in:

A) 40s; B) 70s;

B) 50s; D) 80sgg.

2. Which device has the fastest information exchange speed?

A) CD- ROMdrive; B) floppy drive;

B) hard drive; D) RAM chips.

3. Indicate the correct statement:

A) The motherboard contains only those blocks that process information, and the circuits that control all other computer devices are implemented on separate boards and are inserted into standard connectors on the motherboard;

B) The motherboard contains all the blocks that receive, process and output information using electrical signals and to which all the necessary input/output devices can be connected;

B) On the motherboard there is a system data bus, to which adapters and controllers are connected, allowing the computer to communicate with input/output devices;

D) All devices of the computer system are located on the motherboard and communication between them is carried out through a backbone.

4. What device is designed to store information?

A) external memory; B) processor;

B) monitor; D) keyboard.

5. In order to preserve information, floppy disks must be protected from:

A) cold; B) magnetic fields;

B) light; D) atmospheric changespressure.

6. The processor processes information:

A) in the decimal number system

B) in binary code;

B) in BASIC language;

D) in text form.

7. In which direction from the monitor is the maximum harmful radiation?

A) from the screen forward; B) from the screen down;

B) from the screen back; D) from the screen up.

8. Processor performance is characterized by:

A)number of operations per second;

B) the number of programs running simultaneously;

B) the time of organizing communication between the ALU and RAM;

D) dynamic characteristics of input-output devices.

9. Smallest addressable part of RAM:

A)bit;IN)file;

B) kilobyte; D) byte.

10. A characteristic property of RAM is:

A) energy dependence;

B) energy independence;

B) rewriting information;

D) long-term storage of information.

11. To transfer information use:

A) floppy disk; B) disk drive;

B) RAM; D) processor.

12. During execution the program is:

A) on the clipboard; B) in RAM;

B) on the keyboard; D) on the hard drive.

13. Indicate the concepts characteristic of an inkjet printer:

A) low print quality; B) ink;

B) laser beam; D) print head with rods.

14. Mouse - This:

A) information output device;

B) symbolic information input device;

B) manipulator type input device;

D) information storage device.

15. Specify a device that is not an output device:

A) monitor; B) printer;

B) keyboard; D) sound speakers.

16. Key assignment Backspace :

A) command entry;

B) deleting the character to the left of the cursor;

B) printing capital characters;

D) go to the top of the page.

17. Scanner - This:

A) information processing device;

B) information storage device;

B) a device for entering information from paper;

D) a device for outputting information onto paper.

Answers to the test: