In digital audio, the level of detail at which an analog audio signal can be captured, stored and recreated largely dictates the resultant sound quality. A digital audio file comprises a string of samples - i.e., tiny snapshots in time, each representing the amplitude of the analog audio signal at that particular moment.
In terms of recording, the sample rate refers to how many samples per second we're using to capture an incoming audio signal. Using a high sample rate can mean that you're taking tens of thousands of samples per second, thus more accurately capturing the fast fluctuations present in any audio signal you're recording.
A low sample rate takes fewer snapshots and is therefore less able to represent the signal clearly. With fewer samples, higher frequencies that cause faster fluctuations in the audios ignal can't be captured as accurately and are prone to incur what's known as aliasing- think of spinning car wheels or helicopter blades in films, where the object is rotating faster than the film format can, capture, which causes it to appear as if it's moving at a much slower pace or even going in reverse.
According to Nyquist's sampling theorem, a signal can be perfectly reconstructed when the sample rate is twice as high as the highest frequency being sampled. So if the highest frequency of an audio signal Is 1 kHz, sampling it at 2 kHz should result in a perfectly represented audio signal.
Bit-depth, on the other hand, refers to the number of digital bits used to represent each sample. In other words, the resolution we're using to capture the amplitude of the signal at any given moment. A higher bit-depth enables us to track smaller fluctuations in the incoming signal, and, as there's a greater range of values between the highest and lowest signals we can represent, dictates the dynamic range and signal-to-noise ratio of a digital audio signal.
Digital Audio File formats
The standard format for uncompressed digital audio is PCM (Pulse Code Modulation), which is typically stored as WAY files on PC and AIFF files on Mac, although both systems can play back either format. PCM holds samples taken at uniform intervals, and can be used to represent audio with any combination of sample rate and bit-depth, within reason. This makes it the ideal choice for recording applications - it gives uncompromised audio quality, as well as the ability to create very high resolution masters.
The only real drawback of PCM is its size. A few full tracks of uncompressed 96kHz/24-bit audio will require a substantial amount of hard drive space, which, in this day and age, can make sharing projects and getting involved in collaborative efforts over the internet a somewhat slow and frustrating experience.
FLAC is a lossless compressed audio format, which means the size of the file can be reduced without any apparent loss in data or sound quality. FLAC can typically compress audio files by around 30-50%. This has made it the first choice format for high quality music downloads or those recording their own CD or vinyl collections.
MP3 is a hugely popular audio format, employing loss-inducing data compression - high data compression rates can be achieved, but at the expense of sound quality. MP3's success stems from the fact that it can represent reasonably good audio quality at sometimes less than 10% of the size of the equivalent PCM file. This makes storing music and uploading/downloading it to/from the internet much more manageable. However, the resultant loss in quality makes it a less than ideal choice for most recording applications.
Lastly, REX is a lossless compressed audio format, which is especially designed for looped passages of audio that are created in Propellerhead's ReCycle software. A REX file will typically contain a looped section of audio, which has been chopped up into a string of shorter individual events, all represented as separate hits. This means looped sections of audio can be imported straight into your songs, where they'll map themselves to the tempo and groove of your track. it also makes editing loops very straight forward, as individual hits can be rearranged or assigned their own channels, and can also be tuned independently.