MusicKit
0.0.0
|
00001 /* 00002 $Id$ 00003 Defined In: The MusicKit 00004 00005 Description: 00006 A MKScorePerformer performs a MKScore object by creating a group of 00007 MKPartPerformers, one for each MKPart in the MKScore, and controlling the 00008 group's performance. MKScorePerformer itself isn't a MKPerformer but it 00009 does define a number of methods, such as activate, pause, and resume, 00010 that resemble MKPerformer methods. When a MKScorePerformer receives such 00011 a message, it simply forwards it to each of its MKPartPerformer objects, 00012 which are true MKPerformers. 00013 00014 MKScorePerformer also has a MKPerformer-like status; it can be active, 00015 inactive, or paused. The status of a MKScorePerformer is, in general, 00016 the same as the status of all of its MKPartPerformers. For instance, 00017 when you send the activate message to a MKScorePerformer, its status 00018 becomes MK_active as does the status of all its MKPartPerformers. 00019 However, you can access and control a MKPartPerformer independent of the 00020 MKScorePerformer that created it. Thus, an individual MKPartPerformer's 00021 status can be different from that of the MKScorePerformer. 00022 00023 A MKScorePerformer's score is set and its MKPartPerformers are created 00024 when it receives the setScore: message. If you add MKParts to or remove 00025 MKParts from the MKScore after sending the setScore: message, the changes 00026 will not be seen by the MKScorePerformer. 00027 00028 Original Author: David A. Jaffe 00029 00030 Copyright (c) 1988-1992, NeXT Computer, Inc. 00031 Portions Copyright (c) 1994 NeXT Computer, Inc. and reproduced under license from NeXT 00032 Portions Copyright (c) 1994 Stanford University. 00033 Portions Copyright (c) 1999-2001, The MusicKit Project. 00034 */ 00035 @class MKScore; 00036 @class MKPartPerformer; 00037 00064 #ifndef __MK_ScorePerformer_H___ 00065 #define __MK_ScorePerformer_H___ 00066 00067 #import <Foundation/NSObject.h> 00068 #import "MKPerformer.h" 00069 00070 @interface MKScorePerformer : NSObject 00071 { 00072 MKPerformerStatus status; 00073 NSMutableArray *partPerformers; 00074 MKScore *score; 00075 double firstTimeTag; 00077 double lastTimeTag; 00079 double timeShift; 00080 double duration; 00081 MKConductor *conductor; 00082 id delegate; 00083 Class partPerformerClass; 00085 @private 00086 MKMsgStruct * _deactivateMsgPtr; 00087 } 00088 00093 + (MKScorePerformer *) scorePerformer; 00094 00102 - init; 00103 00112 - releasePartPerformers; 00113 00119 - removePartPerformers; 00120 00136 - setScore: (MKScore *) aScore; 00137 00142 - (MKScore *) score; 00143 00153 - activate; 00154 00165 - activateSelf; 00166 00173 - (void) deactivate; 00174 00182 - pause; 00183 00191 - resume; 00192 00202 - setFirstTimeTag: (double) aTimeTag; 00203 00213 - setLastTimeTag: (double) aTimeTag; 00214 00219 - (double) firstTimeTag; 00220 00225 - (double) lastTimeTag; 00226 00237 - setTimeShift: (double) aTimeShift; 00238 00248 - setDuration: (double) aDuration; 00249 00254 - (double) timeShift; 00255 00260 - (double) duration; 00261 00272 - copyWithZone: (NSZone *) zone; 00273 00274 /* Frees the receiver and its MKPartPerformers. */ 00275 - (void) dealloc; 00276 00282 - setConductor: (MKConductor *) aConductor; 00283 00295 - (MKPartPerformer *) partPerformerForPart: (MKPart *) aPart; 00296 00301 - (NSArray *) partPerformers; 00302 00312 - (NSArray *) noteSenders; 00313 00318 - (int) status; 00319 00332 - setPartPerformerClass: (Class) aPartPerformerSubclass; 00333 00340 - (Class) partPerformerClass; 00341 00347 - (void) setDelegate: (id) object; 00348 00354 - delegate; 00355 00363 - (void) encodeWithCoder: (NSCoder *) aCoder; 00364 00371 - (id) initWithCoder: (NSCoder *) aDecoder; 00372 00373 @end 00374 00375 /* Describes the protocol that may be implemented by the delegate: */ 00376 #import "MKPerformerDelegate.h" 00377 00378 #endif