Composing for Interactive Music Performance Using Max

Leonard V. Ball, Jr.

School of Music, The University of Georgia

lvball@rameau.music.uga.edu

The twenty first-century composer will undoubtedly be a technically proficient professional, skilled in the use of computers for a myriad of tasks … from word-processing to data management to sampling & manipulating digital audio. With the advent of MIDI, the greatly reduced cost of acquiring a digital audio system, and the growing acceptance of technologically oriented art, it is no longer a question of if–but when–a composer will embrace technology. In a mere fifty years the composition landscape has changed drastically to include electronic media at every level of performance, and the trend shows no sign of dissipating. With this acceptance of electronic media, the task–or perhaps the challenge–for composers is to determine how the new capabilities will contribute to their output. Will it be through an extension of the tape manipulation techniques of the middle part of this century and the use of programs like Pro Tools, Sound Designer II, and Studio Vision Pro? Will it be the production of works that employ MIDI instruments and software sequencers; e.g., programs like Vision, Performer, and Cakewalk? Or perhaps the composer will become proficient in programming languages like Csound, Cmusic or Lisp; programs that are specifically designed or adaptable to the creation of cyber musical instruments and scores. Many composers will explore all of the techniques mentioned above and others not even currently designed or projected.

A concept that has gained widespread acceptance over the last nine years and now permeates the electronic medium is the trend toward an interactive approach to compositions involving computers. As George Lewis, the prominent composer and performer, writes in a 1993 response to an open letter by Peter Desain and Henkjan Honing, as published in the Computer Music Journal:

Not having attended an ICMC since 1986 in Den Haag, I was surprised to discover that "interaction" in computer music has moved from being considered the province of kooks and charlatans (I’m proud to have been one of those), to a position where composers now feel obliged to "go interactive" in order to stay abreast of newer developments in the field. (Garton and Rowe, CMJ, 1993)

Interactive works using a computer–or computers, if desired or required–provide a solo performer or ensemble with an additional "player" on- (or off-) stage. Depending on the programming skill and sophistication of the composer and/or the strength, flexibility, and purpose of the program in use, the computer’s role can vary widely from work to work or even within the same work. In its simplest role, a computer might listen to low level MIDI input to identify and use specific notes or switches as "triggers" to initiate preprogrammed events. A slightly more sophisticated approach might have the computer recording the live player’s actual performance and reproducing it in an altered fashion. In a much more complex and intuitive posture, the computer would listen and react to the live player’s performance using subtle timing, pitch, or phrasing information to guide its own interpretation either of preconceived material or of material it is generating based on algorithms designed and implanted by the composer. Any of these techniques, and more, are available to today’s composer of interactive works. The software that claims to support interactive composition must be powerful, flexible, and expandable to allow for each composer’s unique approach and thought process.

MAX is a software application designed to provide that flexibility, power, and expandability when approaching interactive composition. Developed at IRCAM by Miller Puckette between 1985 and 1988 as a front-end software controller for the 4X processor and eventually optimized for commercial distribution by Opcode Systems, Inc. (Chadabe, 1998), the program’s graphical interface and relatively easy conceptual approach provides a convenient interface for beginning and journeyman composers alike. Its modular design provides the flexibility required to produce works of widely varying complexity and concept, while its underpinning in the C programming language and its ability to accept and utilize user-designed modules provides theoretically limitless power.

While even a modest explanation of the program’s capabilities is beyond the scope of this document, a basic description of the work environment will help to enlighten those unfamiliar with the user interface. MAX programs are developed in a window termed a patcher. The name has obvious links to analog patch cables used to route signals between modules in voltage control synthesizers and, as will be shown directly, the comparison is more than superficial. After the program has started, the user chooses to either enter a new patcher or to open an established patch. Example 1 displays a new patcher and the MAX window, the program’s "message area."

Example 1: New Patcher Window and MAX Window

The patcher window is the composer’s principal work area. In example 1 the left window, as yet unnamed, is ready for input. In the title bar you see the standard close box at the top left and the "full screen" tool at the top right. There are two additional selections: the small object immediately to the right of the close box is the lock/unlock toggle. With an open lock showing MAX is in edit mode and current information may be altered or new information entered. With a secure lock, MAX is in "run" mode. In this mode the program acts as if it were an application and all buttons and switches are active for mouse-clicks. The small icon next to the lock/unlock toggle is, in effect, a MIDI filter. With the MIDI connector in view MAX is capable of reading and sending MIDI information. Clicking on the icon changes it to an "X," indicating that all MIDI communication is suspended. Immediately below the title bar is the object palette. These icons represent MAX’s "on-board" capabilities, ranging from simple comment boxes to graphic switchers to LED’s designed as visual indicators of completed or initiated action. Ex. 2 displays the patcher window with all object icons identified.

