Specifying the Performance Behavior

Behavior is defined by supplying the instance methods:

noteOnSelf:

noteUpdateSelf:

noteOffSelf:

noteEndSelf

These are invoked as follows:

  1. When a noteOn or noteDur arrives, the noteOn: message is sent. This invokes noteOnSelf:

  2. When a noteUpdate arrives, the noteUpdate: message is sent. This invokes noteUpdateSelf:

  3. When a noteOff arrives or the end of the duration occurs, the noteOff: message is sent. This invokes noteOffSelf: noteOffSelf: returns the time required to finish, in seconds. This is ordinarily the time for the amplitude envelope to finish its release portion.

  4. When the phrase is really finished (the release portion is finished) , the noteEnd message is sent. This invokes noteEndSelf

Like a MKUnitGenerator, a MKSynthPatch may be in one of three states:

Table 5-4. MKSynthPatch States

MK_idleNot producing sound.
MK_runningRunning.
MK_finishingMKEnvelope release.