user73: Given that most people can't hear so many frequencies above 20kHz anyways, I've never understood the exact arguments for using sampling rates above 48kHz.  At 48kHz, I understand that it is easier to construct a lowpass filter with a bit of higher bandwidth to remove aliasing, but I don't understand why anybody would want to record at 96kHz.  
For projects which are strictly digital, ie, using pure digital synthesis and not recording any material which would be converted from analog -> digital, is there any advantage to using sampling rates above 44.1kHz?
For everything else, is there any benefit at all to using 96kHz?  Is it beneficial when applying some particular type of DSP operation later on?  Or is it purely a placebo effect for the ear?
Note: There are other questions here asking about which sampling rates to use for various types of recording projects, but here I am asking for real, hard facts for any mathematical or DSP-related reasons supporting use of higher sampling rates.

user50: When recording with multiple tracks, I believe the bit depth is more important than the sampling rate.
So for example, 24bit would be better that 16bit. This has to do with the way that your tracks are mixed down together and something called "rounding errors" when there are not sufficient bits.
Most hardware and software can now easily support 96k & 24bit, so there isn't a real need to settle for less.
That said, you can obviously make a high quality recording using older 16/44.1 equipment.
It's more about the talent than it is the equipment.

user156: For what it's worth, the mathematical rationale, at least to the needs of the audio world, is generally described by the Nyquist-Shannon sampling theorem, sometimes just referred to as the Nyquist theorem, which in basic language just states that to fully reproduce a waveform with a max frequency n Hz, you need 2n samples per second.

user345: Another good reason to use a higher sampling rate is to work around deficiencies of plugin implementations.  Many plugin writers do not properly take into account the bandwidth-expanding effects of nonlinear signal operations, and as a result you can get aliasing effects  before you leave the box. 
For example, a compressor is basically a voltage-controlled amplifier... it multiplies one signal (the audio signal) by another signal (the gain).  Multiplication of 2 signals is also known as ring modulation or heterodyning; it has the effect of producing sum and difference signals of the 2 inputs.  If you multiply a 15 kHz sine by a 10 kHz sine, you get an output signal that has a 5 kHz and a 25 kHz component.  If your compressor's gain has a very fast attack, and the input signal has a wide bandwidth, the "sum" component signal could easily go over the Fs/2 limit on a transient basis, resulting in spurious aliased low-frequency junk in your output signal.
The real fix for this is for the plugin to be implemented using oversampling internally, but if you can't get that the next best thing is to run the system at as high a Fs as you can.  You won't have any actual audio content up in the stratosphere but you are protected against some plugin blowing past the boundary.   

user739: To have headroom for effects is a theoretically (and practically) valid reason to have a higher sampling rate than twice the human hearing limit.
The reason for this is easily visualised by comparing with image editing – if you only have say 800x600 px image with an overall shot of a high contrast brick wall, fishnet, striped textiles, or other finely spaced high contrast texture, you can only rotate in 45° multiples without causing a moiré effect and blurring the details. With audio, the distortions that occur with editing have different terms, but the same Nyquist-Shannon sampling theorem principles apply. Aliasing is a more commonly used term than "imaging effect", for the event that the sampled sound has frequency content above half the sampling rate (called Nyquist frequency).
In practise, like Pelle ten Cate already explained, a brick wall low pass filter is not achievable, but there is always some gradient (slope) on the cut off.
Another good reason to record with higher sampling rates is to achieve a more precise stereo image, as human hearing in large part relies on small time differences (about 5-20 ms, and physically these are phase differences) between ears to localise sound sources. The heads "shadow" and other aspects also play a part.
With the audio CD sampling rate  of 44100 Hz, each sample represents 22,6 microseconds, and for example one period of a 882 Hz frequency has 50 samples. Also, a rather long delay of 20 ms delay lasts 50 samples. So, only 25 samples at that middle frequency means a 180° phase cancellation.
So, 44,1 KHz sampling rate is just good enough, but does not really have much headroom for editing.
Another thing that should be kept in mind is to use dithering (just as in image editing) to prevent quantization noise. And next you will ask, should I use 24 bit quantization instead of 16 bits...?

user153: 
For projects which are strictly digital, ie, using pure digital synthesis and not recording any material which would be converted from analog -> digital, is there any advantage to using sampling rates above 44.1kHz?

