00001 /* 00002 $Id: MKMixerInstrument.h 3449 2009-04-04 16:52:47Z leighsmith $ 00003 Defined In: The MusicKit 00004 HEADER FILES: MusicKit.h 00005 00006 Description: 00007 See the headerdoc description below. 00008 00009 Original Author: David A. Jaffe, with Michael McNabb adding the 00010 enveloping and pitch transposition, the latter based on code 00011 provided by Julius Smith. Incorporation into the MusicKit framework, conversion 00012 to OpenStep and the SndKit by Leigh M. Smith. 00013 00014 Copyright (c) 1988-1992, NeXT Computer, Inc. 00015 Portions Copyright (c) 1994 NeXT Computer, Inc. and reproduced under license from NeXT 00016 Portions Copyright (c) 1994 Stanford University. 00017 Portions Copyright (c) 1999-2004 The MusicKit Project. 00018 */ 00042 #ifndef __MK_MixerInstrument_H___ 00043 #define __MK_MixerInstrument_H___ 00044 #import "MKInstrument.h" 00045 #import <SndKit/SndKit.h> 00046 00047 @interface MKMixerInstrument: MKInstrument 00048 { 00050 NSMutableDictionary *samplesToMix; 00052 unsigned int currentMixFrame; 00054 SndFormat soundFormat; 00056 Snd *sound; 00058 SndAudioProcessorChain *mixedProcessorChain; 00060 double defaultAmplitude; 00062 double defaultBearing; 00064 double defaultNewFrequency; 00066 double defaultOriginalFrequency; 00068 NSString *defaultFile; 00070 id defaultEnvelope; 00072 int defaultTimeScale; 00074 BOOL currentlyLooping; 00075 } 00076 00083 - (void) setSamplingRate: (double) aSrate; 00084 00091 - (void) setChannelCount: (int) chans; 00092 00097 - (Snd *) mixedSound; 00098 00102 - init; 00103 00104 - (void) dealloc; 00105 00114 - firstNote: (MKNote *) aNote; 00115 00122 - (BOOL) mixNewNote: (MKNote *) thisNote; 00123 00130 - (BOOL) mixNoteUpdate: (MKNote *) thisNote; 00131 00140 - realizeNote: (MKNote *) aNote fromNoteReceiver: (MKNoteReceiver *) aNoteReceiver; 00141 00149 - afterPerformance; 00150 00151 @end 00152 00153 #endif