A MusicKit performance can be divided into three phases:
Preparation: You must determine the sources and
destinations of the MKNote
s that you wish to
perform and establish other characteristics of the performance.
Commencement: This is always accomplished by
sending startPerformance to the
MKConductor
class.
Termination: This is achieved by sending finishPerformance to the
MKConductor
class.
This sequence of activities can be repeated any number of
times while an application is running. While a single application can
have but a single performance in progress at any particular time, that
single performance can do any number of things. For example, if you
want to capture MIDI input as a scorefile while
playing along to a MKPart
that's synthesized on
the DSP, you perform both tasks in a single
performance―you don't have to set up separate environments.
Obviously, the two endeavors involve different classes of objects, but
when the MKConductor
class receives the
startPerformance message, everybody
starts wheezing.
Much of the work that goes into a performance is involved in setting it up; in fact, many of the methods that are defined by the classes that are involved in a performance can only be invoked before the performance starts (or between performances). As you design your own application, you should consult the class descriptions in MusicKit Class References to check for the conditions under which a method may be invoked.
The following sections examine the three primary classes
involved in a performance: MKInstrument
,
MKPerformer
, and
MKConductor
.