Coding and processing of audio information presentation. Coding and processing of audio information Audio coding presentation

Coding of graphic information. No. Questions. 1. This is spatial discretization. 2. Screen resolution in graphics mode is determined by quantity. 3. The video memory page is 16,000 bytes. The display operates in 320x400 pixel mode. How many colors are in the palette? 4. Determine the color depth in graphic mode, in which the palette consists of 256 colors. 5. A 256-color drawing contains 120 bytes of information. How many points does it consist of? 6. Determine the number of colors in the palette at a color depth of 16 bits. 7. The black and white raster image has a size of 10 X 10 pixels. How much memory will this image take? 8. A color (with a palette of 256 colors) raster image has a size of 10 X 10 pixels. How much memory will this image take? 9. In the process of converting a raster graphic image, the number of colors decreased from 65536 to 16. How many times will the amount of memory it occupies decrease?


What is sound? Using a microphone, the sound is converted into a so-called analog electrical signal. sound_high_low.swf sound_quiet_aloud.swf An analog signal is an arbitrary change in a certain value within a given range. Sound is vibrations of a medium (air, water) that are perceived by the human ear.


Digitization Digital signal Digitization is the conversion of an analog signal into a digital code.


Sampling 0 T 2T2T 0 T 2T2T Time sampling of audio is a process in which, during encoding of a continuous audio signal, the sound wave is divided into separate small time sections, and for each such section a certain amplitude value is set. The greater the amplitude of the signal, the louder the sound. Analog signal Digital signal


Sampling frequency The quality of digital sound depends on the number of measurements of the sound volume level per unit of time, i.e., the sampling frequency. The more measurements are taken in 1 second (the higher the sampling frequency), the more accurately the “ladder” of the digital audio signal follows the curve of the analog signal. The audio sampling rate is the number of sound volume measurements per second. Measured in Hz.


Sampling rates The most commonly used sampling rates for audio encoding in computers are 8 kHz (poor quality, but sufficient for speech recognition), 11 kHz, 22 kHz, 44.1 kHz (audio CDs), 48 kHz (DVD movies), 96 kHz and 192 kHz (high quality sound in DVD audio format).


Audio encoding depth During the sampling process, limited space is allocated for storing one sample in memory. Let's imagine that 3 bits are allocated for one sample. In this case, the code of each sample is an integer from 0 to 7. The entire range of possible signal values, from 0 to the maximum permissible, is divided into 8 bands, each of which is assigned a number (code). All samples that fall into the same band have the same code. That. When encoding audio, sampling is performed with loss of information


Audio encoding depth If the encoding depth is known, then the number of digital audio volume levels (sampling level) can be calculated using the formula. N = 2 I Inexpensive sound cards have a bit depth, most modern ones are 24 bits, which allows the use of 2 24 = different levels. The depth (bit depth) of audio encoding is the number of bits that are allocated to one sound dimension. Converting the measured signal value into a number is called level sampling. This operation is performed by the analog-to-digital converter (ADC) of the sound card.


Graphic file formats WAV (Waveform audio format), often uncompressed (size!) MP3 (MPEG-1 Audio Layer 3, lossy compression) WMA (Windows Media Audio, streaming audio, compression) OGG (Ogg Vorbis, open format, compression with losses) Using digitization, you can encode any sound that a microphone receives (human voice, surf noise, etc.). However, this method also has disadvantages: when digitizing sound, there is always a loss of information (due to sampling); Audio files tend to be large in size, so most modern formats use compression.


Instrumental encoding MIDI (Musical Instrument Digital Interface) - digital interface for musical instruments (*.MID files) accurately reproduces the sound of instruments without loss of quality. The MIDI format stores a note (pitch, duration) a musical instrument (128 melodic and 47 percussion instruments can be used) sound parameters (volume, timbre) multi-channel sound (polyphony) The human voice cannot be encoded MIDI keyboard




