📚 Seth MB

Search

Search IconIcon to open search

Sound

Last updated May 26, 2023 Edit Source

share_title="Look at this page from SethMB.xyz" share_description="https://sethmb.xyz/sixth/CompSci/Theory/Sound/" author="@saluki@fosstodon.org"

Sound is stored the same way as other digital files. However, a soundwave is a continuous signal, that isn’t directly digital.

An ADC (Analogue Digital Converter) is required to convert a soundwave to a digital sound file. It requires thousands of samples to be taken per second.

A sample is a snapshot of what sound was detected at a specific point in time. If samples are played together at a high enough rate, sound that is close to the original can be played.

# Factors Impacting Audio Quality

# Sampling Rate

# Frequency

# Nyquist’s Theorem

# Bit Depth

# PCM

# Bit Rates

# Audio Quality

# Analogue to Digital conversion

# File size check

24 x 16000 x 2 = 768kbps 768000 x 150= 115200000 bits / 8 = 14.4 MB

# (Musical Instrument Device Interface) MIDI

# Types of bytes


  1. Bit depth of 8 bits, what value range can be represented? 2^n = 2^8 = 256
  2. Calculate the bit rate of a 32-bit system with a sampling rate of 44,100 samples per second and 2 channels. 32 * 44100 * 2 = 2822400 bits

2822.4kbps

  1. What is the file size of a 4-minute song with bit rate of question 2/ 2,822,400 * 240 = 677,376,600 bits = 84.67MB

  1. Analogue sound is converted to digital using a DAC to sample.
  2. Sound files from the internet are typically lower quality than a CD sound file, because online services tend to use lower bit rates and higher compression to reduce hosting costs and increase speed.
  3. If the bit depth is increased, then there is a greater range of sound possible. The file size will also be increased.
  4. VoIP uses a sampling rate of 8kHZ because it is enough for you to understand a human voice. Anything higher would be inefficient.
  5. Factors affecting audio quality: sample rate, bit depth & bit rate.

Theory