Sound Sampling Visualiser
See how an analog sound wave is digitised by adjusting sample rate and bit depth. Watch quantisation in action and calculate file sizes. Covers AQA A Level CS (7517) §4.5.6.2.
📖 Learn Step-by-StepSampling Summary
File size for 1 second of audio
file size = sample rate × bit depth × duration (seconds)
Higher sample rate → captures more detail in the waveform
Higher bit depth → more precise amplitude values
Quality vs size
View sample data as binary
| # | Time | Analog | Quantised | Level | Binary |
|---|---|---|---|---|---|
| 0 | 0.000 | 0.5000 | 0.5333 | 8 | 1000 |
| 1 | 0.067 | 0.8716 | 0.8667 | 13 | 1101 |
| 2 | 0.133 | 0.9973 | 1.0000 | 15 | 1111 |
| 3 | 0.200 | 0.7939 | 0.8000 | 12 | 1100 |
| 4 | 0.267 | 0.3960 | 0.4000 | 6 | 0110 |
| 5 | 0.333 | 0.0670 | 0.0667 | 1 | 0001 |
| 6 | 0.400 | 0.0245 | 0.0000 | 0 | 0000 |
| 7 | 0.467 | 0.2966 | 0.2667 | 4 | 0100 |
| 8 | 0.533 | 0.7034 | 0.7333 | 11 | 1011 |
| 9 | 0.600 | 0.9755 | 1.0000 | 15 | 1111 |
| 10 | 0.667 | 0.9330 | 0.9333 | 14 | 1110 |
| 11 | 0.733 | 0.6040 | 0.6000 | 9 | 1001 |
| 12 | 0.800 | 0.2061 | 0.2000 | 3 | 0011 |
| 13 | 0.867 | 0.0027 | 0.0000 | 0 | 0000 |
| 14 | 0.933 | 0.1284 | 0.1333 | 2 | 0010 |
| 15 | 1.000 | 0.5000 | 0.4667 | 7 | 0111 |
Sound Sampling Practice Questions
A sound file is recorded at a sample rate of 44,100 Hz with a bit depth of 16 bits for 3 seconds (mono). Calculate the file size in bytes.
A sound is sampled with a bit depth of 8 bits. How many different amplitude levels can be represented?
A sound wave has a maximum frequency of 20,000 Hz. According to the Nyquist theorem, what is the minimum sample rate needed to accurately reproduce this sound? Give your answer in Hz.
A stereo audio file is recorded at 22,050 Hz, 16-bit depth, for 5 seconds. Stereo uses 2 channels. Calculate the file size in kilobytes (1 KB = 1024 bytes). Give your answer to the nearest whole number.
A podcast episode is 45 minutes long, recorded in mono at 22,050 Hz with a bit depth of 16 bits. Calculate the file size in megabytes (1 MB = 1024×1024 bytes). Give your answer to 1 decimal place.
Quick reference — sound sampling
Analogue to digital conversion (ADC):
- Sound is a continuous (analogue) pressure wave
- To store digitally, we sample the wave at regular intervals
- Each sample's amplitude is quantised to the nearest available level
Key definitions:
- Sample rate: number of samples taken per second (measured in Hz). CD quality = 44,100 Hz
- Bit depth: number of bits per sample — determines the number of amplitude levels (2n). CD = 16-bit
- Nyquist theorem: sample rate must be at least 2× the highest frequency to reconstruct the signal accurately
File size formula:
file size (bits) = sample rate × bit depth × duration (s)
Divide by 8 for bytes, ÷1024 for KB, etc.
Trade-offs:
- ↑ Sample rate → captures more detail (higher frequencies) → larger file
- ↑ Bit depth → more precise amplitudes → larger file
- Compression (e.g., MP3) reduces file size with some loss of quality