Sample rates

This page is mainly here to document some development work, but should eventually probably be included in the technical end of the reference section

Audacity in principle supports recording and playing back audio at almost any sample rate from a few hertz to tens of kilohertz. Whilst this is useful for some data processing applications, for most audio work your choice of sample rate will be restricted by three factors:
 * What quality you wish to achieve
 * What sample rates your hardware will support
 * What you are going to do with the audio after it leaves Audacity

The sample rate of an audio recording describes how many times a second the system records the pressure of the sound wave. The more often it records the pressure, the more information has to be stored, but the more accurately the audio can be reproduced when it is played back. A piece of mathematics known as Nyquist's Theorem says that the highest frequency that can be stored and reproduced by any sampling system (like a digital audio system) is half of the sample rate. For example the maximum frequency that could be recorded on an Audio CD with a sample rate of 44100 Hz would be 22050 Hz. In practice, the maximum recorded frequency is lower than the Nyquist limit due to the limitations of equipment design and construction.

Whilst the sample rate of audio recordings can be changed through a process known as resampling, this is relatively slow and always leads to some loss of quality. In particular, once the sample rate of a recording has been reduced and information lost, there is no way to get the information back.

Common Sample Rates
Whilst it would be nice to choose the sample rate for a given recording based on the range of frequencies that need to be recorded, in practice the other two factors mentioned above are much more likely to restrict your choice of sample rate. Most audio distribution formats only support a limited range of sample rates, so you will either have to record at the correct rate for your distribution medium, or convert your recording later.

Maybe offer some guidance on whether it's better to record at correct rate or convert later. For example with high end ADCs would not oversampling be preferred? - Gale

Table presentation will hopefully be improved soon by improving the CSS

The other main restriction on your choice of sample rate may well be what your sound card is capable of. Many consumer sound cards only support 48000 Hz sample rate recording and playback, with some ability to work at other rates using software sample rate conversion. Other hardware (like many Creative SoundBlaster cards) only works at 44100 Hz. Windows' default sound system under MME drivers converts all playback to 44100 Hz before sending to the sound card.

Sample Rates in Audacity
In order to give the maximum choice of sample rates when working in Audacity, the following sample rates will always be offered when a choice of sample rates is required:

Any other sample rates supported by the sound card will also be included in the list. If one of the rates from the above list is chosen, but not supported by your sound hardware, then playback and recording will be resampled to a supported sample rate. Audacity always plays back and records at the same sample rate if you are doing both at the same time. This means if you have Software Playthrough, or Play other Tracks whilst Recording activated, you will only be able to use sample rates that are supported by both your playback and recording devices. Any other sample rates will have to be converted.

The way Audacity works out what sample rate to try and play or record your project at goes like this:
 * If the project rate is supported by your hardware, use that
 * If not, look for the next rate higher than the project rate supported by the hardware
 * If there aren't any higher rates, use the highest available rate