Task 1 A single-channel (mono) sound recording is made with a sampling frequency of 16 kHz and a coding depth of 24 bits. The recording lasts 1 minute, its results are written to a file, data compression is not performed. Which of the following numbers is closest to the size of the resulting file, expressed in megabytes? 1) 0.2 2) 2 3) 34) 4 Solution: 16 kHz = Hz; V = M*i*t V = * 24 *60 = bit 2.7 MB Closest value 3 MB Answer: 3)


Task 2 The volume of the sound file is 5.25 MB, the bit depth of the sound card is 16. What is the duration of the sound of this file (approximately), recorded with a sampling frequency of 22.05 kHz? V = M * i * t t = 5.25 * 8 * 1024 *1024 / (22.05 * 1000 * 16) = 125 sec V = 5.25 MB M = 22.05 kHz i = 16 bits t = V / (M*i)


Task 3 A single-channel (stereo) sound recording is made with a sampling frequency of 64Hz. 32 sampling levels were used during recording. The recording lasts 4 minutes 16 seconds, its results are written to a file, and each signal is encoded with the minimum possible and the same number of bits. Calculate the size of the resulting file, expressed in kilobytes? Solution: 32 = 2 5 – Coding depth i=5 bits 4 min 16 s = = 256 s V = = byte = 5 2 KB = 10 KB Answer: 10 KB.



To use presentation previews, create a Google account and log in to it: https://accounts.google.com


Slide captions:

Properties: sound - longitudinal wave; spreads in elastic media (air, water, various metals, etc.); has a finite speed. Sound vibrations (waves) are mechanical vibrations whose frequency ranges from 20 to 20,000 Hz. Sound vibrations 20 Hz 20,000 Hz

The loudness of the sound depends on the amplitude of the vibrations. The greater the amplitude of the vibrations, the louder the sound. sound height is determined by the frequency of air vibrations. speed of sound – speed of propagation of waves in a medium. sound timbre - the color of the sound, depending on the sound source (violin, piano, guitar, etc.). The unit of sound volume is decibel (dB) (tenth of a white). Named after Alexander Graham Bell, inventor of the telephone. sound_high_low.swf sound_quiet_aloud.swf

fourth.swf third.swf Dependence of the volume and pitch of sound on the intensity and frequency of the sound wave

Sound source Level (dB) Calm breathing Not perceptible Whispering 10 Rusting leaves 17 Flipping through newspapers 20 Normal noise in the house 40 Surf on the shore 40 Medium-volume conversation 50 Loud conversation 70 Working vacuum cleaner 80 Subway train 80 Rock music concert 100 Rolling thunder 110 Jet engine 110 Gun shot 120 Pain threshold 120

Sound information 2. Temporary sound discrediting 3. Discrediting frequency 4. Sound encoding depth 5. Quality of digitized sound 6. Sound editors

Analog Discrete physical quantity takes on an infinite number of values, and they change continuously. a physical quantity takes on a finite set of values, and they change abruptly. Vinyl record (sound track changes shape continuously) Audio CD (sound track contains areas of varying reflectivity)

t A(t) Time sampling is the division of a continuous sound wave into separate small time sections, and for each section a certain amplitude value is set.

QUANTIZATION is the process of replacing real signal values ​​with approximate ones with a certain accuracy. BITRATE (bitrate) - quantization level, the amount of information per unit of time (bits per second). That is, how much information about each second of recording we can spend. Measured in bits.

Sound information is stored as amplitude values ​​taken at specific points in time (i.e., measurements are taken in “pulses”).

To digitize sound, special devices are used: an analog-to-digital converter (ADC) and a digital-to-analog converter (DAC).

Let the sound encoding depth be 16 bits, then the number of sound volume levels is equal to: N = 2 I = 2 16 = 65 536 During the encoding process, each sound volume level is assigned its own 16-bit binary code, the lowest sound level will correspond to the code 00000000000000000, and the highest - 1111111111111111. AUDIO SAMPLE DEPTH (I) is the amount of information required to encode discrete volume levels of digital audio. N – number of volume levels I – coding depth

