Sampling is a method of converting an analogue audio signal into a digital signal. While sampling a sound wave, the computer takes measurements of this sound wave at a regular interval called sampling interval. Each measurement is then saved as a number in binary format.
The quality and file size of the sound files are linked to the size of the sampling interval (in milliseconds).
A small sampling interval results in a better quality sound file and increases the size of the audio file.
To describe the quality of a sound file we often use the term sample rate as opposed to the sampling interval.
The sample rate (in Hz) is the number of samples in one seconds.
Sample Rate = 1 / Sampling Interval
A small sampling interval results in a high sample rate which results in a better quality sound file and increases the size of the audio file.
Sampling Sound Visualisation using Python
Bit depth is the number of bits available for each sample. The higher the bit depth, the higher the quality of the audio. Bit depth is usually 16 bits on a CD and 24 bits on a DVD.
The bit rate of a file tells us how many bits of data are processed every second. Bit rates are usually measured in kilobits per second (kbps). The higher the bit depth, the higher the quality of the audio.
Take the Quiz
Take the Quiz on Sampling Sound