~Proceedings ICMCISMCI2014 14-20 September 2014, Athens, Greece
A Protocol for creating Multiagent Systems in Ensemble with Pure Data
Pedro Bruel
Universidade de So Paulo
pedro.bruel@gmail.com
ABSTRACT
This work presents a protocol for integration of two software platforms, the Ensemble framework for musical multiagent systems and the Pure Data programming environment. Ensemble is written in Java and requires knowledge
of this language in order to access high-level features of the
framework, such as creating customized agent reasonings,
new event servers for non-supported data-types, or new
physical models for the virtual world. On the other hand,
Pure Data (Pd) is a very popular programming environment for real-time audio processing (among other things)
and has an ever-growing community of users interested in
sound and music applications. The protocol described here
allows Pd users with no knowledge of Java to create musical multiagent applications in Ensemble with a high degree
of flexibility, including configuration of parameters defining the virtual world, creation of agents and agent components (sensors, actuators, memories and knowledge base)
and the definition of agent reasonings, which control agent
behaviour and agent interactions in the virtual world, all
from within Pd patches.
1. INTRODUCTION
The interest in multiagent systems in music started about
fifteen years ago, and several such applications have appeared in the literature, which included distributed artificial intelligence concepts such as autonomous agents, virtual world modelling and collaborative agent interactions,
in musical environments dealing with composition, improvisation and performance [1, 2, 3, 4, 5, 6, 7, 8]. Many of
these applications [9, 10, 11, 12, 13, 14, 15, 16] presented
a whole conception of the virtual world and its laws, and of
agents with specific cognitive and musical functions, following determined algorithms.
A few exceptions to this rule are systems designed to
aid the development of general musical multiagent applications, such as MAMA [4], ISO [5] and Ensemble [6, 8].
MAMA focused in agents which exchanged and produced
exclusively MIDI information; ISO is oriented towards the
idea of a swarm orchestra, where agents in a swarm are
controlled by complex collective behaviours. Ensemble
on the other hand concentrates on the idea of autonomous
agents, and has tackled from its inception both symbolic
Copyright: 2014 Pedro Bruel et al. This is an open-access article distributed
under the terms of the u n r.s, which
permits unrestricted use, distribution, and reproduction in any medium, provided
the original author and source are credited.
Marcelo Queiroz
Universidade de So Paulo
mqz@ime.usp.br
exchange (MIDI, text, musical data and algorithms) and
audio communication between agents immersed in a virtual world, which required physical modelling of sound
propagation in various virtual realities (including, but not
restricted to, realistic 3D spherical sound propagation).
The Ensemble framework has been written in Java, to allow some degree of platform-independence, uses the JADE
multiagent middleware and depends on a sound engine,
such as Java Sound (over the native OS sound server), PortAudio or JACK. Although many existing components in
Java may be combined and assembled through XML configuration files to produce a number of musical multiagent
applications, the high degree of flexibility that the framework offers is only available to a Java-literate user, who is
thus able to design new components, new reasonings, new
event types and event servers, and ultimately new virtual
realities. Unfortunately for Ensemble, a number of potentially interested users are not Java programmers and their
interest wane before the perspective of having to dive into
Java code.
libpd [17] is a project which allows programmers to access and control Pure Data objects, patches and the whole
DSP engine from within other applications. The libpd API
is written in C and has language bindings for Java, which
allows Ensemble to benefit from this infrastructure, allowing parts of the framework, that were originally meant to
be written in Java, to be defined in Pd and accessed through
libpd's API. On one hand, this possibility requires not only
the incorporation (in Ensemble) of mechanisms for accessing and controlling Pd patches and the data that flows between Ensemble and these patches, but also defining a complete protocol for accessing Ensemble agent structures, such
as sensors, actuators, memories and its knowledge base,
from within Pd patches. On the other hand, this integration provides the user with the ability of completely defining high level agent processes through Pd patches, and unleashes Ensemble from its requirement of Java-literacy (on
the part of the user).
This paper is structured as follows. Section 2 presents
the structures in Ensemble dealing with agent reasoning,
including components that exchange information with a
reasoning, such as sensors and actuators, memories and
knowledge bases. Section 3 describes libpd and the functions that allow control of Pd patches from within Ensemble. Section 4 describes the implemented Pd-Ensemble
protocol, which allow access to Ensemble structures from
within a Pd patch. Section 5 shows examples of how to
use the protocol to configure and control Ensemble applications. To conclude, section 6 evaluates the contributions
- 1512 -
0