4 ms·
You should watch this: https://youtu.be/cD7YFUYLpDc?si=rUm6IR3IKXyzcaDB https://youtu.be/cD7YFUYLpDc?si=rUm6IR3IKXyzcaDB to better understand why high sample ra
by eyegor 3y ago
You should watch this: https://youtu.be/cD7YFUYLpDc?si=rUm6IR3IKXyzcaDB https://youtu.be/cD7YFUYLpDc?si=rUm6IR3IKXyzcaDB to better understand why high sample rates are a waste of time, instead of just reading about nyquist. "accurately preserving a 6kHz sine wave" sounds a lot like you think that sample points are reproduced 1-1 from the digital to the analog domain.
This just builds on the xiph video someone else linked but essentially
- sine waves are fine as long as you have points for rising and falling edge (nyquist, 44k guarantees 22k sine wave reproduction)
- bit depth only really affects noise floor, so it depends on your audios dynamic range
- daneel_w 3y agoA 44 kHz sample rate guarantees accurate 22 kHz triangle wave reproduction if a reconstruction filter with linear interpolation is used on the output, and accurate amplitude of same signal if samples happen to align somewhat with the peaks of the waveform.
- NobodyNada 3y agoThat's exactly why linear interpolation is not used. The Nyquist-Shannon sampling theorem says that you can perfectly reconstruct any sampled signal as long as the input signal was bandlimited to 1/2 the sampling rate. Using a low-pass filter to bandlimit your 22 kHz triangle wave will remove all the (inaudible) overtones, leaving you with a single 22 kHz sine wave as input to your ADC. The reconstruction filter on the output DAC will then output a perfect 22 kHz sine wave, with the correct amplitude too!
- user_7832 3y agoYep, as Monty showed in the 2nd xiph video a square wave will have issues with a low nquist frequency (at for eg 44khz sampling).
- NobodyNada 3y agoThere are no "issues" with the square wave at 44kHz. Yes, a square wave sampled at 44kHz and converted back to analog does have visible ringing on an oscilloscope, but that's because you're looking at a perfect reconstruction of a band-limited square wave. Before sampling, the square wave is filtered to remove all of the overtones above 22kHz, which are not audible (as that's above the upper limit of human hearing) and would cause aliasing issues in the sampled signal. In other words, the ringing is an artifact of low-pass-filtering on the square wave, not the sampling process itself. A purely analog system with a 22kHz low-pass filter would have the same "ringing", and your ears couldn't tell either way because they can't detect information above 15-20 kHz. It's not even possible to have a "perfect" square wave in the real world because that would require the speaker cone, air molecules, and your eardrum to teleport instantly from one spot to another -- so you will always have some low-pass filtering, and therefore ringing, on any real-world approximation of a square wave.
- user_7832 3y agoThank you for your detailed comment. Disclaimer, I don't think I fully understand this topic or your comment in entirety. When you say > Before sampling, the square wave is filtered to remove all of the overtones above 22kHz, which are not audible (as that's above the upper limit of human hearing) and would cause aliasing issues in the sampled signal. Do you mean that the human ear "hears" (for lack of a better word) in sine waves because of fourier transforms? So, a pure squarewave signal (cut off above 20khz due to human ear limits) sounds identical to an "imperfect"/wavey sq.wave made from harmonics lacking higher frequency parts?
- vel0city 3y agoA perfect square wave has infinite bandwidth. The phase change from high to low theoretically happens instantaneously. Practically nothing moves that fast in the real world. Voltages take time to go up and down because of inductance and what not in the circuit, the cone of the speaker needs to start accelerating to move, etc. A speaker cone doesn't move instantaneously from its high point in the wave to the low point in the wave, it takes time for it to move and actually push the air around. Plus, the air itself is kind of springy, so even if the speaker did move instantaneously (which it can't, it would have to move at infinite acceleration) the resulting pressure wave wouldn't be nearly as sharp of a transition. Your ears don't experience pure square waves. They can't. They'll get the approximation of a square wave as close as they can experience them, but your ear drum doesn't immediately warp from one point to another. It gradually moves. The fluid in your ear has its own springiness. The hairs which do the final detection don't just instantly move either, they're being vibrated by the motion of the fluid in your ear. And yeah, technically your eardrums can be moved by waves higher than 20kHz. But its not just the motion of your ear drums that give you hearing, its lots of tiny hairs in your inner ear that resonate at different frequencies that gives you the detection of certain audio frequencies that are present. Normal humans (read: practically everyone) tend to only have the equipment to accurately sense up to ~20kHz pressure waves with our ears as sound. As you age the areas which detect higher frequency sounds get less sensitive first, so you start losing the ability to hear those higher frequency sounds first. It does seem like you're missing a bit of knowledge about signal theory though. That would really help you understand what I mean when I say a real square wave has infinite bandwidth. A very rough and basic idea to help here is that a wave can be thought of as a sum of fundamental sine waves. So a square wave is essentially the sum of all the component fundamentals, each fundamental gets sharper and sharper edges of the square. But the only way for the sine wave to have a truly vertical edge is to be infinite frequency, right? And what are the edges of a square wave? Vertical lines. So to keep adding these fundamentals together to achieve a square output, you'd need to add an infinite sum of sines together to make an actually perfect square. Monty touches on this in that video a bit, but it goes pretty quick.
- rplst8 3y agoWrong. You need to read some more Shannon and Nyquist. https://en.m.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem https://en.m.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_samp...