Good article about sample rates

Link to good samples/soundfonts at http://wiki.linuxaudio.org/wiki/free_audio_data

Moderators: MattKingUSA, khz

j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Good article about sample rates

Post by j_e_f_f_g »

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

User avatar
Ricardus
Established Member
Posts: 64
Joined: Thu Apr 18, 2013 11:29 pm
Been thanked: 1 time

Re: Good article about sample rates

Post by Ricardus »

Good stuff.

I no longer take part in the sample-rate arguments that take place on the various audio and hi-fi forums in which I participate.
Mastering/Mix Engineer
Available for hire
User avatar
aprzekaz
Established Member
Posts: 144
Joined: Wed Oct 31, 2012 2:41 am

Re: Good article about sample rates

Post by aprzekaz »

Interesting. This makes me insecure about what sample rate sounds best with my (crappy) converters which is silly since I usually work with actual samples that are 44.1 anyway. Does It make any sense to use a higher sample rate for the session? I'm thinking it's probably best for me to just stick with 44.1 KHz since my own ears are not that sensitive anymore after years of playing drums too loud. And also, in the rare case that anyone else hears my music, it will be at 44.1KHz.


On another note: It seems that there is a consensus that a higher bit depth Is better for allowing headroom and dynamic range and that kind of thing, right? So is there a benefit in using 32bit float? I'll answer my own question again and say that since I'm pushing everything up into a limiter to make it all loud as can be, 16 bit is probably fine.
User avatar
Petra-Sue
Established Member
Posts: 35
Joined: Sun Oct 20, 2013 7:39 pm

Re: Good article about sample rates

Post by Petra-Sue »

aprzekaz wrote:It seems that there is a consensus that a higher bit depth Is better for allowing headroom and dynamic range and that kind of thing, right? So is there a benefit in using 32bit float? I'll answer my own question again and say that since I'm pushing everything up into a limiter to make it all loud as can be, 16 bit is probably fine.
Hmm - 16 bit will give you a relative (amplitude) resolution of roughly 1:65.000. So, even if there is some "error" in the last bit the resultant noise amplitude will be extremely low. I don't anticipate any gain in going higher.

Cheers,

Petra
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: Good article about sample rates

Post by raboof »

Cool, pretty clear and well-written article with nice references.

One part I don't understand in in the 'Oversampling for DSP' section: he describes that for DSP, a higher sampling rate does help. That makes total sense to me. Then, however, he goes on to claim that "the audio doesn’t have to be recorded at this higher sample rate, it’s just the processing that must happen at the higher rate". That seems counter-intuitive to me: wouldn't the oversampling of the low-samplerate signal have to make assumptions/guesses/averages that you don't need to make when your signal was recorded in the high sample rate in the first place? And wouldn't those assumptions/guesses/averages translate to audible artifacts in the processed signal?
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: Good article about sample rates

Post by raboof »

Also, one topic that I didn't see in the article is aliasing when downsampling.

Suppose you're processing audio that will eventually be released on CD, so 44.1kHz. And say, for whatever reason, you have something going on that makes you want to do processing on the signal at a sample rate of at least 60kHz (the article seems to suggest that might be reasonable in some cases). In such a case, I always thought that picking 88.2kHz would be preferable compared to picking 60kHz or even 96kHz. This, because converting from 88.2kHz to 44.1kHz is mostly a matter of just skipping every second sample, whereas when converting a 60kHz or 96kHz signal would require interpolation, leading to possible aliasing artifacts.

Is this idea incorrect, or simply so obvious that the author felt it didn't need mentioning?
Thad E Ginathom
Established Member
Posts: 369
Joined: Fri Sep 23, 2011 1:03 pm

Re: Good article about sample rates

Post by Thad E Ginathom »

Thanks for the article. There's stuff there I didn't know --- and plenty for those never ending hifi discussions :)
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: Good article about sample rates

Post by j_e_f_f_g »

raboof wrote:the audio doesn’t have to be recorded at this higher sample rate, it’s just the processing that must happen at the higher rate". That seems counter-intuitive to me: wouldn't the oversampling of the low-samplerate signal have to make assumptions/guesses/averages that you don't need to make when your signal was recorded in the high sample rate in the first place? And wouldn't those assumptions/guesses/averages translate to audible artifacts in the processed signal?
I don't understand your question at all.

