|
jMusic Realtime audio architecture
Below is a diagram that depicts the jMusic real time audio
architecture. Notes are contained (or generated by) an RTLine, which is
kind of like a real time phrase. An RTLine has an instrument
(strictly an array of several instances of the instrument) with which
is renders the notes. The array of instruments is necessary to
deal with polyphony; overlapping notes. A number of RTLines (in an
array) are controlled by an RTMixer which combines and sychronises the
lines and passes the output to JavaSound audio out.
Instruments are a stroy to themselves, but briefly, an instrument is a
combination (or chain) of AudioObjects. For example a chain might be
made up of, an oscillator, a filter, an amplitude envelope, and a delay
audio objects. The Instrument class, from which all instruments extend,
takes care of pulling samples down the chain while the note duration
lasts.
Changes to AudioObjects during processing - for example sweeping the
filter cutoff - are managed by passing messages to the actionLines()
method in the RTMixer which, in tun, passes the messages to all RTLines
and Instruments. It is up to the instrument to pass the message on to
the audioObject instance.
This is simply an overview. Other tutorials will deal with more details
(and you can always look through the source :).
|