Sound
Music, speech and every other sound reaches your ear as an analogue wave โ a signal that rises and falls smoothly, with no gaps. A computer cannot store a smooth curve, only numbers, so something has to measure the wave for it. An analogue-to-digital converter (ADC) does that job: it takes measurements of the wave and turns each one into a number that the computer keeps as binary.
Every measurement the ADC takes is called a sample. At that instant the converter looks at the height of the wave and records it as a value, which is stored in binary. A sound file is therefore just a sequence of binary sample values, held in the order they were taken. The computer plays the sound back by working through that sequence from first value to last and rebuilding the wave.
For example, a hand clap might be measured eight times and give the heights 0, 4, 11, 14, 9, 3, 7, 1. The sound file holds those eight numbers one after another, each written in binary, so the loudest moment of the clap is the value furthest from zero.
Amplitude is the height of the wave above or below its resting, middle position at a given point. It is the measurement a sample records. A wave that swings far above and below the middle line has a large amplitude and sounds loud; a flattened wave that stays close to the middle line has a small amplitude and sounds quiet. Silence sits on the middle line with an amplitude of zero, so a sample taken in silence is stored as 0. Because each sample stores amplitude, a value further from zero means a louder moment in the recording.
Edexcel GCSE Computer Science ยท Sound