The Acoustic Compiler

The Acoustic Compiler

Much of the following discussion is redacted from F. R. Moore's "Elements of Computer Music", Prentice Hall 1990. This text is specific to the cmusic acoustic compiler and general to the art and science of computer music. In a complex field with a significant body of extant literature this text shines brightly as a clear, concise and edifying treatment of a challenging subject.


Overview

The acoustic compiler is a computer software tool which interprets programming code and outputs binary data representations of acoustic waveforms which can be converted into electrical signals and then sound waves by the action of the digital to analog converter. These waveforms can be stored, further processed, and variously reused after their initial computation. Creating and modifying sound in this way is generally referred to as software synthesis.

Over the past 40 years, significant research has gone into the design and implementation of these kinds of tools. Several currently exist and some of these enjoy astonishingly widespread use. Among them Csound, developed at M.I.T. during the 1980s by Barry Vercoe, and cmusic, written in 1980 by Dick Moore at the Center for Music Experiment Computer Audio Research Laboratory, are perhaps the most significant. Both of these programs could be said to be loosely based upon MUSIC V - an earlier program written by Max Mathews. Both Csound and cmusic are written in the C programming language and had their first incarnations on UNIX operating systems. Lately, both programs have spawned new versions - pcmusic for the X86 DOS operating system and versions of Csound for nearly every computer platform in wide usage.

How it Works: The Unit Generator

The acoustic compiler, like software compilers used to create programming applications, does most of its work (for sake of argument) outside of real-time. It uses a text edit-able set of command instructions that invoke sub-routines which model the action of known circuits - such as oscillators, envelope generators and filters. For historical reasons these functions are referred to as unit generators. These units are "modelled" in software and interact within a computer mediated framework - though their interconnection has analogies to the modular synthesizers of the 1960's, which used patch cables to interconnect the disparate modules. In fact, it is fairly straightforward to make a translation from an extant electronic music synthesizer into a representation appropriate for an acoustic compiler. This is known as a "unit generator" approach and it is this method that unifies the important acoustic compilers - they all share a common lineage - going back to modular analog synthesizers as a design basis. Clearly, the acoustic compiler and the art of software synthesis goes well beyond the capabilities of hardware synthesizers in breadth of scope, specificity and power.

Function and Waveform Generation

In addition to the stored sub-routine functions which are the unit generators, there exist features such as waveform and function generation sub-routines, some of which are common to all acoustic compilers and some which are unique to specific programs. Arbitrarily specific functions can be created which interact with the unit generators in user defined ways. The overall interaction of signal representations and their transformation is coordinated by other sub-routines specific to the acoustic compiler under consideration.

Instrument Definitions

The user of an acoustic compiler designs and specifies one or more computer instruments - sometimes referred to as instrument definitions. These software instruments contain arbitrarily connected unit generators taken from the library of unit generators associated with the acoustic compiler in question. In addition to specifying the interconnection of the unit generators, the user also defines one or more tables containing waveforms, control functions and the like. Once the "orchestra" has been created, consisting of one or more instrument definitions, the user then creates a "score" to provide at the very least a time ordered sequence of commands to "play" an "instrument".

The Score

The score consists of an arbitrary starting time and duration associated with each "note" to be played on defined instruments. The score may also contain a set of parameters which are passed to the instrument and inform its behavior. The "notes" of a score can be similar to music notes - producing a set acoustic signal - or they can be complex sonic events which stretch the typical definition of "the note". Perhaps the most useful way to consider the concept of a note is as an arbitrary signal event which has a beginning and a duration.

Programming Elements

The score has four basic elements which may be contained in one or more files on a computer, depending upon which acoustic compiler is being used.

Initialization: usually before anything else is defined or any action is taken, global parameters such as sampling rate and number of channels of audio output are specified.

Instrument Definition: consists an interconnection of various unit generators specific to a particular task or sonic result. Parameter fields specific to the instrument are designated here.

Score - Table Definition: the first part of the score which drives the instrument(s) consists of the declaration and definition of stored functions such as basic waveforms or control signals.

Score - Note List: the second part of the score is a "note list" which contains start-times and durations for the instrument(s) as well as parameters passed to the instrument(s) which will inform sound production or other factors.

The Virtual Synthesizer

One might suggest that an acoustic compiler is a kind of virtual synthesizer. A user can create instruments which perform arbitrary actions on signals and therefore model the basic synthesis modes.

  • additive synthesis
  • subtractive synthesis
  • all types of non-liner synthesis
  • sampling synthesis
  • Acoustic compilers can generate signals directly or they can manipulate stored signals. A digital waveform processed by the program may be one earlier created by another run of the program or it may be the result of a digital recording from a microphone. The acoustic compiler is capable of all types of digital signal processing because, at least in the case of Csound and cmusic, the library of unit generators is user extensible. One might say therefore, that these are completely general musical instruments. They can:

  • execute any known digital process on any type of sound
  • generate sound directly in a variety of synthesis modes
  • mix, edit and rearrange digital recordings
  • respond to arbitrarily complex designs
  • There are values to this kind of tool which are in addition to their obvious contribution to the art of electronic music synthesis. The acoustic compiler is a very useful tool for teaching and learning about synthesis techniques, digital audio, digital filter theory, digital signal processing, audio analysis and so on.

    The Future

    It is possible that in the future recording studios will embrace the notions of the acoustic compiler in the types of recording consoles and computer music tools in use. Clearly, the techniques of software synthesis are important ones for the recording engineer to become familiar with. If nothing else, the critical thinking required to build instrument definitions from the library of unit generators intended to create specific results upon recorded sound will aid the engineer in solving complex tasks in conventional studio environments. The view into synthesis and modification afforded by the acoustic compiler becomes an important adjunct to practice with hardware synthesis and signal processing tools.


    Robert Scott Thompson, October 1996
    http://www.gsu.edu/~musrst/cara/courses/Csound_Users_Seminar/acoustic.html