Example 2: The Object Palette Icons

Beginning work in MAX is as simple as pointing your cursor at the icon you wish to use and clicking. The cursor takes on the shape of the object and you place it on the page by clicking at the desired location. If you choose the first icon, the "object box" and click in the workspace at any location, you will immediately see a scrollable list of "New Objects" that are possible for this particular icon. These "objects" are software programs that comprise the action elements for MAX; i.e., they accomplish tasks with data that appear at their input(s).

Example 3: New Object Box

Looking at the New Object window, one immediately notices that it is divided in half, with categories of objects in the left sub-window and the objects that relate to a highlighted category in the right. MAX defaults to viewing the "All Objects" list and, as a user becomes accustomed to the objects they normally use and learns the subtleties of navigating in MAX, this category tends to be the preferred list. It is recommended, however, that new users individually highlight each category to view those objects associated with each overall function.

Example 4: Random Number Generator

Creating a patch in MAX is very much like constructing a sound on an analog modular synthesizer. You must first provide data input to an object for routing or processing. Objects are connected with patch lines … those attached to the top of an object’s box are inputs and those attached the bottom are the outputs. Some objects generate their own data and merely need a "shove" to start their output. In MAX, this impetuous is termed a "Bang." The patch in example four above creates a random number generator that will produce a random number between 0 and 5 each time the object "Random" receives a bang from the object "Metro" (for metronome). Metro has been instructed to send a bang every half-second after the toggle switch is clicked. The LED object turns on each time it receives an integer from random. The delay object delays each bang from metro by fifty milliseconds and then resets the LED object, providing an indication that an integer has been sent by the random generator even when a number is repeated.

A possible musical application of this simple concept might have the random generator producing numbers from 0 to 12 (Random 13). These numbers would be added to sixty (60) in order to place them in the octave between middle c and c5. A moderate volume level and a short duration would be predetermined for each pitch, but rhythm would not be steady since note repetitions would be filtered from the number stream. Finally, the patch would be toggled on or off whenever MAX receives MIDI note 48 (an octave below middle c).

Example 5: Random Note Generator

Example 5 provides a working model of the simplest interaction between a performer and computer; i.e., the performer plays notes, the computer listens until the appropriate value is received and then, upon receipt, initiates or terminates the appropriate, pre-programmed action(s). Further development of the patch is possible, even desirable, in order to provide a more meaningful output from the computer. Still, the developmental path from the first "non-musical" random number generator to the last "musical" patch is an example of the thought process that must be employed by a composer working in MAX.

Experience has shown that there are several elements of basic knowledge that, while not essential to begin an exploration of the program’s capabilities, provide a foundation that will produce clearer, more efficient patches in MAX. First, some programming experience is a must in order to quickly achieve any degree of repeatable sophistication when developing patches. While admittedly elementary, example 5 reflects experience in two subtle, yet important programming concepts: documentation and simplicity. Although it may seem obvious, documenting a patch as it is developed is not an easy concept to instill in new users, especially those without programming experience. Clarification via detailed comments–liberally applied at each processing level of the patch–will ensure program comprehension when a composer returns to the patch even after a short period of time. Additionally, other users will find the thoughtful guides extremely helpful as they initially explore the patch’s capabilities. Simplicity must be a constant goal, for new and experienced users, alike. Todd Winkler, in his excellent and welcomed text on interactive music composition with MAX, provides five straightforward guidelines for structuring patches in this graphic environment: "Try to find simple solutions to complex problems. Choose objects designed for a specific task that use the fewest number of steps. Make patches do a limited number of things. Eliminate redundant objects and variables. Don’t use complex objects to do simple jobs." Winkler goes on to recommend "--many small, modular patches, rather than one large one." (Winkler, 1998) MAX is designed to encourage users to implement Winkler’s advice. Without much effort, complex, far-ranging patches can be created fairly quickly. In this author’s experience, comprehension, reliability, and maintenance diminish in direct proportion to the complexity of a patch. The user must, therefore, always strive to separate complex problems into their simplest, most basic programming actions. Once identified, solutions for each of the smaller elements can be developed, tested, and, finally, incorporated with other solutions to reach a satisfactory resolution for the overall complex action. The most beneficial result of this process will be verification at each stage of the solution, greatly reducing the debugging time when something fails to work properly.