Yes.  Some examples:
Creation of frequencies you don't want
Aliasing from digital synthesis
Many square/sawtooth/triangle wave generators are naively-written, in that they produce an infinite number of harmonics, which are aliased and sound clearly bad. (..., +1, +1, +1, +1, −1, −1, −1, −1, ... is not a correct square wave, and the aliased harmonics will produce radio tuning sounds in the background during portamento.)
If the sampling frequency is higher, this effect is reduced, because the aliasing frequency is farther away from the audio band.
Of course it would be better if the generator were written in a way that completely eliminates aliasing, but you can't always control that as a user.  Even well-written ones are usually compromises, with "reduced" aliasing, not completely bandlimited, so higher sampling rate still helps.
Aliasing from digital distortion
Likewise, when you use any kind of digital non-linear distortion, it produces an infinite number of harmonics or intermodulation products.  The ones that would be produced above the Nyquist frequency are actually aliased back into the audible range.
Although it's theoretically possible to distort in a bandlimited way, it isn't common for plugin coders to actually do this.  Every guitar distortion plugin I've tested has aliasing, even processing at 96 kHz.
I'm not sure how much of a problem this is practically.  Lots of things cause small amounts of distortion, like a compressor or volume fade, but the amount is already negligible, so the aliased amount is even more negligible.  For heavy distortion, the aliased frequencies may also be not noticeable because they're buried in the noise.  Regardless, higher sampling rate will help to minimize any harmful effects.
Lack of frequencies you do want
Another possible concern is that synthesized ultrasonic frequencies might become useful later in processing, even though you can't hear them directly in the recording:
Frequency shift from time changes
If you resample a wave to slow it down, such as in a soundfont player, those ultrasonic frequencies will become audible frequencies.  If you had filtered them out to avoid aliasing at the lower sampling rate, the slowed-down sound would be missing the high end.
Distortion/Modulation
As said before, distortion will create new intermodulation frequencies at sum and difference locations from the frequencies in the original recording.  This time, we're concerned about desirable audible frequencies being produced by distortion/modulation of ultrasonic frequencies (not related to aliasing).  If those ultrasonic frequencies aren't in the recording before distortion, the output will be missing the audible frequencies they produce, and it won't exactly emulate an equivalent analog effect.
Again, I'm not sure if this is practically a problem, but it's at least plausible, and higher sampling rates that include ultrasound will improve it.
In general, working at higher sampling rates gives "headroom" to prevent problems with effects and stuff that may not be implemented correctly.  Like photocopying a photocopy, the better the quality of each copy, the less degradation there will be in the final product.
Useless for playback
This is not to say that higher sampling rates are a good idea for playback of the finished mix.  They're not.  As described above, distortion of ultrasound can produce audible sound, and loudspeakers are the least linear thing in the audio chain, so you want to eliminate any ultrasound from the final mix to prevent it from being distorted by the speaker.
There's no benefit to higher sampling rates for music playback; they should only be used in the recording and processing stages.  See 24/192 Music Downloads ...and why they make no sense.

user24: I always use double sampling rates if possible, for two important reasons.
First reason: to get rid of the characteristics of the anti-imaging filter when working with analog sound sources. What is an anti-imaging filter?
Let's say I am recording on 44100 Hz.
If I would record a sine wave of less then 10 KHz, you could clearly see the sinewave when you plot the sample values in a graph.
If I sample a sine wave of 0dB FS with a 22,5KHz frequency, the samples read 1 and -1 alternately.
Now, here's the problem. If I record a sine wave of 0dB FS with a 30 KHz frequency, and plot the samples, each sample is taking more than half a sine period, and - if you would play back the samples - it would return an 11KHz sinewave. (If you don't believe me, just make a simple drawing.) This behaviour is called the 'imaging effect'.
This means that before sampling the signal, we have to be sure that there are NO frequencies present what so ever above the so-called "nyquist frequency" (which is half the sampling rate). When using digital sound sources that provide their sounds already sampled, this is not really that big a deal, since they can sometimes just be programmed to never generate a signal above half the sampling rate, or they can filter everything out using a linear-phase brickwall filter that has no effect on the rest. 
But, if you are sampling signal from an analog source, this filtering is done before the signal is sampled. The only way to filter analog sound is by use of an electronical circuit. And since the filter is supposed to have a very steep curve, it will affect the frequencies within the audible range, even though the filter was not designed for it. Now there are quite some good filters inside A/D converters, so the problem is minimal, but it gets relatively irritating to listen to when you are working several days on 44.1 KHz audio, compared to using 96KHz. The filter that is going to be applied when you downsample 96 back to 44.1 is of course a digital filter, and is probably of a much better quality. And, it is only applied when you are completely done with all the work, so it won't bother you.
Second reason: to get rid of the characteristics of the dithering signal. 
When you are recording in 24 bits resolution and you plan to have your master at 16 bits, you will need a dithering signal to mask away the rounding errors. Now noise is not a pretty thing to have in your recording and while broadband noise is best for masking rounding errors, noise shaping can be a big improvement applied to the dithering signal in order to make it less disturbing. Now if the recording was made using 96KHz, you can noise shape most of the dithering signal to frequencies higher than 24KHz, so nobody will hear them. The dithering noise is at the end of the recording finally filtered out, at the moment you downsample your project back to 44.1 KHz.
So, bottom lines:
Is it useful when recording analog stuff:

