download _scorefile.h
Language: C
Copyright: (c) 1988-1992, NeXT Computer, Inc. (c) 1999-2005, The MusicKit Project. (c) 1994 NeXT Computer, Inc. and reproduced under license from NeXT (c) 1994 Stanford University
LOC: 67
Project Info
The MusicKit(musickit)
Server: SourceForge
Type: cvs
...sicKit\Frameworks\MusicKit\
   _ArielQP.h
   _DSPMK.h
   _error.h
   _midi.h
   _MKAppProxy.h
   _MKAppProxy.m
   _MKNameTable.h
   _MKNameTable.m
   _MKParameter.h
   _MTCHelper.h
   _MTCHelper.m
   _musickit.h
   _noteRecorder.h
   _OrchloopbeginUG.h
   _OrchloopbeginUG.m
   _ParName.h
   _ParName.m
   _scorefile.h
   _ScorefileVar.h
   _ScorefileVar.m
   _SharedSynthInfo.h
   _SharedSynthInfo.m
   _synthElementMethods.m
   _time.h
   ArielQP.h
   ArielQP.m
   classFuncs.h
   ConductorPrivate.h
   dsp_types.h
   DSPSerialPortDevice.h
   dspwrap.h
   EnvelopePrivate.h
   equalTempered.m
   errors.h
   fastFFT.c
   fastFFT.h
   GNUmakefile.postamble
   GNUmakefile.preamble.in
   InstrumentPrivate.h
   keynums.h
   libMusicKit.def
   Localized.strings
   make.sh
   Makefile.postamble
   Makefile.preamble
   midi_spec.h
   midifile.h
   midifile.m
   MidiPrivate.h
   midiTranslation.h
   MKConductor.h
   MKConductor.m
   MKConductorDelegate.h
   MKDeviceStatus.h
   MKEnvelope.h
   MKEnvelope.m
   MKFilePerformer.h
   MKFilePerformer.m
   MKFileWriter.h
   MKFileWriter.m
   MKInstrument.h
   MKInstrument.m
   MKMidi.h
   MKMidi.m
   MKMixerInstrument.h
   MKMixerInstrument.m
   MKMTCPerformer.h
   MKMTCPerformer.m
   MKNote.h
   MKNoteFilter.h
   MKNoteFilter.m
   MKNoteReceiver.h
   MKNoteReceiver.m
   MKNoteSender.h
   MKNoteSender.m
   MKOrchestra.h
   MKPart.m
   MKPartials.h
   MKPartials.m
   ...tialsWaveshapingTable.m
   MKPartPerformer.h
   MKPartPerformer.m
   MKPartRecorder.h
   MKPartRecorder.m
   MKPatch.h
   MKPatch.m
   MKPatchConnection.h
   MKPatchConnection.m
   MKPatchEntry.h
   MKPatchEntry.m
   MKPatchTemplate.h
   MKPatchTemplate.m
   MKPerformer.h
   MKPerformer.m
   MKPerformerDelegate.h
   MKPlugin.h
   MKSamplerInstrument.h
   MKSamplerInstrument.m
   MKSamples.h
   MKScore.h
   MKScore.m
   MKScorefileObject.h
   MKScorefilePerformer.h
   MKScorefilePerformer.m
   MKScorefileWriter.m
   MKScorePerformer.h
   MKScorePerformer.m
   MKScoreRecorder.h
   MKScoreRecorder.m
   MKSynthData.h
   MKSynthData.m
   MKSynthInstrument.h
   MKSynthPatch.h
   MKTimbre.h
   MKTimbre.m
   MKTuningSystem.h
   MKTuningSystem.m
   MKUnitGenerator.h
   MKUnitGenerator.m
   MKWaveTable.h
   MKWaveTable.m
   mtcMidi.m
   mtcMidiPrivate.m
   MusicKit-Info.plist
   MusicKit.h
   MusicKitConfig.h.in
   names.h
   noDVal.h
   noteDispatcherMethods.m
   NotePrivate.h
   noteRecorderCFuncs.m
   noteRecorderMethods.m
   orch.h
   OrchestraPrivate.h
   OrchloopbeginUG.h
   OrchloopbeginUG.m
   orchloopbeginUGInclude.m
   params.h
   parNames.m
   partialsDBInclude.m
   PartialsPrivate.h
   PartPerformerPrivate.h
   PartPrivate.h
   PartRecorderPrivate.h
   PatchTemplatePrivate.h
   PB.project
   PerformerPrivate.h
   pitches.h
   platform.make
   ...efilePerformerPrivate.h
   ScorePerformerPrivate.h
   ScorePrivate.h
   ScoreRecorderPrivate.h
   SynthDataPrivate.h
   synthElementCFuncs.m
   synthElementMethods.m
   SynthInstrumentPrivate.h
   SynthPatchList.h
   SynthPatchList.m
   SynthPatchPrivate.h
   timetagInclude.m
   timeunits.h
   tokenNames.m
   tokens.h
   trigonometry.c
   trigonometry.h
   TuningSystemPrivate.h
   UnitGeneratorPrivate.h
   win32-def.top
   writeBinary.m
   writeMidi.m
   writeScore.m

