MusicKit
0.0.0
|
A MKScorefileWriter is an MKInstrument that realizes MKNotes by writing them to a scorefile. More...
#include <MKScorefileWriter.h>
A MKScorefileWriter is an MKInstrument that realizes MKNotes by writing them to a scorefile.
The name of the scorefile to which the MKNotes are written is set through methods inherited from MKFileWriter.
Each of a MKScorefileWriter's MKNoteReceivers corresponds to a MKPart that will appear in the scorefile. Unlike most MKInstruments, the MKScorefileWriter class doesn't add any MKNoteReceivers to a newly created object, they must be added by invoking the addNoteReceiver: method.
The names of the MKParts represented in the scorefile are taken from the MKNoteRecievers for which they were created. You can name a MKNoteReceiver by calling the MKNameObject() function.
The header of the scorefile always includes a part statement that names the MKParts represented in the MKScore, and a tagRange statement that states the range of noteTag values used in the MKNote statements. A MKScorefileWriter can be given an info MKNote that's written as a MKScore info statement in the file; similarly, the MKScorefileWriter's MKNoteReceivers can each contain a MKPart info MKNote. These, too, are written to the scorefile, each in a separate MKPart info statement.
You shouldn't change the name of a data object (such as an MKEnvelope, MKWaveTable, or MKNoteReceiver) during a performance involving a MKScorefileWriter.