Yes, definitely. You have less disturbance from the anti-imaging filter and less disturbance from the dithering signal when used with proper noise shaping.

Is it useful when working with digital stuff that came right of my softsynth?

Yes, still useful if you plan to work with 24 bits, and mastering it down to 16 bits. You can gain a great deal with noise shaping the dithering signal.


73: <p>Given that most people can't hear so many frequencies above 20kHz anyways, I've never understood the exact arguments for using sampling rates above 48kHz.  At 48kHz, I understand that it is easier to construct a lowpass filter with a bit of higher bandwidth to remove aliasing, but I don't understand why anybody would want to record at 96kHz.  </p>

<p>For projects which are strictly digital, ie, using pure digital synthesis and not recording any material which would be converted from analog -> digital, is there any advantage to using sampling rates above 44.1kHz?</p>

<p>For everything else, is there any benefit at all to using 96kHz?  Is it beneficial when applying some particular type of DSP operation later on?  Or is it purely a placebo effect for the ear?</p>

<p>Note: There are other questions here asking about which sampling rates to use for various types of recording projects, but here I am asking for <em>real, hard facts</em> for any mathematical or DSP-related reasons supporting use of higher sampling rates.</p>
 50: <p>When recording with multiple tracks, I believe the bit depth is more important than the sampling rate.</p>

<p>So for example, 24bit would be better that 16bit. This has to do with the way that your tracks are mixed down together and something called "rounding errors" when there are not sufficient bits.</p>

<p>Most hardware and software can now easily support 96k &amp; 24bit, so there isn't a real need to settle for less.</p>

<p>That said, you can obviously make a high quality recording using older 16/44.1 equipment.</p>

<p>It's more about the talent than it is the equipment.</p>
 156: <p>For what it's worth, the mathematical rationale, at least to the needs of the audio world, is generally described by <a href="http://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem" rel="nofollow">the Nyquist-Shannon sampling theorem</a>, sometimes just referred to as the Nyquist theorem, which in basic language just states that to fully reproduce a waveform with a max frequency n Hz, you need 2n samples per second.</p>
 345: <p>Another good reason to use a higher sampling rate is to work around deficiencies of plugin implementations.  Many plugin writers do not properly take into account the bandwidth-expanding effects of nonlinear signal operations, and as a result you can get aliasing effects  before you leave the box. </p>

<p>For example, a compressor is basically a voltage-controlled amplifier... it multiplies one signal (the audio signal) by another signal (the gain).  Multiplication of 2 signals is also known as ring modulation or heterodyning; it has the effect of producing sum and difference signals of the 2 inputs.  If you multiply a 15 kHz sine by a 10 kHz sine, you get an output signal that has a 5 kHz and a 25 kHz component.  If your compressor's gain has a very fast attack, and the input signal has a wide bandwidth, the "sum" component signal could easily go over the Fs/2 limit on a transient basis, resulting in spurious aliased low-frequency junk in your output signal.</p>

<p>The real fix for this is for the plugin to be implemented using oversampling internally, but if you can't get that the next best thing is to run the system at as high a Fs as you can.  You won't have any actual audio content up in the stratosphere but you are protected against some plugin blowing past the boundary.   </p>
 739: <p>To have headroom for effects is a theoretically (and practically) valid reason to have a higher sampling rate than twice the human hearing limit.</p>

