errors.h File Reference

#import <Foundation/Foundation.h>

Go to the source code of this file.

Defines

#define MK_TRACEORCHALLOC   1
 Trace Constants.
#define MK_TRACEPARS   2
#define MK_TRACEDSP   4
#define MK_TRACEMIDI   8
#define MK_TRACEPREEMPT   16
#define MK_TRACESYNTHINS   32
#define MK_TRACESYNTHPATCH   64
#define MK_TRACEUNITGENERATOR   128
#define MK_TRACECONDUCTOR   256
#define MK_TRACEDSPARRAYS   512

Typedefs

typedef enum _MKErrno MKErrno
 This enumeration defines the exceptions that the MusicKit can generate via the MKErrorCode() mechanism.

Enumerations

enum  _MKErrno {
  MK_musicKitErr = MK_ERRORBASE, MK_machErr, MK_cantOpenFileErr, MK_cantCloseFileErr,
  MK_outOfOrderErr, MK_samplesNoResampleErr, MK_noMoreTagsErr, MK_notScorefileObjectTypeErr,
  MK_orchBadFreeErr, MK_synthDataCantClearErr, MK_synthDataLoadErr, MK_synthDataReadonlyErr,
  MK_synthInsOmitNoteErr, MK_synthInsNoClass, MK_ugLoadErr, MK_ugBadArgErr,
  MK_ugBadAddrPokeErr, MK_ugBadDatumPokeErr, MK_ugOrchMismatchErr, MK_ugArgSpaceMismatchErr,
  MK_ugNonAddrErr, MK_ugNonDatumErr, MK_sfBadExprErr, MK_sfBadDefineErr,
  MK_sfBadParValErr, MK_sfNoNestDefineErr, MK_sfBadDeclErr, MK_sfMissingStringErr,
  MK_sfBadNoteTypeErr, MK_sfBadNoteTagErr, MK_sfMissingBackslashErr, MK_sfMissingSemicolonErr,
  MK_sfUndeclaredErr, MK_sfBadAssignErr, MK_sfBadIncludeErr, MK_sfBadParamErr,
  MK_sfNumberErr, MK_sfStringErr, MK_sfGlobalErr, MK_sfCantFindGlobalErr,
  MK_sfMulDefErr, MK_sfDuplicateDeclErr, MK_sfNotHereErr, MK_sfWrongTypeDeclErr,
  MK_sfBadHeaderStmtErr, MK_sfBadStmtErr, MK_sfBadInitErr, MK_sfNoTuneErr,
  MK_sfNoIncludeErr, MK_sfCantFindFileErr, MK_sfCantWriteErr, MK_sfOutOfOrderErr,
  MK_sfUnmatchedCommentErr, MK_sfInactiveNoteTagErr, MK_sfCantFindClass, MK_sfBoundsErr,
  MK_sfTypeConversionErr, MK_sfReadOnlyErr, MK_sfArithErr, MK_sfNonScorefileErr,
  MK_sfTooManyErrorsErr, MK_ugsNotSetRunErr, MK_ugsPowerOf2Err, MK_ugsNotSetGetErr,
  MK_spsCantGetMemoryErr, MK_spsSineROMSubstitutionErr, MK_spsInvalidPartialsDatabaseKeywordErr, MK_spsOutOfRangeErr,
  MK_spsCantGetUGErr, MK_synthDataCantReadDSPErr, MK_dspMonitorVersionError
}
 This enumeration defines the exceptions that the MusicKit can generate via the MKErrorCode() mechanism. More...

Functions

unsigned MKSetTrace (int traceCode)
 Turns on specified trace bit.
unsigned MKClearTrace (int traceCode)
 Turns off specified trace bit.
BOOL MKIsTraced (int traceCode)
 Returns whether specified trace bit is on.
void MKSetScorefileParseErrorAbort (int threshholdCount)
 Set the scorefile error threshhold, the number of parser errors to abort on.
void MKSetErrorProc (void(*errProc)(NSString *msg))
 Sets function to be used when MKError() and MKErrorCode() are called.
