Microchip logo
Microchip logo
  • All
  • Products
  • Documents
  • Applications Notes

Digital Audio Basics

Audio SourceFrequenciesPopular Sampling Rates
Tones, BuzzersUsually a sinusoid of single frequency within the 3 KHz range2-4 times the tone with the largest frequency
DTMFA weighted sum of two sinusoids at specific standard frequencies between 500 Hz and 3 KHz7.2 KHz or greater
AlarmsUsually a time-varying sweep of a range of frequenciesTwice the largest frequency
Human Speech/VoiceCan be viewed as a weighted sum of signals between 300 Hz to 3.3 KHz. A human voice is capable of generating these frequencies8 KHz, 11.02 KHz, 16 KHz
Music & Musical InstrumentsCan be viewed as a weighted sum of signals between 20 Hz to 20 KHz. A human ear can perceive these frequencies.32 KHz (Good enough for most instruments), 44.1 KHz (CD-quality), 48 KHz (PC soundcards)
Music & Musical InstrumentsCan be viewed as a weighted sum of signals between 20 Hz to 20 KHz. A human ear can perceive these frequencies.48KHz, 96 KHz, 196 KHz. MP3 and WMA decoder libraries for PIC32 devices support sampling rates of 8KHz to 96 KHz and high resolution USB solutions are available supporting up to 196 KHz today.

Sampling Rate

Sampling Rate is the number of samples of a signal that need to be captured or played back within a second to ensure the signal has been captured intelligently. The sampling rate should satisfy Nyquist criterion to prevent effects of aliasing. Nyquist criterion requires the sampling rate to be greater than twice the highest frequency in the band of interest.

Bit Rate

Bit rate is the product of number of bits used to record a given sample and the sampling rate. It is expressed in kilo bits per second (kbps).

Audio Quality, Software Codecs and Low-Bit Rate Coding

Audio quality is directly proportional to the bit rate. However, since it can take significant memory to record an audio signal in its original form or alternatively significant time to transmit an audio signal in its original form, several software codecs such as ADPCM, G.711, G.726A & Speex have been devised to compress the raw audio signal without in many cases affecting audio quality. Here’s a simple comparison:

One second of a speech signal recorded at 16-bit resolution at 8 KHz sampling rate requires about 128 kilobits or 16 KB of memory for storage.

One second of the speech signal recorded at 16-bit resolution at 8 KHz sampling rate and encoded using the Speex library for dsPIC® DSCs will require 8 kilobits or 1 KB for storage, providing a 16:1 compression.

See the Playback and Recording sections for further details on various algorithms and on-chip peripherals used in audio applications.