WhiteNoiseInstrument.h

Go to the documentation of this file.
00001 //
00002 // WhiteNoiseInstrument.h -- Simple filtered noise instrument class.
00003 //  See the copyright notice and acknowledgment of authors in the file COPYRIGHT
00004 // 
00005 
00006 #ifndef INCLUDE_WhiteNoise_Instrument_H
00007 #define INCLUDE_WhiteNoise_Instrument_H
00008 
00009 #include "Instrument.h"
00010 #include "CSL_All.h"
00011 
00012 namespace csl  {
00013 
00014 enum {
00015                         // Global
00016     kNumParameters = 16,
00017                         // Parameters Tags
00018     kThresh = 0,        // Spectral filtering threshhold
00019     kWindowSize,        // Size of the FFT filtering window
00020     kNumBins,           // Number of spectral bins
00021     kOut,               // Output gain
00022     kNumParams
00023 };
00024 
00025 class WhiteNoiseInstrument : public Instrument {
00026 
00027 protected:              // These are the UGens of the DSP graph (i.e., the FM instrument)
00028     ADSR mAEnv;         // amplitude & filter frequency envelopes
00029     WhiteNoise mSig;    // White Noise signal
00030     Butter mLpfilter;   // This filters the white noise
00031     MulOp mAPul;        // the output and frequency value multiplier guys
00032 
00033 public:
00034     WhiteNoiseInstrument();
00035     ~WhiteNoiseInstrument();
00036     
00037 // Plug functions
00038 
00039     unsigned num_accessors();
00040     void get_accessors(Accessor **);
00041     void set_parameter(unsigned selector, void * value);
00042     void play_osc_note(char * types, void * args, char * endOfArgs);        
00043     void playMIDI(float dur, int chan, int key, int vel);   
00044 
00045 };
00046 
00047 }
00048 
00049 #endif

Generated on Sat Oct 17 14:12:32 2009 for CSL by  doxygen 1.4.5-20051010