void MKError (NSString *msg)
 Calls the user's error procedure (aka function, set with MKSetErrorProc), if any, with one argument, the message. Otherwise, writes the message on the MusicKit error stream.
void MKSetErrorStream (NSMutableData *aStream)
 Sets the MusicKit error stream.
NSMutableData * MKErrorStream (void)
 Returns the MusicKit error stream. This is, by default, stderr.


Detailed Description


Define Documentation

#define MK_TRACECONDUCTOR   256

MKConductor time setting messages

#define MK_TRACEDSP   4

DSP manipulation

#define MK_TRACEDSPARRAYS   512

DSP array-setting messages

#define MK_TRACEMIDI   8

MIDI in/out/time warnings

#define MK_TRACEPARS   2

Application-defined parameters, when first encountered.

#define MK_TRACEPREEMPT   16

MKSynthPatch preemption

#define MK_TRACESYNTHINS   32

MKSynthInstrument mechanations

#define MK_TRACESYNTHPATCH   64

MKSynthPatch library messages

#define MK_TRACEUNITGENERATOR   128

MKUnitGenerator library messages


Typedef Documentation

typedef enum _MKErrno MKErrno

This enumeration defines the exceptions that the MusicKit can generate via the MKErrorCode() mechanism.

The errors are in six categories: general errors, representation errors, synthesis errors, scorefile errors, MKUnitGenerator library errors and MKSynthPatch library errors.


Enumeration Type Documentation

enum _MKErrno

This enumeration defines the exceptions that the MusicKit can generate via the MKErrorCode() mechanism.

The errors are in six categories: general errors, representation errors, synthesis errors, scorefile errors, MKUnitGenerator library errors and MKSynthPatch library errors.

