MusicKit  0.0.0
MKNoteSender Class Reference

MKNoteSender is an auxilliary class that completes the implementation of MKPerformer. More...

#import <MKNoteSender.h>


Detailed Description

MKNoteSender is an auxilliary class that completes the implementation of MKPerformer.

Instances are created and owned by MKPerformer objects, normally when the MKPerformer itself is created or initialized. A MKNoteSender object performs two functions:

There's a fundamental difference between these two tasks in that while you connect MKNoteSenders to MKNoteReceivers from your application, sending MKNotes is a MKPerformer's responsibility: Subclasses of MKPerformer should invoke sendNote: as part of their implementations of the perform method.

Keep in mind that while you can create MKNoteSenders and add them to MKPerformers through messages sent by your application (a MKNoteSender is added to a MKPerformer through the latter's addNoteSender: method), they're designed to be created and added by the MKPerformers themselves. Before adding your own MKNoteSenders to a MKPerformer, you should check the description of the MKPerformer subclass that you're using to ensure that your MKNoteSenders will be recognized.

A MKNoteSender can be owned by only one MKPerformer at a time; however, it can be connected to any number of MKNoteReceivers. In addition, two different MKNoteSenders can be connected to the same MKNoteReceiver. Thus the connections between MKPerformers and MKInstruments can describe an arbitrarily complicated network. To retrieve the MKNoteSenders that are owned by a particular MKPerformer - to connect them to MKNoteReceivers, or to squelch and unsquelch them - you invoke the MKPerformer's noteSender or noteSenders method.

MKNoteSenders are also created, owned, and used by instances of MKNoteFilter and MKMidi - neither of which are actual MKPerformers - as part of their assumptions of the role of MKPerformer. A MKNoteFilter subclass should send sendNote: to its MKNoteSenders as part of its implementation of realizeNote:fromNoteSender:. It isn't anticipated that MKMidi will be subclassed (at least not to override its sendNote: invocation).


The documentation for this class was generated from the following file: