3.3.7 - Sampling sound and calculating file size

3.3.7 - Sampling sound and calculating file size

Learn how samples turn analogue sound into digital data, distinguish sampling rate from sample resolution, and calculate uncompressed sound size with clear units.

Converting analogue sound

Sound in the physical world varies continuously, while a computer stores discrete binary values.

A microphone turns changing air pressure into a changing electrical signal. This analogue signal can vary continuously in amplitude and time. The computer cannot store every possible value at every instant. An analogue-to-digital converter measures the signal at selected instants and represents each measurement with a finite binary code.

The stored numbers are a digital representation of the sound. On playback, the system uses them to reconstruct an analogue signal that drives a speaker. The speaker's physical movement produces sound again; the binary digits themselves are not sound waves.

The conversion is an approximation because measurements are taken at separate times and each measurement has limited precision. This does not mean digital sound has only two possible loudness levels: each sample can contain several bits and therefore represent many amplitude values.

Analogue and digital

An analogue signal varies continuously. A digital representation uses discrete values stored as binary data.

Sampling rate and resolution

A sample is a measurement of the signal's amplitude at a particular point in time.

Sampling rate is the number of samples taken each second, usually measured in hertz. A rate of 8,000 Hz means 8,000 samples per second; the sample interval is 1÷80001\div8000 seconds. It does not mean that each sample contains 8,000 bits.

Sample resolution is the number of bits used for each sample. An 8-bit sample has 256 possible codes; a 16-bit sample has 65,536. These codes represent the permitted amplitude levels. The original measurement is stored using an available level, rather than infinite precision.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account