Enumerator:
MK_musicKitErr  Used as a way of specifying MusicKit errors not otherwise defined.
MK_machErr  Used for errors from the operating system. For example, the MIDI object uses this error to report problems gaining access to the MIDI device.
MK_cantOpenFileErr  Warns that a file can't be opened.
MK_cantCloseFileErr  Warns that a file can't be closed.
MK_outOfOrderErr  Warns that notes were found in a scorefile with times out of order.
MK_samplesNoResampleErr  Samples class: Warns that the MKSamples object cannot change the sampling rate of a waveform by anything but a negative power of 2.
MK_noMoreTagsErr  Warns that the MusicKit has run out of noteTags.
MK_notScorefileObjectTypeErr  Warns that a class is specified in a scorefile as a scorefile object type; but that class does not implement the appropriate protocol to be used in that way.
MK_orchBadFreeErr  MKOrchestra class: Attempt to free a MKUnitGenerator that's in use.
MK_synthDataCantClearErr  MKSynthData class: A DSP error occurred when trying to clear a MKSynthData.
MK_synthDataLoadErr  MKSynthData class: A DSP error occurred when trying to load a MKSynthData.
MK_synthDataReadonlyErr  MKSynthData class: An attempt was made to set the value of a read-only MKSynthData.
MK_synthInsOmitNoteErr  MKSynthInstrument class: A MKNote had to be omitted.
MK_synthInsNoClass  MKSynthInstrument class: No MKSynthPatch class was set.
MK_ugLoadErr  MKUnitGenerator class: A DSP error occurred when loading a unit generator.
MK_ugBadArgErr  MKUnitGenerator class: A bad argument was specified. Probably a bug in a subclass.
MK_ugBadAddrPokeErr  MKUnitGenerator class: A DSP error occurred when trying to put an address in an argument.
MK_ugBadDatumPokeErr  MKUnitGenerator class: A DSP error occurred when trying to put a datum in an argument.
MK_ugOrchMismatchErr  MKUnitGenerator class: An attempt was made to set an argument to a MKSynthData from a different MKOrchestra.
MK_ugArgSpaceMismatchErr  MKUnitGenerator class: The memory space of an address-valued argument does not match the MKSynthData it was given.
MK_ugNonAddrErr  MKUnitGenerator class: An attempt was made to set a DSP unit generator argument to a datum value when that unit generator argument accepts only an address.
MK_ugNonDatumErr  MKUnitGenerator class: An attempt was made to set a DSP unit generator argument to an address value when that unit generator argument accepts only a datum.
MK_sfBadExprErr  Illegal expression.
MK_sfBadDefineErr  Illegal definition.
MK_sfBadParValErr  Illegal parameter value.
MK_sfNoNestDefineErr  Illegal nesting of definitions.
MK_sfBadDeclErr  Illegal declaration.
MK_sfMissingStringErr  Missing string where a string is required.
MK_sfBadNoteTypeErr  Illegal note type.
MK_sfBadNoteTagErr  Illegal (non-integer) note tag.
MK_sfMissingBackslashErr  Missing backslash.
MK_sfMissingSemicolonErr  Missing semicolon.
MK_sfUndeclaredErr  Undeclared symbol.
MK_sfBadAssignErr  Illegal assignment.
MK_sfBadIncludeErr  Illegal include.
MK_sfBadParamErr  Illegal parameter.
MK_sfNumberErr  Illegal number.
MK_sfStringErr  Illegal string.
MK_sfGlobalErr  Illegal global symbol.
MK_sfCantFindGlobalErr  Undefined global symbol.
MK_sfMulDefErr  Multiple definitions.
MK_sfDuplicateDeclErr  Duplicate declarations.
MK_sfNotHereErr  Something may not appear where it does appear.
MK_sfWrongTypeDeclErr  Something is declared where it should not be declared..
MK_sfBadHeaderStmtErr  Illegal header statement.
MK_sfBadStmtErr  Illegal body statement.
MK_sfBadInitErr  Illegal initialization.
MK_sfNoTuneErr  Illegal argument follows the tune construct.
MK_sfNoIncludeErr  Unused.
MK_sfCantFindFileErr  Can't find a file.
MK_sfCantWriteErr  Can't write a file.
MK_sfOutOfOrderErr  Times appear out of order in a file.
MK_sfUnmatchedCommentErr  comment without a matching endComment.
MK_sfInactiveNoteTagErr  A noteOff or noteUpdate appears for an inactive noteTag.
MK_sfCantFindClass  An Objective-C class is specified which can not be found.
MK_sfBoundsErr  Lookup value is out of bounds.
MK_sfTypeConversionErr  Illegal type conversion.
MK_sfReadOnlyErr  An attempt to set a read-only variable.
MK_sfArithErr  An arithmetic error, such as divide by zero.
MK_sfNonScorefileErr  An attempt to read a text file that is not a ScoreFile.
MK_sfTooManyErrorsErr  Too many errors have occurred -- aborting.
MK_ugsNotSetRunErr  MK_ugsNotSetRunErr Indicates a memory argument that needs to be set before run is sent.
MK_ugsPowerOf2Err  Indicates that a MKUnitGenerator that accepts only power-of-2 length MKSynthData was passed a MKSynthData of some other length.
MK_ugsNotSetGetErr  Indicates that a value was queried before a dependent value was set.
MK_spsCantGetMemoryErr  Indicates a MKSynthPatch cannot get enough DSP memory for some purpose.
MK_spsSineROMSubstitutionErr  Indicates a MKSynthPatch is substituting the sine ROM for the requested wavetable, due to a lack of DSP memory.
MK_spsInvalidPartialsDatabaseKeywordErr  Indicates an invalid keyword was passed to the MKTimbre data base.
MK_spsOutOfRangeErr  Indicates that a parameter is out of range.
MK_spsCantGetUGErr  Indicates that a MKSynthPatch can't allocate an MKUnitGenerator it needs. This can arise, for example, if a MKSynthPatch allocates MKUnitGenerators outside of its basic definition (i.e. outside of the patchTemplateFor: method.)
MK_synthDataCantReadDSPErr  MKSynthData class: Problem reading MKSynthData from DSP.
MK_dspMonitorVersionError  MKOrchestra class: Mismatch between DSP monitor version and MKOrchestra version.


Generated on Sat Dec 5 17:01:14 2009 for MusicKit by  doxygen 1.5.6