KS4J277 1.2.4 22 min read 10 question quiz 20 exam marks

Storing Sound

How a continuous analogue wave becomes a list of binary numbers, what sample rate and bit depth each control, and the sound file size calculation.

Analogue to digital

Sound in the real world is an analogue wave: a continuously varying change in air pressure. It has infinitely many values at infinitely many moments.

A computer cannot store infinity. So sound must be sampled.

Sampling

Sampling means measuring the amplitude of the sound wave at regular intervals and recording each measurement as a binary number.

  1. A microphone converts the sound wave into a varying electrical signal.
  2. An analogue to digital converter measures the amplitude of that signal at fixed intervals.
  3. Each measurement is rounded to the nearest available level and stored in binary.

The result is a long list of numbers that approximates the original wave.

Definition

Sampling is the process of measuring the amplitude of an analogue sound wave at regular intervals and storing each measurement as a binary value.

Digital sound is always an approximation

Because samples are taken at intervals and rounded to fixed levels, the stored version can never be a perfect copy. It can only be a closer or a rougher approximation.

Sampling an analogue sound wave into digital dataA smooth analogue sound wave drawn as a continuous curve, with sampling shown on top of it. At sixteen evenly spaced moments the height of the wave is measured, marked by dots on the curve, and each measured height is rounded to the nearest of the available levels. Joining those rounded values produces a staircase that follows the curve but is not identical to it, and the difference between the staircase and the curve is the loss caused by digitising. Taking samples more often, a higher sample rate measured in hertz, makes the staircase steps narrower. Storing more bits per sample, a higher bit depth, gives more possible levels, so eight bits gives 256 levels and each step lands closer to the true height. Both improvements make the recording closer to the original and both make the file bigger. File size in bits equals sample rate times bit depth times length in seconds times number of channels.loudquiettimeSample ratehow many samples per second, in hertz.More samples means more detail across time.Bit depthbits stored per sample, so 8 bits gives 256 levels.More bits means each height is recorded more exactly.file size in bits = sample rate x bit depth x seconds x channels
Sample rate is how often you measure. Bit depth is how precisely you record each measurement. Examiners want both named, not just one.
Turning a sound wave into numbers by sampling itHow a sound is turned into numbers. Sound is a wave, a smooth and continuous change in air pressure, and a computer cannot store smooth because it can only store numbers. So it measures the height of the wave at regular intervals, and each measurement is a sample. The sample rate is how many measurements are taken each second, in hertz: with only eleven samples the recorded shape is a rough approximation of the original, while with more than thirty it follows the wave closely. The bit depth is how many bits each measurement is stored in, and so how finely the height is rounded: three bits give eight levels, each sample is rounded to the nearest one, and more bits give finer steps. Higher sample rate and higher bit depth both mean a closer recording and a bigger file.Sound is a smooth waveFew samples: a rough copyMany samples: a close copysample rate: 11 a secondsample rate: 34 a secondtime →Bit depthhow finely each height is rounded765432103 bits: 8 levelsmore bits: finer steps1234
  1. Sound is a wave: a smooth, continuous change in air pressure.
  2. A computer cannot store smooth. It measures the height at intervals.
  3. Sample more often and the shape you recorded is closer to the original.
  4. Bit depth is how finely each measurement is rounded.
Higher sample rate and higher bit depth both mean a closer recording and a bigger file. That trade is the whole topic.

Sample rate and bit depth

Sample rate

Sample rate is the number of samples taken per second, measured in hertz.

  • CD quality is 44,100 Hz, so 44,100 measurements every second
  • Telephone quality is about 8000 Hz

A higher sample rate means:

  • The samples are closer together, so the digital version follows the shape of the original wave more closely
  • Higher frequencies can be captured accurately
  • The file is larger

Bit depth

Bit depth is the number of bits used to store each individual sample.

  • 8 bit depth gives 28 = 256 possible amplitude levels
  • 16 bit depth gives 216 = 65,536 levels

A higher bit depth means:

  • Each measurement can be recorded more precisely, because there are more levels to round to
  • Quieter details survive rather than being rounded away
  • The file is larger
Do not mix them up

Sample rate is about how often you measure, along the time axis. Bit depth is about how precisely you record each measurement, along the amplitude axis. Questions frequently test whether you know which is which.

Sample rateBit depth
MeasuresHow many samples per secondHow many bits per sample
AxisTimeAmplitude
UnitHertzBits
Increasing itCaptures the wave shape more accurately over timeRecords each amplitude more precisely

