Learn
1.2.2 | REPRESENTING SOUND
01 | A CONTINUOUS WAVE, A DIGITAL RECORDING
A microphone responds to changing air pressure and produces an electrical signal that varies over time. To store that sound digitally, the system measures the signal at regular intervals and represents the measurements using binary.
Sampling takes measurements of the signal’s amplitude. Quantisation maps each measurement to one of the available numeric levels. An analogue-to-digital converter performs this conversion.
The recording contains a sequence of numbers, not a tiny drawing of the waveform.
02 | SAMPLE RATE: HOW OFTEN DO WE MEASURE?
Sample rate is the number of samples taken each second. It is measured in hertz (Hz). A rate of 8000 Hz means 8000 samples per second; 44.1 kHz means 44100 samples per second.
On a waveform graph, sample rate controls the horizontal spacing between measurements. A higher rate puts them closer together in time.
A higher sample rate can capture more rapid changes and a wider range of signal frequencies when the system is designed appropriately. Too few samples can misrepresent the signal; this is called aliasing.
Sample rate is not the sound’s pitch or loudness. It describes how often the recording system measures the signal.
03 | SAMPLE RESOLUTION: HOW PRECISE IS EACH VALUE?
Sample resolution, also called bit depth, is the number of bits used per sample. More bits provide more possible amplitude levels.
| Bits per sample | Available levels |
|---|---|
| 2 | 4 |
| 3 | 8 |
| 4 | 16 |
| 8 | 256 |
| 16 | 65536 |
On the graph, bit depth controls the vertical spacing of the available levels. More levels allow an amplitude to be represented more closely, reducing quantisation error.
Bit depth does not determine how many measurements happen per second. Keep it separate from sample rate.
04 | EXPLORE THE WAVEFORM
Change one control at a time. The green curve is the original signal. Circles show its amplitude at sample times; pink squares show the nearest available digital level. Dashed vertical connectors show the quantisation difference.
This simplified graph uses very low rates and bit depths to make the effect visible. It is not a playable recording. The numeric code is an illustrative unsigned level index; real audio formats may represent sample amplitudes differently.
05 | HOW TO READ THE GRAPH
- The horizontal axis is time, covering one second.
- The vertical axis is normalised signal amplitude, from −1 to +1.
- The green curve varies continuously.
- Sampling chooses specific times along that curve.
- Each amplitude is mapped to the nearest horizontal level.
- The chosen level is represented by a binary code.
Hold bit depth constant and increase sample rate: there are more sample points, but the same levels. Hold sample rate constant and increase bit depth: sample times stay the same, but there are more levels.
These are different kinds of detail: detail over time and precision of amplitude.
06 | ENCODE A MEASURED LEVEL
| Chosen level index | Three-bit code |
|---|---|
| 0 | 000 |
| 1 | 001 |
| 2 | 010 |
| 3 | 011 |
| 4 | 100 |
| 5 | 101 |
| 6 | 110 |
| 7 | 111 |
If a measurement is mapped to level 5 in this demonstration, its stored code is 101. The next sample may use a different level and code.
These codes identify the available levels. The mapping between numeric values and physical signal amplitude must be defined by the recording format.
07 | ACCURACY AND FILE SIZE
Increasing sample rate provides more measurements over the same duration. Increasing bit depth provides a finer set of values for each measurement. Both can improve the fidelity of a suitable recording.
Both also increase the amount of uncompressed sample data. With duration and channel count fixed:
- Double the sample rate: twice as many samples, so twice as much sample data.
- Double the bits per sample: twice as much data per sample.
- Increase both: the effects multiply.
A higher setting does not repair a poor microphone or an already damaged recording. Sample rate and resolution are important factors, not the only influences on quality.
08 | A SMALL FILE-SIZE EXAMPLE
Uncompressed sample data in bits = sample rate × bits per sample × seconds × channels 8000 samples/s × 8 bits × 10 s × 1 channel = 640000 bits = 80000 bytes
This is a ten-second mono example. Two channels would double the sample data. File headers, metadata and compression are excluded.
The main goal here is to explain the relationship between settings, accuracy and size. More detailed storage calculations appear in the storage and compression section.
09 | PLAYBACK: FROM NUMBERS BACK TO SOUND
During playback, software interprets the sample data and a digital-to-analogue system creates a changing signal that can drive speakers.
Correct reconstruction involves more than drawing straight lines between points. Suitable sampling and filtering allow a digital recording to reproduce the intended signal accurately within the system’s limits.
A waveform shows amplitude over time. Do not confuse changing bit depth with turning up the speaker volume, or changing sample rate with simply making the source pitch higher.