2.4d: Sound Storage
To store sound on a computer analog sound waves must be converted into digital data (binary).
The sound is sampled using an ADC (Analog to Digital Convertor) and stored as a binary value (such as 01010011) called a sample.
0010 1011 0101 0101
Analog sound wave
(Analog to Digital Converter)
Sampling an Analog Sound Wave
Digital sampling is discrete (separate) and not continuous like analog waves.
To get the highest quality sound, many samples are taken to recreate the analog wave as closely as possible.
The sample rate is the number of samples taken per second. It is measured in kilohertz (kHz), for example CD quality is 44.1kHz (44,100 samples per second).
The higher the sample rate, the better the audio quality as the digital data more closely resembles an analog wave.
However, higher sample rates result in larger file sizes because more data is stored for each individual sample.
A low sample rate will result in a low-quality sound because the digital data does not closely resemble the original analog wave.
A higher sample rate will result in a higher-quality sound because the digital data more closely resembles the original analog wave.
Improving Audio Quality
The bit rate is defined as the amount of audio data processed per second. It is measured in kilobytes per second (kbps).
The bit rate is calculated by multiplying the sample rate and bit depth.
Because the bit rate is the measure of the sample rate and bit depth multiplied together, the higher the bit rate the higher the quality of the sound.
The bit depth is the number of bits available to represent each sample. For example, a sample with a bit depth of 4 could be 0101 or 0111 or 1010. A sample with a bit depth of 8 could be 01010110 or 1010110 or 11001111. A common bit depth is 16 bits.
The higher the bit depth, the more bits are available to be used for each sample. Therefore the quality is often higher as the wave more closely resembles an analog wave.
The file size will also be larger if the bit depth is higher, as each sample stores additional bits.
sound file size = sample rate x duration (s) x bit depth
Example: A short audio sample has a bit depth of 4 and a sample rate of 10 samples per second. The clip is 15 seconds long.
Calculate the bit rate by multiplying the sample rate and bit depth: 4 bits x 10 = 40 bits.
Now that is the correct data for one second. Multiply the bit rate by the number of seconds in the file: 40 x 15 = 600 bits.
To convert the answer from bits to bytes, divide by 8.
600 bits ÷ 8 = 75 bytes.
Calculating File Size
Metadata for Sound Files
Music libraries such as Apple Music or Spotify store a huge amount of metadata on each song. Metadata is additional data about a file such as:
Title / Track Title
Product / Album Title
Date Created / Year
2.4d - Sound Storage:
1. Explain how an analog sound wave is converted into a binary sample. 
2a. What is a sample rate? 
2b. Explain two ways an audio file will be affected if the sample rate is increased. 
3a. What is bit depth? 
3b. Explain two ways an audio file will be affected if the bit depth is increased. 
3c. Explain what the bit rate is. 
4. An audio sample has a bit depth of 8, a sample rate of 10 and it is 12 seconds long. What is the file size in bytes? 
5a. What is metadata? 
5b. State four different types of metadata for audio files. 
low bit rate = lower quality
high bit rate = higher quality