00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00099 #ifndef __MK_Samples_H___
00100 #define __MK_Samples_H___
00101
00102 #import "MKWaveTable.h"
00103 #import <SndKit/SndKit.h>
00104
00105 @interface MKSamples : MKWaveTable
00106 {
00108 Snd *sound;
00110 NSString *soundfile;
00112 SndAudioProcessorChain *audioProcessorChain;
00113 int tableType;
00115 int curLoc;
00117 double amplitude;
00119 double panBearing;
00121 unsigned int startSampleLoc;
00123 unsigned int lastSampleLoc;
00124 }
00125
00126
00137 - init;
00138
00139
00140
00141 - (void) dealloc;
00142
00149 - copyWithZone: (NSZone *) zone;
00150
00156 - (BOOL) setSound: (Snd *) aSound;
00157
00169 - (BOOL) readSoundfile: (NSString *) aSoundfile;
00170
00175 - (Snd *) sound;
00176
00184 - (NSString *) soundfile;
00185
00199 - writeScorefileStream: (NSMutableData *) aStream;
00200
00201
00202
00203
00204
00205
00206
00207
00208
00217 - (void) encodeWithCoder: (NSCoder *) aCoder;
00218
00225 - (id) initWithCoder: (NSCoder *) aDecoder;
00226
00234 - (int) tableType;
00235
00239 - (void) setProcessingStartSample: (unsigned int) sampleNum;
00240
00244 - (unsigned int) processingStartSample;
00245
00249 - (void) setProcessingEndSample: (unsigned int) sampleNum;
00250
00254 - (unsigned int) processingEndSample;
00255
00259 - (unsigned int) currentSample;
00260
00264 - (void) setCurrentSample: (unsigned int) sampleNum;
00265
00269 - (double) amplitude;
00270
00274 - (void) setAmplitude: (double) amp;
00275
00279 - (void) setPanBearing: (double) newBearing;
00280
00284 - (double) panBearing;
00285
00290 - (SndAudioProcessorChain *) audioProcessorChain;
00291
00299 - setAudioProcessorChain: (SndAudioProcessorChain *) anAudioProcessorChain;
00300
00301
00302 - _fillTableLength: (int) aLength scale: (double) aScaling ;
00303
00304 @end
00305
00306 @interface MKSamples(OscTable)
00307
00325 - (DSPDatum *) dataDSPAsOscTableLength: (int) aLength;
00326
00344 - (double *) dataDoubleAsOscTableLength: (int) aLength;
00345
00346
00347
00348
00349
00350
00351
00352
00361 - (DSPDatum *) dataDSPAsOscTable;
00362
00372 - (double *) dataDoubleAsOscTable;
00373
00388 - fillOscTableLength: (int) aLength scale: (double) aScaling;
00389
00408 - fillTableLength: (int) aLength scale:(double)aScaling ;
00409
00410 @end
00411
00412 @interface MKSamples(ExcitationTable)
00413
00432 - (DSPDatum *) dataDSPAsExcitationTableLength: (unsigned int) aLength scale: (double) aScaling;
00433
00452 - (double *) dataDoubleAsExcitationTableLength: (unsigned int) aLength scale: (double) aScaling;
00453
00454
00455
00456
00457
00458
00459
00472 - (DSPDatum *) dataDSPAsExcitationTable;
00473
00487 - (DSPDatum *) dataDSPAsExcitationTableLength: (int) aLength;
00488
00502 - (DSPDatum *) dataDSPAsExcitationTableScale: (double) aScaling;
00503
00516 - (double *) dataDoubleAsExcitationTable;
00517
00531 - (double *) dataDoubleAsExcitationTableLength: (int) aLength;
00532
00546 - (double *) dataDoubleAsExcitationTableScale: (double) aScaling;
00547
00566 - fillExcitationTableLength: (int) aLength scale: (double) aScaling;
00567
00568 @end
00569
00570
00571 #endif