Sound Representation

Published by Patrick Mutisya 10 months and 11 days ago

Objectives

  • Be able to tell the distinction between analog and digital sound.
  • Be able to calculate file size for sound data.
  • Understand the impact of different sampling rates and bit depths on sound quality and file size.
  • Be able to explain the difference between lossy and lossless compression.

 

Key Terms

  • Amplitude: The height of a sound wave, related to loudness.
  • Frequency: The number of sound wave cycles per second, related to pitch.
  • Bit Depth: The number of bits used to store each sample, affecting sound quality.
  • Sample Rate: How often the sound is sampled, measured in Hertz (Hz).

 

Introduction to Sound

        Sound is a vibration that travels through a medium (such as air) and can be heard when it reaches the ear.

        In computing, sound is represented as a series of binary data that approximates the original sound waves.

 

Analog vs Digital Sound

  • Analog Sound:
    • Continuous and represents sound waves as smooth curves.
    • Real-world sound (e.g., human voice, musical instruments) is analog.
  • Digital Sound:
    • Discrete; sound is broken down into binary numbers.
    • Computers store and process digital sound.
  • Conversion from Analog to Digital:
    • Uses a process called Analog-to-Digital Conversion (ADC).
    • Two main aspects: sampling and quantization.

The sampling of Sound wave Converting an analog signal into digital signal causes the loss of part of the information of the signal, to avoid this state and to get high precision in the process of sampling , rate of sample per second is taken to be at least double the highest frequency in the analog signal [2][12][13] , that is: Fs = 2f 

                          Figure 1: showing analogue (top) and digital (bottom) waves and the conversion of analogue into digital (middle)

 

Sound Sampling

        Sampling is the process of taking regular measurements of an analog sound wave.

        Each measurement is called a sample.

        Sampling Rate (Frequency) is the number of samples taken per second, measured in Hertz (Hz).

        Common sampling rates: 44.1 kHz (CD quality), 48 kHz (DVD quality).

        A higher sampling rate provides better sound quality but increases file size.

 

Bit Depth (Resolution)

        This is the number of bits used to store each sample.

        Common bit depths: 8-bit, 16-bit, 24-bit.

        Higher bit depth means more levels to represent sound amplitude (volume) more accurately.

        A higher bit depth improves sound quality but also increases file size.

 

File Size Calculation for Digital Audio

To calculate the size of an audio file, you need:

  • Sample Rate: How often samples are taken (e.g., 44.1 kHz).
  • Bit Depth: Number of bits used for each sample (e.g., 16-bit).
  • Duration: Length of the audio in seconds.
  • Number of Channels: Mono (1 channel) or Stereo (2 channels).

 

Formula:

File Size (bits) = Sample Rate Bit Depth Number of Channels Duration (seconds)

For example, a 10-second stereo recording at 44.1 kHz with 16-bit depth:

44,10016210 = 14,112,000 bits or 1.76 MB

 

Sound Compression

Sound compression is necessary in order to reduce the file size for storage and transmission, especially on the internet.

 

Types of Compression:

1.      Lossy Compression (e.g., MP3):

        Removes parts of the sound that are less audible to human ears.

        Reduces file size significantly but with some loss of quality.

  1. Lossless Compression (e.g., FLAC):

        No data is lost, the sound can be perfectly reconstructed.

        File size is reduced but not as much as lossy compression.

 

Common Audio File Formats

  • WAV: Uncompressed, high-quality, large file size.
  • MP3: Compressed using lossy compression, widely used for its balance of quality and size.
  • FLAC: Lossless compression, retains all original data.
  • AAC: Compressed, used in Apple devices, better quality than MP3 at the same bit rate.

 

Practical Applications of Sound Representation

  • Music Production: Digital Audio Workstations (DAWs) use sound sampling and bit depth settings.
  • Voice Recognition: Digital sound data is analyzed to recognize speech.
  • Multimedia Systems: Videos, podcasts, and online games rely on compressed audio for faster streaming.