AUDIO SAMPLE RATE is the number of sound volume measurements taken in one second. 1 Hz = 1/s 1 kHz = 1000/s Sample rate (samplerate) - sampling frequency (or sampling frequency) - the frequency of sampling a continuous signal in time when sampling it (in particular, by an analog-to-digital converter - ADC). sound_frequency.swf

The higher the quality of digital sound, the larger the information volume of the sound file. Parameter Encoding depth Sampling frequency Telephone communication 8 bits up to 8 kHz Average quality 8 bits or 16 bits 8-48 kHz CD sound 16 bits up to 48 kHz

V = I * M * t * k V - volume of the audio file, I - audio encoding depth, M - audio sampling frequency, t - duration of the file, k - number of audio channels (mono mode k = 1, stereo k = 2)

Example. Estimate the information volume of a high-quality stereo audio file with a sound duration of 1 minute, if the encoding “depth” is 16 bits and the sampling frequency is 48 kHz. The information volume of a 1 second sound file is: 16 bits * 48,000 * 2 = 1,536,000 bits = 187.5 KB This means that the bitrate or playback speed should be 187.5 kilobytes per second. The information volume of a sound file lasting 1 minute is: 187.5 KB/s * 60 s = 11 MB

Noise removal Dividing a stereo recording into two different files: Sound mixing Adding effects Sound editing is any kind of transformation.

Sound editors allow you to change the quality of digital audio and the size of the audio file by changing the sampling rate and encoding depth. Digitized audio can be saved uncompressed in audio files in the universal WAV format or in MP3 compressed format. When saving sound in compressed formats, low-intensity sound frequencies that are “excessive” for human perception and coincide in time with high-intensity sound frequencies are discarded. The use of this format allows you to compress sound files tens of times, but leads to irreversible loss of information (files cannot be restored to their original form).

WAVE (.wav) is the most widely used format. Used in Windows OS to store sound files. MPEG-3 (.mp3) is the most popular audio file format today. MIDI (.mid) - do not contain the sound itself, but only commands for playing the sound. The sound is synthesized using FM or WT synthesis. Real Audio (.ra, .ram) - designed to play sound on the Internet in real time. MOD (.mod) is a music format that stores digitized sound samples that can then be used as templates for individual notes.

Editing area Timeline Main menu Toolbars http://www.audacity.ru/p1aa1.html

Learn the notes, solve problems in the notebook. Tasks “Coding audio information” Level “5” Determine the length of the sound file that will fit on a 3.5” floppy disk. Please note that 2847 sectors of 512 bytes are allocated to store data on such a floppy disk. a) with low sound quality: mono, 8 bit, 8 kHz; b) with high sound quality: stereo, 16 bit, 48 kHz. Level “4” The user has a memory capacity of 2.6 MB at his disposal. 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? Level “3” Determine the amount of memory to store a digital audio file, the playing time of which is two minutes at a sampling frequency of 44.1 kHz and a resolution of 16 bits.


1 slide

2 slide

Since the early 90s, PCs have been able to work with audio information. Every PC with a sound card, microphone, headphones or speakers can record, save and play audio information. * We work with graphic information using graphic editors, and with audio information using audio file editors. We work with graphic information using graphic editors, and with audio information using audio file editors.

3 slide

Sound information Sound is a wave propagating in air, water or other medium with continuously changing intensity and frequency. *

4 slide

In the process of encoding audio information, time sampling occurs when the sound wave is divided into separate small time sections. For each such area, a certain sound intensity value is set. At the end of the sampling process, the sound information is stored in the computer memory in the form of binary codes. *

5 slide

6 slide

