KS48525 3.3.6 24 min read 10 question quiz 15 exam marks

Representing Sound

How an analogue wave becomes a stream of numbers, what sample rate and sample resolution each control, and how to calculate a sound file size without losing a mark on the conversions.

From analogue to digital

Sound in the real world is a continuous wave of changing air pressure. It is analogue: at every instant it has some value, and between any two instants there are infinitely many more.

A computer cannot store something infinite, so the wave has to be sampled. Sampling means measuring the height of the wave at regular intervals and recording each measurement as a binary number.

The result is a staircase that follows the shape of the original wave without ever exactly matching it. Playing the file back reconstructs a wave from those measurements, and how close that reconstruction is to the original depends entirely on how often you measured and how precisely you recorded each measurement.

The two controls, and what each one does

Sample rate controls how often you measure, which is detail across time. Sample resolution controls how precisely each measurement is recorded, which is detail in amplitude. Questions expect both, and expect you to know which is which.

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 sample resolution

Sample rate

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

Sample rateTypical use
8000 HzTelephone speech
22050 HzBasic voice recording
44100 HzCD quality music
48000 HzVideo soundtracks

A higher sample rate means narrower steps in the staircase, so the digital version follows the original wave more closely and higher frequencies survive. It also means proportionally more samples to store.

Sample resolution

Sample resolution, also called bit depth, is the number of bits used to store each individual sample. AQA uses the term sample resolution, so use it.

  • 8 bits gives 256 possible levels for a sample's height.
  • 16 bits gives 65536 levels.

Every measured height has to be rounded to the nearest available level, and the difference between the true height and the recorded one is the error introduced by digitising. More bits means more levels, so smaller rounding, so a more faithful recording.

Do not swap the two terms

Increasing the sample rate does not give a finer measurement of loudness, and increasing the resolution does not capture higher frequencies. Mark schemes distinguish them carefully.

Calculating sound file size

The formula AQA expects is:

file size in bits = sample rate x sample resolution x duration in seconds

If the recording is in stereo, multiply by 2 for the two channels.

A worked example

A 3 minute recording at 44100 Hz with a sample resolution of 16 bits, in mono.

duration      = 3 x 60               = 180 seconds
size in bits  = 44100 x 16 x 180     = 127 008 000 bits
size in bytes = 127 008 000 / 8      = 15 876 000 bytes
size in kB    = 15 876 000 / 1000    = 15 876 kB
size in MB    = 15 876 / 1000        = 15.876 MB
Convert minutes to seconds first

It is the single most common error on this question. The formula uses seconds, and a question that says three minutes is testing whether you noticed.

Why quality costs so much

Doubling the sample rate doubles the file. Doubling the resolution doubles it again. Recording in stereo doubles it once more. That is why a few minutes of uncompressed CD quality audio runs to tens of megabytes, and why almost all music is distributed compressed.

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.

File size formulas for an image, a sound and a piece of text, each worked through to a size in bytesThe file size of three kinds of data, each worked through from the formula to a size. For an image, multiply the width by the height by the colour depth: 1,000 times 800 times 24 is 19,200,000 bits, which divided by 8 is 2,400,000 bytes, or 2.4 megabytes. For a sound, multiply the sample rate by the bit depth by the number of seconds: 44,100 times 16 times 10 is 7,056,000 bits, which divided by 8 is 882,000 bytes, or 0.88 megabytes. For text, multiply the number of characters by the bits per character: 2,000 times 8 is 16,000 bits, which divided by 8 is 2,000 bytes, or 2 kilobytes. To move up the units, divide bits by 8 for bytes, then by 1,000 for kilobytes, megabytes and gigabytes. OCR, AQA and Key Stage 3 use 1,000. Edexcel uses 1,024 and the names kibibyte, mebibyte and gibibyte.Image1width1,000× height800× colour depth24= 19,200,000 bits÷ 8 = 2,400,000 bytes2.4 MBSound2sample rate44,100× bit depth16× seconds10= 7,056,000 bits÷ 8 = 882,000 bytes0.88 MBText3characters2,000× bits each8= 16,000 bits÷ 8 = 2,000 bytes2 KBFrom bits to bigger units4bits÷ 8bytes÷ 1000KB÷ 1000MB÷ 1000GBOCR, AQA and Key Stage 3 divide by 1000. Edexcel divides by 1024 and writes KiB, MiB and GiB.
  1. Image: width × height × colour depth. Every pixel costs the colour depth in bits.
  2. Sound: sample rate × bit depth × seconds, and × 2 for stereo.
  3. Text: number of characters × bits per character. ASCII uses 8.
  4. Divide by 8 to turn bits into bytes, then by 1,000 for each step up.
Every file size question is the same three steps: multiply, divide by 8, then change the unit. Show each step.

Key terms you must be able to define

Analogue
A continuously varying signal, which has a value at every instant.
Sampling
Measuring the height of an analogue wave at regular intervals and recording each measurement as a number.
Sample rate
The number of samples taken per second, measured in hertz.
Sample resolution
The number of bits used to store each individual sample.
Duration
The length of the recording in seconds, used in the file size calculation.
Channel
One stream of audio. Mono has one, stereo has two.

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, which has a value at every instant.
DefineSampling
AnswerMeasuring the height of an analogue wave at regular intervals and recording each measurement as a number.
DefineSample rate
AnswerThe number of samples taken per second, measured in hertz.
DefineSample resolution
AnswerThe number of bits used to store each individual sample.
DefineDuration
AnswerThe length of the recording in seconds, used in the file size calculation.
DefineChannel
AnswerOne stream of audio. Mono has one, stereo has two.