<p>The reason for this is easily visualised by comparing with image editing – if you only have say 800x600 px image with an overall shot of a high contrast brick wall, fishnet, striped textiles, or other finely spaced high contrast texture, you can only rotate in 45° multiples without causing a <a href="http://en.wikipedia.org/wiki/Moire">moiré effect</a> and blurring the details. With audio, the distortions that occur with editing have different terms, but the same Nyquist-Shannon sampling theorem principles apply. <b>Aliasing</b> is a more commonly used term than "imaging effect", for the event that the sampled sound has frequency content above half the sampling rate (called Nyquist frequency).</p>

<p>In practise, like Pelle ten Cate already explained, a brick wall low pass filter is not achievable, but there is always some gradient (slope) on the cut off.</p>

<p>Another good reason to record with higher sampling rates is to achieve a more precise stereo image, as human hearing in large part relies on small time differences (about 5-20 ms, and physically these are phase differences) between ears to localise sound sources. The heads "shadow" and other aspects also play a part.</p>

<p>With the audio CD sampling rate  of 44100 Hz, each sample represents 22,6 microseconds, and for example one period of a 882 Hz frequency has 50 samples. Also, a rather long delay of 20 ms delay lasts 50 samples. So, only 25 samples at that middle frequency means a 180° phase cancellation.</p>

<p>So, 44,1 KHz sampling rate is just good enough, but does not really have much headroom for editing.</p>

<p>Another thing that should be kept in mind is to use dithering (just as in image editing) to prevent quantization noise. And next you will ask, should I use 24 bit quantization instead of 16 bits...?</p>
 153: <blockquote>
<p>For projects which are strictly digital, ie, using pure digital synthesis and not recording any material which would be converted from analog -&gt; digital, is there any advantage to using sampling rates above 44.1kHz?</p>
</blockquote>
<p>Yes.  Some examples:</p>
<h1>Creation of frequencies you <em>don't</em> want</h1>
<h2>Aliasing from digital synthesis</h2>
<p>Many square/sawtooth/triangle wave generators are naively-written, in that they produce an infinite number of harmonics, which <a href="https://www.flickr.com/photos/omegatron/4624609411" rel="nofollow noreferrer">are aliased and sound clearly bad</a>. (<code>..., +1, +1, +1, +1, −1, −1, −1, −1, ...</code> is <em>not</em> a correct square wave, and the aliased harmonics will produce radio tuning sounds in the background during portamento.)</p>
<p>If the sampling frequency is higher, this effect is reduced, because the aliasing frequency is farther away from the audio band.</p>
<p>Of course it would be better if <a href="http://slack.net/%7Eant/bl-synth/" rel="nofollow noreferrer">the generator were written in a way that completely eliminates aliasing</a>, but you can't always control that as a user.  Even well-written ones are usually compromises, with <a href="https://ieeexplore.ieee.org/document/1395943" rel="nofollow noreferrer">&quot;reduced&quot; aliasing</a>, not completely bandlimited, so higher sampling rate still helps.</p>
<h2>Aliasing from digital distortion</h2>
<p>Likewise, when you use any kind of digital non-linear distortion, it produces an infinite number of harmonics or <a href="https://en.wikipedia.org/wiki/Intermodulation" rel="nofollow noreferrer">intermodulation</a> products.  The ones that would be produced above the Nyquist frequency are actually aliased back into the audible range.</p>
<p>Although it's theoretically possible to <a href="https://dsp.stackexchange.com/q/2608/29">distort in a bandlimited way</a>, it isn't common for plugin coders to actually do this.  Every guitar distortion plugin I've tested has aliasing, even processing at 96 kHz.</p>
<p>I'm not sure how much of a problem this is practically.  Lots of things cause small amounts of distortion, like a compressor or volume fade, but the amount is already negligible, so the aliased amount is even more negligible.  For heavy distortion, the aliased frequencies may also be not noticeable because they're buried in the noise.  Regardless, higher sampling rate will help to minimize any harmful effects.</p>
<h1>Lack of frequencies you <em>do</em> want</h1>
<p>Another possible concern is that synthesized ultrasonic frequencies might become useful later in processing, even though you can't hear them directly in the recording:</p>
<h2>Frequency shift from time changes</h2>
<p>If you resample a wave to slow it down, such as in a soundfont player, those ultrasonic frequencies will become audible frequencies.  If you had filtered them out to avoid aliasing at the lower sampling rate, the slowed-down sound would be missing the high end.</p>
<h2>Distortion/Modulation</h2>
<p>As said before, distortion will create new intermodulation frequencies at sum and difference locations from the frequencies in the original recording.  This time, we're concerned about desirable audible frequencies being produced by distortion/modulation of ultrasonic frequencies (not related to aliasing).  If those ultrasonic frequencies aren't in the recording before distortion, the output will be missing the audible frequencies they produce, and it won't exactly emulate an equivalent analog effect.</p>
<p>Again, I'm not sure if this is practically a problem, but it's at least plausible, and higher sampling rates that include ultrasound will improve it.</p>
<p>In general, working at higher sampling rates gives &quot;headroom&quot; to prevent problems with effects and stuff that may not be implemented correctly.  Like photocopying a photocopy, the better the quality of each copy, the less degradation there will be in the final product.</p>
<h1>Useless for playback</h1>
<p>This is not to say that higher sampling rates are a good idea for <em>playback</em> of the finished mix.  They're not.  As described above, distortion of ultrasound can produce audible sound, and loudspeakers are the least linear thing in the audio chain, so you want to eliminate any ultrasound from the final mix to prevent it from being distorted by the speaker.</p>
<p>There's no benefit to higher sampling rates for music playback; they should only be used in the recording and processing stages.  See <a href="http://people.xiph.org/%7Exiphmont/demo/neil-young.html" rel="nofollow noreferrer">24/192 Music Downloads ...and why they make no sense</a>.</p>
 24: <p>I always use double sampling rates if possible, for two important reasons.</p>