With the help of a microphone, sound is converted into electric current vibrations that have a certain amplitude. A sampling device (ADC) measures electrical voltage within a certain range and converts the numerical voltage value into a multi-bit binary number. Reverse process: The DAC converts binary numbers into electrical voltage. The step signal received at the output of the DAC is converted into sound using an amplifier and speaker. * Audio information processing devices

7 slide

8 slide

The quality of sound reproduction is affected by two parameters: sampling frequency and audio encoding depth. Sound coding depth is the cell size allocated for recording the amplitude (loudness) value in binary code. Modern sound cards can provide encoding of 65,536 different signal levels or states (65,536=2i, i=16 bits). Thus, modern sound cards provide 16-bit audio encoding (encoding depth). With each sample, the amplitude value of the audio signal is assigned a 16-bit code. * Audio information options

Slide 9

The sampling rate is the number of sound volume measurements taken by the instrument in 1 second. Frequency is measured in Hertz (Hz). One measurement per second corresponds to a frequency of 1 Hz. 1000 measurements in one second – 1 kilohertz (kHz). The number of samples per second can be in the range from 8,000 to 48,000, i.e. The sampling frequency of an analog audio signal can take values ​​from 8 to 48 kHz. *

10 slide

The human ear perceives sound at frequencies ranging from 20 vibrations per second (low sound) to 20,000 vibrations per second (high sound). The higher the frequency and sampling depth of the sound, the higher the quality of the digitized sound. The lowest quality of digitized sound, corresponding to the quality of telephone communication, is obtained with a sampling frequency of 8000 times per second, a sampling depth of 8 bits and recording of one audio track (mono mode). *

11 slide

The highest quality of digitized audio, corresponding to the quality of an audio CD, is achieved with a sampling rate of 48,000 times per second, an encoding depth of 16 bits and recording of two audio tracks (stereo mode). *

Slide 1

CODING AND PROCESSING OF AUDIO INFORMATION

Slide 2

Audio information

A person perceives sound waves in the form of sound of varying volume and tone. The greater the intensity of the sound wave, the louder the sound; the greater the frequency of the wave, the higher the pitch of the sound.

Low sound High sound volume

Slide 3

The human ear perceives sound at frequencies ranging from 20 (low sound) to 20,000 (high sound) vibrations per second. A special unit “decibel” is used to measure sound volume.

Slide 4

Digitization (translation into digital form)

1011010110101010011

analog signal

digital signal

Slide 5

Time sampling of audio

In order for a PC to process sound, a continuous audio signal must be converted into a digital discrete form using time sampling (a continuous wave is divided into separate small sections, for each such section the value of the sound intensity is set). On the graph it looks like this:

A, volume t, time

Slide 6

Time sampling

Slide 7

The audio sampling rate is the number of sound volume measurements taken in one second. The audio sampling rate can range from 8,000 to 48,000 changes in audio volume per second.

Slide 8

Audio coding depth is the amount of information needed to encode discrete volume levels of digital audio. If the encoding depth is known, then the number of digital audio volume levels can be calculated using the formula N - number of audio volume levels I - encoding depth

Slide 9

Digitized sound quality

Depends on: sampling frequency; sampling depths. The higher the frequency and sampling depth of the sound, the higher the quality of the digitized sound. The higher the quality of digital sound, the larger the information volume of the sound file.

Slide 10

Sound editors

Sound editors allow you not only to record and play back sound, but also to edit it. They allow you to change the sound quality and size of the audio file. Digitized audio can be saved uncompressed in the universal wav format or in mp3 compressed format. WAV (Waveform audio format), often uncompressed (size!) MP3 (MPEG-1 Audio Layer 3, lossy compression) WMA (Windows Media Audio, streaming audio, compressed)

Slide 11

An example of solving the problem: Let's estimate the volume of a stereo sound file with a sound duration of 1 second with average sound quality (16 bits, 24000 measurements per second). V=16* 24000*2 (since stereo 2 tracks)= 768000 bits= 96000 bytes=94 KB