Lesson video

In progress...

Loading...

Hello, my name's Mr. Davison.

I'm so excited to be learning with you today.

Today's lesson is called "Calculation of sound file size" from the unit, "Representation of text, images and sound." By the end of the lesson, we will be able to explain how sample resolution and sample rate affect the size and quality of a sound file.

We have two keywords for today, accuracy, which is how close a measurement is to its actual value, and duration, which is the length of time that something lasts.

There will be three learning cycles today.

Let's start with the first, "Effects of changing sound-sampling properties." When we capture sound to use on a digital device, it is digitised by capturing measurements that we call samples.

These samples are measurements at points in time.

If a sample falls between measurements, however, due to a low resolution, it cannot accurately be recorded and has to be approximated.

If we choose a low sample resolution when recording our sound, we won't be able to digitise the sound wave accurately.

You can see here on our graph, as the sound wave changes, when we digitise the sound, if we aren't close to one of our sample resolution measurements, we won't be able to capture exactly what the original sound wave was.

There will be a difference between the original and the sample, which we just have to accept as a part of the recording.

So what's the correct way to finish this sentence? "The accuracy of a sound sample will be reduced if," a low sample resolution is used, the volume of the sound is low, or the duration of the sound is low.

What do you think? (no audio) Well done, the accuracy of a sound sample will be reduced if a low sample resolution is used.

What we can see then is a low sample resolution means that the number of different samples that can be taken is limited.

If we can't get those accurate measurements, then that's gonna make the sound difficult to make out and is gonna introduce distortion to our sound samples.

If we listen to an original recording of audio at 16-bit sample resolution, it sounds like this.

One, two, three, four, five, six, seven, eight, nine, 10.

Now, let's compare that with sample audio recorded with an 8-bit sample resolution.

One, two, three, four, five, six, seven, eight, nine, 10.

Clearly, the highest sample resolution makes the audio sound better.

It gives it more detail and reduces any distortion, whereas the lower sample resolution makes the audio distorted and it doesn't sound as realistic.

We can say then that a higher sample resolution will be able to digitise the sound wave more accurately.

There is gonna be a reduced difference between the original sound wave and the sample, and we can see on that graph that the digitised signal is closer to the original.

Sample rate also has an effect on the quality of audio.

The sampling rate determines how many samples are taken in one second.

Changes to the sound wave, though, between samples might not be captured and result in reduced accuracy of the digitised sound.

In our two samples that we've got there, the peak in-between the two samples is not going to be captured, and there's no way for the digital device that's playing this audio can put back that original sound based on what it hasn't captured.

So let's check you've understood that.

Which words go in the gaps to complete the sentences? (no audio) The correct answers are, "A low sample rate reduces the accuracy of sound digitization," and, "Changes between samples might be missed." Remember, if we're not sampling regularly enough, that means that some information in the sound wave is going to be missed.

We can explore this further by investigating the digitization of a sound wave at various sampling rates.

So we have our original sound on the left-hand side, and then, some audio that has been sampled at a high sampling rate.

The digitised sound is close to the original, with not much variation.

However, as we reduce the sample rate, the digitised sound continues to lose its accuracy.

At half sampling rate, we start noticing some slight differences at all the peaks and troughs of the sound wave, and as we go to a third of that original sampling rate, you can see the shape of the wave really starts to differ from the original.

If we were listening to all of these tracks, we'd notice a big difference in the quality and the accuracy of what had been recorded.

Ultimately then, a low sample rate means that digitised sound doesn't match the original that closely.

This makes the sound less defined as we miss out on higher frequencies, and we could introduce some distortion to the actual audio track itself.

Let's listen to what those effects would actually be.

This first example is audio recorded at a 22,050-hertz sample rate.

One, two, three, four, five, six, seven, eight, nine, 10.

Now, let's listen to that same audio, but this time, the sample rate has been reduced to 8,000 hertz.

One, two, three, four, five, six, seven, eight, nine, 10.

As we saw before, changes to any of the properties of sound are really going to affect the quality, and can sometimes introduce some distortion.

Let's consolidate some of that knowledge now.

For the first part of task A, I want you to match the correct terms to the definitions.

For the second part of task A, I want you to consider this scenario.

"Aisha is listening to music on a digital device using a free streaming service." She's complaining that the quality is really bad.

The premium version says it has better versions with enhanced sample rates and sample resolutions for all tracks.

Based on what Aisha has said, can you explain to her why the version she's using seems to be poor quality, and why the premium version is going to sound better? Pause the video now and have a go at that task.

(no audio) Well done, there was a lot of technical language to consider there, but you used it well.

Let's just check you've got the right answers.

The definition for sample is that it's a measurement of a physical property at a point in time, sample rate is the amount of measurements in one second, and sample resolution is the amount of bits used to represent a measurement.

For the second part, we had to explain to Aisha why the version she is using seems to be poor quality, and why the premium version is going to sound better.

Well, the sample resolution determines how accurate each sample is.

If not enough bits are used, the samples will then have to be approximated.

It's going to mean that the sound won't sound as detailed if we used a high resolution.

