Coding and processing of audio information 9th grade. Encoding of audio information

Antipyretics for children are prescribed by a pediatrician. But there are emergency situations for fever when the child needs to be given medicine immediately. Then the parents take responsibility and use antipyretic drugs. What is allowed to be given to infants? How can you lower the temperature in older children? What medications are the safest?

...for them, and for most adults, this is terra incognita, they need a guide to this world, a world of unexpected effects, a world of discoveries, which for most remains unknown... The CoolEdit program allows you to see what you hear, and see exactly what , which is discussed in this lesson. All these are the results of the ADC. Using its capabilities, you can create many different lessons. For example, how do you like the theme: “Mom’s record is a chipped edge, about love for us, play something about love for us...”, or “Moving sound in space”, or “Sound detective”, etc.

Lesson: Coding and processing of audio information

Lesson objectives:

Developmental and educational goals Means of achievement Control technology
Gain skills in processing audio files. Working in the CoolEdit96 program, Processing sound files.

Visual inspection and listening

Develop skill in using the keyboard and mouse to perform cut, copy and paste operations.

Operations with files and their fragments.

Visual.

Arouse a sense of responsibility when influencing local nature. Demonstration of illustrations, playback of sound files. File editing work.
Increase lexicon not only Russian, but also English words Using the English version of the program to process sound files. Pronunciation of words in English.
Develop the ability to navigate the computer file system when searching for files.

Search for the desired sound file.

Monitoring the student's work speed.

Learning goals Means of achievement Control technology
Get acquainted with the technology of binary encoding of Wav files Demonstration of illustrations and posters, techniques for working with files.

Issuance of supporting notes.

Problem solving

Learn to solve problems to determine the size of a WAV audio file Demonstration of an algorithm for solving such problems.

Problem solving

Learn to open, edit, process and save audio files Practical work on the assignment file. Evaluation of the implementation of practical work.

Lesson provision:

Tape recorder, multimedia computers, sound speakers and headphones, a program for processing sound files Cool Edit 96, sound files with sounds of animals and birds, posters, photographs of animals and birds, photographs of forests, task cards, instruction cards for working with the Cool Edit 96 program (Replace the tape recorder and posters can be a multimedia projector and a presentation.)

Lesson Plan

Teacher actions

Student actions

Time(min)

inclusion in the lesson.

They are listening. Write down the topic.

Outlines the principles of audio coding.

Draw a supporting outline.

Outlines the algorithm for solving problems.

Solve problems.

Sets a goal for practical work - processing a WAV audio file.

Checks the solution to problems. Helps those who find it difficult in practical work.

They take seats at the PC. Using ready-made reference notes for working with the COOL EDIT 96 program, open and process the sound file. Save the results of editing. Determine file size
Pronounces the final word. After completing the work, he hands over photographs of animals found in the area, the sounds of which the students have heard.

Conducts exercises for the eyes.

Do eye exercises

Summarizes the lesson, announces grades and homework.

Write down homework

Detailed summary of one of the lesson options

Start of the lesson

Silent scene and showing signs: hello, sit down. Open your notebooks. Write down the topic of the lesson. Audio encoding and processing.

You probably didn't have enough audio information at the beginning of our lesson. The ability to use and process sound has long attracted computer and software developers. I will ask you to tell me other types of information before starting work on a new topic. (Sound, graphic, text, numerical, video.)

Right! And in what form is it stored inside the computer? (Discrete, binary.)

Where can it be stored? (RAM, Winchester, Floppy disk)

What information will be discussed in today's lesson? (Sound.) As we already remembered, all information in a PC is presented in discrete, binary form. Sound is no exception.

But what is sound? (Air vibrations.) CONTINUOUS signal. (Analog, as they call it.) How is it converted?

Demonstration

(A presentation or poster is used.) First, the sound is converted into an electrical signal using a microphone. To convert a continuous sound signal (sound recording) into numerical form, a special device is used that is part of the sound card - it is called an ADC (analog-to-digital converter). It is this device that measures the electrical signal at very small, equal intervals of time, converts the measurement result into a binary number and transmits it to the PC’s RAM.

The signal is measured with limited accuracy. And to store each measured value, a multi-bit memory cell is allocated.

What should the sampling rate be if we want to describe the original signal very accurately?

(If we want to get an exact copy of the signal, then the sampling frequency must be large (high), higher than the frequency of the encoded sound). For CD recording quality, this frequency should be 44100 Hz (once per second).

The quality of the recording is also affected by the bit depth of the binary number that describes one signal value. It is taken equal to 4, 8, or 16 bits.

Calculate the volume and duration of sound files

