A Language for Interactive Audio Applications

A Language for Interactive Audio Applications

A Language for Interactive Audio Applications Roger B. Dannenberg School of Computer Science, Carnegie Mellon University email: [email protected] Abstract abstraction mechanisms and orthogonal features. They should provide general building blocks rather than special- Interactive systems are difficult to program, but high-level case solutions, and languages should minimize the semantic languages can make the task much simpler. Interactive gap between language concepts and application concepts. audio and music systems are a particularly interesting case because signal processing seems to favor a functional language approach while the handling of interactive 2 Existing Approaches parameter updates, sound events, and other real-time There are many systems available for digital audio computation favors a more imperative or object-oriented including music synthesis and processing. A standard approach. A new language, Serpent, and a new semantics reference is csound (Boulanger, 2000), which has roots in for interactive audio have been implemented and tested. The the Music N languages (Mathews, 1969). The csound result is an elegant way to express interactive audio orchestra language illustrates both good and bad features for algorithms and an efficient implementation. an interactive audio programming language. The good features include a somewhat functional style in which 1 Introduction sounds are created by instances of functions (instruments) and where instances of function-like unit generators are Creating interactive audio programs is difficult and not created simply by mentioning them in an expression. It very well supported by traditional programming languages seems to be natural to express signal-processing algorithms such as Lisp, C++, or Java. Libraries built upon these in terms of an acyclic graph (or patch), and the csound languages can help, but even with library support, creating a orchestra programs tend to be semantically close to this dynamic, interactive, reliable system is very difficult. A conceptual organization. particularly difficult problem is creating networks of sound On the negative side, csound instruments cannot be generators and processors on the fly in response to input composed hierarchically. One cannot define a new unit events. A simple example is a synthesizer that creates a generator in terms of primitive ones. Because all computation in response to a key down event, updates instruments output sound to global variables, flexibility is envelope generators in response to a key up event, and frees curtailed. A classic problem in csound is how to add all relevant resources when the sound decays to silence. reverberation to the mixed output of many instruments. The In the following sections, I describe some existing standard solution relies on an inelegant arrangement of approaches to interactive audio programming and derive global variables and programming conventions. some properties that easy-to-program systems seem to Arctic (Dannenberg, 1984) was intended to provide a share. Then, I describe some concepts that are hard to more elegant expression of the semantics that underlie express in existing languages and systems. In particular, the Music N languages. Arctic is a more pure functional problems of updating parameters and creating abstractions language where unit generators, instruments, and even are described. Next, I explain some new ways of organizing scores are all simply functions that return signals (real- programs that solve these problems. This approach has been valued functions of time). Arctic allows better abstraction implemented in the Aura framework using a new scripting than csound and allows a clean solution to the language, Serpent, that was developed specifically to “reverberation problem.” The functional nature of Arctic address the problem of interactive audio programming. makes it somewhat awkward at handling discrete events. One of the difficulties of this type of research is For example, after creating an instance of a function in evaluation. How do we know when a language is good, and response to a key-down message, the instance must inspect what things should we avoid? These questions cannot be every key-up message for a matching key number in order answered objectively, but lessons learned from the to know when to stop. Furthermore, to cause an envelope to programming language community and from experience in ramp to zero in response to a key-up event, the existing the computer music domain can be used to derive some envelope must be stopped and replaced. In an imperative general guidelines. Languages should provide good Published as: Roger B. Dannenberg (2002). “A Language for Interactive Audio Applications.” In Proceedings of the International Computer Music Conference. San Francisco: International Computer Music Association. language, it might be a simple matter to alter the state of an form patches. This approach was the first one taken in Aura envelope object. (Dannenberg & Brandt, 1996), but it is not very satisfying In spite of its shortcomings, Arctic semantics are quite because it is too easy to make programming mistakes. powerful for audio processing. A less interactive version of Typical errors include leaving inputs unconnected or trying Arctic (called Nyquist) (Dannenberg, 1997) has been to patch a control-rate output to an audio-rate input. These implemented and used extensively for composition tasks. mistakes are not so easy to make with a more functional The ease-of-use found in Nyquist confirms the importance style of patch language. The main problem with these of a functional notation for audio processing algorithms. systems is that the user manipulates unit generators to build This problem is how to combine a functional signal desired patches rather than writing expressions that express processing language with an imperative or object-oriented the desired sounds directly. event-processing language. Open Sound Control (Matt Wright & Freed, 1997) is not A good example of an object-oriented event-processing a language but a protocol for communicating with a sound language is Aura (Dannenberg & Brandt, 1996), which is an synthesis engine. OSC offers a model for connecting a real- extension of C++. In Aura, an event corresponds to the time interactive program dealing with discrete events, arrival of a message. This causes the execution of a method especially parameter updates, to a synthesis program (member function). In contrast to functional languages, this computing continuous streams of audio. One characteristic object-oriented approach seems very natural for receiving of OSC is that it uses a hierarchical naming scheme. Thus, messages and responding to them. Aura and its predecessor, one can set parameters of objects deeply embedded within a the CMU Midi Toolkit, have been used for many interactive patch. In most implementations, this scheme works against music programs and compositions (Morales-Manzanares, structural abstraction because it gives full view and access Morales, Dannenberg, & Berger, 2001). However, Aura, an to the inner workings of complex sounds. On the other hand, object-oriented language, has been much more difficult to translations between low-level device- or algorithm-specific use than Nyquist, a functional language, for audio parameters and high-level OSC parameters provides a useful computation. abstraction mechanism, hiding peculiarities of input devices Judging by its popularity, Max with added signal and synthesis algorithms. (Madden, Smith, Wright, & processing primitives (Dechelle et al., 1998; Lindemann, Wessel, 2001; Matthew Wright, Freed, Lee, Madden, & Dechelle, Sarkier, & Smith, 1991; Puckette, 2002; Zicarelli, Momeni, 2001) Since OSC only provides a synthesizer 1998) is an interesting approach. Max uses a visual interface, it remains for additional structure and language programming language to describe audio computation. The design to provide a complete programmable system. visual layout is a direct expression of the data flow graph. A The M Orchestra Language (Puckette, 1984) is probably drawback of this approach is that it is hard to express graphs the closest in concept to the present work. This language whose structure depends upon real-time data or whose allows nested expressions to describe patches in a functional structure changes dynamically. Various extensions, such as style and uses an object-oriented framework to describe specialized support for polyphony and the ability to activate instrument methods that can be invoked to manipulate unit and deactivate sections of the graph have been developed to generator parameters. work around the static nature of these graphs. Max was not As can be seen from these examples, there are many designed to be a general programming language and it is different approaches and many interesting features in generally considered to be problematic for many existing work. However, it would be hard to argue that any programming tasks. approach is best or that “best” can even be defined. This is SuperCollider (McCartney, 2000) is the best known an evolving area with many possibilities remaining to system for interactive audio that provides a general-purpose explore. In this work, I introduce some new concepts for programming language. Although based on an object- organizing interactive programs and music compositions. oriented programming language, SuperCollider adopts a These are supported by a new (but mostly conventional) highly functional programming language approach

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    7 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us