Information Technology Reference
In-Depth Information
Figure 11. UML sequence diagram of event dispatch
Events are user definable actions that are
“frozen” until dispatched. They are distinct
from the normal flow of audio data. There are
no restrictions on the types of Events that can be
defined. Perhaps the most common event is updat-
ing a MarSystem control (for example creating a
new file with features every 1 minute). Another
example is the “wire” event which updates the
value of a control based on the value of another
control (similar to a control wire in Max/MSP,
PD). Events must supply a dispatch() method that
the Scheduler can call at the appropriate time.
Events may take place immediately or some time
in the future. The time at which an Event happens
may be specified by the user and depends on the
Timer that the requested time is with respect to
(for example the user might specify that an Event
should happen after 4 beats using a tempo-based
Timer or 3 seconds using a time-based Timer ). The
Event is then sent to the scheduler and removed
when its time interval has passed. The Scheduler
then calls the dispatch() method on the event.
Figure 10 shows a UML class diagram of the
scheduling architecture. Notice how multiple, user-
defined Timers and Events can be supported by
abstraction and are decoupled from the Scheduler .
The UML sequence diagram of Figure 11 shows the
order of method calls between objects for performing
a control update (a specific kind of Event ).
MARSYAS Scripting Language
MSL is a scripting language for building and
controlling MarSystem networks at runtime. It
is more accessible and readable than writing raw
C++ code. Essentially the interpreter translates
MSL code into the corresponding C++ Marsyas
code and then executes it. Lexical analysis (or
scanning) is performed using the Flex scanner
generator, and parsing performed using the Bison
parser generator 2 . The output of the parsing stage
from Bison is an abstract syntax tree representa-
tion of the MSL script, which is then traversed
to generate and execute the equivalent Marsyas
C++ code. The “do” construct allows multiple
events to be scheduled at particular times based
on a Timer. Figure 12 shows a more complicated
example with two-voice polyphony using a Fanout
composite. Two sine oscillators are controlled by
separate timers one based on SystemTimer and
the other based on TempoTimer which is based
on MIDI input.
Distributed Audio Processing
One of the most important challenges facing MIR
of audio signals is scaling algorithms to large
collections. Typically, analysis of audio signals
utilizes sophisticated signal processing and ma-
Search WWH ::




Custom Search