A second area essential for developing successful, sophisticated, interactive projects in MAX would be experience with and comprehension of Musical Instrument Digital Interface (MIDI) language. Obviously, in a musically-oriented patch, much of the information used to initiate actions or to alter performance data depends on one’s ability to manipulate MIDI. Note-on and note-off information is crucial to the construction of even the simplest patch (such as Random-2 in Example 5). A MIDI note-on message must contain data bytes that address both the velocity and duration of the MIDI note. Without this information no sound would result when MIDI note 48 is played as part of example 5. This result is guaranteed even though the Random object faithfully produces the required numbers and the Add object places those numbers in the appropriate octave. Additionally, failing to include an object that will generate note-off information would ensure constant sound until the MIDI device is shutdown or until an AllNotesOff message is sent … not a desirable prospect. Understanding MIDI, and the MAX objects that directly address the protocol, provides user control of MIDI-capable keyboards, sound modules, MIDI-capable lighting systems and audio-visual machines, stage effects, and–through the Macintosh’s Inter-Application Communication bus–software sequencers for both MIDI and audio. The MAX reference manual dedicates twenty-four pages to various MIDI subjects including MIDI messages and controller numbers, the Opcode MIDI System (OMS), addressing MIDI ports in MAX–both single track and multitrack sequencing–and MIDI patch librarians. While this introduction is detailed and certainly helpful, supplemental information for all of these categories would be invaluable for the new user.

Finally, it is suggested that a thorough review of the history of electronic music be undertaken either before–or during–the user’s initial exposure to the MAX programming environment. Two principal areas should be addressed. First, works for tape alone or tape with live performer(s)–produced from 1950 to present and universally recognized for excellence–should be studied. While this recommendation might be viewed as pedantic by some, or even abstractive by others, knowledge of this repertoire is considered essential by this author for composition. Second, a review of interactive works during the last thirty years should be undertaken. It is hoped that this activity will ensure proper respect for the pioneering work that preceded the development of MAX. Knowledge gleaned from this review may even prevent categorization of one’s "new" work in rather uncomplimentary terms. To return once again to George Lewis for his description of "trigger"-oriented interactive patches: "That these amoeba (sic) or roach-like automata have passed for serious interactive work in recent computer music could (uncharitably, to be sure) be simply deemed a testament to the low level of the current thinking about musical interaction." (Garton and Rowe, 1993) Although Lewis does relent almost immediately, recognizing a then current trend to link composer control with the overall musical structure of a work, his comparison of a truly interactive work of art to a living creature is illuminating:

A real "interactive" entity, a mammal for instance, exhibits complex behavior that cannot be simply tied to a set of controlling "triggers." Moreover, the structures present at the animal’s input (senses) are processed in quite a complex, multi-directional fashion. Often the animal’s output (behavior) is not immediately traceable to any particular input event. The number of triggers needed to fully control every sonic movement of an "interactive" composition of the complexity of a housefly would already be quite high; perhaps hundreds of triggers would be needed, far too many to be manipulated at once by anyone. (Garton and Rowe, 1993)

Whether the approach is sophisticated or merely "roach-like"; whether the material to be manipulated is strictly MIDI or involves signal processing of digital audio; whether the objects are already available or must be developed; MAX provides the power, flexibility, and the expandable programming environment necessary for the production of quality interactive works of lasting significance.

References:

Chadabe, Joel. Electric Sound, The Past and Promise of Electronic Music. Prentice-Hall, Inc. 1997.

Dobrian, J. Christopher (with editing by Jon Drukman). MAX Reference. Opcode Music Systems, Inc. 1995

Garton, Brad and Rowe, Robert. "Putting MAX in Perspective." Computer Music Journal 17:2 (1993)

The MIDI Manufacturers Association, The Complete MIDI 1.0 Detailed Specification. Los Angeles, CA. 1996

Puckette, Miller and Zicarelli, David. "MAX: A Graphical Musical Programming Environment." Opcode Music Systems/IRCAM. 1990-1997.

Winkler, Todd. Composing Interactive Music, Techniques and Ideas Using MAX. The MIT Press. Cambridge, Massachusetts. 1998, pages 76-78.