One of the tasks of computer science is to be able to calculate the amount of information. Tell me, the volume of which files have you already counted? (Graphic files) The task of finding the amount of information contained in a sound file is practically no different from the previous one, and now we will try to calculate the amount of information contained in a WAV sound file.

There are pieces of paper on your desks, please sign them and read the algorithm of work on the back.

So, let’s read the algorithm: Algorithm 1 (Calculate the information volume of a sound file):

1) find out how many total values ​​are read into memory during the playing time of the file;

2) find out the code capacity (how many bits in memory each measured value occupies);

3) multiply the results;

4) translate the result into bytes;

5) convert the result to K bytes;

6) translate the result into M bytes;

We read the algorithm: Algorithm 2 (Calculate the playing time of the file.)

1) Convert the information volume of the file to K bytes.

2) Convert the information volume of the file into bytes.

3) Convert the information volume of the file into bits.

4) Find out how many values ​​were measured (information volume in bits divided by the bit length of the code).

5) Calculate the number of seconds of sound. (Divide the previous result by the sample rate.)

Give yourself time to decide

The algorithm and theory will be useful to you when preparing for the computer science exam. At home, glue them into your notebooks. Hand in the sheets of paper with your completed problems, and they will be returned to you after checking.

And I'll ask for a moment's attention.

Epigraph to practical work

All sorts of things Living being Wonderful. Beauty is hidden in his existence and in his closeness to nature, his adaptability to it. Its beauty also lies in the fact that not a single creature will kill another just for the sake of its own whim, and not for food...

And people... sometimes they forget about this. And when they pick up guns they shoot left and right, becoming enemies of nature and themselves. Because of such hunting, some species of animals completely disappear on our land... forever. I suggest you take the first step towards correcting this situation. At least in the imagination.

You have a SOUNDS folder on your computers; your task files are in it, and I suggest you edit them by removing the sounds of gunshots and inserting the sound of a camera shutter instead.

The key to completing the task is on your desk.

Get started!

Practical work, checking tasks.

Practical work is described for the student in an instruction card located on the table near the computer; the names of files with sounds can be written in advance on the same instruction card.

Epilogue and eye exercises

Look behind the monitors and pick up the photos. These are animals and birds of our region. Some of them are already facing extinction. These are the animals you rescued and whose sounds you heard.

And look at the photo of the forest for a few seconds, relax, sit comfortably, close your eyes. Imagine how good it is for animals and birds in their home when no one bothers them... Don’t open your eyes... look up. Try to see the tops of the trees and the clear sky, Lower your eyes, lower them, and imagine a clear river in which fish are splashing. Now turn your eyes left and right, around you there are flowers and berries, you can hear the singing of birds and the buzzing of insects... (at this stage of the lesson you can turn on PC files with stereo sound and ask students with their eyes closed to turn their eyes towards certain sounds)

Now open your eyes. Everything on our Earth can disappear just as what was in your imagination disappeared. Be more careful with nature, because not a single digitized sound can replace live sound, and nothing can replace the beauty of living nature.

(On this note, we conclude our lesson, announce grades and homework.)

Of course, today we could not use all the features of the program, if you wish, you can copy it and try to master it at home on your own. It fits on one floppy disk.

Annex 1

Basic notes for the student

All information in a PC is presented in discrete, binary form. Sound is no exception. The ability to process sound has long attracted computer and software developers.

First, the sound is converted into an electrical signal using a microphone. To translate a continuous sound signal (sound recording) into a numerical form, a special device is used, which is part of the sound card - it is called an ADC (analogue-to-digital converter). It is this device that, at very small, equal intervals of time, measures an electrical signal, converts the measurement result into a positive or negative binary number and transfers it to the PC's RAM.

The frequency at which a signal is measured is called the sampling rate.

For high recording quality (CD recording quality), this frequency should be 44,100 Hz (once per second), i.e. twice as high as the frequency of the highest sound a human can hear.

To encode each measured value, a four-, eight-, or sixteen-bit code is used, depending on the desired recording quality. (With 16-bit encoding, the value of the amplitude of the audio signal is most accurately described, which means that its quality is higher)

The reverse conversion from binary codes to an analog electrical sound signal is performed using a DAC - a digital-to-analog converter, also included in the sound card

Tasks

One of the tasks of computer science is to be able to calculate the amount of information contained in a sound file. You may encounter 2 types of tasks for encoding audio information. In some, you will need to find out the information volume of the file by the known playing time, in others, by the known volume of the file, find out the time of its playing.

Problem 1

____________________

Algorithms-hints

Algorithm 1(Calculate the information volume of a sound file)

