Images & Graphics6 min readLast updated: Mon Feb 12 2024 00:00:00 GMT+0000 (Coordinated Universal Time)

Audio Basics: Sample Rate & Bit Depth

Sound is a continuous wave of air pressure. Computers cannot store "continuous" things; they can only store individual numbers. To digitize sound, we must take snapshots of the wave.

Sample Rate (Time)

This is how many times per second we measure the sound wave.

  • 44.1 kHz (44,100 times per second): The standard for CD Audio.
  • 48 kHz: The standard for Video/Movies.

Why 44.1 kHz? Humans can hear frequencies up to roughly 20 kHz. According to the Nyquist Theorem, you must capture at least double the highest frequency you want to record. $20 \times 2 = 40$. The extra 4.1 is a safety buffer.

Bit Depth (Volume)

This is how accurate each measurement is. It determines the dynamic range (difference between quietest and loudest sounds).

  • 16-bit: standard CD quality. (65,536 levels of volume).
  • 24-bit: Studio quality. (16.7 million levels).

Visualizing the "Steps"

Digital audio is like a staircase trying to match a smooth ramp.

  • Higher Sample Rate: The steps are narrower (horizontal).
  • Higher Bit Depth: The steps are shorter (vertical).

With enough samples and enough depth, the steps become so small that the human ear perceives them as a smooth, perfect wave.

Common Formats

  • WAV / AIFF: Uncompressed. Huge files. Perfect quality.
  • MP3 / AAC: Compressed (Lossy). Removes data humans (supposedly) can't hear.
  • FLAC: Compressed (Lossless). Perfect quality, about half the size of WAV.