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

Interesting... in audio, we've basically had affordable super-sampling for a few years. That's exactly what "record at 96KHz or 192KHz" is; all your plugins run against a waveform that's higher-bandwidth than you can hear, and then you downsample and dither at the end to 44.1 or 48KHz in mastering. Some of the best equalizer plugins had internal upsampling, so that even if your source material was 48KHz, the processing was all done at 96KHz. The quality gain from the higher resolution offset the quality loss from resampling.

(In audio, there are other benefits to higher resolution, like latency; a 256-sample buffer adds 6ms at 44.1KHz, but only 1ms at 192KHz.)



> (In audio, there are other benefits to higher resolution, like latency; a 256-sample buffer adds 6ms at 44.1KHz, but only 1ms at 192KHz.)

But the buffer is there to allow you to gather data up before sending it across the pipe (physical or virtual) so you're not incurring latency you don't need to. Increasing the resolution of your data doesn't decrease latency, as you're just incurring that hit more frequently. If that worked, you could just do away with the buffer and send a continuous stream of data at whatever sampling rate you wanted.


I'm thinking of setups which often have some absolute minimum buffer size, maybe due more to the protocol (e.g. ASIO) than the converter design; my RME Digiface setup can't work below 56 samples, no matter what the sample rate.


Don't forget that the air between you and the speakers is another buffer, holding about 150 samples at 44.1 kHz, assuming near field monitors.


Yep, which is why it's so amazing that bands play to a beat that doesn't really exist - it's an agreed-upon moment in time that we pretend is the same for all of us, but when you're standing 20 or 30 feet apart, it isn't.

But latency is critical for tracking through headphones, especially singers; a little bit of latency can screw up your pitch perception as well as your timing.


Well, that's why we have hardware monitoring. You only really need the low latency stuff for recording software synthesizers / samplers or if you have a virtual amp, etc.


As someone who has spent a fair deal of time in the audio world both professionally and independently I'm pretty confused by this post.

The primary reason to oversample in the audio world is two fold:

1) To avoid aliasing, which is a somewhat different issue from graphical aliasing. ADC conversion creates aliases of the primary signal lower in the frequency band. For example if we sample at 40khz we can resolve signals up to 20khz. If the input contains content higher than this frequency it will alias into the pass band.

For example a 24khz tone on the input would appear as a 16 khz tone, a 28khz tone would appear as a 12khz tone, all higher frequency content will mirror around the Nyquist-Shannon point. Now if it were possible to build a "brick wall" filter, that is. completely block anything above the Nyquist-Shannon point and completely pass everything under this point, there would be no issue. But, in practice, this type of filtering isn't possible. As a result if your sampling at 48khz and you want to accurately convert all content up to 20khz you have to play a balancing act. You either provided flat response to 20khz and accept that some aliasing will make it through, or deal with some reduced level(roll off) at the higher end of your desired spectrum and block all audible aliasing.

This is really the primary reason for oversampling for high fidelity content as we can push the anti-aliasing filter well above the audible spectrum, allowing us to get both flat response to 20khz and block all audible aliasing. It should also be said that this issue is becoming less and less and issue as ADC/DACs are now implementing digital filters which can get far closer to the ideal 'brick wall' than is reasonable with analog filtering.

2) At a deeper level, oversampling increases resolution. Note that resolution here means actual resolution, that is bit depth, which is in opposition to the use of the term in the parent post. An example would be modern Sigma-Delta ADC/DACs.

Its common to use a low resolution part, maybe only 1-4 bits and oversample at a higher rate. For example, if your target output is 48khz @ 24 bits, you can use a 20 bit ADC and sample at ~12.28Mhz and downsample (internally within the ADC/DAC, really just averaging) to get your desired output. In practice a part may only operate on 1-4 bits but sample, much, much faster to get the desired resolution.

As for upsampling for the purpose of signal processing, there are a limited number of algorithms where this is useful and upsampling in and of itself introduces issues that have to be dealt with. The reason for upsampling tends to have more to do with processing accuracy limitations created by computation than anything else. For example bi-quad filter coefficients at very low frequency, say 5-8hz can exhaust the available resolution of a 32bit float at 48khz where as it may be completely fine at 192khz. This can be an issue with a sub-sonic filter in a subwoofer for instance.


You're right; I was being imprecise (or sloppy, perhaps). Graphical aliasing isn't the same as signal aliasing, though it's easy to equate the two conceptually.

I understand the value of using 96KHz instead of 48KHz so you can have a gentler filter, at least in the days before digital filters (as you say), but don't you agree that there's no further advantage to 192KHz in that respect? Maybe I'm justifying 192KHz by saying that it's for cleaner processing, when the real reason is It's A Bigger Number.

I've never heard anyone use "resolution" to mean bit depth; in fact, I've always heard it used to specifically mean sample rate - e.g. 96KHz resolution, 24 bits. But I've never studied DSP programming - I have a plumber's understanding, not a fluid mechanics engineer's.


How is graphical aliasing not signal aliasing? I've always thought it was, but then all my signal processing knowledge comes from image processing and not EE courses.


It is. The difference is that in audio it's generally associated with periodic waveforms, whereas onscreen it is more often problematic with isolated peaks. Where you have periodic, aliased structures onscreen, it's often called a Moiré pattern, but it's all the same effect.




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

Search: