Sampling Sound

microphone-sampling-soundSampling 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.

Sampling Interval


The quality and file size of the sound files are linked to the size of the sampling interval (in milliseconds).

Sampling Interval: 15 ms

Sampling Interval: 15 ms

Sampling Interval: 40ms

Sampling Interval: 40ms

A small sampling interval results in a better quality sound file and increases the size of the audio file.

Sample Rate


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
Sampling Interval: 15 ms

Sample Rate: 66Hz

Sampling Interval: 40ms

Sample Rate: 25Hz

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


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.

Bit Rate


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

Did you like this challenge?

Click on a star to rate it!

Average rating 3.7 / 5. Vote count: 31

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!