Skip to main content

Topic: Are high sample rates better for DSP? (Read 12718 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
Are high sample rates better for DSP?
I've read many times that audio plug-ins such as equalizers work better at higher sample rates, even if audio generally doesn't benefit. It seems unlikely that there's a practical advantage to up-sampling all your files, or recording at 96 KHz in the first place, but is there a potential theoretical improvement? Or is this just another Internet myth?

--Ethan
I believe in Truth, Justice, and the Scientific Method

  • knutinh
  • [*][*][*][*][*]
Are high sample rates better for DSP?
Reply #1
The higher the sample-rate, the better any approximations that assume that the sample-rate is infinite (or that logic propagation speed is infinite) will be.

Resampling the input to a higher rate is a perfectly valid design technique for some dsp tasks. I would rather trust the dsp designer to do it for me, than just assuming that I know his job better than him, though.

-k

  • lvqcl
  • [*][*][*][*][*]
  • Developer
Are high sample rates better for DSP?
Reply #2
Here is an example of such filter (with explanation): http://www.sonorissoftware.com/catalog/equalizer-p-31.html
(note that according to the wiki article this effect is called frequency warping, not pre-warping)



  • Last Edit: 10 June, 2012, 04:03:54 PM by lvqcl

  • benski
  • [*][*][*][*][*]
  • Developer
Are high sample rates better for DSP?
Reply #3
Yes, many filters work better with higher sampling rates.  Particularly resonant filters (of the kind used in EQ) as well as filters feedback paths, such as emulations of analog filters.  Many of these kinds of filters are only accurate (desired Fc versus actual Fc) and stable up to perhaps 1/8 Fs.  With certain filter topologies, the filter cutoff point and resonance self-oscillation frequency start to drift apart at higher frequencies, also.

For these reasons, it is much better to oversample the input before the filters so that the audio band lies within the "good" range of the filter. 

Unfortunately, good resampling is often slow, and more importantly, latent, so it can at times be more advantageous to simply run the whole processing chain at some high sampling frequency, e.g. 384kHz.


Also: non-linear effects, such as distortion, will almost always alias.  Certain effects that seem linear are actually not, as fast modulation of parameters such as gain (for a compressor/expander) or filter cutoff (wah pedal) will introduce aliasing as well.  Oversampling reduces aliasing in the audio band, as the aliased signal typical falls off 6dB/octave.
  • Last Edit: 10 June, 2012, 04:21:11 PM by benski

  • xnor
  • [*][*][*][*][*]
  • Developer
Are high sample rates better for DSP?
Reply #4
Many EQs use simple bilinear-transformed filters (the entire frequency response of the analogue prototype is "crammed" into the range 0 - Fs/2 Hz), which behave like lvqcl posted above. There's also EQs that oversample internally to reduce this effect. Some EQs use orfanidis filters which are not very accurate but overall match the bell curve better even near nyquist. And then there's EQs that use higher order filters that are very accurate up to ~20 kHz (44.1 kHz sample rate).

So yes, in case you need to use peak filters near nyquist and want the bell curve to look like the analogue prototype and have a simple EQ as explained above you should use a higher sample rate.
  • Last Edit: 10 June, 2012, 08:45:01 PM by xnor
"I hear it when I see it."

  • Woodinville
  • [*][*][*][*][*]
Are high sample rates better for DSP?
Reply #5
In addition to the warping one sees in a bilinear mapping (which is what this warping you people are talking about is), anything that does any nonlinear processing must do oversampling at least as big as, or larger than, its maximum polynomial order.
-----
J. D. (jj) Johnston

Are high sample rates better for DSP?
Reply #6
That's interesting, so basically if you  want to "remaster" a track :
let's say denoising, eq, exciters, reverb,  stereo ehancers ,  and why not slight loudness compression,
it would be better to upsample first, and then downsample once the work is done ?

I'm not so sure that even with a big dsp chain, upsampling is worth it, or at least that a  difference could be perceived, but I  prefer to  do it anyway.
However, this increase cpu use.

  • bandpass
  • [*][*][*][*]
Are high sample rates better for DSP?
Reply #7
The higher the sample-rate, the better any approximations that assume that the sample-rate is infinite (or that logic propagation speed is infinite) will be.

True, but the worse any approximations that assume that the sample-rate is say 44-48kHz will be.

That's interesting, so basically if you  want to "remaster" a track :
let's say denoising, eq, exciters, reverb,  stereo ehancers ,  and why not slight loudness compression,
it would be better to upsample first, and then downsample once the work is done ?

It depends on how each effect you're using has been implemented—check the specs.

  • knutinh
  • [*][*][*][*][*]
Are high sample rates better for DSP?
Reply #8
True, but the worse any approximations that assume that the sample-rate is say 44-48kHz will be.

Obviously, but I dont see the relevance?

Many algorithms (and training) are based in an analog world - digital is seen as an approximation.

-k
  • Last Edit: 11 June, 2012, 03:31:24 AM by knutinh

  • bandpass
  • [*][*][*][*]
Are high sample rates better for DSP?
Reply #9
From a practical perspective, a particular effect/plugin may utilise filter coeficients that have been pre-calculated to work within a fixed sampling-rate range; increasing the sampling rate to beyond that range would make it perform less well, probably badly.  So having one plugin that works better (or exclusively) at a high rate is not a green light to run the whole chain at that rate—check the specs of each plugin.



  • knutinh
  • [*][*][*][*][*]
Are high sample rates better for DSP?
Reply #10
... So having one plugin that works better (or exclusively) at a high rate is not a green light to run the whole chain at that rate—check the specs of each plugin.

I tend towards trusting dsp developers to know how to do their job: _if_ a given algorithm sounds audibly better at Nx48kHz, they should have arranged internal resampling and/or mentioned this in some user manual. If they don't, then I am sceptical about their competence in the first place. If there is no benefit, then it is potentially waste of time/cycles for me to resample to higher rates

One might think about cases where a long chain of linear/non-linear dsp algorithms might benefit from a single sample-rate conversion at the very beginning and very end instead of multiple conversions inside and outside of each dsp module, but I tend to think that such thinking usually stands in the way of producing good arts (which should be the main goal of any music producer).

-k

Are high sample rates better for DSP?
Reply #11
The higher the sample-rate, the better any approximations that assume that the sample-rate is infinite (or that logic propagation speed is infinite) will be.


non-linear effects, such as distortion, will almost always alias.  Certain effects that seem linear are actually not, as fast modulation of parameters such as gain (for a compressor/expander) or filter cutoff (wah pedal) will introduce aliasing as well.  Oversampling reduces aliasing in the audio band, as the aliased signal typical falls off 6dB/octave.

This is all very interesting, though a bit over my head. Let me ask another way: Considering only "typical" recording studio plug-in effects such as EQ and compression, is there a practical advantage to processing files at, say, 96 KHz rather than at 44.1 KHz? The reason I stress "practical" is because I just tried a simple test in Sound Forge using the Sonitus EQ plug-in bundled with Cakewalk SONAR I use, and I saw no added distortion or other artifacts when applying 10 dB boost at 1 KHz to a 1 KHz sine wave. All that happened is the tone got 10 dB louder.

For completeness, I created two files with the 1 KHz tone at -11 dB. Then I raised the volume of one file by 10 dB, and applied 10 dB of EQ boost with a Q of 24 to the other. The FFT displays of both files are identical, and neither has any added artifacts. Then I did the same test using 10 KHz both with volume boost and EQ at 10 KHz, and again the FFTs were identical showing nothing but the pure tone frequencies.

Edit: I forgot to mention the files were at a sample rate of 44.1 KHz.

--Ethan
  • Last Edit: 11 June, 2012, 12:22:29 PM by Ethan Winer
I believe in Truth, Justice, and the Scientific Method

  • saratoga
  • [*][*][*][*][*]
Are high sample rates better for DSP?
Reply #12
If your software is good, it should be upsampling when needed without you having to do it automatically.  So no, unless you're noticing some specific problem you have to work around, I wouldn't bother doing that.  Usually the engineer who wrote the software would have already figured this out for you.

  • drewfx
  • [*][*][*]
Are high sample rates better for DSP?
Reply #13
This is all very interesting, though a bit over my head. Let me ask another way: Considering only "typical" recording studio plug-in effects such as EQ and compression, is there a practical advantage to processing files at, say, 96 KHz rather than at 44.1 KHz? The reason I stress "practical" is because I just tried a simple test in Sound Forge using the Sonitus EQ plug-in bundled with Cakewalk SONAR I use, and I saw no added distortion


Try repeating the test with white noise and some high frequency EQ and see if you see changes in the shape of the EQ curves.

Are high sample rates better for DSP?
Reply #14
If your software is good, it should be upsampling when needed without you having to do it automatically.

That makes sense, and is about what I figured.

Try repeating the test with white noise and some high frequency EQ and see if you see changes in the shape of the EQ curves.

I can't use the same test with white noise. With a single sine wave I can achieve the same result with either a volume change or EQ. With noise there's no equivalent. I did, however, try boosting 10 KHz on a white noise file with a Q of 2 and again with a Q of 24. The resulting FFTs look as you'd expect in both cases.

So unless someone has an example that proves otherwise, I'll consider the notion that higher sample rates allow typical audio plug-ins to work better as just another audio myth.

--Ethan
I believe in Truth, Justice, and the Scientific Method

  • greynol
  • [*][*][*][*][*]
  • Global Moderator
Are high sample rates better for DSP?
Reply #15
I know the unofficial mantra around here is all things sound the same unless proven otherwise, but all I can say is wow, just wow.  When I was an engineer we always joked about something working on an infinite sample of one.

You've tested a couple of DSP operations on extremely trivial single-tone samples and are now willing to make such a sweeping generalization?!? I hope you don't plan on presenting this in public as things might get more than a little embarrassing for you.
  • Last Edit: 12 June, 2012, 01:48:43 PM by greynol
13 February 2016: The world was blessed with the passing of a truly vile and wretched person.

Your eyes cannot hear.

Are high sample rates better for DSP?
Reply #16
So unless someone has an example that proves otherwise, I'll consider the notion that higher sample rates allow typical audio plug-ins to work better as just another audio myth.


Hum, then what's the point of cd remastered at 96khz 24 bit ? (usually advertised on old classical titles).

Are high sample rates better for DSP?
Reply #17
You've tested a couple of DSP operations on extremely trivial single-tone samples and are now willing to make such a sweeping generalization?!?

No plans to present this in public. I posted this question because a friend asked me about it and I wasn't sure, so I figured I'd ask the experts. Me, I'll be satisfied to hear a good explanation of why EQ works better on 96 KHz audio files than files at 44.1 KHz. I'll be even happier to see an FFT or other data, or even a pair of audio files to compare. Whaddya got?

--Ethan
I believe in Truth, Justice, and the Scientific Method

  • greynol
  • [*][*][*][*][*]
  • Global Moderator
Are high sample rates better for DSP?
Reply #18
Have you read the responses to your topic?

I wanted to add that to my previous post about the couple of DSP operations that it doesn't seem like you know if they were done at higher sample rates to begin with.
  • Last Edit: 12 June, 2012, 02:46:19 PM by greynol
13 February 2016: The world was blessed with the passing of a truly vile and wretched person.

Your eyes cannot hear.

  • drewfx
  • [*][*][*]
Are high sample rates better for DSP?
Reply #19
Me, I'll be satisfied to hear a good explanation of why EQ works better on 96 KHz audio files than files at 44.1 KHz. I'll be even happier to see an FFT or other data, or even a pair of audio files to compare. Whaddya got?

--Ethan

I don't know that I'd say it works "better" (or that I could ABX the difference), but it isn't hard to get FFT's to show differences with identical EQ at different sample rates:


  • saratoga
  • [*][*][*][*][*]
Are high sample rates better for DSP?
Reply #20
Me, I'll be satisfied to hear a good explanation of why EQ works better on 96 KHz audio files than files at 44.1 KHz.


Resampling is accomplished by applying a filter.  If you resample to a higher sampling rate, then apply an EQ, effectively the length of the filter in the EQ is expanded by the length of the filter in the resampler.  Thus, you're essentially using a filter with more taps, which if properly designed (e.g. a good resampler), will give 'better' (or at least different) results then a filter with fewer taps. 

Of course if the EQ is already properly designed for its application, changing it is unlikely to improve things.

Are high sample rates better for DSP?
Reply #21
Thanks Drew for some hard evidence. Can you explain in layman's terms what the difference is between the two files after applying the same EQ? From the partial graph it looks like there's more boost at 10 KHz, but that doesn't seem right.

Of course if the EQ is already properly designed for its application, changing it is unlikely to improve things.

I guess this is the crux of it. Are many/most EQ plug-ins written "properly" such that there's no practical advantage to using files recorded at higher sample rates? Does the Sonitus that drew (and I) use do things properly?

As you know, my perspective is what matters in practice. For example, in theory 0.0001 percent distortion is "better" than 0.001 percent, but in practice it doesn't make even a tiny audible difference because both are too soft to hear. I've been using EQ plug-ins for years, and I've never noticed any degradation, or change to the audio other than the EQ I applied.

--Ethan
I believe in Truth, Justice, and the Scientific Method

  • benski
  • [*][*][*][*][*]
  • Developer
Are high sample rates better for DSP?
Reply #22
It's mostly that the shape (aka Q) is going to be different.  There's two important things.  First is that, at 48khz, the Q for the 10kHz boost is going to be different than the Q for a similar boost at 500Hz.  Since you are mixing with your ears, it's likely that you're already compensating for this subconsciously by turning up the gain.  Second is that the behavior the EQ differs based on sampling rate.
  • Last Edit: 12 June, 2012, 06:44:48 PM by db1989

  • greynol
  • [*][*][*][*][*]
  • Global Moderator
Are high sample rates better for DSP?
Reply #23
As for the "it's best to record at 96kHz because of post-processing," unless you're playing around with the pitch (to make it slower), like the rest of you, I have a hard time believing that there is any audible benefit.

I read the initial post as whether there can be any audible differences for the operations themselves to be at a higher resolution.  I think the safe bet is on "yes".
13 February 2016: The world was blessed with the passing of a truly vile and wretched person.

Your eyes cannot hear.

  • Woodinville
  • [*][*][*][*][*]
Are high sample rates better for DSP?
Reply #24
Me, I'll be satisfied to hear a good explanation of why EQ works better on 96 KHz audio files than files at 44.1 KHz.


Resampling is accomplished by applying a filter.  If you resample to a higher sampling rate, then apply an EQ, effectively the length of the filter in the EQ is expanded by the length of the filter in the resampler.  Thus, you're essentially using a filter with more taps, which if properly designed (e.g. a good resampler), will give 'better' (or at least different) results then a filter with fewer taps. 

Of course if the EQ is already properly designed for its application, changing it is unlikely to improve things.


Err, wrong. Double sample frequency, double taps, same frequency resolution.

What matters is the TIME LENGTH of a filter in regard to its frequency resolution, thank you.

And, once again, folks, do not forget nonlinear issues in processing. Nonlinearities require oversampling.
  • Last Edit: 12 June, 2012, 08:23:34 PM by Woodinville
-----
J. D. (jj) Johnston