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.

LOW-COST SYNTHESIS TECHNIQUES 759<br />

generators can, with proper programming, produce a complete range <strong>of</strong> note<br />

frequencies. In many cases, three or four simultaneous notes are possible and,<br />

in rare cases, timbre variations as well. For popular computers with minimal<br />

native sound generation capacity, there are usually a number <strong>of</strong> independently<br />

manufactured add-ons available. These typically consist <strong>of</strong> a plug-in<br />

synthesizer board and matching music s<strong>of</strong>tware. The sophistication <strong>of</strong> these<br />

boards ranges from 3 square-wave voices to 16 fully programmable waveform<br />

generators. Frequently, the s<strong>of</strong>tware includes a suitably simplified interactive<br />

graphics score editor and perhaps an instrument definition editor as well. A<br />

couple <strong>of</strong> products even include a music keyboard for live as well as<br />

programmed performance.<br />

Techniques for Low-Cost Synthesis<br />

The techniques used in low-cost sound-generating devices are not really<br />

differen.t from those studied so far. Instead, the emphasis is shifted from<br />

considerations <strong>of</strong> flexibility and quality to those <strong>of</strong> cost and distinctiveness.<br />

In many product designs in which sound generation is just a small part, free<br />

choice <strong>of</strong>a synthesis technique might not be possible; available resources may<br />

have to be used instead. Thus, strange and ingenious circuit designs with<br />

limited general applicability sometimes evolve. Here, a few <strong>of</strong> the more<br />

straightforward low-cost synthesis techniques will be explored.<br />

Interface Chip Timers<br />

Many microprocessor-driven devices use one or more "peripheral<br />

interface chips" (PIC) in their design. A high-volume, relatively simple<br />

product may even use an all-in-one-chip microcomputer that also includes<br />

PIC functions. Most modern PICs include one or more programmable<br />

timers. These are normally used to simplify timing-related programming but<br />

can also sometimes be used as oscillators for sound generation.<br />

Such timers are usually programmed in one <strong>of</strong> two ways. A single-shot<br />

timer for example typically has a 16-bit "counter register" that may be<br />

written into under program control. After writing, the register counts down<br />

at a fixed rate and generates an interrupt and perhaps an external pulse when<br />

it reaches zero. The timing reference is usually the microprocessor clock,<br />

which sometimes is passed through a programmable prescaler where it can be<br />

divided by a power <strong>of</strong> two before clocking the register. The counter register is<br />

normally readable as well so that the microprocessor program can determine<br />

how much time remains in the current interval. A free-running timer is<br />

similar except that it has an "interval register" that is separate from the<br />

counter register. When the counter reaches zero, it is automatically reloaded<br />

from the interval register and starts timing a new interval. Thus, variations<br />

in interrupt response time do not affect cumulative long-term accuracy such<br />

as keeping track <strong>of</strong> the time <strong>of</strong> day from I-sec timing intervals.

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

Saved successfully!

Ooh no, something went wrong!