Noen ganger er det som glimrer faktisk gull.

Fin tråd på Computeraudiophile om interpolering, ulike typer filtrering, og hvor det er best å utføre slike operasjoner - ute i DACen eller i datamaskinen.

Dette med tanke på den nye hifi-moten, apodizing og asymmetric filters.

http://www.computeraudiophile.com/co...ital-Filtering

Link til Spreadsheet som Idiot_savant nevner:

http://spreadsheets.google.com/pub?k...=0&output=html

Cut&Paste av Max sitt innspill, et stykke inn i tråden - det er verdt å lese hele:

What is stored on the CD/computer is simply a list of numbers. These numbers physically represent points on a graph of air pressure versus time: the points are spaced at equal intervals (e.g. 22.676 microseconds for a CD). To listen to the music, we need to reconstruct the varying air pressure as a function of time. Since air pressure is a smoothly-varying physical function, we need to 'draw a line' between the points. This must be a smooth line, with no discontinuities, because the physics require it.

The actual 'drawing' of the smooth line is done by a combination of the 'hold' circuit on the DAC output (if fitted), an analogue 'reconstruction filter' (if fitted), the bandwidth-limited response of the amplifier(s) and cable(s), and the similarly bandwidth-limited response of the speaker/headphone, and the air in the room itself. There is ALWAYS some bandwidth-limiting going on after the DAC. (YFNI's first spreadsheet showed how 'smoothing out' steps corresponds with limiting the bandwidth).

Now, given a set of evenly-spaced points on a graph, it is possible to draw lots of smooth curves which pass through every point (interpolating functions). In fact there are an uncountably infinite number of such curves! What Nyquist showed was that there is precisely 1 (one) interpolating curve which has the dual properties that it both passes through every point and contains no Fourier components at any frequency greater than 1/2 the sample rate. This is a Useful Result. He also showed how to calculate this function - which is where the sin(x)/x comes from.

There is, of course, a snag. This property only holds for an infinitely long sequence of points, and CDs aren't that long (even if they sometimes seem to be). The 'correct' interpolated value at some instant between two time samples depends not just on the value of the two nearest samples, but also on the value of EVERY sample in the infinite set.

However, the greater the time difference between the point of interpolation & the sample being considered, the smaller the influence of the sample on the interpolated value. Eventually, we can ignore the effect as being too small to bother about. In fact, rather than suddenly cutting off after a fixed number of samples, it is better to smoothly & carefully reduce their influence as the time difference increases.

This is the situation in the time domain. In the frequency domain, what happens is that our interpolation is now accurate only up to some limited frequency (20kHz in the case of the CD) and wrong above that frequency. We can live with this, PROVIDED that the original graph of air pressure versus time was also band-limited to 20kHz before being sampled. Then the only frequencies that could be affected by inaccurate interpolation aren't there in the first place - so no errors!

Now the business of interpolating between the DAC samples is quite tricky, and if it is not done properly, will introduce errors at frequencies below 20kHz, and since such frequencies are present in the source, we will be able to hear them. Hence designers prefer to do this interpolation under closely controlled conditions - right next to or within the DAC itself. (In fact the boxes usually called 'DACs' invariably include the interopolation/reconstruction function as well).

You can do this interpolation using an analogue filter circuit, but the performance requirements are very stringent, and meeting them, particularly accounting for component stability over time and temperature, is difficult (but not impossible). This is a true NOS DAC: a DAC running at the input sample frequency, followed by an analogue reconstruction filter.

Another approach is to digitally calculate additional samples, between each of the source samples, using the exact same interpolating function that would otherwise be implemented by the analogue filter. All we have done is to add extra points on the graph of air pressure versus time, making the same assumption about no signals above 20kHz. No new 'information' has been added. Except that now we have a set of samples at (e.g.) 176.4kHz that describe a graph which has no signal components above 20kHz. It is now much easier to design an analogue filter which interpolates correctly between these samples: it still has to be accurate only up to 20kHz, but gets four times as many input samples to interpolate from. This is an oversampling DAC.

Note that it is still a 20kHz bandwidth DAC - the oversampling has been used to move complexity from an analogue circuit into a number cruncher (DSP, FPGA, ASIC, etc) which may well be on the DAC chip itself.

Max