But let's be sure folks understand what oversampling is for, whether it be hardware in a cd player doing it, or code inside of a software plugin. (I'm gonna try to explain this in laymen's terms). It's not done to make the original 44.1 KHz source audio sound better. That doesn't happen. It's done to help some DSP hardware or code perform some operation on the 44.1 audio without introducing nasty audible artifacts like distortion, hiss, phasing, etc. No DSP algorithim is completely transparent, and some are worse than others. For example, if the algo uses floating point math, then rounding errors could cause probs. If the plugin is working entirely within human hearing range (which the data at 44.1 is... ideally), then it's more likely a human will detect bad DSP artifacts. So the plugin will "up-sample" the 44.1 data to 88.2, and perform its algo, hopefully producing its artifacts way up there above human hearing. When done, the plugin will down-sample the data back to 44.1, hopefully tossing away all the artifacts.

Some algos become a lot less prone to producing audible artifacts when they operate at higher sample rates, such as filters/EQs. Other algos may see little or no benefit.

But the bottom line is that oversampling has nothing to do with affecting/improving the 44.1 source. It's to help to help some DSP algo avoid adding audible "nastiness" when it operates upon that 44,1 source.
Last edited by j_e_f_f_g on Thu Jan 16, 2014 7:06 am, edited 1 time in total.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: Good article about sample rates

Post by j_e_f_f_g »

raboof wrote:converting from 88.2kHz to 44.1kHz is mostly a matter of just skipping every second sample, whereas when converting a 60kHz or 96kHz signal would require interpolation, leading to possible aliasing artifacts.
With today's algos, and the high resolution math capabilities of modern hardware, this isn't a big issue.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: Good article about sample rates

Post by j_e_f_f_g »

aprzekaz wrote:is there a benefit in using 32bit float?
Short answer: Yes absolutely (well 24-bit anyway)... but only during the recording/mixing phase. Once you've done the final mix, then storing that as 32-bit makes no sense. It's not like the extra dynamic range is going to be of use to a human ear, which is the only thing processing that data further.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

ssj71
Established Member
Posts: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: Good article about sample rates

Post by ssj71 »

raboof wrote: One part I don't understand in in the 'Oversampling for DSP' section: he describes that for DSP, a higher sampling rate does help. That makes total sense to me. Then, however, he goes on to claim that "the audio doesn’t have to be recorded at this higher sample rate, it’s just the processing that must happen at the higher rate". That seems counter-intuitive to me: wouldn't the oversampling of the low-samplerate signal have to make assumptions/guesses/averages that you don't need to make when your signal was recorded in the high sample rate in the first place? And wouldn't those assumptions/guesses/averages translate to audible artifacts in the processed signal?
The sampling theorem says that any signal sampled at more than 2x the highest frequency can be reconstructed to the analog waveform perfectly. So unless the lower samplerate signal is already aliased, oversampling isn't making any sort of assumptions/guesses/averages. It is simply adding more samples, which is in a sense getting closer to the analog waveform. More appropriate reasons not to run a lower sample rate is to use a cheaper analog anti-aliasing filter on the input, or if your computational overhead of upsampling outweighs the cost of the higher rate A/D processing, both of which seem unlikely in our situation.
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
emarsk
Established Member
Posts: 96
Joined: Wed Jul 27, 2011 3:50 pm

Re: Good article about sample rates

Post by emarsk »

I know this thread is not super-fresh, but I want to add this link because it's the best article I found on this matter:
http://people.xiph.org/~xiphmont/demo/neil-young.html

BTW, it's also cited in the OP article, but I think it deserves its own post.

Cheers.
Please, avoid some common spelling errors:
http://theoatmeal.com/comics/misspelling
nbd
Established Member
Posts: 43
Joined: Thu May 03, 2012 11:40 am

Re: Good article about sample rates

Post by nbd »

raboof wrote:because converting from 88.2kHz to 44.1kHz is mostly a matter of just skipping every second sample
Doing this would be a bad idea if you truly care about the quality. You could easily test this by doing a simple 'skip' and then using a lib like libsamplerate and listen the differences. Throwing away 50% of the information without using it will have an impact.
Eino
Established Member
Posts: 107
Joined: Mon Dec 23, 2013 2:22 pm
Location: Music City USA
Contact:

Re: Good article about sample rates

Post by Eino »

When recording something in flac, with no set bit rate. The bit rate changes with the sound produced.
It hold true with 16bit or 32bit float integers.
I like recording lossless anyway. It's the best sound reproduction. .
"Music is everybody's possession. It's only publishers who think that people own it. "
John Lennon

https://soundcloud.com/eino1953
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: Good article about sample rates

Post by raboof »

Eino wrote:When recording something in flac, with no set bit rate. The bit rate changes with the sound produced.
That's actually unrelated. Even with VBR formats, the *sample* rate (the rate at which samples were taken from the sound source) is still constant.

Indeed the bitrate is a 'bytes per second'-like quantity just like the sample rate, but the bitrate is about the compressed data, the sample rate is about the data before compression (c.q. after decompression).
Post Reply