Fugue: Composition and Sound Synthesis With Lazy Evaluation and Behavioral Abstraction Christopher Lee Fraley Computer Engineering Advisor: Roger Dannenberg Fugue is a language for composition and sound synthesis. Consider- ations and features of Fugue include: a fully interactive environment based on Lisp; a language which does not force a high-level distinction between the "score" and the "orchestra"; support for behavioral abstraction; the ability to work both in terms of actual and perceptual start and stop times; and a time and memory efficient implementation. Fugue is embedded in a Lisp environment, which provides an inter- active interface, flexibility in manipulating sounds, and a base for performing other related symbolic processing. Sounds are first-class types in Fugue, hence they can be assigned to variables, passed as parameters, and stored in data structures. This allows "instruments" to be implemented as ordinary Lisp functions and eliminates the orchestra/ score dichotomy. Fugue semantics include behavioral abstraction, motivated by the idea that one should be able to describe "behaviors" that respond appropriately to their environment. For example, stretching a sound may mean one thing in the context of granular synthesis and another in the context of sampling. Fugue allows the programmer to describe abstract behaviors that "know" how to stretch, transpose, change loudness, and shift in time. Transformation operators are provided on these abstractions. Composition requires that sounds be placed in time together, in sequence, and at arbitrary offsets. Because musical sounds often have attack and release portions, we make a distinction between the absolute first and last samples of a sound and the perceptual start and end to which other sounds should be aligned. Fugue is implemented in a combination of C and XLisp, extending XLisp with a new "sound" type. The use of two languages reflects our goal to provide an interactive and efficient environment. Other steps are taken to increase time and memory efficiency, including multiple sample-rates and lazy evaluation. Sounds in Fugue are immutable values, implying that every operation on a sound must allocate memory for a new sound instead of destructively altering the old sound. We avoid this inefficiency though lazy evaluation; describing the result without actually computing any samples. This technique avoids many redundant copy operations but is completely hidden from the user. Fugue is a new language that provides high-level operations on sounds. Fugue is unique in that is spans a range of computational tasks from score manipulation to synthesis within a single integrated language. Fugue already has an efficient implementation on Unix workstations. We intend to improve this further by taking advantage of virtual copy and mapped file capabilities of the Mach operating system and the DSP chip on the NeXT computer. We also plan to extend Fugue with more sound functions based on NeXT's Sound Kit and Lansky's Cmix.