In the same way the sample rate is a measure of how often samples of sound are taken, if we use a lower sample rate, that's going to mean that detail in the sound is likely to be missed.

The premium version is going to sound better.

The premium version offers a higher sample resolution and a sample rate, which means the audio is going to be closer to the original audio, as each sample will be more accurate and it will more closely match changes to the sound wave.

Let's carry on now to the second learning cycle, where we're going to calculate sound file size.

There's a direct relationship between the sample resolution, the sample rate of a sound, and the amount of data that we end up storing in a sound file.

In this example that we've got here, we've got four samples that have been taken for part of a sound file.

In this example, the data captured would be 10111000, those four measurements have been approximated to the values that we've chosen to represent those particular levels of the sound wave.

If we want more accuracy in our measurements, we're going to have to increase the sample resolution.

As we increase it, though, that means we're going to have to store extra data for each sample.

The data captured in this example is going to be longer.

In this case, the four measurements combined together would be 100110100000.

If we compare it to the previous version, we've got four more bits than if we used 2-bit samples.

We might do the same with the sample rate, as well.

A higher sample rate increases the amount of samples taken for each second of recording.

The data captured in this example would be 1011111110010001.

That's eight more bits than a four-hertz sample, we've doubled the amount of samples and we've increased the number of bits for the same piece of audio.

So let's think about that.

What effect does increasing the sample resolution have on the overall number of bits used to represent sound? Does it increase the amount of bits used, decrease the amount of bits used, or keeps the amount of bits used the same? What do you think? (no audio) Well done, the correct answer is that increasing the sample resolution will increase the amount of bits used to represent the sound.

We need to be able to calculate the representation size of a sound file, and the size of a sound file is determined by the product of the sample resolution and the sample rate.

For one second of audio, we can work out that the file size in bits is equal to its sample resolution, also recorded in bits, multiplied by the sample rate measured in hertz, which, remember, is samples per second.

That process continues throughout the rest of the recording.

We would say the sound is digitised in the same way for the duration of the recording.

Now, for a specified amount of time, our file-size calculation, which we said was equal to the sample resolution multiplied by the sample rate, also then needs to be multiplied by the duration of the recording, which we would measure in seconds.

That's a really important calculation to remember, so what's missing from this calculation used to determine the file size of a sound recording? (no audio) Well done.

The file size is equal to the sample resolution multiplied by the sample rate, multiplied by the duration of the recording.

Let's try an example.

Imagine we've got a 30-second sound recording that has been made using a sample rate of 1,000 hertz and a sample resolution of four bits.

We would use our formula to calculate that the file size is calculated as file size equals sample resolution multiplied by sample rate, multiplied by duration.

If we use our numbers from the question, that's four multiplied by 1,000, multiplied by 30.

Our file size would be 120,000 bits.

We've got to be careful, though, that we use the right units for those values.

In the second example, we are now using a two-minute sound recording made using the sample rate, again, of 1,000 hertz, but this time, a sample resolution of five bits.

We'd remember our formula is file size equals sample resolution multiplied by sample rate, multiplied by the duration.

We would again use the values from the question, sample resolution of five bits, the sample rate of 1,000 hertz, however, the duration needs to be in seconds, but the question gives it in minutes.

We'd need to make sure that we'd convert two minutes into seconds, which would be two times 60, and then, we'd be able to calculate that from that value, we would end up with a file size of 600,000 bits.

We may find as well that some of the other properties have not been expressed in the base units that we need.

Alex has spotted that the units in this question don't match the units in the formula, so he's worried it's not going to work.

Lucas is pretty confident, though, that if you convert them first, it will work, and it will, so if we've got a four-minute sound recording made using a sample rate of 10 kilohertz and a sample resolution of six bits, we need to make sure that the duration is expressed in seconds, the sample rate as hertz, and the sample resolution as bits.

Typically, sound tends to be sampled in the kilohertz range, so sample rates that you see in questions are often expressed in kilohertz, which is "kHz." Expect that you would need to convert them, so remember that one kilohertz is 1,000 hertz.

Similarly, duration is going to be expressed in minutes, so we'd often need to convert it, as well.

Remember that one minute is 60 seconds.

Let's try that same example that Alex and Lucas were discussing.

A four-minute sound recording has been made using a sample rate of 10 kilohertz and a sample resolution of six bits.

The file size will be calculated as sample resolution multiplied by sample rate, multiplied by the duration.

The sample resolution of six bits is fine as it is, but the sample rate of 10 kilohertz will need to be expressed just as hertz, so one kilohertz is 1,000 hertz, that means 10 kilohertz is 10,000 hertz.

The duration of four minutes would need to be multiplied by 60, so we know how many seconds that recording will be.

Those two values have been converted to give us our file size of 14,400,000 bits.

I think you're ready to practise that now.

In this task, the first thing I want you to do is to use our formula to calculate sound file sizes.

I want you to calculate the file size of the four scenarios that you can see there.

And for the second part, remember that one byte is eight bits and one kilobyte is 1,000 bytes.

I want you to take your answers from part one and convert them into kilobytes.

