Software
Design
The
Jam-O-Drum’s software library was designed with flexibility and
extensibility in mind. We
chose Java as the language of implementation because of its
suitability for rapid prototyping as well as its high degree of
object orientedness. We
knew from the beginning that we wanted the creation of new
experiences to be easy and standardized, so we made a set of
interfaces through which all experiences
communicate with the system. We also created a Control Panel that is a centralized way to
start and stop the Jam-O-Drum experiences.
There are two
main interfaces that experience authors must know about:
Controllable and Input. Every
experience created for the Jam-O-Drum needs to implement the
Controllable interface. This
allows the Control Panel to start and stop the experience.
Controllable is a pure Java interface, so no requirements
are made on how the experience interacts with the rest of the
system. There have
been experiences implemented in pure Java, and others that use the
Java Native Interface to communicate with low-level libraries
written in C++ (such as DirectSound).
When starting the
experience, the Control Panel passes the Controllable object an
instance of the Input object. This object is the way that input from the various parts of
the Jam-O-Drum (the turntables and drumpads) gets sent to the
experience. Interaction
with this object is simple – experiences implement the
padListener for drumpad input, and diskListener for turntable
input, and an instance of each of those listeners is passed to the
Input object. When
player interactions are received by the system, the Input object
calls the appropriate functions on the Listener objects.
|