Find out how values ​​are read into memory during the playing time of the file;

Find out the bit depth of the code (how many bits in memory each measured value occupies);

Multiply the results;

Convert the result to bytes;

Convert the result to KB;

Convert the result to MB.

Algorithm 2(Calculate the playing time of the file.)

Convert the information volume of the file to KB.

Convert the information volume of the file into bytes.

Convert the information volume of the file into bits.

Find out how many values ​​were measured. (Divide the bits by the length of the code.)

Calculate the number of seconds of sound. (Divide the previous result by the sampling frequency.)

Appendix 2

Instruction card for working in the Cool Edit 96 program.

1) Launching the program from the working folder - Fig. 5

2) mark the indicated radio buttons and click ABOUT To Fig.7

3) Select items in the program menu sequentially File, Open…, set the type of files to open ALL(*.*)( see picture) and Open WAV file specified by the teacher.

4) Listen (PLAY) and view the file. Determine the location in the file of the gunshot sound that you want to delete.

5) Using mouse selection operations, select and delete a fragment of the sound file. (Edit, Delete)

6) Add a camera shutter sound to your file. (File, Open Append…, Select file named Shutter.wav)

7) Listen to the file again. (PLAY)

8) View the file parameters in the CoolEdit96 program window. Will your file fit on a floppy disk?

As you can see, editing audio files is not that difficult. Show and let the teacher listen to your work, he worries about you, because you are doing this for the first time.

Additional task

View your file at maximum magnification (Press Zoom several times)

Have you seen the results of measurements made by the ADC?

Try to increase the signal amplitude by dragging the “mouse” over the markers at the measurement points

Reduce the magnification and listen to the file with the “click” sound you created.

You can try to fix the file defect.

Practical work 1.5

Coding and processing of audio information

Hardware and software. A computer with the Windows operating system installed, a sound card, a connected microphone and speakers (or headphones); sound editor Audacity 2.0.

Goal of the work. Learn how to digitize sound, edit sound recordings and save sound files in various formats.

Exercise. Record digitized audio, edit a recording, overdub two recordings, apply sound effects and save audio files in various formats.

Encoding and processing of audio information in the Audacity audio editor

    Launch the Audacity sound editor with the command [ Start – All Programs –AudacityAudacity].

Set the audio sampling rate to 22050 Hz and the audio encoding depth to 16 bits.

    In the application window, run the command [ Edit - Options]. In the dialog box that appears, select Quality. In the corresponding fields in the drop-down lists, select the sampling rate and audio encoding depth (audio bit depth):

Click OK.

Let's record digitized audio.

To stop recording, click the button Stop .

    A graphical representation of the dependence of the volume of the recorded digitized sound on time will appear in the application window.

Let's get acquainted with the digitization points displayed on the graph of the dependence of sound volume on time.

    In the application window, enter the command [ View – Zoom In]. The time scale will be significantly stretched, and the points of sound digitization will become visible on the graph:

Let's edit the digitized sound: move the initial fragment of the recording to its end.

Place the cursor at the end of the record and press the button Insert or run the command [ Edit - Paste].

Listen to the edited recording by clicking on the button on the toolbar Play .

Let's mix (overlay) two recordings.

    Open the second sound file audio. mp3 stored on the local disk using the [ command File – Import – Sound file…]. The required sound file is located at: My documents – 9th grade – Blanks.

Listen to the overlay of two recordings by first placing a vertical mark (cursor) at the beginning of the audio tracks by clicking the mouse or pressing a key Home, and then clicking on the button on the toolbar Play.

Let's apply various sound effects to the recording ( Smooth Fade, Speed ​​Shift, Pitch Shift, Echo and others).

    Use the mouse to select the second record or part of it and sequentially execute the commands [ Effects – Smooth rise…], [Effects – Pitch Shift…], [Effects – Speed ​​change…], [Effects – Echo...] and others.

After each application of effects, listen to the resulting sound processing results.

Save the digitized and processed sound in a sound file

    To save the processed audio in Audacity's native format, run the command [ File - Save project as...]. In field File name: enter the file name – Sound. Save the project in its own folder.

    To save an audio file in the universal WAV format, execute the command [ File – Export…]. In the dialog box that opens, enter the file name (“Sound”) and specify the file type (WAV) and save path (own folder).

In the window that appears Editing metadata In the corresponding text fields you can enter data that will be saved in the properties of the sound file.

Press the button OK.

    To save an audio file in MP3 format, repeat step 10 (in the Ti drop-down list n file: choose - FilesMP3 ). Save the file in its own folder and under the same name.

    Compare information volumes of audio files saved in different formats.

