MKSynthInstrument Class An MKInstrument subclass that realizes
MKNotes on the DSP.
You specify which MKSynthPatch
subclass to use with setSynthPatchClass:.
Allocates patches based on
noteTags of incoming
MKNotes. Allocation can be done
from a global or a local pool. If you send setSynthPatchCount:, the pool is
local (MK_MANUALALLOC) and contains
the number of patches specified. Otherwise, pool is
global (MK_AUTOALLOC).
Supports automatic preemption of the oldest running patch.
You can subclass MKSynthInstrument and
override one method to provide an alternative preemption strategy.
Advantage of automatic mode is that there's never any wasted of patches.
Advantage of manual mode is that important musical parts can be given precedence. (E.g. you can get around a screw case such as overlapping bass-line notes causing a disappearing melody.)
In Scorefiles, the MKSynthPatch
is specified in the part info's synthPatch: parameter. Manual mode
is specified in the part info's synthPatchCount: parameter.
Example:
part p1; /* Scorefile excerpt*/ p1 synthPatch: "Pluck" synthPatchCount: 2; |