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.

746 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

Figure 19-14B shows how several CARL system programs might be<br />

connected together using the pipe facility and the command line a user<br />

might type to effect this combination. SNDIN will read shortsams from the<br />

sound file called DEADSOUND, convert them to floatsams, and then<br />

output them through its standard output to a UNIX pipe. The vettical bar<br />

immediately after the sound file name on the command line designates a pipe<br />

connection to the following program name. FILTER in turn gets the name <strong>of</strong><br />

the coefficient file to use (BRIGHTCOEFFS) from the command line, filters<br />

the floatsams from its standard input, and outputs the filtered result to its<br />

standard output, which in turn is piped to the LPREV program. LPREV is a<br />

reverberation program that reads reverberation parameters trom the command<br />

line and reverberates samples passing from its standard input to<br />

output. The D parameter specifies the ratio <strong>of</strong> reverberated to original sound,<br />

and the G parameter specifies the reverberation time. Many other parameters<br />

are available, which take on default values when not specified. The results <strong>of</strong><br />

LPREV are finally piped to SNDOUT, which converts floatsams back to<br />

shortsams and writes them onto a new sound file called LIVESOUND. Since<br />

UNIX is a time-sharing operating system, all four <strong>of</strong> these programs are<br />

actually loaded and run simultaneously. Thus, the pipes are actual in-memory<br />

communication channels rather than temporary files as would be required in<br />

other operating systems. Much more complex interconnection patterns with<br />

parallel signal paths are also possible using special "branch" and "merge"<br />

programs.<br />

C-MUSIC is the heart <strong>of</strong> the CARL system for synthesis applications.<br />

This program reads text from a score file and produces floatsams on its<br />

standard ourput for piping to other programs or writing into a sound file.<br />

The score file (or standard input if no file is specified) may have been prepared<br />

by the user with a text editor or may be the output from a macroexpander or<br />

high-level composition program. The brief discussion that follows should<br />

convey the flavor <strong>of</strong> C-MUSIC, which is also generally applicable to MUSIC­<br />

V, MUSIC-ll, and other family members.<br />

A C-MUSIC score consists <strong>of</strong>statements, each <strong>of</strong>which is terminated by a<br />

semicolon. Text enclosed in curly brackets (n) may be placed anywhere as<br />

comments. Score statements are grouped into four overall sections as follows:<br />

1. Options<br />

2. Instrument definitions<br />

3. Function (table) generation<br />

4. Notelist<br />

The options section contains statements that specify several global<br />

attributes applicable to the current "run" <strong>of</strong> C-MUSIC. These include the<br />

sample rate, number <strong>of</strong> sound output channels (one to four), the sizes <strong>of</strong><br />

internal buffers, the random-number generator initial seed, and the default<br />

function length. The latter is the size <strong>of</strong> waveform and envelope shape tables

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

Saved successfully!

Ooh no, something went wrong!