Chapter 4: Context

4.1 MPEG-4 Structured Audio and Csound

CPS is based on MPEG-4 Structured Audio, a texutual synthesis toolkit, which is designed for realtime exchange of parameters through a network (through a bitstream). MPEG-4 Structured Audio is based on 'C-sound'. The roots of Csound and other programs like Cmusic by Richard Moore, are Max Mathews' MUSIC programs. Barry Vercoe translated MUSIC 11 into Csound at the MIT (Massachusetts Institute of Technology) in 1986. Although this history is much too short, it ends with the birth of 'MPEG-4 Structured Audio' (1999) edited by Eric Scheirer.

Because MPEG-4 Structured Audio is the standard for the future, the core opcodes (CPS: objects) of MPEG-4 SA are implemented in CPS exactly according to the standard. A CPS file is comparable with a MPEG-4 'instrument'. Some features are added to some objects make them usefull in a realtime modular environment without a score file, like the retriggering of envelopes. CPS will gradually support MPEG-4 Structured Audio more and more in the future (load/save as an .saol file, schedule a .sasl file, transport score data via a bitstream, use the Structured Audio Sample Bank Format, etc).

At first sight, CPS does not look very much like MPEG-4 Structured Audio (often called ‘SAOL’ too). Structured audio uses two text 'files' (implicit or explicit like in a bitstream): an orchestra file (named .saol) and a score file (named .sasl). In the orchestra file, you define your instruments (subpatches) and your 'globals' (just like the 'Globals' menu in CPS, and more). The instruments can represent anything. In the score file, you define how to put these instruments in time. You can read more information about MPEG-4 Structured Audio at, and there is a book about it at

CPS can be seen as a realtime implementation of the opcodes in MPEG-4 Structured Audio. There are more similarities. The control inputs of a subpatch (represented by an KPatchIn object, see paragraph 1.6) are the 'import' variables which you can control with the 'control' line in the score file; the audio inputs is the 'input' array, and the audio outputs are the same as the output() statement.

Throughout the manual, it is explained how CPS relates to MPEG-4 Structured Audio. Here are some references and more technical details.

The biggest differences between MPEG-4 Structured Audio and CPS is the handling of the controlrate signals. In fact, the way MIDI is processed in CPS, and the 'event'-driven aspect, is absent in MPEG-4 Structured Audio.

A difference between CPS objects and MPEG-4 Structured Audio opcodes, is that opcodes in MPEG-4 Structured Audio need a minum number of arguments. In CPS, it is possible that not all inputs have a connection. So here is a gap, which is filled with (safe) default values, which are mentioned in the helptext of objects if used.

Also, MPEG-4 Structured Audio has a special rate, called i-rate, to reset variables at initialisation time. In CPS, the i-rate is supported (see paragraph 1.5) but it is completely virtual, because you are able to change any parameter at any time. For more information about k-rate, read paragraph 3.2.

MPEG-4 Structured Audio prescribes the use of ‘runtime-errors’. Runtime errors are implemented in CPS by giving visual feedback at the place where the error happened, a text message in the ‘System Messages’ window, and a beep. However, the patch continues running. For more information about the runtime errors, read paragraph 2.2.

A problem with visualising a .saol (or any text based) file, is that opcodes can have a virtually unlimited length of parameters. Since a parameter input of an opcode is represented by an input of the object in CPS, this would mean that the objects in CPS would have very much inputs. This is not practical. The opcodes that have such a list of parameters (envelopes like kline, aline, and the table), have a commandline in CPS, where you can type the list of parameters. Most of these objects also have a graphical interface to represent the parameter list. Using variables in the parameter list is still a problem; this will be possible when text is supported in CPS. Other typical text-to-visual 'problems' are arrays (which is not yet supported in CPS 1) and the 'while' statement, which is also not yet supported in CPS 1 although enumeration on tables is possible with all math and operators objects.

In the plugin format, you can also see the influences of MPEG-4 Structured Audio. Of course, the constructor of the class represents the i-rate, the audio function the a-rate, and the controlrate functions the k-rate, etc. Exceptions are thrown to represent runtime errors. For more information, read chapter five.

Bonneville is absolutely not the only company that is implementing MPEG-4 Structured Audio. More and more companies are using it. Most of them are writing an efficiënt way of interpreting and running .saol files. CPS does it the other way around; it makes sure the opcodes run very efficiently, and the text formats are then placed on the fast architecture.