<p>First reason: to get rid of the characteristics of the anti-imaging filter when working with analog sound sources. What is an anti-imaging filter?</p>

<p>Let's say I am recording on 44100 Hz.<br>
If I would record a sine wave of less then 10 KHz, you could clearly see the sinewave when you plot the sample values in a graph.<br>
If I sample a sine wave of 0dB FS with a 22,5KHz frequency, the samples read 1 and -1 alternately.</p>

<p>Now, here's the problem. If I record a sine wave of 0dB FS with a 30 KHz frequency, and plot the samples, each sample is taking more than half a sine period, and - if you would play back the samples - it would return an 11KHz sinewave. (If you don't believe me, just make a simple drawing.) This behaviour is called the 'imaging effect'.</p>

<p>This means that before sampling the signal, we have to be sure that there are NO frequencies present what so ever above the so-called "nyquist frequency" (which is half the sampling rate). When using digital sound sources that provide their sounds already sampled, this is not really that big a deal, since they can sometimes just be programmed to never generate a signal above half the sampling rate, or they can filter everything out using a linear-phase brickwall filter that has no effect on the rest. </p>

<p>But, if you are sampling signal from an analog source, this filtering is done before the signal is sampled. The only way to filter analog sound is by use of an electronical circuit. And since the filter is supposed to have a very steep curve, <strong><em>it will affect the frequencies within the audible range</em></strong>, even though the filter was not designed for it. Now there are quite some good filters inside A/D converters, so the problem is minimal, but it gets relatively irritating to listen to when you are working several days on 44.1 KHz audio, compared to using 96KHz. The filter that is going to be applied when you downsample 96 back to 44.1 is of course a digital filter, and is probably of a much better quality. And, it is only applied when you are completely done with all the work, so it won't bother you.</p>

<p>Second reason: to get rid of the characteristics of the dithering signal. </p>

<p>When you are recording in 24 bits resolution and you plan to have your master at 16 bits, you will need a dithering signal to mask away the rounding errors. Now noise is not a pretty thing to have in your recording and while broadband noise is best for masking rounding errors, noise shaping can be a big improvement applied to the dithering signal in order to make it less disturbing. Now if the recording was made using 96KHz, you can noise shape most of the dithering signal to frequencies higher than 24KHz, so nobody will hear them. The dithering noise is at the end of the recording finally filtered out, at the moment you downsample your project back to 44.1 KHz.</p>

<p>So, bottom lines:
Is it useful when recording analog stuff:</p>

<ul>
<li>Yes, definitely. You have less disturbance from the anti-imaging filter and less disturbance from the dithering signal when used with proper noise shaping.</li>
</ul>

<p>Is it useful when working with digital stuff that came right of my softsynth?</p>

<ul>
<li>Yes, still useful if you plan to work with 24 bits, and mastering it down to 16 bits. You can gain a great deal with noise shaping the dithering signal.</li>
</ul>