Pause the video and have a go now.

(no audio) Well done, there was a lot to work out there, but you did really well.

Let's check the answers.

In the first scenario, a two-minute sound recording that's used a sample rate of 2,000 hertz and a sample resolution of four bits, that would give us 960,000 bits, for B, a two-minute sound recording that's used a sample rate of 1,000 hertz and a sample resolution of four bits, that would be 480,000 bits, in the third example, a one-minute sound recording that's used a sample rate of two kilohertz and a sample resolution of six bits, that would be 720,000 bits, and then, lastly, a three-minute sound recording that's used a sample rate of one kilohertz and a sample resolution of two bits, that would give us a file size of 360,000 bits.

In the second part of task B, we remember that one byte is eight bits and one kilobyte is 1,000 bytes, converting our answers into kilobytes, A would be 120 kilobytes, B would be 60 kilobytes, C would be 90 kilobytes, and D, 45 kilobytes.

(no audio) Let's move on to our last learning cycle for today, which is, "Justify sound quality based on use." Seeing as the properties of sound recordings can be adjusted, then we've got to consider that how we use the sound recording is going to affect decisions about the quality and the file size that we accept for our recording.

Higher sample resolution and higher sample rate of recording does improve the quality, but it also means that we have to accept a higher file size.

We may have to consider that a trade-off has to be made between the quality of the audio and the file size that we expect for that same audio.

We may have to trade those things off if either one of them negatively affects the way that the audio is used.

We have also got some limiting factors, as well.

The human ear can only hear frequencies up to 20 kilohertz, and this lessens as people get older.

Now, you might expect that we just have to have a sample rate of 20 kilohertz, but actually, sample rates go above this to help with the processing of sound.

However, there will come a point at which higher sample rates are not needed, as the audio gets close enough for humans not to notice any difference in the original frequencies of the sound.

We do know, though, as well that if the sample rate and sample resolution is too low, sound is going to become distorted and low quality.

Conversely, if we go too high with our sample rate and sample resolution, that's gonna make our file size become too large for perhaps any little perceivable gain that humans can hear.

Therefore, the choice of sampling properties needs to be balanced based on what we're going to use the audio for.

Let's check something important in that.

Can you fill in the gap with the correct word? An older person can hear what higher frequencies than a younger person? Is it fewer, the same, or more? (no audio) Well done.

The correct answer is that an older person can hear fewer higher frequencies than a younger person.

Let's consider an example of where we might use some sound recordings.

In a shop, we have a lift to go between floors, and in that lift, we may have a small speaker that plays music stored on an internal low-capacity SD card, a very small amount of storage so we can't store much on there.

Consider that this is a lift.

The speaker that the audio will play on is likely to be very small, and it won't produce high-quality audio.

Remember as well that the SD card that stores this audio on is not gonna be able to store a large amount of data, and that means that we can't use large audio files.

We're not overly worried about the best quality, but we are worried about keeping the audio data as small as possible to be able to be stored on that low-capacity SD card.

In this case, a low sample rate and sample resolution is going to be the best choice.

It won't give us great quality audio, but it will allow us to store as much audio as possible on that small SD card.

Let's consider a different example now.

Imagine we have a professional voiceover artist that needs to record audio for TV programmes.

This is a professional production, so the quality needs to be clear and not distorted in any way.

They're also a professional company, so they have a computer with a large amount of storage.

In this case, because we need that quality, we have to go for a high sample rate and a high sample resolution, and it's still the best choice because the computer has such a large amount of storage, it can cope with the extra data that would be created using the high sample rate and the high sample resolution.

Let's just check you've understood that.

I want you to select all the factors that affect the choice of sample rate and sample resolution when we make audio recordings.

(no audio) Well done, we need to consider how much available file storage we have and the required quality that we need for our particular use.

Let's finish on one more task.

Consider this scenario.

Sofia has won some high-quality, expensive headphones.

She wants to test them 'cause she's excited and wants to hear how good they are.

She plays some music tracks downloaded onto a digital device that only has a small amount of storage.

She has a choice for the tracks of a large-file-size version and a much smaller one.

Compare the choice of files for Sofia's use and justify which she should use.

(no audio) Well done, let's compare your answer against mine.

Remember, we have to compare the choice of files for Sofia's use and justify which she should use.

The files with the larger file size will be of higher quality, as they use a higher sample resolution and sample rate.

In comparison, the files with the smaller file size will be of lower quality, as they use a lower sample resolution and a lower sample rate.

Remember, Sofia wanted to test the high-quality headphones, and if she's gonna get the most out of those headphones, she's going to have to choose the larger file size.

However, if she wants to store as many tracks as possible, then the smaller file size are more appropriate, however, she's got to accept that the quality of the audio is not going to sound as great.

We covered a lot today.

Let's recap what we've learned.

We found out that adjusting the sample resolution and sample rate when we capture sound affects the accuracy of the recorded sound compared to the original, the size of a sound file is determined from its sample resolution, sample rate and duration, and that high-quality audio results in large file sizes, but the only way to reduce the file size is to accept that we have to reduce the quality.

(no audio).