MKInstrument Class An abstract class that realizes MKNotes
in a manner defined by the subclass.
MKInstruments are passive, they respond to
MKNotes sent to them by the user interface or
a MKPerformer.
The subclass defines its means of realization by implementing realizeNote:fromNoteReceiver:.
MKNoteFilter is a special (abstract)
subclass of Instrument that processes MKNotes
it will be described later.
MKInstruments receive
MKNotes via their
“inputs”, which are small objects called
MKNoteReceivers. You can send
MKNotes directly to a
MKNoteReceiver or use a
MKPerformer to dispatch the
MKNotes (e.g. when playing a
MKScore).
You can tell an MKInstrument to realize
a MKNote by sending receiveNote: to one of its
MKNoteReceivers. You can obtain the
MKNoteReceiver in various ways. To get its
first MKNoteReceiver, send noteReceiver to the
MKInstrument.
When sending MKNotes
directly to an
MKInstrument's
MKNoteReceiver, you must update
time. Afterwards (if using the DSP)
you must make sure that the DSP command
buffers are properly emptied. Example:
[MKConductor lockPerformance]; [[anInstrument noteReceiver] receiveNote: aNote]; [MKConductor unlockPerformance]; |