Information Technology Reference
In-Depth Information
Figure 9. Music/speech classification as a dataflow
network in MARSYAS
Figure 10. UML class diagram of the MARSYAS
scheduler architecture
and a time. The scheduler keeps track of pending
requests. Computer music schedulers use times
which are typically references to a single clock that
corresponds to real (physical) time. In addition
to actual time,
MARSYAS
supports the notion of
virtual time which is based directly on the data.
This is especially important in nonrealtime ap-
plications. In addition it is often convenient to
have a time reference or references that do not
correspond to real time. For example consider
scheduling events in beats that are defined in
relation to tapping a MIDI keyboard to extract
beat-synchronous audio features. In this sec-
tion we show how multiple notions of time and
events are supported through object orientation
in
MARSYAS
.
Each
MarSystem
has its own
Virtual Sched-
uler
that manages an arbitrary number of
Event
Schedulers
. Each
Event Scheduler
contains its
own
Timer
that controls the rate at which time
passes and events are dispatched.
Schedulers
themselves do not keep track of time, but leave
this task solely to the
Timer
. Structured this way
events may be scheduled to any number of dif-
ferent
Timers
.
A
Timer
in
MARSYAS
is any object that can
read from a time source and triggers some action
on each tick. A
Timer
must also provide some
way to specify units of time in its time base.
The one restriction in a time source is that time
must always advance.
Timers
are definable by the
user, provided they support the
AbstractTimer
interface. The interface requires specification
of the following: a method for determining the
interval of time since the last reading, a method
for comparing time intervals for that particular
Timer
, a trigger method which calls the Scheduler
dispatch, and a method for converting time repre-
sentations to the specific notion of time used by
the
Timer
. This generalization of Timers allows
for many different possibilities in controlling event
scheduling. Linear and nonlinear advancing are
both possible.
Search WWH ::
Custom Search