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.

106 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

complexity <strong>of</strong> computers in general and programming in particular is being<br />

overcome by easier to use computer systems and early introduction <strong>of</strong> programming<br />

concepts. It is not unusual for elementary school students to<br />

become very adept at programming using simplified languages. Hopefully,<br />

books such as this will take some <strong>of</strong> the mystery out <strong>of</strong> the theoretical aspects<br />

<strong>of</strong> direct computer synthesis. Even the critical mass problem is decreasing in<br />

severity as the performance/price ratio <strong>of</strong> digital electronics seems to double<br />

every year.<br />

These improvements in technology coupled with inherent limitless<br />

capability would seem to indicate that direct computer synthesis will eventually<br />

oust all other methods in serious electronic music applications.<br />

SoundinDi~twForm<br />

Computers deal with numbers and sound consists <strong>of</strong> continuously varying<br />

electrical signals. Somehow the two have to be accurately linked together<br />

in order for direct computer sound 1tynthesis to work at all. Fortunately, this<br />

is possible with fewer limitations than might be expected.<br />

The first problem to be solved is how to represent a waveform that can<br />

wiggle and undulate in a seemingly infinite variety <strong>of</strong> ways with a finite<br />

string <strong>of</strong> numbers having a finite number <strong>of</strong> digits. Intuitively, one would<br />

probably suggest dividing the time axis up into a large number <strong>of</strong> segments,<br />

each segment being a short enough time so that the waveform does not<br />

change very much during the segment. The average amplitude <strong>of</strong> the<br />

waveform over each segment could then be converted into a number for the<br />

computer or vice versa. It would seem that the accuracy <strong>of</strong> the approximation<br />

could be made as good as desired by making the segments small enough.<br />

Let us take an example and see how small these segments must be for<br />

high-fidelity sound-to-numbers and numbers-to-sound conversion. Figure<br />

4-IA shows a I-kHz sine wave that has been chopped into 100 segments per<br />

cycle <strong>of</strong> the wave. The segment time is thus 10 J.tsec. Assuming that the<br />

desire is to generate the sine wave given the string <strong>of</strong> 100 numbers repeated<br />

continously, the problem is to determine how good it will be.<br />

Digital-to-Analog Converter<br />

First, however, a device to do the conversion is needed. Such a device is<br />

called a digital-to-analog converter, which is usually abbreviated DAC. Such a<br />

device accepts numbers one at a time from a computer or other digital source<br />

and generates one voltage pulse per number with a height proportional to the<br />

number. Thus, a DAC that is calibrated in volts would give a voltage pulse<br />

2.758 V in amplitude ifit received a numerical input <strong>of</strong> 2. 758. The width <strong>of</strong><br />

the pulses is constant but varies with the type <strong>of</strong> DAC. For now, the pulse<br />

width will be assumed to be very small compared to the spacing between<br />

pulses.<br />

Figure 4-IB shows the output from a DAC fed the 100 numbers<br />

representing a I-kHz sine wave. As expected, it is a string <strong>of</strong> very narrow

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

Saved successfully!

Ooh no, something went wrong!