Sound is naturally analogue — a continuous waveform of air pressure variations. Computers can only process digital (binary) data. To store sound digitally, the analogue wave must be converted to binary through a process called sampling.
Sampling is the process of measuring (taking "samples" of) the amplitude (height) of the analogue sound wave at regular time intervals. Each measurement is recorded as a binary number. The collection of these samples can be used to reconstruct the original sound.
The sample rate (or sampling rate) is the number of samples taken per second, measured in Hz (hertz) or kHz (kilohertz).
Bit depth (sample resolution) is the number of bits used to store each sample. More bits = more possible amplitude values = more accurate representation of the sound.
| Bit depth | Possible amplitude values | Use |
|---|---|---|
| 8 bits | 256 values | Basic, low quality |
| 16 bits | 65,536 values | CD quality audio |
| 24 bits | 16,777,216 values | Studio/professional audio |
Example: A 3-minute stereo audio file at 44,100 Hz with 16-bit depth:
| Change | Effect on quality | Effect on file size |
|---|---|---|
| Increase sample rate | Better (more accurate sound) | Larger |
| Decrease sample rate | Worse (choppy/distorted) | Smaller |
| Increase bit depth | Better (more precise amplitudes) | Larger |
| Decrease bit depth | Worse (fewer amplitude levels) | Smaller |