From physics we know that sound is air vibrations. If you convert sound into an electrical signal (for example, using a microphone), you can see the voltage changing smoothly over time. For computer processing, such an analog signal must somehow be converted into a sequence of binary numbers.

This is done, for example, this way - the voltage is measured at regular intervals and the resulting values ​​are recorded in the computer memory. This process is called sampling (or digitization), and the device that performs it is called an analog-to-digital converter (ADC).

To reproduce the sound encoded in this way, you need to do the reverse conversion (a digital-to-analog converter (DAC) is used for this), and then smooth the resulting step signal.

The higher the sampling rate and the more bits allocated for each sample, the more accurately the sound will be represented, but the size of the sound file will also increase. Therefore, depending on the nature of the sound, the requirements for its quality and the amount of memory occupied, some compromise values ​​are chosen.

Sampling parameters.

Important sampling parameters are frequency and bit depth.

Bit depth indicates the accuracy with which changes in analog signal amplitude occur. The accuracy with which the signal amplitude value at each instant of time is transmitted during digitization determines the quality of the signal after digital-to-analog conversion. The reliability of waveform reconstruction depends on the bit depth.

To encode the amplitude value, the principle of binary coding is used. The sound signal must be presented as a sequence of electrical pulses (binary zeros and ones). Typically, 8, 16-bit, or 20-bit representations of amplitude values ​​are used. When binary coding a continuous audio signal, it is replaced by a sequence of discrete signal levels.

Frequency- number of analog signal amplitude measurements per second.

In the new Audio DVD format, the signal is measured 96,000 times in one second, i.e. apply sampling rate 96 kHz. To save hard disk space in multimedia applications, lower frequencies are often used: 11, 22, 32 kHz. This leads to a decrease in the audible frequency range, which means that there is a strong distortion of what is heard.

The quality of encoding depends on the sampling frequency (the number of signal level measurements per unit time). With an increase in the sampling frequency, the accuracy of the binary representation of information increases. At a frequency of 8 kHz (number of measurements per second 8000), the quality of the digitized sound signal corresponds to the quality of a radio broadcast, and at a frequency of 48 kHz (number of measurements per second 48000) - the sound quality of an audio CD.

Modern converters typically use 20-bit signal encoding, which allows for high-quality audio digitization.

Let's remember the formula K = 2 a. Here K is the number of all possible sounds (the number of different signal levels or states) that can be obtained by encoding sound with bits

The described method of encoding sound information is quite universal; it allows you to represent any sound and transform it in the most different ways. But there are times when it is more profitable to act differently.

A fairly compact way of presenting music has long been used - musical notation. It uses special symbols to indicate what pitch the sound is, what instrument to play and how to play it. In fact, it can be considered an algorithm for a musician, written in a special formal language. In 1983, leading computer and music synthesizer manufacturers developed a standard that defined such a code system. It was called MIDI.

Of course, such a coding system does not allow you to record every sound; it is only suitable for instrumental music. But it also has undeniable advantages: extremely compact recording, naturalness for the musician (almost any MIDI editor allows you to work with music in the form of ordinary notes), ease of changing instruments, changing the tempo and key of the melody.

There are other, purely computer, formats for recording music. Among them is the MP3 format, which allows you to encode music with very high quality and compression ratio, while instead of 18–20 musical compositions, about 200 can be placed on a standard compact disc (CDROM). One song takes up approximately 3.5 Mb, which allows Internet users can easily exchange music compositions.

Text coding tasks.

1. Two texts contain the same number of characters. The first text is written in Russian, and the second in the language of the Naguri tribe, whose alphabet consists of 16 characters. Whose text contains more information?

I = K * a (the information volume of the text is equal to the product of the number of characters and the information weight of one character).

Because Both texts have the same number of characters (K), then the difference depends on the information content of one character of the alphabet (a).

2 a1 = 32, i.e. a1 = 5 bits,

2 a2 = 16, i.e. a2 = 4 bits.

I1 = K * 5 bits, I2 = K * 4 bits.

This means that a text written in Russian carries 5/4 times more information.

2. The size of the message, containing 2048 characters, was 1/512 of a MB. Determine the power of the alphabet.

I = 1/512 * 1024 * 1024 * 8 = 16384 bits. - converted the information volume of the message into bits.

a = I / K = 16384 / 2048 = 8 bits - accounts for one character of the alphabet.

2 8 = 256 characters - the power of the alphabet used.

This is the alphabet used in the ASCII encoding.

Image coding tasks.

1. How many bits are required to encode information about 130 shades?