Reach the top grade on this topic

Almost every mark beyond the basics on this topic comes from keeping the two controls straight and from careful arithmetic.

Say which control does what, in the same sentence as its effect. "A higher sample rate takes more measurements each second, so rapid changes in the wave are captured and higher frequencies are preserved." That is a complete answer. "Better quality" is not.

Name the price alongside the benefit. Every improvement in quality has a proportional cost in file size, and questions asking you to evaluate a choice want both sides plus a decision.

Convert to seconds before anything else. Write it as the first line of your working so you cannot forget it.

Mistakes that cost marks here

Avoid these
  • Leaving the duration in minutes when the formula needs seconds.
  • Confusing sample rate with sample resolution.
  • Forgetting to multiply by two for a stereo recording.
  • Forgetting to divide the total bits by eight to get bytes.
  • Saying that sampling captures the wave exactly. It approximates it, and the difference is the error introduced by digitising.
Fun fact

CD audio uses 44100 samples a second because of a rule from signal theory: to reconstruct a wave you must sample at more than twice its highest frequency. Human hearing tops out near 20000 Hz, so 44100 leaves a margin.

Knowledge check

0 of 10 answered
1What does sample rate measure?
2What does increasing the sample resolution do?
3A 2 minute mono recording is made at 44100 Hz with 16 bit resolution. What is the size in bits?
4How many different levels can a 16 bit sample resolution represent?
5What effect does recording in stereo rather than mono have on file size?
6Why can a digital recording never be identical to the original analogue sound?
7A recording is made at 8000 Hz. What is the likely consequence?
8Which change would improve the quality of a recording without affecting how precisely each individual height is stored?
9A 30 second stereo recording at 44100 Hz and 16 bits is how large in megabytes, using 1 kB as 1000 bytes?
10Which unit is a sample rate measured in?
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.

15 marks
1State what is meant by sample resolution.1 mark
State

Mark scheme0 / 1
  • LThe number of bits used to store each sample
Model answer

Sample resolution is the number of bits used to store each individual sample taken from the sound wave.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
2A recording lasts 4 minutes. It is sampled at 44100 Hz with a sample resolution of 16 bits, in mono. Calculate the file size in megabytes, using 1 kilobyte as 1000 bytes. Show your working.4 marks
Calculate

Mark scheme0 / 4
  • LConverts 4 minutes to 240 seconds
  • LMultiplies sample rate by resolution by duration
  • LDivides by 8 to get bytes
  • LGives approximately 21.168 MB
Model answer

Four minutes is 4 times 60, which is 240 seconds. The size in bits is 44100 times 16 times 240, which is 169344000 bits. Dividing by 8 gives 21168000 bytes, dividing by 1000 gives 21168 kilobytes, and dividing by 1000 again gives 21.168 megabytes.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
3Explain the difference between sample rate and sample resolution, and the effect each has on the quality of a recording.4 marks
Explain

Mark scheme0 / 4
  • LSample rate is how many samples are taken each second
  • LA higher sample rate captures rapid changes and higher frequencies
  • LSample resolution is how many bits are used for each sample
  • LA higher resolution gives more levels, so each height is recorded more accurately
Model answer

Sample rate is the number of measurements taken from the wave each second, measured in hertz. Raising it means the measurements are closer together in time, so rapid changes in the wave are captured and higher frequencies survive into the recording. Sample resolution is the number of bits used to store each individual measurement. Raising it increases the number of levels a sample can take, so each measured height is rounded by a smaller amount and the recorded amplitude is closer to the true one. The two controls therefore improve different things: the rate improves detail across time and the resolution improves detail in loudness, and both increase the file size in direct proportion.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
4A music streaming service wants to reduce the amount of data it sends to users on slow connections. Discuss two changes it could make to the audio and the effect each would have.6 marks
Discuss

Mark scheme0 / 6
  • LIt could reduce the sample rate
  • LThis reduces the file size in proportion but loses higher frequencies
  • LIt could reduce the sample resolution
  • LThis gives fewer levels, so loudness is recorded less accurately and the sound is noticeably worse
  • LIt could send mono rather than stereo, halving the data
  • LReaches a reasoned conclusion about the trade off for this situation
Model answer

The first change is to reduce the sample rate, for example from 44100 Hz to 22050 Hz. That halves the number of samples and therefore halves the data sent, but it also halves the highest frequency that can be reconstructed, so cymbals and consonants sound dull and the recording loses its brightness. The second change is to reduce the sample resolution, for example from 16 bits to 8. That also halves the data, but it cuts the number of available levels from 65536 to 256, so every measured height is rounded much more coarsely, which is heard as a hiss behind quiet passages. A third option is to send mono rather than stereo, which halves the data again without touching the accuracy of any individual sample, at the cost of losing the sense of position in the mix. For a user on a slow connection the sensible order is to drop to mono first, because the loss is the least noticeable on phone speakers or a single earpiece, then reduce the sample rate, and only reduce the resolution as a last resort since that is where the audible damage is worst. Better still is to offer several quality levels and let the player choose automatically, so the user gets the best the connection can carry.

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