Storing Sound

Storing Sound

Basic Understanding of Sound

  • Sound, in computer science, is a form of data that computers can process.
  • It is typically stored and manipulated as audio files in various formats such as MP3, WAV, or Midi.
  • All these sound files are a digital representation of sound waves.

Analogue and Digital Sound

  • Real-world sound is analogue, meaning it is continuous and has an infinite number of variations.
  • Computers, however, cannot store analogue data so the sound must be converted into digital data that computers can understand.
  • This process of converting analogue sound into digital data is known as digitisation.

Sample Rate

  • The Sample Rate is the number of samples of audio carried per second, measured in Hz or kHz.
  • A higher sample rate means higher sound quality but also larger file sizes.

Bit Depth

  • Bit Depth refers to the number of bits of information in each sample, and it directly corresponds to the resolution of each sample.
  • More bits equals higher resolution, higher dynamic range, and larger file size.

Audio Compression

  • To reduce the size of the audio file, compression is applied.
  • There are two types of audio compression, lossless and lossy.
  • Lossless Compression reduces file size without any loss of quality. The original and compressed file are exactly the same.
  • Lossy Compression reduces file size but also removes some data. The quality of the sound decreases, but this might not be noticeable.

File Formats

  • File Formats such as MP3, WAV, or MIDI each have a different way of handling sound data.
  • MP3 uses lossy compression which leads to smaller file sizes but lower sound quality.
  • WAV can use lossless compression leading to larger files but preserving sound quality.
  • MIDI does not store actual sounds but a sequence of instructions to generate those sounds, making the files very small.

Importance of Audio Representation

  • Understanding audio representation is essential in managing sound data effectively and efficiently.