Representing sound
Sound needs to be converted into binaryA number system that contains two symbols, 0 and 1. Also known as base 2. for computers to be able to process it. To do this, sound is captured - usually by a microphone - and then converted into a digitalInformation stored as discrete values usually represented as numbers. This contrasts with analogue data which is represented by continuous data, usually in waves. signal.
An analogueContinuous data which can have a range of values. to digital converter will sample a sound wave at regular time intervals. For example, a sound wave like this can be sampled at each time sample point:
The samples can then be converted to binary. They will be recorded to the nearest whole number.
Time 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 | 0100 | 0110 | 0110 |
Time 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 |
0100 |
0110 |
0110 |
If the time samples are then plotted back onto the same graph, it can be seen that the sound wave now looks different. This is because sampling does not take into account what the sound wave is doing in between each time sample.
This means that the sound loses quality as data has been lost between the time samples. The way to increase the quality and store the sound at a quality closer to the original, is to have more time samples that are closer together. This way, more detail about the sound can be collected, so when it’s converted to digital and back to analogue again it does not lose as much quality.
The frequency at which samples are taken is called the sample rateHow many samples of data are taken per second. This is normally measured in hertz, eg an audio file usually uses samples of 44.1 kHz (44,100 audio samples per second)., and is measured in Hertz (Hz). 1 Hz is one sample per second. Most CD-quality audio is sampled at 44 100 or 48 000 Hz.