Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>If you can't hear over 8 kHz

Can't most folks hear frequencies higher than 8 kHz? I don't disagree with your conclusions since I don't care much about audio quality, but I feel like I'm missing something here.



Yeah I think parent poster confused a detail or two.

20hz-20khz is the human range, more or less. For most adults it's more like 15khz.

The 44.1khz sampling rate of CD audio was chosen because it can represent frequencies up to 22.05hz (44.1khz / 2) which safely covers the frequency range of human hearing with a bit of headroom for good measure.


The problem is that you have to implement an anti-aliasing filter that goes from 0dB at 20kHz to -96dB at 22kHz. This isn't a very practical filter to build, and will typically add all kinds of ripple to the top end.

The reason for 96kHz or even 192kHz sampling is that your filter can have a much gentler roll-off.


That's why they chose 44.1khz for redbook audio, right? Takes you up to 22khz, but most people can only hear up to 15khz or less, so you've got some headroom to play with if things aren't perfect between 15-22khz where our hearing isn't super sensitive anyway.

Or no?


That's not really true. 2kHz is a pretty big range to build a filter in (and with digital you can trivially sample at 192khz FFT and delete the high frequency data)


Sure you can easily upsample in playback.

And the studio can master the recording from a high sample rate recording using an enormous FIR filter, because latency and computing power are mostly irrelevant.

High sample rate equipment just allows you to listen to studio intermediate data without having to have it downsampled first.

But there are problems. For example, if there is any non-linearity in the equipment this can easily cause inaudible tones in the ultrasonic range to intermodulate with each other to produce tones that are audible.

Nothing is simple.


But surely at 22khz you can only oscillate between 2 values if sampling at 44khz, whereas 2khz gets 20 values in the same 180 degrees of the wave? So doesn’t this mean you lose fidelity at higher frequencies?

Edit: thanks for all these great responses!


A sine wave is a sine wave; it can't contain any "additional information" that would gain anything from getting encoded by more data points.

If it would, it wouldn't be a sine wave anymore, and you could decompose it into its component of phase and amplitude shifted sine waves, which will occupy all kinds of places in the frequency domain, many of them higher than your initial 22 kHz.

That's in fact what we mean when we say "a 22 kHz signal": An ensemble of all of these overlapping waves represented as a single signal. If you're sampling that with an ADC, you're not only sampling the the 22 kHz wave, but you're also sampling it – and that, but only that, can in fact be described with a single bit per ADC readout.

Looking at it from an information theoretical point of view, the Kolgomorov complexity of "a sine wave of 22 kHz and amplitude x" is pretty minimal – just from that sentence, you can perfectly recreate that signal with no sampling whatsoever, and one ADC readout tells you its amplitude and phase. It can carry a bandwidth of 0 Hz.


The magical thing about Nyquist is that this isn't a problem. Two values is enough to define a pure sine wave at 20khz, and all you need is the ability to represent sine waves at every frequency (per Fourier analysis).

This reaches the edge of my knowledge, but I think this is basically because the discrete values are 'slewed' (aka integrated aka low-pass filtered) into a continuous signal by the DAC.

See: https://en.wikipedia.org/wiki/Sampling_(signal_processing)


A CD is 16 bits, so you have 65536 possible values to oscillate between.

If you mean "does a 44khz only output a square (or triangle) wave at 22kHz, the answer is "no."

If you have two alternating values at 44kHz, the output will be a perfect (to the limits of noise &c.) sine wave, since the DAC is band limited.

If this is still confusing to you, I recommend watching https://www.youtube.com/watch?v=FG9jemV1T7I


No. Having the other 20 in-between values doesn't help improve the "accuracy" of the 2 khz wave. An x Khz wave is always an x Khz wave. That is to say the x Khz part of the signal is by definition the part of the signal which looks like sin([freq][time]2pi). Your soundwave is a sum of these Eg

a_i sin(2pitf)

where each a_i is the amount of a given frequency present. If every wave sample you have goes [1,-1,1,-1,1,-1...] then 100% of your wave is accounted for as a sin wave at the sampling rate. There is zero additional frequencies present with unknown amounts. If your wave samples went like [0,1,0,-1,0,1,0,-1...] the only frequency of sound present in the signal is the one at half the sampling rate. The whole wave is accounted for.

On a more physical level, its ok if your sample only sees +1/-1 every other sample, because when that electrical signal turns into pushing a magnet the magnet has to accelerate smoothly in accordance to Newtons laws. In other words, flipping the voltage between +-1 as a 40khz square wave becomes a perfect 20khz sine wave when it reaches the speaker.


https://en.m.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_samp...

You can only capture all the information if you sample at twice the rate of the highest frequency of interest.


