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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DIGITAL TONE GENERATION TECHNIQUES 433<br />

fixed-point rather than floating-point arithmetic. Only the sin function poses<br />

any computational difficulty and that can bypassed through use <strong>of</strong> a sine<br />

table with a length equal to the waveform table being filled. Chapter 18 will<br />

describe the use <strong>of</strong> integer and fractional arithmetic to maximize the speed <strong>of</strong><br />

digital synthesis computation.<br />

Dynamic Timbre Variation<br />

In a voltage-controlled synthesizer, the tone generators usually put out<br />

an unchanging waveform that is dynamically altered by processing modules.<br />

Although the same can be done in direct synthesis with digital filters, the<br />

table method <strong>of</strong> tone generation lends itself well to types <strong>of</strong> timbre variation<br />

not easily accomplished with filters.<br />

One technique that is quite practical involves two waveform tables and<br />

interpolation between them. The idea is to start with the waveform in Table<br />

A and then gradually shift to a different waveform in Table B. The arithmetic<br />

is actually quite simple. First, a mixture variable ranging between 0 and 1.0<br />

is defined, which will be called M. The contribution <strong>of</strong> waveform B to the<br />

resultant waveform is equal to M and the contribution <strong>of</strong> A is 1.0 - M.<br />

The actual resultant samples are computed by evaluating<br />

Sr=(l-M)Sa+MSb, where Sr is the result sample, Sa is a sample from the<br />

A table, Sb is the B-table sample, and M is as before. Thus, as M changes<br />

from 0 to 1.0, the mixtute changes in direct proportion.<br />

In actual use, M should be updated frequently enough so that it<br />

changes very little between updates. Also the same table pointer should be<br />

used on both tables to insure that they are in phase. If these rules are<br />

followed, the transition is glitch- and noise-free even for very fast transitions.<br />

The technique is not limited to two tables either. One could go through a<br />

whole sequence <strong>of</strong> tables in order to precisely control a very complex tonal<br />

evolution.<br />

Speaking <strong>of</strong> evolution, it would be desirable to know exactly what the<br />

spectrum <strong>of</strong> the tone does during the transition. If each harmonic has the<br />

same phase in the two tables, then the amplitude evolution <strong>of</strong> that harmonic<br />

will make a smooth, monotonic transition from its amplitude in tone A to its<br />

new amplitude in tone B.<br />

Things get quite interesting, however, if they are not in phase. Depending<br />

on the phase and amplitude differences between the two tables, any<br />

number <strong>of</strong> things can happen as shown in Fig. 13-8. The graph shows<br />

amplitude and phase variations <strong>of</strong> an arbitrary harmonic during a linear<br />

transition from wave A, where this harmonic has an amplitude <strong>of</strong> 0.4 units,<br />

to wave B, where its amplitude is 0.9 units. Its phase in wave A is taken as a<br />

zero reference and its phase in wave B is the parameter for the curves. When<br />

the phase <strong>of</strong> this harmonic in wave B is also zero, the amplitude transition is<br />

linear. It becomes progressively nonlinear and even dips momentarily along<br />

its rise as the phase difference approaches 180 0 •

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

Saved successfully!

Ooh no, something went wrong!