MusicKit
0.0.0
|
00001 /* 00002 $Id$ 00003 Defined In: The MusicKit 00004 00005 Description: 00006 See class documentation below. 00007 00008 Original Author: David A. Jaffe 00009 00010 Copyright (c) 1988-1992, NeXT Computer, Inc. 00011 Portions Copyright (c) 1994 NeXT Computer, Inc. and reproduced under license from NeXT 00012 Portions Copyright (c) 1994 Stanford University 00013 Portions Copyright (c) 1999-2006, The MusicKit Project. 00014 */ 00045 #ifndef __MK_Score_H___ 00046 #define __MK_Score_H___ 00047 00048 #import <Foundation/NSObject.h> 00049 00050 @class MKNote; 00051 00062 typedef enum { 00063 MK_UNRECOGNIZEDFORMAT, 00064 MK_MIDIFILE, 00065 MK_SCOREFILE, 00066 MK_PLAYSCORE, 00067 MK_MUSICXML 00068 } MKScoreFormat; 00069 00070 @interface MKScore: NSObject 00071 { 00073 NSMutableArray *parts; 00075 NSMutableData *scorefilePrintStream; 00077 MKNote *info; 00078 } 00079 00088 - init; 00089 00093 - (void) dealloc; 00094 00095 /* 00096 Removes and releases the MKNotes contained in the receiver's MKParts. 00097 Also releases the receiver's info MKNote. Returns the receiver. 00098 */ 00099 - releaseNotes; 00100 00104 - (void) removeAllParts; 00105 00114 - readScorefile: (NSString *) fileName; 00115 00124 - readScorefileStream: (NSData *) stream; 00125 00138 - readScorefile: (NSString *) fileName 00139 firstTimeTag: (double) firstTimeTag 00140 lastTimeTag: (double) lastTimeTag 00141 timeShift: (double) timeShift; 00142 00155 - readScorefileStream: (NSData *) stream 00156 firstTimeTag: (double) firstTimeTag 00157 lastTimeTag: (double) lastTimeTag 00158 timeShift: (double) timeShift; 00159 00168 - writeScorefile: (NSString *) aFileName; 00169 00179 - writeScorefileStream: (NSMutableData *) aStream; 00180 00193 - writeScorefile: (NSString *) aFileName 00194 firstTimeTag: (double) firstTimeTag 00195 lastTimeTag: (double) lastTimeTag 00196 timeShift: (double) timeShift; 00197 00210 - writeScorefileStream: (NSMutableData *) aStream 00211 firstTimeTag: (double) firstTimeTag 00212 lastTimeTag: (double) lastTimeTag 00213 timeShift: (double) timeShift; 00214 00223 - writeOptimizedScorefile: (NSString *) aFileName; 00224 00232 - writeOptimizedScorefileStream: (NSMutableData *) aStream; 00233 00246 - writeOptimizedScorefile: (NSString *) aFileName 00247 firstTimeTag: (double) firstTimeTag 00248 lastTimeTag: (double) lastTimeTag 00249 timeShift: (double) timeShift; 00250 00260 - writeOptimizedScorefileStream: (NSMutableData *) aStream 00261 firstTimeTag: (double) firstTimeTag 00262 lastTimeTag: (double) lastTimeTag; 00263 00276 - writeOptimizedScorefileStream: (NSMutableData *) aStream 00277 firstTimeTag: (double) firstTimeTag 00278 lastTimeTag: (double) lastTimeTag 00279 timeShift: (double) timeShift; 00280 00295 - readMidifile: (NSString *) aFileName 00296 firstTimeTag: (double) firstTimeTag 00297 lastTimeTag: (double) lastTimeTag 00298 timeShift: (double) timeShift; 00299 00313 - readMidifileStream: (NSMutableData *) aStream 00314 firstTimeTag: (double) firstTimeTag 00315 lastTimeTag: (double) lastTimeTag 00316 timeShift: (double) timeShift; 00317 00327 - readMidifile: (NSString *) fileName; 00328 00369 - readMidifileStream: (NSMutableData *) aStream; 00370 00384 - writeMidifile: (NSString *) aFileName 00385 firstTimeTag: (double) firstTimeTag 00386 lastTimeTag: (double) lastTimeTag 00387 timeShift: (double) timeShift; 00388 00400 - writeMidifileStream: (NSMutableData *) aStream 00401 firstTimeTag: (double) firstTimeTag 00402 lastTimeTag: (double) lastTimeTag 00403 timeShift: (double) timeShift; 00404 00410 - writeMidifileStream: (NSMutableData *) aStream; 00411 00429 - writeMidifile: (NSString *) aFileName; 00430 00435 - (unsigned) noteCount; 00436 00449 - (MKPart *) replacePart: (MKPart *) oldPart with: (MKPart *) newPart; 00450 00458 - addPart: (MKPart *) aPart; 00459 00465 - removePart: (MKPart *) aPart; 00466 00472 - shiftTime: (double) shift; 00473 00479 - scaleTime: (double) scale; 00480 00487 - (double) earliestNoteTime; 00488 00494 - (BOOL) isPartPresent: (MKPart *) aPart; 00495 00506 - (MKPart *) midiPart: (int) aChan; 00507 00512 - (unsigned) partCount; 00513 00520 - (NSMutableArray *) parts; 00521 00526 - (MKPart *) partAtIndex: (NSUInteger) partIndex; 00527 00534 - (MKPart *) partTitled: (NSString *) partTitleToFind; 00535 00541 - (MKPart *) partNamed: (NSString *) partNameToFind; 00542 00547 - (NSArray *) notes; 00548 00554 - (NSArray *) notesBetweenFirstTimeTag: (double) firstTimeTag 00555 lastTimeTag: (double) lastTimeTag; 00556 00560 - combineNotes; 00561 00569 - copyWithZone: (NSZone *) zone; 00570 00577 - (void) setInfoNote: (MKNote *) aNote; 00578 00583 - (MKNote *) infoNote; 00584 00589 - (void) setScorefilePrintStream: (NSMutableData *) aStream; 00590 00595 - (NSMutableData *) scorefilePrintStream; 00596 00597 /* 00598 You never send this message directly. 00599 Archives MKNotes and info. 00600 */ 00601 - (void) encodeWithCoder: (NSCoder *) aCoder; 00602 00603 /* 00604 You never send this message directly. 00605 Note that -init is not sent to newly unarchived objects. 00606 See write:. 00607 00608 Maps noteTags as represented in the archive file onto a set that is 00609 unused in the current application. This insures that the integrity 00610 of the noteTag is maintained. The noteTags of all MKParts in the MKScore are 00611 considered part of a single noteTag space. 00612 */ 00613 - (id) initWithCoder: (NSCoder *) aDecoder; 00614 00648 + setMidifilesEvaluateTempo: (BOOL) yesOrNo; 00649 00656 + (BOOL) midifilesEvaluateTempo; 00657 00663 + (NSArray *) midifileExtensions; 00664 00670 + (NSArray *) scorefileExtensions; 00671 00676 + (void) setAlternativeScorefileExtensions: (NSArray *) otherScoreFileExtensions; 00677 00684 + (NSArray *) fileExtensions; 00685 00693 + (NSArray *) bundleExtensions; 00694 00699 + (MKScore *) score; 00700 00706 + (MKScoreFormat) scoreFormatOfData: (NSData *) fileData; 00707 00713 + (MKScoreFormat) scoreFormatOfFile: (NSString *) filename; 00714 00724 - writeScorefile: (NSString *) aFileName 00725 firstTimeTag: (double) firstTimeTag 00726 lastTimeTag: (double) lastTimeTag; 00727 00737 - writeScorefileStream: (NSMutableData *) aStream 00738 firstTimeTag: (double) firstTimeTag 00739 lastTimeTag: (double) lastTimeTag; 00740 00750 - readScorefile: (NSString *) fileName 00751 firstTimeTag: (double) firstTimeTag 00752 lastTimeTag: (double) lastTimeTag; 00753 00763 - readScorefileStream: (NSMutableData *) stream 00764 firstTimeTag: (double) firstTimeTag 00765 lastTimeTag: (double) lastTimeTag; 00766 00776 - writeOptimizedScorefile: (NSString *) aFileName 00777 firstTimeTag: (double) firstTimeTag 00778 lastTimeTag: (double) lastTimeTag; 00779 00793 - readMidifile: (NSString *) aFileName 00794 firstTimeTag: (double) firstTimeTag 00795 lastTimeTag: (double) lastTimeTag; 00796 00807 - readMidifileStream: (NSMutableData *) aStream 00808 firstTimeTag: (double) firstTimeTag 00809 lastTimeTag: (double) lastTimeTag; 00810 00821 - writeMidifile: (NSString *) aFileName 00822 firstTimeTag: (double) firstTimeTag 00823 lastTimeTag: (double) lastTimeTag; 00824 00834 - writeMidifileStream: (NSMutableData *) aStream 00835 firstTimeTag: (double) firstTimeTag 00836 lastTimeTag: (double) lastTimeTag; 00837 00838 @end 00839 00840 #endif