Calculating sound file size

file size (bits) = sample rate x duration in seconds x bit depth

If the recording is in stereo, multiply by 2, because there are two channels.

Worked example

A 3 minute song is recorded at 44,100 Hz with a bit depth of 16, in mono. Calculate the file size in megabytes.

Duration: 3 x 60 = 180 seconds 44,100 x 180 x 16 = 127,008,000 bits 127,008,000 / 8 = 15,876,000 bytes / 1000 = 15,876 KB / 1000 = 15.876 MB

In stereo that would be 31.752 MB.

The quality against size trade off

SettingQuality effectSize effect
Double the sample rateBetter representation of the wave, higher frequencies capturedDoubles the file
Double the bit depthMore precise amplitudes, wider dynamic rangeDoubles the file
Halve the sample rateWave shape reproduced more roughly, sounds dullerHalves the file
The answer examiners want

Increasing the sample rate or the bit depth improves the accuracy with which the original analogue wave is reproduced, and therefore the sound quality, but it increases the file size proportionally.

File size calculator

Work out the size of an image, a sound file or a block of text, one conversion at a time. This tool needs JavaScript, so turn it on to use it. Everything you need to answer the exam question is explained in the text above.

Key terms you must be able to define

Analogue
A continuously varying signal, such as a real sound wave, with infinitely many possible values.
Sampling
Measuring the amplitude of an analogue signal at regular intervals and storing each value in binary.
Sample rate
The number of samples taken per second, measured in hertz.
Bit depth
The number of bits used to store each individual sample.
Amplitude
The height of the sound wave at a given moment, which corresponds to loudness.
Analogue to digital converter
The hardware that measures an analogue signal and outputs binary sample values.

Flashcards

Say the definition out loud before you flip the card. Retrieving it from memory is what builds recall, reading it again is not.

DefineAnalogue
AnswerA continuously varying signal, such as a real sound wave, with infinitely many possible values.
DefineSampling
AnswerMeasuring the amplitude of an analogue signal at regular intervals and storing each value in binary.
DefineSample rate
AnswerThe number of samples taken per second, measured in hertz.
DefineBit depth
AnswerThe number of bits used to store each individual sample.
DefineAmplitude
AnswerThe height of the sound wave at a given moment, which corresponds to loudness.
DefineAnalogue to digital converter
AnswerThe hardware that measures an analogue signal and outputs binary sample values.

Reach the top grade on this topic

The single biggest discriminator on this topic is whether you can explain why a higher sample rate improves quality, rather than just asserting that it does.

Weak: "A higher sample rate means better quality."

Strong: "A higher sample rate means samples are taken closer together in time, so the sequence of stored values follows the shape of the original analogue wave more closely and less detail is lost between samples, which produces a more accurate reproduction."

Do the same for bit depth: more bits means more possible amplitude levels, so each sample is rounded by a smaller amount, which means quieter detail is preserved.

Always state the file size consequence. Every quality improvement on this topic costs storage in direct proportion.

  • Explain sampling as a three step process from microphone to binary
  • Distinguish sample rate and bit depth in one sentence each
  • Calculate a sound file size in the unit asked for, including stereo
  • Give a reasoned recommendation for a scenario, such as a podcast versus a music studio

Mistakes that cost marks here

Avoid these
  • Swapping sample rate and bit depth. Rate is per second, depth is per sample.
  • Forgetting to convert minutes into seconds before calculating.
  • Forgetting to double the file size for stereo when the question says stereo.
  • Saying digital sound is 'exactly the same' as the original. It is always an approximation.
  • Saying a higher sample rate 'makes the sound louder'. It affects accuracy, not volume.
Fun fact

CD audio uses 44,100 samples per second. That specific number exists because early digital recorders stored audio on video tape, and 44,100 fit neatly into the line and frame structure of both PAL and NTSC television.

Knowledge check

0 of 10 answered
1What does sample rate measure?
2A sound is recorded with a bit depth of 8. How many different amplitude levels can be stored?
3Why can a digital recording never be a perfect copy of the original sound?
4A 10 second clip is sampled at 16,000 Hz with a bit depth of 8, in mono. What is the file size in bits?
5What is the effect of doubling the sample rate while keeping everything else the same?
6Bit depth affects:
7A recording in stereo compared with the same recording in mono will be:
8Which device converts the analogue signal from a microphone into binary samples?
9A 2 minute recording at 44,100 Hz with 16 bit depth in mono is approximately:
10Which change would reduce a sound file's size while having the smallest impact on speech clarity?
Score 0 / 10

