<aside> <img src="/icons/new-badge_green.svg" alt="/icons/new-badge_green.svg" width="40px" /> The new bits in this page are in green, mostly related to sound channels.

</aside>

Sound is originally analogue and must be converted to digital for storage and processing in computers. This conversion is done through sampling.

What is “sampling”?

A sample is a measure of amplitude at a specific point in time. The process of sampling involves taking regular measurements of the analogue signal.

<aside> <img src="/icons/heart-rate-monitor_gray.svg" alt="/icons/heart-rate-monitor_gray.svg" width="40px" /> Sampling Rate The number of samples taken per second. Measured in Hertz (Hz), where 1 Hz = 1 sample per second (like Physics).

</aside>

<aside> <img src="/icons/hashtag_gray.svg" alt="/icons/hashtag_gray.svg" width="40px" /> Sample Resolution The number of bits used to represent each sample. Higher resolution means more precise/more accurate representation of the sound (closer to the original).

</aside>

High sampling rates and resolutions for high-quality sound are usually used in Music and Audio recording. Lower sampling rates and resolutions are usually used in things like voice recording on your phone, or streaming from a platform like Spotify - the audio is acceptable and sounds close enough to our ears, but not 100% accurate to the original, to save bandwidth (streaming) or disk space (recording).

Example (graphs might be stolen from BBC Bitesize)

A sound wave like this can be sampled at each time sample point (in this case every 1 unit of time)

Untitled

And the data looks somewhat like this, which can be stored in a file.

Sample 1 2 3 4 5 6 7 8 9 10
Denary 8 3 7 6 9 7 2 6 6 6
Binary 1000 0011 0111 0110 1001 0111 0010 0110 0110 0110

However, if we plot back this graph, it doesn’t look 100% accurate to the original.

Untitled

If the sample rate is doubled - twice as many samples in the same time period, then the resultant graph is more accurate to the original:

Untitled

An audio file is usually recorded at 44.1 kilohertz. This is high enough for good sound quality while keeping file size down to sensible levels.