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.

DIGITAL FILTERING 523<br />

1.0<br />

0.8<br />

0.6<br />

• /INTERPOLATEO Y<br />

0.4<br />

0.2<br />

X<br />

•<br />

OH----+---1--+----1I-----+---+-+-+--I----+---+---+--+-_<br />

• -5 -4 -3 -2 -I 0 \ l<br />

4<br />

6<br />

-0.2 -6<br />

-0.4<br />

-0.6<br />

UNKNOWN X= 0.375 =12/32<br />

-0.8<br />

-1.0<br />

Known X Known Y Table Address Table Entry Y x Table Entry<br />

~6 -.1 204 .0 .0<br />

-5 .3 172 ~.00358 -.00107<br />

-4 .9 140 .01368 .01231<br />

-3 1.0 108 -.03715 -.03715<br />

~2 .4 76 .08349 .03340<br />

-1 .8 44 -.18840 -.15072<br />

o .6 12 .77698 .46619<br />

1 -.2 20 .45854 -.09171<br />

2 -.4 52 -.15138 .06055<br />

3 -.8 84 .06875 -.05500<br />

4 -.6 116 -.02967 .01780<br />

5 .1 148 .01012 .00101<br />

6 .2 180 -.00257 -.00051<br />

.25510 = Interpolated Y<br />

Fig. 14-32. Interpolation table use example<br />

consuming, particularly on a microcomputer. Applying a tailing function<br />

(instead <strong>of</strong> truncating) takes even longer. The answer to this dilemma is the<br />

maxim: When in doubt use tables! As it turns out, a very simple table<br />

lookup algorithm can be derived that requires N multiplications, table<br />

lookups, and additions, where N is the number <strong>of</strong> points considered. These<br />

numbers are the same even if a tailing function is used to reduce interpolation<br />

nOIse.<br />

The basic idea is to store the impulse response in a table. Since the<br />

impulse response is symmetrical, the table needs to be only half the size it<br />

would otherwise be. Fig. 14-31 shows how the data is placed in the table.<br />

First, we will assume that N is odd. The table area is then divided into<br />

(N - 1)/2 sections and, fot convenience on a binary computer, each section<br />

contains a power <strong>of</strong> two number <strong>of</strong> points. The time span <strong>of</strong> a section is the<br />

same as the input stream sample period. In the example, N = 13 and there<br />

are six sections with 32 entries each for a total <strong>of</strong> 192 entries. It is also<br />

necessary to include or imagine 16 zeroes preceding the first and following<br />

the last section.

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

Saved successfully!

Ooh no, something went wrong!