/*
  $Id: _scorefile.h,v 1.8 2006/02/05 17:57:10 leighsmith Exp $
  Defined In: The MusicKit
  Description:
    Functions for writing and reading text and binary score files.

  Original Author: David A. Jaffe

  Copyright (c) 1988-1992, NeXT Computer, Inc.
  Portions Copyright (c) 1994 NeXT Computer, Inc. and reproduced under license from NeXT
  Portions Copyright (c) 1994 Stanford University  
  Portions Copyright (c) 1999-2005, The MusicKit Project.
*/

#ifndef __MK__scorefile_H___
#define __MK__scorefile_H___

#import <Foundation/Foundation.h>

#import "_MKNameTable.h"

typedef struct __MKScoreInStruct { 
    double timeTag;                 /* Time of most recently read note. */
    id part;                        /* part to which current note goes.*/
    BOOL isInBody;                  /* YES if we've already parsed the header 
				     */
    NSMutableData *printStream;          /* Stream used for scorefile print output */
    BOOL _freeStream;               /* YES if stream was auto-created to
				       go to stderr */
    void *_parsePtr;                /* Private pointer to parse state. */
    _MKNameTable *_symbolTable;     /* Private symbol table used for parse. */
    NSMutableDictionary *_noteTagTable; /* Private map to unique set of noteTags.*/
    int _fileHighTag,_fileLowTag;   /* Private. Tag range. */
    int _newLowTag;                 /* Private. Tag base for noteTag map. */
    id _aNote;                      /* Private. parser 'owns' note. */
    char *_ranState;                /* Private. So each file has its own random
				       sequence. */
    id _owner;                      /* Private. Where to put part decls. */
    int _errCount;                  /* Error count. */
    NSMutableArray *_binaryIndexedObjects; /* List of indexed objects. */
    BOOL _binary;
    void *_repeatStack;
} _MKScoreInStruct;

typedef struct __MKScoreOutStruct { 
    double timeTag;                  /* Time of most recently written note,
				        including timeShift. */
    BOOL isInBody;                   /* YES if first note has been written. */
    NSMutableData *_stream;          /* The output file. */
    id _owner;                       /* Private */
    _MKNameTable *_nameTable;        /* Private */
    BOOL _ownerIsNoteRecorder;       /* Private. */
    double _timeShift;               /* Added to time tags before writing. */ 
    long _tagRangePos;
    NSMapTable *_binaryIndecies;     /* For encoding objects in binary files. (mapping from object to index) */
    int _highBinaryIndex;            /* Currently highest index. */
    BOOL _binary;
} _MKScoreOutStruct;

/* Functions for writing score files: */
extern _MKScoreOutStruct *
_MKInitScoreOut(NSMutableData *fileStream, id owner, MKNote *anInfoNote,
		  double timeShift, BOOL isNoteRecorder, BOOL binary);
extern _MKScoreOutStruct *
  _MKWritePartDecl(MKPart *part, _MKScoreOutStruct *p, MKNote *aPartInfo);
extern _MKScoreOutStruct *
  _MKWriteNote(MKNote *aNote, MKPart *aPart, _MKScoreOutStruct *scoreWPtr);
extern _MKScoreOutStruct *
  _MKFinishScoreOut(_MKScoreOutStruct *scoreWPtr, BOOL writeEnd);

/* Functions for reading score files: */
extern void _MKParseScoreHeader(_MKScoreInStruct *scorefileRPtr);
extern _MKScoreInStruct *_MKNewScoreInStruct(NSData *aStream,id owner,
                    NSMutableData *printStream,
                    BOOL mergeParts,NSString *name,unsigned int *pointer);
extern BOOL _MKParseScoreHeaderStmt(_MKScoreInStruct *scorefileRPtr);
extern id _MKParseScoreNote(_MKScoreInStruct * scorefileRPtr);
extern _MKScoreInStruct *_MKFinishScoreIn(_MKScoreInStruct *scorefileRPtr);

extern const char *_MKTranstab(); /* defined in parseScore.m */

/* functions for writing binary scorefiles */
extern void _MKWriteIntPar(NSMutableData *aStream,int anInt);
extern void _MKWriteDoublePar(NSMutableData *aStream,double aDouble);
extern void _MKWriteStringPar(NSMutableData *aStream,NSString *aString);
extern void _MKWriteVarPar(NSMutableData *aStream,NSString *aString);
extern void _MKWriteInt(NSMutableData *aStream,int anInt);
extern void _MKWriteShort(NSMutableData *aStream,short anShort);
extern void _MKWriteDouble(NSMutableData *aStream,double aDouble);
extern void _MKWriteChar(NSMutableData *aStream,char aChar);
extern void _MKWriteString(NSMutableData *aStream,char *aString);
extern void _MKWriteNSString(NSMutableData *aStream,NSString *aString);
extern void _MKWriteFloat(NSMutableData *aStream,float aFloat);

#define _MK_BINARYSCOREFILEEXT @"playscore"
#define _MK_SCOREFILEEXT @"score"

#endif

About Koders | Resources | Downloads | Support | Black Duck | Submit Project | Terms of Service | DMCA | Privacy Policy | Site Map| Contact Us