Exam-style questions

Five written questions in the style of the real paper. Write a full answer, then let the marker check it against the mark scheme.

20 marks
1Explain what is meant by sampling when recording sound digitally.3 marks
Explain

Mark scheme0 / 3
  • LThe amplitude of the analogue sound wave is measured
  • LMeasurements are taken at regular intervals
  • LEach measurement is stored as a binary value
Model answer

Sampling is the process by which a continuously varying analogue sound wave is converted into digital data. The amplitude of the wave is measured at regular fixed intervals, and each of those measurements is rounded to the nearest available level and stored as a binary number. The complete recording is therefore a long sequence of binary values that approximates the shape of the original wave.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
2Explain the difference between sample rate and bit depth.4 marks
Explain

Mark scheme0 / 4
  • LSample rate is the number of samples taken per second
  • LBit depth is the number of bits used to store each sample
  • LHigher sample rate captures the shape of the wave over time more accurately
  • LHigher bit depth records each amplitude more precisely because there are more levels
Model answer

Sample rate is the number of samples taken every second, measured in hertz, so it describes how often the sound wave is measured along the time axis. Bit depth is the number of bits used to store each individual sample, so it describes how precisely each measurement is recorded along the amplitude axis. Increasing the sample rate means the measurements are closer together in time, so the stored data follows the shape of the original wave more closely and less detail is lost between samples. Increasing the bit depth means there are more possible amplitude levels available, so each measurement is rounded by a smaller amount and quieter detail is preserved.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
3A 90 second sound clip is recorded in mono at a sample rate of 22,050 Hz with a bit depth of 16. Calculate the file size in megabytes.4 marks
Calculate

Mark scheme0 / 4
  • LMultiplies sample rate by duration by bit depth
  • LObtains 31,752,000 bits
  • LDivides by 8 to obtain 3,969,000 bytes
  • LStates approximately 3.97 MB
Model answer

File size in bits is sample rate multiplied by duration multiplied by bit depth, which is 22,050 x 90 x 16 = 31,752,000 bits. Dividing by 8 gives 3,969,000 bytes, dividing by 1000 gives 3969 kilobytes, and dividing by 1000 again gives approximately 3.97 megabytes.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
4A student is recording a spoken podcast that will be downloaded by listeners on mobile data. Recommend suitable settings for sample rate and bit depth, and justify your recommendation.6 marks
Justify

Mark scheme0 / 6
  • LRecommends a relatively low sample rate such as 22,050 Hz or lower
  • LSpeech occupies a narrower frequency range than music so a high rate is unnecessary
  • LRecommends a bit depth of 16, or justifies 8, for adequate clarity
  • LExplains that this keeps the file size small for downloading over mobile data
  • LRecommends mono rather than stereo, halving the size
  • LAcknowledges the trade off that quality is reduced compared with music standard settings
Model answer

A sample rate of around 22,050 Hz with a bit depth of 16, recorded in mono, would be a sensible choice. Speech occupies a much narrower frequency range than music, so the very high frequencies that a 44,100 Hz rate is designed to capture are simply not present in a spoken voice, and halving the sample rate therefore halves the file size with almost no audible loss of clarity. A bit depth of 16 keeps the dynamic range wide enough that quiet speech does not become distorted, and dropping to 8 bits would introduce noticeable background hiss on quiet passages. Recording in mono rather than stereo halves the size again, and since a single speaker has no meaningful stereo image there is nothing lost. Together these settings might produce a file around a quarter the size of a CD quality stereo recording, which matters a great deal to listeners downloading episodes over mobile data where both speed and data allowances are limited. The trade off is that the recording would not be suitable if music were included, and a studio producing music would need the full 44,100 Hz stereo settings.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
5Describe the effect on both quality and file size of halving the sample rate of a recording.3 marks
Describe

Mark scheme0 / 3
  • LFewer samples are taken each second
  • LThe reproduction of the original wave is less accurate, so quality falls
  • LThe file size is halved
Model answer

Halving the sample rate means only half as many measurements of the sound wave are taken each second. Because the samples are further apart in time, more of the detail between them is lost and the stored data follows the shape of the original wave less closely, so the playback quality is noticeably lower and the recording tends to sound duller. Since file size is directly proportional to sample rate, the file will be half its original size, which is the benefit being traded for that loss of quality.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
Machine mark 0 / 20