Yes, humans can detect sounds up to about 20 kHz when they're younger. That number goes down with age and noise exposure. But if you ever have taken a hearing test, you might notice they stop testing at 8 kHz. If you look at equal loudness curves, 8 kHz is around the point where sounds have to get much, much louder to be perceived as the same volume as sounds at lower frequencies. You can hear those higher frequencies in cymbals and a few other things in music if your hearing isn't thrashed, but in a practical sense, 8 kHz is the upper limit of useful human hearing.


The common quoted range is something like 20hz to 20khz; most people aren't able to discern much beyond "sound is present" above 12khz to 16khz.

There are however some folks who have much higher top ends, 24k to 32k and maybe more. hard to test. They hear bats talking.

There's also things like hyperacusis which add an extra dimension of sensitivity to things others can dismiss completely like dynamic range and even phase.

https://en.wikipedia.org/wiki/Hyperacusis https://en.wikipedia.org/wiki/Hyperacusis


Yep, but 8kHz is nearly twice the frequency of a piano’s high C (rightmost key). There are vocalists that can sing G10s (which is around 10k?) but they’re rare and not musically useful


It's not the base frequencies that matter, it's the harmonic sequence above the base note that makes for the difference between instruments.

Play with it yourself - record various notes, on various instruments, do the FFT to break it into the frequency domain, and you'll see quite a few harmonics over the base note. Strip those out, and it sounds muddy.

For those old enough, an analog phone line was typically limited to 300-3300Hz, give or take. It's more than enough to pass clearly understandable human voice, but neither it is the same as being next to someone.

There are also a lot of the high frequencies present in the sort of transients that cymbals and snare drums and such put out - and I'll suggest that most audio compression algorithms mangle them quite badly until you get up into the lossless or "may as well have used lossless" bitrates.


But that high C on a piano isn't a pure 4khz tone. There is a lot going on there above and below 4khz. You can prove this to yourself by looking at it in a frequency analyzer, or by simply listening to a pure 4khz tone and observing that it sounds a lot different than a piano. This is also why the same note played on different instruments sounds different.

If you lop off everything above 8khz, things sound "muffled", like you've put a thin blanket over the speaker.

No need to believe me, try it yourself in Audacity or any music playing app with EQ controls.


Not only that, but stringed instruments have a lot of frequencies in the first millisecond, right at the attack, until the string settles into its harmonic oscillations. This is very noticeable on a spectrogram and gives each plucked/raked/bowed note its distinctive character.


It is, and it's the data that a lot of audio compression algorithms manage to lose or mangle.

A plucked string in FLAC vs something like 128 or 160kbit MP3 sounds radically different. The same is true of the initial hit of a cymbal - they're just wrong when compressed.


Yeah. And I'm not even sure why this is controversial.

We all know that JPEG is a really good format, but like all lossy formats it struggles with sharp pixel-perfect text. More generally, lossy data compression struggles with those sorts of razor-sharp details.

I don't know why some fight tooth and nail against this in the audio domain.

In practice, yeah, MP3 is usually good enough. An isolated plucked string or cymbal crash is not something you come across too often. And that's why MP3 fares so well in listening tests against uncompressed audio.

But if you really want a full fidelity experience it's not the ultimate choice, any more than a JPEG of the Sistine Chapel is a 1:1 substitute for the real thing.


> An isolated plucked string or cymbal crash is not something you come across too often.

It really depends on what you're listening to. If you're, say, a fan of high speed bluegrass, it's an awful lot of isolated plucked strings. :)


Key word "isolated".

The high-speed bluegrass I enjoy has so many string events, so close to each other (in time), that almost none of them are isolated.


People aren't fans of high speed bluegrass? :)

Yeah I was definitely simplifying in order to keep things under 50,000 words hahaha


Is there anything pleasant to hear over 8khz?


Yeah, a lot of the "details" are 8khz and up. A pure 15khz tone isn't fun to listen to (if you can hear that high) but if you cut off everything above 8khz (or 7khz, or etc) things will start to sound increasingly more muffled. Experiment in Audacity or such to see for yourself.


No one wants to listen to pure tones over 8kHz, but things like cymbal crashes would sound rather different if you cut off those higher frequencies. The primary frequencies are of course under that cut-off, but there's lots of other frequencies above it.


The harmonics of a guitar or piano can extend well beyond 8kHz, even though they contain lower frequency components that give them their characteristic sound. In fact, the higher harmonics can contribute to the richness and complexity of the overall sound, even if they're not heard as distinct pitches. Similar effect occurs with cymbals, the high-frequency shimmer of cymbals can extend well above 8kHz. Also violins can include overtones that extend beyond 8kHz and the sound of a trumpet can include overtones that extend up to 10kHz or higher.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: