Sound

Understanding Sound Data

  • Sound is a form of analog data that our ears perceive.
  • It is created by waves of pressure changes in the air or another medium.
  • These pressure changes cause our eardrums to vibrate which our brain interprets as different sounds.

Digital Sound

  • Computers deal with digital data, so sounds must be converted into a digital format for a computer to store or process it.
  • This is done using analog-to-digital conversion which takes an analog sound wave and turns it into digital data.
  • The accuracy of the digital representation depends on the sampling rate and bit depth used in the conversion.

Sampling Rate

  • The sampling rate is the number of samples of audio carried out per second.
  • The higher the sample rate, the higher the quality of the sound, but this also means the file size will be larger.
  • The human ear can hear frequencies up to around 20kHz. According to Nyquist’s theorem, the sampling rate must be at least twice the highest frequency one wishes to record, so a common sampling rate is 44.1kHz.

Bit Depth

  • Bit depth refers to the number of bits of data in each sample, and it affects the dynamic range of the sound.
  • The higher the bit depth, the greater the dynamic range and the better the sound quality. However, like sampling rate, a higher bit depth also means a larger file size.
  • A common bit depth is 16 bits per sample.

Compression

  • Digital sound files can be very large due to the high amount of data needed for high-quality sound.
  • Therefore, compression is often used to reduce the file size.
  • There are two types of compression: lossless and lossy.
  • Lossless compression maintains the same quality as the original sound file but does not reduce the file size as much as lossy compression.
  • Lossy compression reduces the file size more but at the expense of some quality. It removes bits that are deemed least important to maintain as much quality as possible with a smaller file size.