00001 /* 00002 $Id: MKPartRecorder.h 3449 2009-04-04 16:52:47Z leighsmith $ 00003 Defined In: The MusicKit 00004 00005 Description: 00006 See class description below. 00007 00008 Each MKPartRecorder contains a single MKNoteReceiver object. During a 00009 performance, a MKPartPerformer receives MKNotes from its MKNoteReceiver, 00010 copies them, and then adds them to its MKPart object. The MKPartRecorder 00011 gives each MKNote a new timeTag and, if it's a noteDur, a new duration. 00012 The new timeTag reflects the time in the performance that the MKNote was 00013 received by the object. The timeTag and the duration are computed 00014 as beats or seconds. (Additionally, if the timeunit is "MK_timeTag", 00015 the MKNote's timeTag is used verbatim.) 00016 00017 You can create MKPartRecorders yourself, or you can use a MKScoreRecorder 00018 object to create a group of them for you. 00019 00020 00021 Original Author: David A. Jaffe 00022 00023 Copyright (c) 1988-1992, NeXT Computer, Inc. 00024 Portions Copyright (c) 1994 NeXT Computer, Inc. and reproduced under license from NeXT 00025 Portions Copyright (c) 1994 Stanford University. 00026 Portions Copyright (c) 1999-2005, The MusicKit Project. 00027 */ 00054 #ifndef __MK_PartRecorder_H___ 00055 #define __MK_PartRecorder_H___ 00056 00057 #import "MKInstrument.h" 00058 #import "timeunits.h" 00059 00060 @interface MKPartRecorder : MKInstrument 00061 { 00063 MKTimeUnit timeUnit; 00065 MKNoteReceiver *noteReceiver; 00067 MKPart *part; 00068 BOOL compensatesDeltaT; 00069 00070 @private 00071 id _scoreRecorder; 00072 } 00073 00083 - init; 00084 00094 - setTimeUnit: (MKTimeUnit) aTimeUnit; 00095 00102 - (MKTimeUnit) timeUnit; 00103 00108 - (void) setPart: (MKPart *) aPart; 00109 00114 - (MKPart *) part; 00115 00128 - realizeNote: (MKNote *) aNote fromNoteReceiver: (MKNoteReceiver *) aNoteReceiver; 00129 00139 - copyWithZone: (NSZone *) zone; 00140 00141 /* 00142 You never send this message directly. 00143 Should be invoked with NXWriteRootObject(). 00144 Invokes superclass write: then archives timeUnit. 00145 Optionally archives part using NXWriteObjectReference(). 00146 */ 00147 - (void) encodeWithCoder: (NSCoder *) aCoder; 00148 00149 /* 00150 You never send this message directly. 00151 Note that -init is not sent to newly unarchived objects. 00152 See write:. 00153 */ 00154 - (id) initWithCoder: (NSCoder *) aDecoder; 00155 00162 - setDeltaTCompensation: (BOOL) yesOrNo; 00163 00169 - (BOOL) compensatesDeltaT; 00170 00171 @end 00172 00173 #endif