Mapping with planning agents in the Max/MSP environment: the GO/Max language Paolo Bottoni, Stefano Faralli, Anna Labella, Mario Pierro Universit ` a di Roma La Sapienza Dipartimento di Informatica Via Salaria, 113, 00198 – Rome, Italy (bottoni,faralli,labella, pierro)@di.uniroma1.it ABSTRACT GO/Max is an agent programming language that facil- itates the design of algorithms for real-time control of sound/music generation programs crafted in the Max/MSP environment. We show how software planning agents pro- grammed in GO/Max can be used to transform abstract goal states specified by the performer in potentially com- plex sequences of Max/MSP control messages. Keywords mapping, planning, agent, Max/MSP 1. INTRODUCTION In the context of real-time interactive musical systems, mapping represents the correspondence between the con- trol space in which the performer acts and the parameter space of the system that is being controlled. The cen- tral role of mapping and the importance of having efficient methods to design mappings have been exposed by several works [1]. Several approaches for translating from the control space into the parameter space have been proposed (see section 1.1). In this paper we present our experiments on using state models and planning agents to perform such trans- lation. The basic idea behind this approach is to repre- sent the controlled system using a state model. If a state model for the system is finite, it is possible to implement a software agent that will be able to foresee the evolution of such model using a planning algorithm [2]: the agent will be able to produce a command sequence that leads from one model state to another goal state, provided that such transition is possible, or state its non-existence. If the model also specifies a correspondence between state transitions in the model and commands for the system, a sequence of states in the model can be used to drive the actual system. The combination of the system model and the plan- ning agent will thus form an abstraction layer between the performer and the controlled system. The performer will drive the agent by sending it requests for goal states; the agent will devise sequences of operators to reach those Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. NIME 06, June 4-8, 2006, Paris, France Copyright remains with the author(s). Figure 1: Performer requests a goal to the gomax agent, agent’s plans to reach the goal are trans- lated in control sequences for the Max/MSP patch. goal states; operator sequences correspond to message se- quences used to steer the abstracted system (see Figure 1). The abstraction is obtained because of the independence between goal/operator definitions and messages which are sent to the patch. This can be particularly effective when used in conjunction with other mapping techniques which can be used to form goal state requests depending on the performers input. One example could be the mapping of a discrete set of hand gestures to a set of agent goal states. We have experimented abstracting the control of Max/ MSP patches. To do so we developed a language (GO/Max, standing for Goal-Oriented Max) to describe determinis- tic state models of Max/MSP patches, and a Max/MSP external (gomax) to implement a software agent which per- forms planning and translates state model transitions into actual patch commands [3]. 1.1 Related Work The mapping problem has been approached in numerous ways: [4] is a comprehensive review of mapping techniques. Generally mapping is a one-to-one, one-to-many or many- to-one correspondence between the control space and the parameter space, where their dimension numbers gener- ally differ. Van Nort et al. [5] have formalized mapping as a continuous function from the control to the param- eter space and, representing those as subsets of a highly- dimensional Euclidean space, have analyzed the geometri- cal and analytical properties of that function. Some continuous mapping algorithms such as Escher [6] use an intermediate layer of abstract parameters to translate between the control space and parameter space. The recent MnM toolbox [7] uses matrices to represent mappings and provides methods to build them iteratively. Many-to-one mappings have also been approached as a pattern recognition problem to which neural networks have been applied (most recently in [8]). The recent proposal of ChucK ([9], [10]) has exposed the central role played by the programming paradigm in the context of high-level com- Proceedings of the 2006 International Conference on New Interfaces for Musical Expression (NIME06), Paris, France 322