22.09.2015 Views

of Microprocessors

Musical-Applications-of-Microprocessors-2ed-Chamberlin-H-1987

Musical-Applications-of-Microprocessors-2ed-Chamberlin-H-1987

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

516 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

waveform samples is <strong>of</strong> interest and has, in fact, been mentioned in passing<br />

several times so far. In this section, such interpolation will be looked at more<br />

closely.<br />

In general, the interpolation problem can be stated as follows: Given<br />

one or more tabulated points (X and Y coordinates) describing some sort <strong>of</strong><br />

curve and an arbitrary value <strong>of</strong> X, determine as "accurately" as possible the<br />

corresponding Y. Accurately was quoted because unless an equation is known<br />

that exactly describes the curve in the region from which the tabulated points<br />

were taken, there is nothing to compare the interpolated result to. In cases in<br />

which such an equation is not known, interpolation only gives a guess <strong>of</strong><br />

what the untabulated value should be. One can, however, evaluate the guess<br />

by how close it comes to the "most likely" untabulated value. Clearly, a<br />

procedure that painstakingly evaluates all <strong>of</strong> the points in the table (or<br />

record) should be able to make a good guess. For our purposes, an interpolation<br />

algorithm can be characterized by how many data points and how much<br />

calculation is used to make the guess and how good it is likely to be relative<br />

to an exhaustive procedure.<br />

The general approach to performing interpolation is to first find an<br />

equation that "fits" the data, that is, a plot <strong>of</strong> the equation would pass<br />

through the data points being considered. After this is done, the X for which<br />

a value is needed is plugged into the equation and out comes its corresponding<br />

Y. The accuracy <strong>of</strong> this Y depends entirely on how well the "interpolation<br />

function" models the physical process that created the data points in the<br />

first place. This is important because there are many different equations that<br />

will pass through the tabulated data points. Note that in the general case the<br />

tabulated points need not be equally spaced. In synthesis applications, however,<br />

they usually are, which simplifies the calculations.<br />

Generally speaking, the interpolation will be most accurate when the<br />

unknown point is in the middle <strong>of</strong> the cluster <strong>of</strong> known points. If it is<br />

completely outside the tabulated points, the process is known as extrapolation,<br />

which is sheer speculation as to what the point might be if the curve<br />

continued to behave as it did in the tabulated interval.<br />

One class <strong>of</strong> equations that can be used in interpolation is the standard<br />

algebraic polynomials. In general an N -lth degree polynomial can be found<br />

that will exactly pass through N data points. Once found, the polynomial can<br />

be easily evaluated at the unknown point. The higher the degree <strong>of</strong> the<br />

polynomial, that is the more data points that are considered, the better the<br />

interpolation results.<br />

The simplest example, which is what most people call interpolation, is<br />

linear interpolation. Here, a first-degree polynomial, which is a straight line,<br />

is fit to two data points; one on each side <strong>of</strong> the unknown point. The<br />

procedure for doing this was described in detail in the previous chapter. One<br />

could also fit a quadratic curve through three points and so forth. When a

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!