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.

702 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

and timing <strong>of</strong> a playback program. In fact, when using such a DAC, DMA<br />

data transfer is not necessary either from the storage device or to the DAC. In<br />

an all-programmed I/O system using a disk, for example, one could simply<br />

write a new programmed disk data transfer routine that stores bytes read<br />

from the disk data register directly into the DAC data register without ever<br />

going through the computer's own main memory at all. The DAC's buffer<br />

automatically bridges the unpredictable gaps in disk data flow provided the<br />

average transfer rate is great enough. Nowadays, it is perfectly feasible to<br />

have a 16K or 64K sample buffer built into the DAC, which is large enough<br />

to survive data flow interruptions up to a second or more depending on the<br />

sample rate.<br />

The Author's Delayed-Playback Installation<br />

To conclude this section, it seems appropriate to briefly describe the<br />

author's present delayed-playback synthesis setup as an example <strong>of</strong> what can<br />

be done with rather ordinary, currently available hardware. The computer is<br />

an MTU-130, an obscure 6502-based unit with 80K <strong>of</strong> standard memory, a<br />

480 X 256 graphics display, two 8-inch floppy disk drives, and an excellent<br />

performance-oriented operating system. To the standard unit has been added<br />

an 8-MHz 68000 slave processor board with 256K <strong>of</strong> additional RAM. The<br />

audio D-to-A converter has gone through several revisions starting with 12<br />

bits, mono, and a 256-sample buffer, followed by 12-bit stereo with A-to-D<br />

capability and a 1K buffer, and finally becoming 16 bits (with a 12-bit mode)<br />

and a 32K buffer. Although the disk drives use DMA data transfer into<br />

RAM, all three <strong>of</strong> the converter designs used programmed I/O; the current<br />

version in fact simply plugs into the computer's standard parallel printer<br />

port.<br />

For digital audio recording and playback, the 8-inch floppy disks have a<br />

theoretical average transfer rate <strong>of</strong> about 40K bytes/sec and a capacity <strong>of</strong><br />

1.26M bytes. This is normally used to provide a single-channel 25-ks/s rate<br />

using 12-bit samples, which yields about 33 sec per disk. Block compounding<br />

is used, however, to obtain 16-bit dynamic range, and the two drives<br />

allow disk swapping for unlimited program length. Full 16-bit samples can<br />

also be transferred at 20 ks/s for 31 sec. For maximum usable disk storage<br />

capacity and transfer rate, a data format with 1K byte sectors is used. The 1K<br />

sectors are then divided into four 25 6-byte sound blocks, which is the basic<br />

unit <strong>of</strong> sound file storage. In 12-bit mode, each sound block holds 170<br />

samples with the odd byte left over holding a gain value that is applied to the<br />

whole block. Direct programming <strong>of</strong> the disk hardware was necessary because<br />

the operating system runs at only 20K bytes/sec for disk data.<br />

For music s<strong>of</strong>tware, the NOTRAN system described in this chapter<br />

(less percussion) was coded into 6502 assembly language. The waveform<br />

tables used for tone synthesis are 256 points <strong>of</strong> 8 bits but with linear

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

Saved successfully!

Ooh no, something went wrong!