It is easy to calculate that 8 (that is, 1 byte), since using 7 bits you can store the shade number from 0 to 127, and 8 bits store from 0 to 255. It is easy to see that this encoding method is not optimal: 130 is noticeably less than 255.

2. It is known that the computer’s video memory has a capacity of 512 KB. Screen resolution is 640 by 200. How many screen pages can be simultaneously placed in video memory with a palette

a) from 8 colors;

b) 16 colors;

c) 256 colors?

3. In True Color mode, the following is allocated for storing the code of each pixel:

4. The minimum unit of measurement for a graphic image on a monitor screen is:

5. A raster graphic file contains a black and white image (without grayscale) with a size of 100x100 pixels. How much memory is required to store this file?

6. A raster file containing a black and white (no shades of gray) square image has a size of 200 bytes. Calculate the side size of the square (in pixels).

7. The volume of an image measuring 40x50 pixels is 2000 bytes. Image uses:

256 colors;

16777216 flowers.

8. It is known that the computer’s video memory has a capacity of 512 KB. Screen resolution is 640 by 200 pixels. How many screen pages will simultaneously fit in video memory with a palette:

of 8 colors;

16 colors;

256 colors?

Sound coding tasks.

a) 44.1 kHz;

and 16 bits.

a) If you record a mono signal with a frequency of 44.1 kHz, 16 bits (2 bytes), then every minute the analog-to-digital converter will output 44100 * 2 * 60 = 529000 bytes (approximately 5 MB) of data on the amplitude of the analog signal that is recorded in the computer to your hard drive.

If a stereo signal is recorded, then 1058000 bytes (about 10 MB)

b) for frequencies 11, 22, 32 kHz, calculations are carried out similarly.

2. What is the information volume of a mono audio file, the duration of which is 1 second, with an average sound quality (16 bit, 24 kHz)?

16 bits * 24000 = 384000 bits = 48000 bytes = 47 kBytes

3. Calculate the volume stereo 20 second audio file with 20-bit encoding and 44.1 kHz sample rate.

20 bits * 20 * 44100 * 2 = 35280000 bits = 4410000 bytes = 4.41 MB

Goals: introduce sound information and its characteristics; teach how to process audio information on a computer.

Requirements for knowledge and skills

Students should know:

What is audio information;

What is volume, tone, intensity, frequency;

The concepts of “sampling frequency”, “sound encoding depth”;

Audio processing software and hardware.

Students should be able to:

Digitize audio information;

Edit entry;

Apply sound effects;

Save audio files in various formats.

Software and didactic equipment: Ugr., § 1.5, p. 40; demonstration “Coding audio information”; projector; Audacity sound editor.

DURING THE CLASSES

I. Organizational moment

II. Updating knowledge

What types of information do you know by way of perception? (Visual, auditory, kinesthetic, smell, taste.)

What type of information does a person perceive in the greatest quantity? (Visual.)

III. Setting lesson goals

The second largest volume of perceived information is sound.

And what is it? (A wave that travels through air, water, or other medium.)

IV. Work on the topic of the lesson

(The explanation is accompanied by a demonstration, “Coding Audio Information.”)

A sound wave propagates in any medium with continuously changing intensity and frequency, with different loudness and tone.

What is the unit of loudness called? (Decibel) A change in sound volume by 10 dB corresponds to a change in sound intensity by 10 times.

In order for a computer to process sound, it must be digitized. This is done using time sampling. The sound wave is broken into temporary pieces, each of which has its own sound intensity value.

What hardware is needed to work with audio information? (Microphone, sound card, speaker.)

Sound quality depends on the audio sampling rate - the number of sound volume measurements per second. This value takes values ​​from 8000 to 48,000. Each piece of the sound wave has its own sound volume level, the encoding of which requires a certain amount of information - the sound encoding depth. During the encoding process, each volume level is assigned its own 16-bit code.

Which digitized audio will be the lowest quality and which will be the highest? (Telephone connection, ayduo-CD.)

The higher the sound quality, the larger the size of the audio file.

— What software is needed to work with sound? (Player, sound editor.)

Sound editors allow you to record, play back and edit sound (delete, copy, move parts of the audio track, overlay, apply acoustic effects, change the sampling frequency and encoding depth).

There are three groups of sound file formats:

Uncompressed audio formats such as WAV, AIFF;

Audio formats with lossless compression (ARE, FLAC);

Audio formats using lossy compression (shrZ, ogg).

V. Practical work

For the full lesson, see the link below:



Support the project - share the link, thank you!
Read also
Postinor analogues are cheaper Postinor analogues are cheaper The second cervical vertebra is called The second cervical vertebra is called Watery discharge in women: norm and pathology Watery discharge in women: norm and pathology