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 bit depth 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.
Sound on digital devices is the digitization of measurements of sound waves that we call samples.
These samples are captured regularly.
If one of those samples, though, falls between measurements due to a low bit depth, it cannot accurately be recorded and we have to approximate it to the closest value instead.
If we choose a low sample bit depth when we are recording sound, then we will not be able to digitise the sound wave accurately.
So from our original sound wave, when we digitise it, we have to accept that there will be some difference between the original and the sample.
How do you think we finish this sentence? The accuracy of a sound sample will be reduced if.
a low sample bit depth is used, the volume of the sound is low, or the duration of the sound is low.
What do you think? Well done.
The accuracy of a sound sample will be reduced if a low sample bit depth is used.
We can see then that a low sample bit depth means that the number of different samples that can be taken is limited.
This is gonna make the sound difficult to make out and can also add distortion to the audio.
Let's listen to what audio recorded at a 16 bit sample bit depth would sound like.
One, two, three, four, five, six, seven, eight, nine, ten.
And now let's compare that same audio, but this time recorded at an eight bit sample bit depth.
(recording distorting) One, two, three, four, five, six, seven, eight, nine, ten.
Clearly the higher the bit depth, the better the quality.
A higher bit depth adds more clarity to the audio and doesn't introduce distortion.
Whereas the eight bit sample did.
We can see a higher sample bit depth is going to be able to digitise the sound wave more accurately.
The samples are going to be able to get closer to the original value, the original sound wave, so there'll be a reduced difference between the original and the sample, making the digitization more accurate.
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? The correct answers are: A low sample rate reduces the accuracy of sound digitization.
And changes between samples might be missed.
Remember, if we are 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 22050 hertz sample rate, One, two, three, four, five, six, seven, eight, nine, ten.
Now let's listen to that same audio, but this time the sample rate has been reduced to 8,000 hertz, (recording dulls) One, two, three, four, five, six, seven, eight, nine, ten.
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.
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.
Well done, you did really well there and there's a lot of technical language to get used to.
Let's just check the correct definitions.
Firstly, sample is a measurement of a physical property at a point in time.
Sample rate is the amount of measurements in one second, and sample bit depth is the amount of bits used to represent a measurement.
For the second part of the task, we have 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.
We've got to consider the sample bit depth and the sample rate.
Remember, the sample bit depth determines how accurate each sample is.
If we don't use enough bits, then we're gonna have to approximate samples as a part of the sound wave.
The sound is not gonna sound as detailed as the original recording.
In the same way that changes to the bit depth affect the quality, so do changes to the sample rate.
We remember that sample rate is a measure of how often samples of the sound are taken.
A lower sample rate means that detail in the sound can be missed.
Clearly the premium version, if it's going to offer a higher sample bit depth and a higher sampling rate is gonna mean that the audio has better chance of being closer to the original, as each sample is going to be more accurate and 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.
If we consider the sample bit depth and the sample rate of a sound file, we can see that it's going to affect the amount of data that's going to be stored in that sound file.
In this example here, four samples have been taken and the data that will be captured digitally in this example would be 10111000.
Each sample has produced a measurement at a different level and those combinations of those four different measurements constitute the data for our sound file.
It may be that we need extra quality and more accuracy, in which case we'd use a higher sample bit depth.
Problem is, as we increase the bit depth, we're gonna increase the amount of data captured per sample.
The data captured in this example from our four samples would be: 100110100000.
Four more bits than if two bit samples were used instead.
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.
Let's check you've understood that.
What effect does increasing the sample bit depth have on the overall number of bits used to represent sound? Do you think it increases the amount of bits used, decreases the amount of bits used, or does it keep the amount of bits used the same? Well done.
If we increase the sample bit depth, we're going to increase the amount of bits used to represent that sound.
The size of a sound file is determined by the product of the sample bit depth and the sample rate.
For one second of audio, our file size in bits is equal to the sample bit depth measured in bits multiplied by the sample rate, which is measured in hertz, which we remember is samples per second.
Sound is digitised in the same way for a duration of a recording.
So for some specified amount of time, we would still know that the file size is equal to the sample bit depth multiplied by the sample rate, but it would also need to multiply by the duration of the recording, which is measured in seconds.
That's an important calculation to remember.
So what's missing from our calculation here when we want to determine the file size of a sound recording? Well done.
The file size is equal to the sample bit depth multiplied by the sample rate, multiplied by the duration of the sound recording.
Let's try an example.
If we have a 30 second sound recording made using the sample rate of 1000 hertz and a sample bit depth of four bits, what would the file size be? We'd calculate it using the formula file size equals sample bit depth, multiplied by sample rate, multiplied by duration.
Using the numbers from the question, that would be 4 multiplied by 1000 multiplied by 30.
Our file size would be 120,000 bits.
We need to be careful about the units used in the examples.
In this case, we've now got a two minute sound recording made using a sample rate of 1000 hertz and a sample bit depth of five bits.
We'd calculate our file size using the same formula as before, sample bit depth multiplied by sample rate, multiplied by duration.
However, we've got to be careful that the values match the units that are expected.
The sample bit depth is five, that's okay.
The sample rate is 1000, which is also fine, but we can't use the duration as two minutes.
It's got to be converted into seconds, so we take two, multiply it by 60 to work out how many seconds that recording is, put all the numbers together and we'd know that the file size for that recording would be 600,000 bits.
Getting the right units is very important and in this example here, we've got a four minute sound recording that has been made using a sample rate of 10 kilohertz and a sample bit depth of six bits.
Alex has spotted that the units in the question don't match the units in the formula, so it's not going to work.
However, Lucas is confident that if we convert those units, it will work.
We need to make sure the duration is in seconds, the sample rate is just in hertz and the sample bit depth is in 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 1000 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 bit depth of six bits.
We use our file size calculation, which is sample bit depth multiplied by sample rate, multiplied by duration.
The sample bit depth of six bits is fine.
We don't need to convert that.
The sample rate of 10 kilohertz does need to be converted because it needs to be expressed just as hertz, so if one kilohertz is 1000 hertz, 10 kilohertz is 10,000 hertz.
Similarly, our duration must be in seconds.
Four minutes of 60 seconds means that when we use those values together and calculate what our file size is, we'll end up with 40,400,000 bits.
Let's try and put some of that into practise.
Remember, the file size of a sound file uses our formula from before.
What I want you to do is calculate the file size of the following four scenarios.
And for the second part, remember that one byte is eight bits and one kilobyte is 1000 bytes.
I want you to take your answers from part one and convert them into kilobytes.
Pause the video and have a go now.
Well done.
You did really well with that and there was a lot to work out.
Let's check your answers.
For the first part, a two minute sound recording has used a sample rate of 2000 hertz and a sample bit depth of four bits.
That would give a file size of 960,000 bits.
For part B, a two minute sound recording has used a sample rate of 1000 hertz and a sample bit depth of four bits.
That's 480,000 bits.
For part C, a one minute sound recording has used a sample rate of two kilohertz and a sample bit depth of six bits, that's 720,000 bits.
And lastly, a three minute sound recording has used a sample rate of one kilohertz and a sample bit depth of two bits.
That's 360,000 bits.
For the second part of Task B, we remember that one byte is eight bits and one kilobyte is 1000 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.
Let's move on to our last learning cycle for today, which is Justify sound quality based on use.
As these sound properties can change, how we use a sound recording is going to affect decisions we make about the quality and file size that we accept.
We know that a higher sample bit depth and a higher sample rate of recording is going to improve the quality, but we have to accept that that comes at the cost of an increased file size.
We have to make a decision or what we call a trade off between the quality and file size if either of those two properties negatively affects the way 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've seen that the sample rate and sample bit depth when it goes too low can make our sound feel distorted and low quality.
We could increase those properties a lot higher, but if we make them too high, the file size is going to become very large and perhaps too large for any little perceivable gain in human hearing.
Therefore, our choice of sampling properties needs to be balanced based on the intended use.
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? Well done.
The correct answer is that an older person can hear fewer higher frequencies than a younger person.
Let's consider this with an example.
Imagine a shop has got a lift that moves customers between floors.
In that lift, they might want to play music, but it only has a small speaker and the music is played from an internal low capacity SD card.
That means we can't get a lot of data stored on that SD card.
Clearly because we've got a small speaker, we're not gonna be able to produce high quality audio.
Similarly, we've said the SD card is actually low capacity, so we're not gonna be able to store large audio files on it.
In this case, a low sample rate and a low sample bit depth is acceptable.
It's not gonna have high quality audio, but it is the best choice because we don't need that high quality audio.
But what we do need is audio fitted onto the SD card as much as possible.
The best choice in this scenario is to use a low sample rate and a low sample bit depth.
Because we're not worried about the quality 'cause we're using a small speaker, that would be acceptable, and because we've only got a limited amount of capacity on our SD card, we need to make sure we're not providing excess data that is not going to be useful.
Let's consider a different example.
Imagine we have a professional voiceover artist that needs to record audio for TV programmes.
It's important because it's going to be broadcast that the quality needs to be clear and not distorted.
They're going to be doing the recording on a computer with a large amount of storage.
In this case, it's very important that the quality is as clear as it can be, so the high sample rate and high bit depth of the recordings needs to stay.
They will have to accept that that creates an excess amount of data.
However, because their computer is well specced, it can cope and store with that amount of extra data.
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 bit depth of the audio recording.
That's correct.
How much file storage we've got available and the quality that we'll require all are factors that affect the choice of sample rate and sample bit depth when we're recording audio.
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.
Well done.
You did really well there.
Let's see your answer compared to mine.
Remember we had to compare the choice of files for Sofia's use and justify which she should use.
We remember that the files with the larger file size are going to be higher quality as they will use a higher sample bit depth and a higher sample rate.
The files with the smaller file size are likely to be lower quality as the sample rate and the sample bit depth is going to be lower.
If Sofia's interested in getting the most out of the high quality headphones, she's going to need to choose the larger file size.
If she wants to store as many tracks as possible, then the smaller file size are more appropriate.
However, the quality of the audio is not going to sound as great.
We've covered a lot today, so let's recap what we've learned.
We found out that adjusting the sample bit depth and the sample rate when we capture sound affects the accuracy of the recorded sound compared to the original.
We also learned that the size of a sound file is determined from its sample bit depth, sample rate and duration, and also that higher quality audio results in a larger file size.
We can reduce the file size, but we have to accept that we need to reduce the quality to bring that file size down.