ЁЯФК

Sound Storage in Computers

Jul 21, 2024

Lecture Notes: Sound Storage in Computers

Introduction

  • Focus on Chapter about Text, Images, and Sound.
  • Today's focus: Sound, how it is stored in computers.

What is Sound?

  • Sound is analog data and a form of wave, specifically vibrations.
  • Computation of sound involves converting it into a format the computer understands.

Analog vs Digital Data

  • Analog Data: Continuous wave data, difficult for computers to interpret.
    • Example: Continuous waveform where each second has different values.
  • Digital Data: Discrete data points, easier for computers to interpret.
    • Continuous wave is sampled at regular intervals to create digital data.

Sampling

  • Definition: Process of converting analog data into digital by taking discrete points at regular intervals.
  • Converts pure line data (analog) into stepped data (digital).
  • Loss and Addition: During conversion, some data (blue) is lost, and some extra data (green) is added.
  • Improvement: Increasing the number of samples reduces loss and added data.
    • Example: More samples per second lead to better approximation of original data.

Sampling Rate

  • Definition: Number of samples taken per second.
  • Effects:
    • Higher sampling rate: Sound is closer to the original, fewer errors, requires more storage.

Sampling Resolution

  • Definition: Number of bits assigned per sample.
  • Effects:
    • Higher resolution: Greater volume range, better quality, but more storage required.
    • Example: High pitch or bass sounds require more bits per sample.
  • Calculation:
    • File size = Sampling Rate ├Ч Sampling Resolution ├Ч Length of Sound (in seconds).
    • Example: 320 Kbps vs 128 Kbps sound quality.

Practical Example

  • Human Voice Recording: Requires around 8000 samples/second for good quality.
  • Music Recording: Requires 32,000 to 44,000 samples/second for preserving quality.
  • Different Modes: Different sampling rates are used for various applications like phone calls vs music.

Summarized Topics

  1. Sampling - Digital approximation by marking discrete points to convert analog sound into digital at regular intervals.
  2. Sampling Rate - Number of samples taken per second, affects closeness to original sound and error rate.
  3. Sampling Resolution - Number of bits per sample, affects volume range and quality of sound.

Example Calculation and Units

  • Smallest Unit: Bit (B), proceeds to Byte, Kilobyte (KB), Megabyte (MB), Gigabyte (GB), etc.
  • Conversion based on powers of 1024.

Homework and Further Reading

  • Question: Explain how sound is stored in a computer.
  • Related Topics: Text and Image storage in computers.
  • Next Class Topic: Data Storage and Compression

Note: Pay attention to the conceptual difference between how human senses and computers perceive and store data.